/* trf-persona-store.c generated by valac 0.24.0, the Vala compiler
 * generated from trf-persona-store.vala, do not modify */

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

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


#define TRF_TYPE_FIELDS (trf_fields_get_type ())

#define TRF_TYPE_AFFL_INFO_FIELDS (trf_affl_info_fields_get_type ())

#define TRF_TYPE_POSTAL_ADDRESS_FIELDS (trf_postal_address_fields_get_type ())

#define TRF_TYPE_URLS_FIELDS (trf_urls_fields_get_type ())

#define TRF_TYPE_ROLE_FIELDS (trf_role_fields_get_type ())

#define TRF_TYPE_IM_FIELDS (trf_im_fields_get_type ())

#define TRF_TYPE_PHONE_FIELDS (trf_phone_fields_get_type ())

#define TRF_TYPE_EMAIL_FIELDS (trf_email_fields_get_type ())

#define TRF_TYPE_TAG_FIELDS (trf_tag_fields_get_type ())

#define TRF_TYPE_ATTRIB (trf_attrib_get_type ())

#define TRF_TYPE_PERSONA_STORE (trf_persona_store_get_type ())
#define TRF_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRF_TYPE_PERSONA_STORE, TrfPersonaStore))
#define TRF_PERSONA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRF_TYPE_PERSONA_STORE, TrfPersonaStoreClass))
#define TRF_IS_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRF_TYPE_PERSONA_STORE))
#define TRF_IS_PERSONA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRF_TYPE_PERSONA_STORE))
#define TRF_PERSONA_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRF_TYPE_PERSONA_STORE, TrfPersonaStoreClass))

typedef struct _TrfPersonaStore TrfPersonaStore;
typedef struct _TrfPersonaStoreClass TrfPersonaStoreClass;
typedef struct _TrfPersonaStorePrivate TrfPersonaStorePrivate;

#define TRF_TYPE_PERSONA (trf_persona_get_type ())
#define TRF_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRF_TYPE_PERSONA, TrfPersona))
#define TRF_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRF_TYPE_PERSONA, TrfPersonaClass))
#define TRF_IS_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRF_TYPE_PERSONA))
#define TRF_IS_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRF_TYPE_PERSONA))
#define TRF_PERSONA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRF_TYPE_PERSONA, TrfPersonaClass))

typedef struct _TrfPersona TrfPersona;
typedef struct _TrfPersonaClass TrfPersonaClass;

#define TYPE_RESOURCES (resources_get_type ())
#define RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_RESOURCES, Resources))
#define IS_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_RESOURCES))
#define RESOURCES_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_RESOURCES, ResourcesIface))

typedef struct _Resources Resources;
typedef struct _ResourcesIface ResourcesIface;

#define TYPE_RESOURCES_PROXY (resources_proxy_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_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 __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))
#define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
typedef struct _TrfPersonaStoreAddPersonaFromDetailsData TrfPersonaStoreAddPersonaFromDetailsData;
typedef struct _TrfPersonaStoreRemovePersonaData TrfPersonaStoreRemovePersonaData;
typedef struct _TrfPersonaStoreRemoveAttributesFromPersonaData TrfPersonaStoreRemoveAttributesFromPersonaData;
typedef struct _TrfPersonaStoreBuildUpdateQuerySetData TrfPersonaStoreBuildUpdateQuerySetData;
typedef struct _TrfPersonaStoreRemoveAttributesData TrfPersonaStoreRemoveAttributesData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TrfPersonaStorePrepareData TrfPersonaStorePrepareData;
typedef struct _TrfPersonaStoreBuildPredicatesTableData TrfPersonaStoreBuildPredicatesTableData;
#define _g_variant_iter_free0(var) ((var == NULL) ? NULL : (var = (g_variant_iter_free (var), NULL)))
typedef struct _TrfPersonaStoreHandleEventsData TrfPersonaStoreHandleEventsData;

#define TYPE_EVENT (event_get_type ())
typedef struct _Event Event;
typedef struct _TrfPersonaStoreHandleDeleteEventsData TrfPersonaStoreHandleDeleteEventsData;
typedef struct _TrfPersonaStoreHandleInsertEventsData TrfPersonaStoreHandleInsertEventsData;
typedef struct _TrfPersonaStoreDoAddContactsData TrfPersonaStoreDoAddContactsData;

#define TRF_TYPE_AFFL_INFO (trf_affl_info_get_type ())
#define TRF_AFFL_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRF_TYPE_AFFL_INFO, TrfAfflInfo))
#define TRF_AFFL_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRF_TYPE_AFFL_INFO, TrfAfflInfoClass))
#define TRF_IS_AFFL_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRF_TYPE_AFFL_INFO))
#define TRF_IS_AFFL_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRF_TYPE_AFFL_INFO))
#define TRF_AFFL_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRF_TYPE_AFFL_INFO, TrfAfflInfoClass))

typedef struct _TrfAfflInfo TrfAfflInfo;
typedef struct _TrfAfflInfoClass TrfAfflInfoClass;
typedef struct _TrfAfflInfoPrivate TrfAfflInfoPrivate;
typedef struct _TrfPersonaStoreDoUpdateData TrfPersonaStoreDoUpdateData;
typedef struct _TrfPersonaStoreGetPropertyData TrfPersonaStoreGetPropertyData;
typedef struct _TrfPersonaStoreGetNaoPropertyByPersonIdData TrfPersonaStoreGetNaoPropertyByPersonIdData;
typedef struct _TrfPersonaStoreGetNaoPropertyByPropIdData TrfPersonaStoreGetNaoPropertyByPropIdData;
typedef struct _TrfPersonaStoreGetAfflInfoData TrfPersonaStoreGetAfflInfoData;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _TrfPersonaStoreInsertPersonaData TrfPersonaStoreInsertPersonaData;
typedef struct _TrfPersonaStoreSingleValueQueryData TrfPersonaStoreSingleValueQueryData;
typedef struct _TrfPersonaStoreMultiValueQueryData TrfPersonaStoreMultiValueQueryData;
typedef struct _TrfPersonaStoreUrnFromTrackerIdData TrfPersonaStoreUrnFromTrackerIdData;
typedef struct _TrfPersonaStoreSetNicknameData TrfPersonaStoreSetNicknameData;
typedef struct _TrfPersonaStoreSetLocalIdsData TrfPersonaStoreSetLocalIdsData;
typedef struct _TrfPersonaStoreSetWebServiceAddrsData TrfPersonaStoreSetWebServiceAddrsData;
typedef struct _TrfPersonaStoreSetTrackerPropertyData TrfPersonaStoreSetTrackerPropertyData;
typedef struct _TrfPersonaStoreSetIsFavouriteData TrfPersonaStoreSetIsFavouriteData;
typedef struct _TrfPersonaStoreSetEmailsData TrfPersonaStoreSetEmailsData;
typedef struct _TrfPersonaStoreSetPhonesData TrfPersonaStoreSetPhonesData;
typedef struct _TrfPersonaStoreSetUniqueAttribSetData TrfPersonaStoreSetUniqueAttribSetData;
typedef struct _TrfPersonaStoreSetUrlsData TrfPersonaStoreSetUrlsData;
typedef struct _TrfPersonaStoreSetImAddressesData TrfPersonaStoreSetImAddressesData;
typedef struct _TrfPersonaStoreSetPostalAddressesData TrfPersonaStoreSetPostalAddressesData;
typedef struct _TrfPersonaStoreSetRolesData TrfPersonaStoreSetRolesData;
typedef struct _TrfPersonaStoreSetNotesData TrfPersonaStoreSetNotesData;
typedef struct _TrfPersonaStoreSetBirthdayData TrfPersonaStoreSetBirthdayData;
typedef struct _TrfPersonaStoreSetGenderData TrfPersonaStoreSetGenderData;
typedef struct _TrfPersonaStoreSetAvatarData TrfPersonaStoreSetAvatarData;
typedef struct _TrfPersonaStoreSetStructuredNameData TrfPersonaStoreSetStructuredNameData;
typedef struct _TrfPersonaStoreSetFullNameData TrfPersonaStoreSetFullNameData;
typedef struct _TrfPersonaStoreSetAttribSetData TrfPersonaStoreSetAttribSetData;
typedef struct _TrfPersonaStoreTrackerUpdateData TrfPersonaStoreTrackerUpdateData;
typedef struct _TrfPersonaStoreAffiliationsFromPersonaData TrfPersonaStoreAffiliationsFromPersonaData;
typedef struct _TrfPersonaStorePhonesFromAffiliationData TrfPersonaStorePhonesFromAffiliationData;
typedef struct _TrfPersonaStorePostalsFromAffiliationData TrfPersonaStorePostalsFromAffiliationData;
typedef struct _TrfPersonaStoreImaddrsFromAffiliationData TrfPersonaStoreImaddrsFromAffiliationData;
typedef struct _TrfPersonaStoreEmailsFromAffiliationData TrfPersonaStoreEmailsFromAffiliationData;
typedef struct _TrfPersonaStoreResourceUsageCountData TrfPersonaStoreResourceUsageCountData;
typedef struct _TrfPersonaStoreDeleteResourceData TrfPersonaStoreDeleteResourceData;
typedef struct _TrfPersonaStoreLinkedResourcesData TrfPersonaStoreLinkedResourcesData;
typedef struct _TrfPersonaStoreUrnFromPersonaData TrfPersonaStoreUrnFromPersonaData;
typedef struct _TrfPersonaStoreUrnFromPropertyData TrfPersonaStoreUrnFromPropertyData;

typedef enum  {
	TRF_FIELDS_TRACKER_ID,
	TRF_FIELDS_FULL_NAME,
	TRF_FIELDS_FAMILY_NAME,
	TRF_FIELDS_GIVEN_NAME,
	TRF_FIELDS_ADDITIONAL_NAMES,
	TRF_FIELDS_PREFIXES,
	TRF_FIELDS_SUFFIXES,
	TRF_FIELDS_NICKNAME,
	TRF_FIELDS_BIRTHDAY,
	TRF_FIELDS_AVATAR_URL,
	TRF_FIELDS_IM_ADDRESSES,
	TRF_FIELDS_PHONES,
	TRF_FIELDS_EMAILS,
	TRF_FIELDS_URLS,
	TRF_FIELDS_FAVOURITE,
	TRF_FIELDS_CONTACT_URN,
	TRF_FIELDS_ROLES,
	TRF_FIELDS_NOTE,
	TRF_FIELDS_GENDER,
	TRF_FIELDS_POSTAL_ADDRESS,
	TRF_FIELDS_LOCAL_IDS_PROPERTY
} TrfFields;

typedef enum  {
	TRF_AFFL_INFO_FIELDS_IM_TRACKER_ID,
	TRF_AFFL_INFO_FIELDS_IM_PROTOCOL,
	TRF_AFFL_INFO_FIELDS_IM_ACCOUNT_ID,
	TRF_AFFL_INFO_FIELDS_AFFL_TRACKER_ID,
	TRF_AFFL_INFO_FIELDS_AFFL_ROLE,
	TRF_AFFL_INFO_FIELDS_AFFL_ORG,
	TRF_AFFL_INFO_FIELDS_AFFL_TITLE,
	TRF_AFFL_INFO_FIELDS_AFFL_POBOX,
	TRF_AFFL_INFO_FIELDS_AFFL_DISTRICT,
	TRF_AFFL_INFO_FIELDS_AFFL_COUNTY,
	TRF_AFFL_INFO_FIELDS_AFFL_LOCALITY,
	TRF_AFFL_INFO_FIELDS_AFFL_POSTALCODE,
	TRF_AFFL_INFO_FIELDS_AFFL_STREET_ADDRESS,
	TRF_AFFL_INFO_FIELDS_AFFL_ADDRESS_LOCATION,
	TRF_AFFL_INFO_FIELDS_AFFL_EXTENDED_ADDRESS,
	TRF_AFFL_INFO_FIELDS_AFFL_COUNTRY,
	TRF_AFFL_INFO_FIELDS_AFFL_REGION,
	TRF_AFFL_INFO_FIELDS_AFFL_EMAIL,
	TRF_AFFL_INFO_FIELDS_AFFL_PHONE,
	TRF_AFFL_INFO_FIELDS_AFFL_WEBSITE,
	TRF_AFFL_INFO_FIELDS_AFFL_BLOG,
	TRF_AFFL_INFO_FIELDS_AFFL_URL,
	TRF_AFFL_INFO_FIELDS_IM_NICKNAME
} TrfAfflInfoFields;

typedef enum  {
	TRF_POSTAL_ADDRESS_FIELDS_TRACKER_ID,
	TRF_POSTAL_ADDRESS_FIELDS_POBOX,
	TRF_POSTAL_ADDRESS_FIELDS_DISTRICT,
	TRF_POSTAL_ADDRESS_FIELDS_COUNTY,
	TRF_POSTAL_ADDRESS_FIELDS_LOCALITY,
	TRF_POSTAL_ADDRESS_FIELDS_POSTALCODE,
	TRF_POSTAL_ADDRESS_FIELDS_STREET_ADDRESS,
	TRF_POSTAL_ADDRESS_FIELDS_ADDRESS_LOCATION,
	TRF_POSTAL_ADDRESS_FIELDS_EXTENDED_ADDRESS,
	TRF_POSTAL_ADDRESS_FIELDS_COUNTRY,
	TRF_POSTAL_ADDRESS_FIELDS_REGION
} TrfPostalAddressFields;

typedef enum  {
	TRF_URLS_FIELDS_TRACKER_ID,
	TRF_URLS_FIELDS_BLOG,
	TRF_URLS_FIELDS_WEBSITE,
	TRF_URLS_FIELDS_URL
} TrfUrlsFields;

typedef enum  {
	TRF_ROLE_FIELDS_TRACKER_ID,
	TRF_ROLE_FIELDS_ROLE,
	TRF_ROLE_FIELDS_DEPARTMENT,
	TRF_ROLE_FIELDS_TITLE
} TrfRoleFields;

typedef enum  {
	TRF_IM_FIELDS_TRACKER_ID,
	TRF_IM_FIELDS_PROTO,
	TRF_IM_FIELDS_ID,
	TRF_IM_FIELDS_IM_NICKNAME
} TrfIMFields;

typedef enum  {
	TRF_PHONE_FIELDS_TRACKER_ID,
	TRF_PHONE_FIELDS_PHONE
} TrfPhoneFields;

typedef enum  {
	TRF_EMAIL_FIELDS_TRACKER_ID,
	TRF_EMAIL_FIELDS_EMAIL
} TrfEmailFields;

typedef enum  {
	TRF_TAG_FIELDS_TRACKER_ID
} TrfTagFields;

typedef enum  {
	TRF_ATTRIB_EMAILS,
	TRF_ATTRIB_PHONES,
	TRF_ATTRIB_URLS,
	TRF_ATTRIB_IM_ADDRESSES,
	TRF_ATTRIB_POSTAL_ADDRESSES
} TrfAttrib;

struct _TrfPersonaStore {
	FolksPersonaStore parent_instance;
	TrfPersonaStorePrivate * priv;
};

struct _TrfPersonaStoreClass {
	FolksPersonaStoreClass parent_class;
};

struct _ResourcesIface {
	GTypeInterface parent_iface;
};

struct _TrfPersonaStorePrivate {
	GeeHashMap* _personas;
	GeeMap* _personas_ro;
	gboolean _is_prepared;
	gboolean _prepare_pending;
	gboolean _is_quiescent;
	Resources* _resources_object;
	TrackerSparqlConnection* _connection;
};

struct _TrfPersonaStoreAddPersonaFromDetailsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	GHashTable* details;
	FolksPersona* result;
	GLoadableIcon* avatar;
	TrackerSparqlBuilder* builder;
	TrackerSparqlBuilder* _tmp0_;
	TrackerSparqlBuilder* _tmp1_;
	TrackerSparqlBuilder* _tmp2_;
	TrackerSparqlBuilder* _tmp3_;
	TrackerSparqlBuilder* _tmp4_;
	GHashTable* _tmp5_;
	GList* _tmp6_;
	GList* k_collection;
	GList* k_it;
	const gchar* k;
	GValue* v;
	GHashTable* _tmp7_;
	const gchar* _tmp8_;
	gconstpointer _tmp9_;
	GValue* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	TrackerSparqlBuilder* _tmp13_;
	TrackerSparqlBuilder* _tmp14_;
	TrackerSparqlBuilder* _tmp15_;
	GValue* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	TrackerSparqlBuilder* _tmp20_;
	TrackerSparqlBuilder* _tmp21_;
	TrackerSparqlBuilder* _tmp22_;
	GValue* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	FolksStructuredName* sname;
	GValue* _tmp27_;
	GObject* _tmp28_;
	FolksStructuredName* _tmp29_;
	TrackerSparqlBuilder* _tmp30_;
	TrackerSparqlBuilder* _tmp31_;
	TrackerSparqlBuilder* _tmp32_;
	FolksStructuredName* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	TrackerSparqlBuilder* _tmp36_;
	TrackerSparqlBuilder* _tmp37_;
	FolksStructuredName* _tmp38_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	TrackerSparqlBuilder* _tmp41_;
	TrackerSparqlBuilder* _tmp42_;
	FolksStructuredName* _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	TrackerSparqlBuilder* _tmp46_;
	TrackerSparqlBuilder* _tmp47_;
	FolksStructuredName* _tmp48_;
	const gchar* _tmp49_;
	const gchar* _tmp50_;
	TrackerSparqlBuilder* _tmp51_;
	TrackerSparqlBuilder* _tmp52_;
	FolksStructuredName* _tmp53_;
	const gchar* _tmp54_;
	const gchar* _tmp55_;
	const gchar* _tmp56_;
	const gchar* _tmp57_;
	GValue* _tmp58_;
	gboolean _tmp59_;
	TrackerSparqlBuilder* _tmp60_;
	TrackerSparqlBuilder* _tmp61_;
	TrackerSparqlBuilder* _tmp62_;
	const gchar* _tmp63_;
	const gchar* _tmp64_;
	GLoadableIcon* new_avatar;
	GValue* _tmp65_;
	GObject* _tmp66_;
	GLoadableIcon* _tmp67_;
	GLoadableIcon* _tmp68_;
	GLoadableIcon* _tmp69_;
	GLoadableIcon* _tmp70_;
	const gchar* _tmp71_;
	const gchar* _tmp72_;
	GDateTime* birthday;
	GValue* _tmp73_;
	void* _tmp74_;
	GDateTime* _tmp75_;
	TrackerSparqlBuilder* _tmp76_;
	TrackerSparqlBuilder* _tmp77_;
	GTimeVal tv;
	GDateTime* _tmp78_;
	GTimeVal _tmp79_;
	TrackerSparqlBuilder* _tmp80_;
	gchar* _tmp81_;
	gchar* _tmp82_;
	const gchar* _tmp83_;
	const gchar* _tmp84_;
	FolksGender gender;
	GValue* _tmp85_;
	gint _tmp86_;
	FolksGender _tmp87_;
	TrackerSparqlBuilder* _tmp88_;
	TrackerSparqlBuilder* _tmp89_;
	FolksGender _tmp90_;
	TrackerSparqlBuilder* _tmp91_;
	TrackerSparqlBuilder* _tmp92_;
	const gchar* _tmp93_;
	const gchar* _tmp94_;
	GeeSet* email_addresses;
	GValue* _tmp95_;
	GObject* _tmp96_;
	GeeSet* _tmp97_;
	TrackerSparqlBuilder* _tmp98_;
	GeeSet* _tmp99_;
	const gchar* _tmp100_;
	const gchar* _tmp101_;
	GeeMultiMap* im_addresses;
	GValue* _tmp102_;
	GObject* _tmp103_;
	GeeMultiMap* _tmp104_;
	gint im_cnt;
	GeeIterator* _proto_it;
	GeeMultiMap* _tmp105_;
	GeeSet* _tmp106_;
	GeeSet* _tmp107_;
	GeeIterator* _tmp108_;
	GeeIterator* _tmp109_;
	GeeIterator* _tmp110_;
	gboolean _tmp111_;
	gchar* proto;
	GeeIterator* _tmp112_;
	gpointer _tmp113_;
	GeeCollection* addrs_a;
	GeeMultiMap* _tmp114_;
	const gchar* _tmp115_;
	GeeCollection* _tmp116_;
	GeeIterator* _im_fd_it;
	GeeCollection* _tmp117_;
	GeeIterator* _tmp118_;
	GeeIterator* _tmp119_;
	gboolean _tmp120_;
	FolksImFieldDetails* im_fd;
	GeeIterator* _tmp121_;
	gpointer _tmp122_;
	gchar* im_affl;
	gint _tmp123_;
	gchar* _tmp124_;
	gchar* im;
	gint _tmp125_;
	gchar* _tmp126_;
	TrackerSparqlBuilder* _tmp127_;
	const gchar* _tmp128_;
	TrackerSparqlBuilder* _tmp129_;
	TrackerSparqlBuilder* _tmp130_;
	TrackerSparqlBuilder* _tmp131_;
	TrackerSparqlBuilder* _tmp132_;
	FolksImFieldDetails* _tmp133_;
	gconstpointer _tmp134_;
	const gchar* _tmp135_;
	TrackerSparqlBuilder* _tmp136_;
	TrackerSparqlBuilder* _tmp137_;
	const gchar* _tmp138_;
	TrackerSparqlBuilder* _tmp139_;
	const gchar* _tmp140_;
	TrackerSparqlBuilder* _tmp141_;
	TrackerSparqlBuilder* _tmp142_;
	TrackerSparqlBuilder* _tmp143_;
	TrackerSparqlBuilder* _tmp144_;
	const gchar* _tmp145_;
	TrackerSparqlBuilder* _tmp146_;
	TrackerSparqlBuilder* _tmp147_;
	TrackerSparqlBuilder* _tmp148_;
	const gchar* _tmp149_;
	gint _tmp150_;
	const gchar* _tmp151_;
	const gchar* _tmp152_;
	GeeSet* notes;
	GValue* _tmp153_;
	GObject* _tmp154_;
	GeeSet* _tmp155_;
	GeeIterator* _n_it;
	GeeSet* _tmp156_;
	GeeIterator* _tmp157_;
	GeeIterator* _tmp158_;
	gboolean _tmp159_;
	FolksNoteFieldDetails* n;
	GeeIterator* _tmp160_;
	gpointer _tmp161_;
	TrackerSparqlBuilder* _tmp162_;
	TrackerSparqlBuilder* _tmp163_;
	TrackerSparqlBuilder* _tmp164_;
	FolksNoteFieldDetails* _tmp165_;
	gconstpointer _tmp166_;
	const gchar* _tmp167_;
	const gchar* _tmp168_;
	const gchar* _tmp169_;
	GeeSet* phone_numbers;
	GValue* _tmp170_;
	GObject* _tmp171_;
	GeeSet* _tmp172_;
	TrackerSparqlBuilder* _tmp173_;
	GeeSet* _tmp174_;
	const gchar* _tmp175_;
	const gchar* _tmp176_;
	GeeSet* roles;
	GValue* _tmp177_;
	GObject* _tmp178_;
	GeeSet* _tmp179_;
	gint roles_cnt;
	GeeIterator* _role_fd_it;
	GeeSet* _tmp180_;
	GeeIterator* _tmp181_;
	GeeIterator* _tmp182_;
	gboolean _tmp183_;
	FolksRoleFieldDetails* role_fd;
	GeeIterator* _tmp184_;
	gpointer _tmp185_;
	gchar* role_affl;
	gint _tmp186_;
	gchar* _tmp187_;
	TrackerSparqlBuilder* _tmp188_;
	const gchar* _tmp189_;
	TrackerSparqlBuilder* _tmp190_;
	TrackerSparqlBuilder* _tmp191_;
	TrackerSparqlBuilder* _tmp192_;
	TrackerSparqlBuilder* _tmp193_;
	FolksRoleFieldDetails* _tmp194_;
	gconstpointer _tmp195_;
	FolksRole* _tmp196_;
	const gchar* _tmp197_;
	const gchar* _tmp198_;
	TrackerSparqlBuilder* _tmp199_;
	TrackerSparqlBuilder* _tmp200_;
	FolksRoleFieldDetails* _tmp201_;
	gconstpointer _tmp202_;
	FolksRole* _tmp203_;
	const gchar* _tmp204_;
	const gchar* _tmp205_;
	TrackerSparqlBuilder* _tmp206_;
	TrackerSparqlBuilder* _tmp207_;
	FolksRoleFieldDetails* _tmp208_;
	gconstpointer _tmp209_;
	FolksRole* _tmp210_;
	const gchar* _tmp211_;
	const gchar* _tmp212_;
	TrackerSparqlBuilder* _tmp213_;
	TrackerSparqlBuilder* _tmp214_;
	TrackerSparqlBuilder* _tmp215_;
	const gchar* _tmp216_;
	gint _tmp217_;
	const gchar* _tmp218_;
	const gchar* _tmp219_;
	GeeSet* postal_addresses;
	GValue* _tmp220_;
	GObject* _tmp221_;
	GeeSet* _tmp222_;
	gint postal_cnt;
	GeeIterator* _pafd_it;
	GeeSet* _tmp223_;
	GeeIterator* _tmp224_;
	GeeIterator* _tmp225_;
	gboolean _tmp226_;
	FolksPostalAddressFieldDetails* pafd;
	GeeIterator* _tmp227_;
	gpointer _tmp228_;
	FolksPostalAddress* pa;
	FolksPostalAddressFieldDetails* _tmp229_;
	gconstpointer _tmp230_;
	FolksPostalAddress* _tmp231_;
	FolksPostalAddress* _tmp232_;
	gchar* postal_affl;
	gint _tmp233_;
	gchar* _tmp234_;
	gchar* postal;
	gint _tmp235_;
	gchar* _tmp236_;
	TrackerSparqlBuilder* _tmp237_;
	const gchar* _tmp238_;
	TrackerSparqlBuilder* _tmp239_;
	TrackerSparqlBuilder* _tmp240_;
	TrackerSparqlBuilder* _tmp241_;
	TrackerSparqlBuilder* _tmp242_;
	FolksPostalAddress* _tmp243_;
	const gchar* _tmp244_;
	const gchar* _tmp245_;
	TrackerSparqlBuilder* _tmp246_;
	TrackerSparqlBuilder* _tmp247_;
	FolksPostalAddress* _tmp248_;
	const gchar* _tmp249_;
	const gchar* _tmp250_;
	TrackerSparqlBuilder* _tmp251_;
	TrackerSparqlBuilder* _tmp252_;
	FolksPostalAddress* _tmp253_;
	const gchar* _tmp254_;
	const gchar* _tmp255_;
	TrackerSparqlBuilder* _tmp256_;
	TrackerSparqlBuilder* _tmp257_;
	FolksPostalAddress* _tmp258_;
	const gchar* _tmp259_;
	const gchar* _tmp260_;
	TrackerSparqlBuilder* _tmp261_;
	TrackerSparqlBuilder* _tmp262_;
	FolksPostalAddress* _tmp263_;
	const gchar* _tmp264_;
	const gchar* _tmp265_;
	TrackerSparqlBuilder* _tmp266_;
	TrackerSparqlBuilder* _tmp267_;
	FolksPostalAddress* _tmp268_;
	const gchar* _tmp269_;
	const gchar* _tmp270_;
	TrackerSparqlBuilder* _tmp271_;
	TrackerSparqlBuilder* _tmp272_;
	FolksPostalAddress* _tmp273_;
	const gchar* _tmp274_;
	const gchar* _tmp275_;
	TrackerSparqlBuilder* _tmp276_;
	const gchar* _tmp277_;
	TrackerSparqlBuilder* _tmp278_;
	TrackerSparqlBuilder* _tmp279_;
	TrackerSparqlBuilder* _tmp280_;
	TrackerSparqlBuilder* _tmp281_;
	const gchar* _tmp282_;
	TrackerSparqlBuilder* _tmp283_;
	TrackerSparqlBuilder* _tmp284_;
	TrackerSparqlBuilder* _tmp285_;
	const gchar* _tmp286_;
	gint _tmp287_;
	const gchar* _tmp288_;
	const gchar* _tmp289_;
	GeeSet* url_fds;
	GValue* _tmp290_;
	GObject* _tmp291_;
	GeeSet* _tmp292_;
	gint url_cnt;
	GeeIterator* _url_fd_it;
	GeeSet* _tmp293_;
	GeeIterator* _tmp294_;
	GeeIterator* _tmp295_;
	gboolean _tmp296_;
	FolksUrlFieldDetails* url_fd;
	GeeIterator* _tmp297_;
	gpointer _tmp298_;
	gchar* url_affl;
	gint _tmp299_;
	gchar* _tmp300_;
	TrackerSparqlBuilder* _tmp301_;
	const gchar* _tmp302_;
	TrackerSparqlBuilder* _tmp303_;
	TrackerSparqlBuilder* _tmp304_;
	TrackerSparqlBuilder* _tmp305_;
	TrackerSparqlBuilder* _tmp306_;
	FolksUrlFieldDetails* _tmp307_;
	gconstpointer _tmp308_;
	const gchar* _tmp309_;
	TrackerSparqlBuilder* _tmp310_;
	TrackerSparqlBuilder* _tmp311_;
	TrackerSparqlBuilder* _tmp312_;
	const gchar* _tmp313_;
	gint _tmp314_;
	const gchar* _tmp315_;
	const gchar* _tmp316_;
	GeeSet* local_ids;
	GValue* _tmp317_;
	GObject* _tmp318_;
	GeeSet* _tmp319_;
	gchar* ids;
	GeeSet* _tmp320_;
	gchar* _tmp321_;
	TrackerSparqlBuilder* _tmp322_;
	TrackerSparqlBuilder* _tmp323_;
	TrackerSparqlBuilder* _tmp324_;
	TrackerSparqlBuilder* _tmp325_;
	TrackerSparqlBuilder* _tmp326_;
	TrackerSparqlBuilder* _tmp327_;
	TrackerSparqlBuilder* _tmp328_;
	const gchar* _tmp329_;
	TrackerSparqlBuilder* _tmp330_;
	TrackerSparqlBuilder* _tmp331_;
	TrackerSparqlBuilder* _tmp332_;
	const gchar* _tmp333_;
	const gchar* _tmp334_;
	GeeMultiMap* ws_obj;
	GValue* _tmp335_;
	GObject* _tmp336_;
	GeeMultiMap* _tmp337_;
	gchar* ws_addrs;
	GeeMultiMap* _tmp338_;
	gchar* _tmp339_;
	TrackerSparqlBuilder* _tmp340_;
	TrackerSparqlBuilder* _tmp341_;
	TrackerSparqlBuilder* _tmp342_;
	TrackerSparqlBuilder* _tmp343_;
	TrackerSparqlBuilder* _tmp344_;
	TrackerSparqlBuilder* _tmp345_;
	TrackerSparqlBuilder* _tmp346_;
	const gchar* _tmp347_;
	TrackerSparqlBuilder* _tmp348_;
	TrackerSparqlBuilder* _tmp349_;
	TrackerSparqlBuilder* _tmp350_;
	const gchar* _tmp351_;
	const gchar* _tmp352_;
	const gchar* _tmp353_;
	const gchar* _tmp354_;
	GError* _tmp355_;
	TrackerSparqlBuilder* _tmp356_;
	TrfPersona* ret;
	gchar* contact_urn;
	TrackerSparqlBuilder* _tmp357_;
	const gchar* _tmp358_;
	const gchar* _tmp359_;
	gchar* _tmp360_;
	const gchar* _tmp361_;
	gchar* filter;
	const gchar* _tmp362_;
	gchar* _tmp363_;
	gchar* query;
	const gchar* _tmp364_;
	gchar* _tmp365_;
	GeeHashSet* ret_personas;
	const gchar* _tmp366_;
	GeeHashSet* _tmp367_;
	GeeIterator* _p_it;
	GeeHashSet* _tmp368_;
	GeeIterator* _tmp369_;
	GeeIterator* _tmp370_;
	gboolean _tmp371_;
	TrfPersona* p;
	GeeIterator* _tmp372_;
	gpointer _tmp373_;
	TrfPersona* _tmp374_;
	TrfPersona* _tmp375_;
	gboolean _tmp376_;
	TrfPersona* _tmp377_;
	GLoadableIcon* _tmp378_;
	TrfPersona* _tmp379_;
	GLoadableIcon* _tmp380_;
	GError * _inner_error_;
};

struct _TrfPersonaStoreRemovePersonaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	gchar* urn;
	FolksPersona* _tmp0_;
	gchar* _tmp1_;
	gchar* q;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
};

struct _TrfPersonaStoreRemoveAttributesFromPersonaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	gchar remove_flag;
	gchar* result;
	gchar* urn;
	FolksPersona* _tmp0_;
	gchar* _tmp1_;
	gchar _tmp2_;
};

struct _TrfPersonaStoreBuildUpdateQuerySetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	TrackerSparqlBuilder* builder;
	GeeSet* properties;
	gchar* contact_var;
	TrfAttrib attrib;
	gchar* affl_var;
	gchar* obj_var;
	const gchar* related_attrib;
	const gchar* related_prop;
	const gchar* related_connection;
	TrfAttrib _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gint cnt;
	GeeIterator* _p_it;
	GeeSet* _tmp5_;
	GeeIterator* _tmp6_;
	GeeIterator* _tmp7_;
	gboolean _tmp8_;
	FolksAbstractFieldDetails* p;
	GeeIterator* _tmp9_;
	gpointer _tmp10_;
	gchar* affl;
	const gchar* _tmp11_;
	gint _tmp12_;
	gchar* _tmp13_;
	gchar* obj;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	FolksAbstractFieldDetails* _tmp16_;
	gconstpointer _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	gint _tmp22_;
	gchar* _tmp23_;
	TrackerSparqlBuilder* _tmp24_;
	const gchar* _tmp25_;
	TrackerSparqlBuilder* _tmp26_;
	TrackerSparqlBuilder* _tmp27_;
	const gchar* _tmp28_;
	TrackerSparqlBuilder* _tmp29_;
	const gchar* _tmp30_;
	TrackerSparqlBuilder* _tmp31_;
	FolksAbstractFieldDetails* _tmp32_;
	gconstpointer _tmp33_;
	const gchar* _tmp34_;
	TrackerSparqlBuilder* _tmp35_;
	const gchar* _tmp36_;
	TrackerSparqlBuilder* _tmp37_;
	TrackerSparqlBuilder* _tmp38_;
	TrackerSparqlBuilder* _tmp39_;
	const gchar* _tmp40_;
	TrackerSparqlBuilder* _tmp41_;
	const gchar* _tmp42_;
	TrackerSparqlBuilder* _tmp43_;
	const gchar* _tmp44_;
	TrackerSparqlBuilder* _tmp45_;
	TrackerSparqlBuilder* _tmp46_;
	const gchar* _tmp47_;
	gint _tmp48_;
};

struct _TrfPersonaStoreRemoveAttributesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* urn;
	gchar remove_flag;
	FolksSmallSet* affiliations;
	const gchar* _tmp0_;
	FolksSmallSet* _tmp1_;
	FolksSmallSet* _affl_list;
	FolksSmallSet* _tmp2_;
	FolksSmallSet* _tmp3_;
	gint _affl_size;
	FolksSmallSet* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	gint _affl_index;
	gint _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	gchar* affl;
	FolksSmallSet* _tmp10_;
	gint _tmp11_;
	gconstpointer _tmp12_;
	gchar* _tmp13_;
	gboolean got_attrib;
	gboolean _tmp14_;
	gchar _tmp15_;
	gchar _tmp16_;
	FolksSmallSet* phones;
	const gchar* _tmp17_;
	FolksSmallSet* _tmp18_;
	FolksSmallSet* _phone_list;
	FolksSmallSet* _tmp19_;
	FolksSmallSet* _tmp20_;
	gint _phone_size;
	FolksSmallSet* _tmp21_;
	gint _tmp22_;
	gint _tmp23_;
	gint _phone_index;
	gint _tmp24_;
	gint _tmp25_;
	gint _tmp26_;
	gchar* phone;
	FolksSmallSet* _tmp27_;
	gint _tmp28_;
	gconstpointer _tmp29_;
	gchar* _tmp30_;
	const gchar* _tmp31_;
	gboolean _tmp32_;
	gchar _tmp33_;
	gchar _tmp34_;
	FolksSmallSet* postals;
	const gchar* _tmp35_;
	FolksSmallSet* _tmp36_;
	FolksSmallSet* _postal_list;
	FolksSmallSet* _tmp37_;
	FolksSmallSet* _tmp38_;
	gint _postal_size;
	FolksSmallSet* _tmp39_;
	gint _tmp40_;
	gint _tmp41_;
	gint _postal_index;
	gint _tmp42_;
	gint _tmp43_;
	gint _tmp44_;
	gchar* postal;
	FolksSmallSet* _tmp45_;
	gint _tmp46_;
	gconstpointer _tmp47_;
	gchar* _tmp48_;
	const gchar* _tmp49_;
	gboolean _tmp50_;
	gchar _tmp51_;
	gchar _tmp52_;
	FolksSmallSet* im_addrs;
	const gchar* _tmp53_;
	FolksSmallSet* _tmp54_;
	FolksSmallSet* _im_addr_list;
	FolksSmallSet* _tmp55_;
	FolksSmallSet* _tmp56_;
	gint _im_addr_size;
	FolksSmallSet* _tmp57_;
	gint _tmp58_;
	gint _tmp59_;
	gint _im_addr_index;
	gint _tmp60_;
	gint _tmp61_;
	gint _tmp62_;
	gchar* im_addr;
	FolksSmallSet* _tmp63_;
	gint _tmp64_;
	gconstpointer _tmp65_;
	gchar* _tmp66_;
	const gchar* _tmp67_;
	gboolean _tmp68_;
	gchar _tmp69_;
	gchar _tmp70_;
	FolksSmallSet* emails;
	const gchar* _tmp71_;
	FolksSmallSet* _tmp72_;
	FolksSmallSet* _email_list;
	FolksSmallSet* _tmp73_;
	FolksSmallSet* _tmp74_;
	gint _email_size;
	FolksSmallSet* _tmp75_;
	gint _tmp76_;
	gint _tmp77_;
	gint _email_index;
	gint _tmp78_;
	gint _tmp79_;
	gint _tmp80_;
	gchar* email;
	FolksSmallSet* _tmp81_;
	gint _tmp82_;
	gconstpointer _tmp83_;
	gchar* _tmp84_;
	const gchar* _tmp85_;
	gboolean _tmp86_;
	gboolean _tmp87_;
	gchar _tmp88_;
	const gchar* _tmp89_;
};

struct _TrfPersonaStorePrepareData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	TrackerSparqlConnection* _tmp5_;
	TrackerSparqlConnection* _tmp6_;
	TrackerSparqlConnection* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	GeeHashSet* _tmp14_;
	GeeHashSet* _tmp15_;
	const gchar* _tmp16_;
	const gchar* _tmp17_;
	Resources* _tmp18_;
	Resources* _tmp19_;
	Resources* _tmp20_;
	Resources* _tmp21_;
	GDBusConnection* _tmp22_;
	GDBusConnection* _tmp23_;
	GDBusConnection* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	GError* e1;
	GError* _tmp27_;
	GError* _tmp28_;
	const gchar* _tmp29_;
	GError* _tmp30_;
	const gchar* _tmp31_;
	GError* _tmp32_;
	GError* e2;
	GError* _tmp33_;
	const gchar* _tmp34_;
	GError* _tmp35_;
	const gchar* _tmp36_;
	GError* _tmp37_;
	GError* e3;
	GError* _tmp38_;
	const gchar* _tmp39_;
	GError* _tmp40_;
	const gchar* _tmp41_;
	GError* _tmp42_;
	const gchar* _tmp43_;
	const gchar* _tmp44_;
	GError * _inner_error_;
};

struct _TrfPersonaStoreBuildPredicatesTableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	GeeTreeMap* _tmp0_;
	GeeTreeMap* _tmp1_;
	gchar* query;
	gchar* _tmp2_;
	GeeIterator* _urn_t_it;
	GeeTreeMap* _tmp3_;
	GeeSet* _tmp4_;
	GeeSet* _tmp5_;
	GeeSet* _tmp6_;
	GeeIterator* _tmp7_;
	GeeIterator* _tmp8_;
	GeeIterator* _tmp9_;
	gboolean _tmp10_;
	gchar* urn_t;
	GeeIterator* _tmp11_;
	gpointer _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	TrackerSparqlCursor* cursor;
	TrackerSparqlConnection* _tmp22_;
	const gchar* _tmp23_;
	TrackerSparqlCursor* _tmp24_;
	gboolean _tmp25_;
	TrackerSparqlCursor* _tmp26_;
	gboolean _tmp27_;
	gint i;
	GeeIterator* _urn_it;
	GeeTreeMap* _tmp28_;
	GeeSet* _tmp29_;
	GeeSet* _tmp30_;
	GeeSet* _tmp31_;
	GeeIterator* _tmp32_;
	GeeIterator* _tmp33_;
	GeeIterator* _tmp34_;
	gboolean _tmp35_;
	gchar* urn;
	GeeIterator* _tmp36_;
	gpointer _tmp37_;
	gint tracker_id;
	TrackerSparqlCursor* _tmp38_;
	gint _tmp39_;
	gint64 _tmp40_;
	gchar* prefix;
	GeeTreeMap* _tmp41_;
	const gchar* _tmp42_;
	gpointer _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	GeeTreeMap* _tmp47_;
	const gchar* _tmp48_;
	gint _tmp49_;
	gint _tmp50_;
	GError* e1;
	const gchar* _tmp51_;
	GError* _tmp52_;
	const gchar* _tmp53_;
	GError* e2;
	const gchar* _tmp54_;
	GError* _tmp55_;
	const gchar* _tmp56_;
	GError * _inner_error_;
};

struct _TrfPersonaStoreHandleEventsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	GVariantIter* iter_del;
	GVariantIter* iter_ins;
	GVariantIter* _tmp0_;
	GVariantIter* _tmp1_;
};

struct _Event {
	gint graph_id;
	gint subject_id;
	gint pred_id;
	gint object_id;
};

struct _TrfPersonaStoreHandleDeleteEventsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	GVariantIter* iter_del;
	GeeHashSet* removed_personas;
	GeeHashSet* _tmp0_;
	gint nco_person_id;
	GeeTreeMap* _tmp1_;
	gpointer _tmp2_;
	gint rdf_type_id;
	GeeTreeMap* _tmp3_;
	gpointer _tmp4_;
	Event e;
	GVariantIter* _tmp5_;
	gboolean _tmp6_;
	gchar* p_id;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	Event _tmp9_;
	gint _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gboolean _tmp15_;
	Event _tmp16_;
	gint _tmp17_;
	gint _tmp18_;
	Event _tmp19_;
	gint _tmp20_;
	gint _tmp21_;
	TrfPersona* removed_p;
	GeeHashMap* _tmp22_;
	const gchar* _tmp23_;
	gpointer _tmp24_;
	TrfPersona* _tmp25_;
	GeeHashSet* _tmp26_;
	TrfPersona* _tmp27_;
	GeeHashMap* _tmp28_;
	TrfPersona* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	TrfPersona* persona;
	GeeHashMap* _tmp32_;
	const gchar* _tmp33_;
	gpointer _tmp34_;
	TrfPersona* _tmp35_;
	TrfPersona* _tmp36_;
	Event _tmp37_;
	GeeHashSet* _tmp38_;
	gint _tmp39_;
	gint _tmp40_;
	GeeHashSet* _tmp41_;
};

struct _TrfPersonaStoreHandleInsertEventsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	GVariantIter* iter_ins;
	GeeHashSet* added_personas;
	GeeHashSet* _tmp0_;
	Event e;
	GVariantIter* _tmp1_;
	gboolean _tmp2_;
	gchar* subject_tracker_id;
	Event _tmp3_;
	gint _tmp4_;
	gchar* _tmp5_;
	gchar* p_id;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	TrfPersona* persona;
	GeeHashMap* _tmp10_;
	const gchar* _tmp11_;
	gpointer _tmp12_;
	TrfPersona* _tmp13_;
	const gchar* _tmp14_;
	TrfPersona* _tmp15_;
	GeeHashMap* _tmp16_;
	TrfPersona* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	TrfPersona* _tmp20_;
	GeeHashSet* _tmp21_;
	TrfPersona* _tmp22_;
	TrfPersona* _tmp23_;
	Event _tmp24_;
	GeeHashSet* _tmp25_;
	gint _tmp26_;
	gint _tmp27_;
	GeeHashSet* _tmp28_;
};

struct _TrfPersonaStoreDoAddContactsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* query;
	GeeHashSet* result;
	GeeHashSet* added_personas;
	GeeHashSet* _tmp0_;
	TrackerSparqlCursor* cursor;
	TrackerSparqlConnection* _tmp1_;
	const gchar* _tmp2_;
	TrackerSparqlCursor* _tmp3_;
	gboolean _tmp4_;
	TrackerSparqlCursor* _tmp5_;
	gboolean _tmp6_;
	gint tracker_id;
	TrackerSparqlCursor* _tmp7_;
	gint64 _tmp8_;
	gchar* p_id;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gint _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	GeeHashMap* _tmp16_;
	const gchar* _tmp17_;
	gpointer _tmp18_;
	TrfPersona* _tmp19_;
	gboolean _tmp20_;
	TrfPersona* persona;
	gint _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	TrackerSparqlCursor* _tmp24_;
	TrfPersona* _tmp25_;
	TrfPersona* _tmp26_;
	GeeHashMap* _tmp27_;
	TrfPersona* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	TrfPersona* _tmp31_;
	GeeHashSet* _tmp32_;
	TrfPersona* _tmp33_;
	GeeHashSet* _tmp34_;
	gint _tmp35_;
	gint _tmp36_;
	GeeHashSet* _tmp37_;
	GError* e;
	const gchar* _tmp38_;
	GError* _tmp39_;
	const gchar* _tmp40_;
	GError * _inner_error_;
};

struct _TrfAfflInfo {
	GObject parent_instance;
	TrfAfflInfoPrivate * priv;
	FolksPostalAddressFieldDetails* postal_address_fd;
};

struct _TrfAfflInfoClass {
	GObjectClass parent_class;
};

struct _TrfPersonaStoreDoUpdateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	TrfPersona* p;
	Event e;
	gboolean adding;
	Event _tmp0_;
	gint _tmp1_;
	GeeTreeMap* _tmp2_;
	gpointer _tmp3_;
	gchar* fullname;
	gchar* _tmp4_;
	gboolean _tmp5_;
	Event _tmp6_;
	gint _tmp7_;
	gchar* _tmp8_;
	TrfPersona* _tmp9_;
	const gchar* _tmp10_;
	Event _tmp11_;
	gint _tmp12_;
	GeeTreeMap* _tmp13_;
	gpointer _tmp14_;
	gchar* nickname;
	gchar* _tmp15_;
	gboolean _tmp16_;
	Event _tmp17_;
	gint _tmp18_;
	gchar* _tmp19_;
	TrfPersona* _tmp20_;
	const gchar* _tmp21_;
	Event _tmp22_;
	gint _tmp23_;
	GeeTreeMap* _tmp24_;
	gpointer _tmp25_;
	gchar* family_name;
	gchar* _tmp26_;
	gboolean _tmp27_;
	Event _tmp28_;
	gint _tmp29_;
	gchar* _tmp30_;
	TrfPersona* _tmp31_;
	const gchar* _tmp32_;
	Event _tmp33_;
	gint _tmp34_;
	GeeTreeMap* _tmp35_;
	gpointer _tmp36_;
	gchar* given_name;
	gchar* _tmp37_;
	gboolean _tmp38_;
	Event _tmp39_;
	gint _tmp40_;
	gchar* _tmp41_;
	TrfPersona* _tmp42_;
	const gchar* _tmp43_;
	Event _tmp44_;
	gint _tmp45_;
	GeeTreeMap* _tmp46_;
	gpointer _tmp47_;
	gchar* additional_name;
	gchar* _tmp48_;
	gboolean _tmp49_;
	Event _tmp50_;
	gint _tmp51_;
	gchar* _tmp52_;
	TrfPersona* _tmp53_;
	const gchar* _tmp54_;
	Event _tmp55_;
	gint _tmp56_;
	GeeTreeMap* _tmp57_;
	gpointer _tmp58_;
	gchar* suffix_name;
	gchar* _tmp59_;
	gboolean _tmp60_;
	Event _tmp61_;
	gint _tmp62_;
	gchar* _tmp63_;
	TrfPersona* _tmp64_;
	const gchar* _tmp65_;
	Event _tmp66_;
	gint _tmp67_;
	GeeTreeMap* _tmp68_;
	gpointer _tmp69_;
	gchar* prefix_name;
	gchar* _tmp70_;
	gboolean _tmp71_;
	Event _tmp72_;
	gint _tmp73_;
	gchar* _tmp74_;
	TrfPersona* _tmp75_;
	const gchar* _tmp76_;
	Event _tmp77_;
	gint _tmp78_;
	GeeTreeMap* _tmp79_;
	gpointer _tmp80_;
	Event _tmp81_;
	gint _tmp82_;
	gint _tmp83_;
	gboolean _tmp84_;
	TrfPersona* _tmp85_;
	TrfPersona* _tmp86_;
	Event _tmp87_;
	gint _tmp88_;
	GeeTreeMap* _tmp89_;
	gpointer _tmp90_;
	gboolean _tmp91_;
	gchar* email;
	Event _tmp92_;
	gint _tmp93_;
	gchar* _tmp94_;
	TrfPersona* _tmp95_;
	const gchar* _tmp96_;
	Event _tmp97_;
	gint _tmp98_;
	gchar* _tmp99_;
	gchar* _tmp100_;
	TrfPersona* _tmp101_;
	Event _tmp102_;
	gint _tmp103_;
	gchar* _tmp104_;
	gchar* _tmp105_;
	Event _tmp106_;
	gint _tmp107_;
	GeeTreeMap* _tmp108_;
	gpointer _tmp109_;
	gboolean _tmp110_;
	gchar* phone;
	Event _tmp111_;
	gint _tmp112_;
	gchar* _tmp113_;
	TrfPersona* _tmp114_;
	const gchar* _tmp115_;
	Event _tmp116_;
	gint _tmp117_;
	gchar* _tmp118_;
	gchar* _tmp119_;
	TrfPersona* _tmp120_;
	Event _tmp121_;
	gint _tmp122_;
	gchar* _tmp123_;
	gchar* _tmp124_;
	Event _tmp125_;
	gint _tmp126_;
	GeeTreeMap* _tmp127_;
	gpointer _tmp128_;
	gboolean _tmp129_;
	TrfAfflInfo* affl_info;
	Event _tmp130_;
	gint _tmp131_;
	gchar* _tmp132_;
	gchar* _tmp133_;
	Event _tmp134_;
	gint _tmp135_;
	gchar* _tmp136_;
	gchar* _tmp137_;
	TrfAfflInfo* _tmp138_;
	TrfAfflInfo* _tmp139_;
	TrfAfflInfo* _tmp140_;
	gchar* _tmp141_;
	gchar* _tmp142_;
	TrfAfflInfo* _tmp143_;
	const gchar* _tmp144_;
	const gchar* _tmp145_;
	TrfPersona* _tmp146_;
	TrfAfflInfo* _tmp147_;
	const gchar* _tmp148_;
	const gchar* _tmp149_;
	TrfAfflInfo* _tmp150_;
	const gchar* _tmp151_;
	const gchar* _tmp152_;
	TrfPersona* _tmp153_;
	TrfAfflInfo* _tmp154_;
	const gchar* _tmp155_;
	const gchar* _tmp156_;
	TrfAfflInfo* _tmp157_;
	const gchar* _tmp158_;
	const gchar* _tmp159_;
	TrfAfflInfo* _tmp160_;
	const gchar* _tmp161_;
	const gchar* _tmp162_;
	TrfAfflInfo* _tmp163_;
	const gchar* _tmp164_;
	const gchar* _tmp165_;
	gboolean _tmp166_;
	TrfAfflInfo* _tmp167_;
	const gchar* _tmp168_;
	const gchar* _tmp169_;
	TrfAfflInfo* _tmp170_;
	const gchar* _tmp171_;
	const gchar* _tmp172_;
	TrfPersona* _tmp173_;
	TrfAfflInfo* _tmp174_;
	const gchar* _tmp175_;
	const gchar* _tmp176_;
	TrfAfflInfo* _tmp177_;
	const gchar* _tmp178_;
	const gchar* _tmp179_;
	TrfAfflInfo* _tmp180_;
	const gchar* _tmp181_;
	const gchar* _tmp182_;
	TrfAfflInfo* _tmp183_;
	const gchar* _tmp184_;
	const gchar* _tmp185_;
	TrfAfflInfo* _tmp186_;
	FolksPostalAddressFieldDetails* _tmp187_;
	TrfPersona* _tmp188_;
	TrfAfflInfo* _tmp189_;
	FolksPostalAddressFieldDetails* _tmp190_;
	TrfAfflInfo* _tmp191_;
	const gchar* _tmp192_;
	const gchar* _tmp193_;
	TrfPersona* _tmp194_;
	TrfAfflInfo* _tmp195_;
	const gchar* _tmp196_;
	const gchar* _tmp197_;
	Event _tmp198_;
	gint _tmp199_;
	gchar* _tmp200_;
	gchar* _tmp201_;
	TrfAfflInfo* _tmp202_;
	const gchar* _tmp203_;
	const gchar* _tmp204_;
	TrfPersona* _tmp205_;
	TrfAfflInfo* _tmp206_;
	const gchar* _tmp207_;
	const gchar* _tmp208_;
	Event _tmp209_;
	gint _tmp210_;
	gchar* _tmp211_;
	gchar* _tmp212_;
	TrfAfflInfo* _tmp213_;
	const gchar* _tmp214_;
	const gchar* _tmp215_;
	TrfPersona* _tmp216_;
	TrfAfflInfo* _tmp217_;
	const gchar* _tmp218_;
	const gchar* _tmp219_;
	TrfAfflInfo* _tmp220_;
	const gchar* _tmp221_;
	const gchar* _tmp222_;
	TrfAfflInfo* _tmp223_;
	const gchar* _tmp224_;
	const gchar* _tmp225_;
	TrfPersona* _tmp226_;
	TrfAfflInfo* _tmp227_;
	const gchar* _tmp228_;
	const gchar* _tmp229_;
	TrfAfflInfo* _tmp230_;
	const gchar* _tmp231_;
	const gchar* _tmp232_;
	TrfAfflInfo* _tmp233_;
	const gchar* _tmp234_;
	const gchar* _tmp235_;
	TrfPersona* _tmp236_;
	TrfAfflInfo* _tmp237_;
	const gchar* _tmp238_;
	const gchar* _tmp239_;
	TrfAfflInfo* _tmp240_;
	const gchar* _tmp241_;
	const gchar* _tmp242_;
	TrfPersona* _tmp243_;
	Event _tmp244_;
	gint _tmp245_;
	gchar* _tmp246_;
	gchar* _tmp247_;
	TrfPersona* _tmp248_;
	Event _tmp249_;
	gint _tmp250_;
	gchar* _tmp251_;
	gchar* _tmp252_;
	TrfPersona* _tmp253_;
	Event _tmp254_;
	gint _tmp255_;
	gchar* _tmp256_;
	gchar* _tmp257_;
	TrfPersona* _tmp258_;
	Event _tmp259_;
	gint _tmp260_;
	gchar* _tmp261_;
	gchar* _tmp262_;
	TrfPersona* _tmp263_;
	Event _tmp264_;
	gint _tmp265_;
	gchar* _tmp266_;
	gchar* _tmp267_;
	TrfPersona* _tmp268_;
	Event _tmp269_;
	gint _tmp270_;
	gchar* _tmp271_;
	gchar* _tmp272_;
	Event _tmp273_;
	gint _tmp274_;
	GeeTreeMap* _tmp275_;
	gpointer _tmp276_;
	gchar* bday;
	gchar* _tmp277_;
	gboolean _tmp278_;
	Event _tmp279_;
	gint _tmp280_;
	gchar* _tmp281_;
	TrfPersona* _tmp282_;
	const gchar* _tmp283_;
	Event _tmp284_;
	gint _tmp285_;
	GeeTreeMap* _tmp286_;
	gpointer _tmp287_;
	gchar* note;
	gchar* _tmp288_;
	gboolean _tmp289_;
	Event _tmp290_;
	gint _tmp291_;
	gchar* _tmp292_;
	TrfPersona* _tmp293_;
	const gchar* _tmp294_;
	Event _tmp295_;
	gint _tmp296_;
	GeeTreeMap* _tmp297_;
	gpointer _tmp298_;
	gboolean _tmp299_;
	TrfPersona* _tmp300_;
	Event _tmp301_;
	gint _tmp302_;
	TrfPersona* _tmp303_;
	Event _tmp304_;
	gint _tmp305_;
	GeeTreeMap* _tmp306_;
	gpointer _tmp307_;
	gchar* avatar_url;
	gchar* _tmp308_;
	gboolean _tmp309_;
	Event _tmp310_;
	gint _tmp311_;
	gchar* _tmp312_;
	TrfPersona* _tmp313_;
	const gchar* _tmp314_;
	Event _tmp315_;
	gint _tmp316_;
	GeeTreeMap* _tmp317_;
	gpointer _tmp318_;
	gboolean _tmp319_;
	gchar** prop_info;
	Event _tmp320_;
	gint _tmp321_;
	gint _tmp322_;
	gchar** _tmp323_;
	gint prop_info_length1;
	gint _prop_info_size_;
	gchar** _tmp324_;
	gint _tmp324__length1;
	const gchar* _tmp325_;
	TrfPersona* _tmp326_;
	gchar** _tmp327_;
	gint _tmp327__length1;
	const gchar* _tmp328_;
	gchar** _tmp329_;
	gint _tmp329__length1;
	const gchar* _tmp330_;
	TrfPersona* _tmp331_;
	gchar** _tmp332_;
	gint _tmp332__length1;
	const gchar* _tmp333_;
	gchar* local_ids;
	Event _tmp334_;
	gint _tmp335_;
	gchar* _tmp336_;
	gchar* ws_addrs;
	Event _tmp337_;
	gint _tmp338_;
	gchar* _tmp339_;
	TrfPersona* _tmp340_;
	const gchar* _tmp341_;
	TrfPersona* _tmp342_;
	const gchar* _tmp343_;
};

struct _TrfPersonaStoreGetPropertyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gint subject_tracker_id;
	gchar* property;
	gchar* subject_type;
	gchar* result;
	gchar* query;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gint _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
};

struct _TrfPersonaStoreGetNaoPropertyByPersonIdData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gint nco_person_id;
	gchar* prop_name;
	gchar* result;
	gchar* query;
	gint _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
};

struct _TrfPersonaStoreGetNaoPropertyByPropIdData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gint nao_prop_id;
	gchar** result;
	gint result_length1;
	gchar* query;
	gint _tmp0_;
	gchar* _tmp1_;
	gchar* ret;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gchar** _tmp5_;
	gint _tmp5__length1;
};

struct _TrfPersonaStoreGetAfflInfoData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* person_id;
	gchar* affiliation_id;
	TrfAfflInfo* result;
	TrfAfflInfo* affl_info;
	TrfAfflInfo* _tmp0_;
	gchar* query;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	TrackerSparqlCursor* cursor;
	TrackerSparqlConnection* _tmp5_;
	const gchar* _tmp6_;
	TrackerSparqlCursor* _tmp7_;
	gboolean _tmp8_;
	TrackerSparqlCursor* _tmp9_;
	gboolean _tmp10_;
	TrfAfflInfo* _tmp11_;
	TrackerSparqlCursor* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	TrfAfflInfo* _tmp16_;
	TrackerSparqlCursor* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	TrfAfflInfo* _tmp21_;
	TrackerSparqlCursor* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	TrfAfflInfo* _tmp26_;
	TrackerSparqlCursor* _tmp27_;
	const gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	TrfAfflInfo* _tmp31_;
	TrackerSparqlCursor* _tmp32_;
	const gchar* _tmp33_;
	gchar* _tmp34_;
	gchar* _tmp35_;
	TrfAfflInfo* _tmp36_;
	TrackerSparqlCursor* _tmp37_;
	const gchar* _tmp38_;
	gchar* _tmp39_;
	gchar* _tmp40_;
	TrfAfflInfo* _tmp41_;
	TrackerSparqlCursor* _tmp42_;
	const gchar* _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	TrfAfflInfo* _tmp46_;
	TrackerSparqlCursor* _tmp47_;
	const gchar* _tmp48_;
	gchar* _tmp49_;
	gchar* _tmp50_;
	gchar* po_box;
	TrackerSparqlCursor* _tmp51_;
	const gchar* _tmp52_;
	gchar* _tmp53_;
	gchar* extension;
	TrackerSparqlCursor* _tmp54_;
	const gchar* _tmp55_;
	gchar* _tmp56_;
	gchar* street;
	TrackerSparqlCursor* _tmp57_;
	const gchar* _tmp58_;
	gchar* _tmp59_;
	gchar* locality;
	TrackerSparqlCursor* _tmp60_;
	const gchar* _tmp61_;
	gchar* _tmp62_;
	gchar* region;
	TrackerSparqlCursor* _tmp63_;
	const gchar* _tmp64_;
	gchar* _tmp65_;
	gchar* postal_code;
	TrackerSparqlCursor* _tmp66_;
	const gchar* _tmp67_;
	gchar* _tmp68_;
	gchar* country;
	TrackerSparqlCursor* _tmp69_;
	const gchar* _tmp70_;
	gchar* _tmp71_;
	FolksPostalAddress* postal_address;
	const gchar* _tmp72_;
	const gchar* _tmp73_;
	const gchar* _tmp74_;
	const gchar* _tmp75_;
	const gchar* _tmp76_;
	const gchar* _tmp77_;
	const gchar* _tmp78_;
	TrfAfflInfo* _tmp79_;
	const gchar* _tmp80_;
	const gchar* _tmp81_;
	FolksPostalAddress* _tmp82_;
	FolksPostalAddress* _tmp83_;
	gboolean _tmp84_;
	TrfAfflInfo* _tmp85_;
	FolksPostalAddress* _tmp86_;
	FolksPostalAddressFieldDetails* _tmp87_;
	TrfAfflInfo* _tmp88_;
	TrackerSparqlCursor* _tmp89_;
	const gchar* _tmp90_;
	gchar* _tmp91_;
	gchar* _tmp92_;
	TrfAfflInfo* _tmp93_;
	TrackerSparqlCursor* _tmp94_;
	const gchar* _tmp95_;
	gchar* _tmp96_;
	gchar* _tmp97_;
	TrfAfflInfo* _tmp98_;
	TrackerSparqlCursor* _tmp99_;
	const gchar* _tmp100_;
	gchar* _tmp101_;
	gchar* _tmp102_;
	TrfAfflInfo* _tmp103_;
	TrackerSparqlCursor* _tmp104_;
	const gchar* _tmp105_;
	gchar* _tmp106_;
	gchar* _tmp107_;
	TrfAfflInfo* _tmp108_;
	TrackerSparqlCursor* _tmp109_;
	const gchar* _tmp110_;
	gchar* _tmp111_;
	gchar* _tmp112_;
	GError* e1;
	const gchar* _tmp113_;
	GError* _tmp114_;
	const gchar* _tmp115_;
	GError* e2;
	const gchar* _tmp116_;
	GError* _tmp117_;
	const gchar* _tmp118_;
	GError * _inner_error_;
};

struct _TrfPersonaStoreInsertPersonaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* query;
	gchar* persona_var;
	gchar* result;
	GVariant* variant;
	gchar* contact_urn;
	gboolean _tmp0_;
	gboolean _tmp1_;
	GError* _tmp2_;
	const gchar* _tmp3_;
	TrackerSparqlConnection* _tmp4_;
	GVariant* _tmp5_;
	TrackerSparqlConnection* _tmp6_;
	const gchar* _tmp7_;
	GVariant* _tmp8_;
	GVariant* _tmp9_;
	GVariantIter* iter1;
	GVariantIter* iter2;
	GVariantIter* iter3;
	gchar* anon_var;
	GVariant* _tmp10_;
	GVariantIter* _tmp11_;
	GVariantIter* _tmp12_;
	gboolean _tmp13_;
	GVariantIter* _tmp14_;
	GVariantIter* _tmp15_;
	gboolean _tmp16_;
	GVariantIter* _tmp17_;
	GVariantIter* _tmp18_;
	gboolean _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	GError* e;
	GError* _tmp22_;
	const gchar* _tmp23_;
	GError * _inner_error_;
};

struct _TrfPersonaStoreSingleValueQueryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* query;
	gchar* result;
	FolksSmallSet* rows;
	const gchar* _tmp0_;
	FolksSmallSet* _tmp1_;
	FolksSmallSet* _r_list;
	FolksSmallSet* _tmp2_;
	FolksSmallSet* _tmp3_;
	gint _r_size;
	FolksSmallSet* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	gint _r_index;
	gint _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	gchar* r;
	FolksSmallSet* _tmp10_;
	gint _tmp11_;
	gconstpointer _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
};

struct _TrfPersonaStoreMultiValueQueryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* query;
	FolksSmallSet* result;
	FolksSmallSet* ret;
	FolksSmallSet* _tmp0_;
	const gchar* _tmp1_;
	TrackerSparqlCursor* cursor;
	TrackerSparqlConnection* _tmp2_;
	const gchar* _tmp3_;
	TrackerSparqlCursor* _tmp4_;
	gboolean _tmp5_;
	TrackerSparqlCursor* _tmp6_;
	gboolean _tmp7_;
	gchar* prop;
	TrackerSparqlCursor* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	const gchar* _tmp11_;
	FolksSmallSet* _tmp12_;
	const gchar* _tmp13_;
	GError* e1;
	const gchar* _tmp14_;
	GError* _tmp15_;
	const gchar* _tmp16_;
	GError* e2;
	const gchar* _tmp17_;
	GError* _tmp18_;
	const gchar* _tmp19_;
	GError * _inner_error_;
};

struct _TrfPersonaStoreUrnFromTrackerIdData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* tracker_id;
	gchar* result;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
};

struct _TrfPersonaStoreSetNicknameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	TrfPersona* persona;
	gchar* nickname;
	gchar* query;
	TrfPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	TrfPersona* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
};

struct _TrfPersonaStoreSetLocalIdsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	TrfPersona* persona;
	GeeSet* local_ids;
	gchar* ids;
	GeeSet* _tmp0_;
	gchar* _tmp1_;
	TrfPersona* _tmp2_;
};

struct _TrfPersonaStoreSetWebServiceAddrsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	TrfPersona* persona;
	GeeMultiMap* ws_obj;
	gchar* ws_addrs;
	GeeMultiMap* _tmp0_;
	gchar* _tmp1_;
	TrfPersona* _tmp2_;
};

struct _TrfPersonaStoreSetTrackerPropertyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	TrfPersona* persona;
	gchar* prop_name;
	gchar* prop_value;
	gchar* callers_name;
	gchar* query;
	TrfPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	TrfPersona* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
};

struct _TrfPersonaStoreSetIsFavouriteData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	gboolean is_favourite;
	gchar* query;
	gboolean _tmp0_;
	FolksPersona* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	FolksPersona* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
};

struct _TrfPersonaStoreSetEmailsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GeeSet* emails;
	FolksPersona* _tmp0_;
	GeeSet* _tmp1_;
};

struct _TrfPersonaStoreSetPhonesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GeeSet* phone_numbers;
	FolksPersona* _tmp0_;
	GeeSet* _tmp1_;
};

struct _TrfPersonaStoreSetUniqueAttribSetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GeeSet* properties;
	TrfAttrib attrib;
	gchar* query_name;
	gchar* p_id;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	TrackerSparqlBuilder* builder;
	TrackerSparqlBuilder* _tmp4_;
	TrackerSparqlBuilder* _tmp5_;
	TrfAttrib _tmp6_;
	gchar* _tmp7_;
	FolksPersona* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	TrackerSparqlBuilder* _tmp11_;
	GeeSet* _tmp12_;
	gchar* _tmp13_;
	FolksPersona* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	TrackerSparqlBuilder* _tmp17_;
	GeeSet* _tmp18_;
	TrackerSparqlBuilder* _tmp19_;
	TrackerSparqlBuilder* _tmp20_;
	TrackerSparqlBuilder* _tmp21_;
	TrackerSparqlBuilder* _tmp22_;
	TrackerSparqlBuilder* _tmp23_;
	gchar* filter;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	TrackerSparqlBuilder* _tmp26_;
	TrackerSparqlBuilder* _tmp27_;
	TrackerSparqlBuilder* _tmp28_;
	const gchar* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
};

struct _TrfPersonaStoreSetUrlsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GeeSet* urls;
	FolksPersona* _tmp0_;
	GeeSet* _tmp1_;
};

struct _TrfPersonaStoreSetImAddressesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GeeMultiMap* im_addresses;
	FolksSmallSet* ims;
	FolksSmallSet* _tmp0_;
	GeeIterator* _proto_it;
	GeeMultiMap* _tmp1_;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
	GeeIterator* _tmp4_;
	GeeIterator* _tmp5_;
	GeeIterator* _tmp6_;
	gboolean _tmp7_;
	gchar* proto;
	GeeIterator* _tmp8_;
	gpointer _tmp9_;
	GeeCollection* addrs;
	GeeMultiMap* _tmp10_;
	const gchar* _tmp11_;
	GeeCollection* _tmp12_;
	GeeIterator* _im_fd_it;
	GeeCollection* _tmp13_;
	GeeIterator* _tmp14_;
	GeeIterator* _tmp15_;
	gboolean _tmp16_;
	FolksImFieldDetails* im_fd;
	GeeIterator* _tmp17_;
	gpointer _tmp18_;
	FolksImFieldDetails* new_im_fd;
	FolksImFieldDetails* _tmp19_;
	gconstpointer _tmp20_;
	const gchar* _tmp21_;
	FolksImFieldDetails* _tmp22_;
	FolksImFieldDetails* _tmp23_;
	const gchar* _tmp24_;
	FolksSmallSet* _tmp25_;
	FolksImFieldDetails* _tmp26_;
	FolksPersona* _tmp27_;
	FolksSmallSet* _tmp28_;
};

struct _TrfPersonaStoreSetPostalAddressesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GeeSet* postal_addresses;
	FolksPersona* _tmp0_;
	GeeSet* _tmp1_;
};

struct _TrfPersonaStoreSetRolesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GeeSet* roles;
	gchar* p_id;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* del_q;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	TrackerSparqlBuilder* builder;
	TrackerSparqlBuilder* _tmp6_;
	TrackerSparqlBuilder* _tmp7_;
	gint i;
	GeeIterator* _role_fd_it;
	GeeSet* _tmp8_;
	GeeIterator* _tmp9_;
	GeeIterator* _tmp10_;
	gboolean _tmp11_;
	FolksRoleFieldDetails* role_fd;
	GeeIterator* _tmp12_;
	gpointer _tmp13_;
	gchar* affl;
	gint _tmp14_;
	gchar* _tmp15_;
	TrackerSparqlBuilder* _tmp16_;
	const gchar* _tmp17_;
	TrackerSparqlBuilder* _tmp18_;
	TrackerSparqlBuilder* _tmp19_;
	TrackerSparqlBuilder* _tmp20_;
	TrackerSparqlBuilder* _tmp21_;
	FolksRoleFieldDetails* _tmp22_;
	gconstpointer _tmp23_;
	FolksRole* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	TrackerSparqlBuilder* _tmp27_;
	TrackerSparqlBuilder* _tmp28_;
	FolksRoleFieldDetails* _tmp29_;
	gconstpointer _tmp30_;
	FolksRole* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	TrackerSparqlBuilder* _tmp34_;
	TrackerSparqlBuilder* _tmp35_;
	FolksRoleFieldDetails* _tmp36_;
	gconstpointer _tmp37_;
	FolksRole* _tmp38_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	TrackerSparqlBuilder* _tmp41_;
	TrackerSparqlBuilder* _tmp42_;
	TrackerSparqlBuilder* _tmp43_;
	const gchar* _tmp44_;
	TrackerSparqlBuilder* _tmp45_;
	TrackerSparqlBuilder* _tmp46_;
	TrackerSparqlBuilder* _tmp47_;
	TrackerSparqlBuilder* _tmp48_;
	TrackerSparqlBuilder* _tmp49_;
	gchar* filter;
	const gchar* _tmp50_;
	gchar* _tmp51_;
	TrackerSparqlBuilder* _tmp52_;
	TrackerSparqlBuilder* _tmp53_;
	const gchar* _tmp54_;
	TrackerSparqlBuilder* _tmp55_;
	const gchar* _tmp56_;
	const gchar* _tmp57_;
	gchar* _tmp58_;
	gchar* _tmp59_;
};

struct _TrfPersonaStoreSetNotesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GeeSet* notes;
	gchar* p_id;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* del_q;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	TrackerSparqlBuilder* builder;
	TrackerSparqlBuilder* _tmp6_;
	TrackerSparqlBuilder* _tmp7_;
	GeeIterator* _n_it;
	GeeSet* _tmp8_;
	GeeIterator* _tmp9_;
	GeeIterator* _tmp10_;
	gboolean _tmp11_;
	FolksNoteFieldDetails* n;
	GeeIterator* _tmp12_;
	gpointer _tmp13_;
	TrackerSparqlBuilder* _tmp14_;
	TrackerSparqlBuilder* _tmp15_;
	TrackerSparqlBuilder* _tmp16_;
	FolksNoteFieldDetails* _tmp17_;
	gconstpointer _tmp18_;
	const gchar* _tmp19_;
	TrackerSparqlBuilder* _tmp20_;
	TrackerSparqlBuilder* _tmp21_;
	TrackerSparqlBuilder* _tmp22_;
	TrackerSparqlBuilder* _tmp23_;
	TrackerSparqlBuilder* _tmp24_;
	gchar* filter;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	TrackerSparqlBuilder* _tmp27_;
	TrackerSparqlBuilder* _tmp28_;
	const gchar* _tmp29_;
	TrackerSparqlBuilder* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	gchar* _tmp33_;
	gchar* _tmp34_;
};

struct _TrfPersonaStoreSetBirthdayData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GDateTime* bday;
	gchar* p_id;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	GTimeVal tv;
	GDateTime* _tmp4_;
	GTimeVal _tmp5_;
	gchar* query;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
};

struct _TrfPersonaStoreSetGenderData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	FolksGender gender;
	gchar* p_id;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* query;
	FolksGender _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* gender_urn;
	FolksGender _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	const gchar* _tmp18_;
};

struct _TrfPersonaStoreSetAvatarData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GLoadableIcon* avatar;
	gchar* p_id;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* image_urn;
	const gchar* _tmp4_;
	gint _tmp5_;
	gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* query;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	FolksAvatarCache* cache;
	FolksAvatarCache* _tmp13_;
	GLoadableIcon* _tmp14_;
	gchar* uri;
	FolksAvatarCache* _tmp15_;
	FolksPersona* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	GLoadableIcon* _tmp19_;
	gchar* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	GError* e1;
	FolksPersona* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	GError* _tmp30_;
	const gchar* _tmp31_;
	FolksAvatarCache* _tmp32_;
	FolksPersona* _tmp33_;
	const gchar* _tmp34_;
	const gchar* _tmp35_;
	GError* e2;
	const gchar* _tmp36_;
	GError * _inner_error_;
};

struct _TrfPersonaStoreSetStructuredNameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	FolksStructuredName* sname;
	gchar* p_id;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* query;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	FolksStructuredName* _tmp6_;
	FolksStructuredName* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	FolksStructuredName* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	FolksStructuredName* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	FolksStructuredName* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	FolksStructuredName* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	const gchar* _tmp24_;
};

struct _TrfPersonaStoreSetFullNameData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	gchar* full_name;
	gchar* p_id;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* query;
	const gchar* _tmp4_;
	gchar* _tmp5_;
};

struct _TrfPersonaStoreSetAttribSetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	GeeSet* attribs;
	TrfAttrib what;
	gchar* p_id;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* related_attrib;
	const gchar* related_prop;
	const gchar* related_prop_2;
	const gchar* related_connection;
	TrfAttrib _tmp4_;
	FolksPersona* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	FolksPersona* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	TrackerSparqlBuilder* builder;
	TrackerSparqlBuilder* _tmp11_;
	TrackerSparqlBuilder* _tmp12_;
	gint i;
	GeeIterator* _p_it;
	GeeSet* _tmp13_;
	GeeIterator* _tmp14_;
	GeeIterator* _tmp15_;
	gboolean _tmp16_;
	GObject* p;
	GeeIterator* _tmp17_;
	gpointer _tmp18_;
	FolksAbstractFieldDetails* fd;
	FolksPostalAddressFieldDetails* pafd;
	FolksPostalAddress* pa;
	gchar* affl;
	gint _tmp19_;
	gchar* _tmp20_;
	gchar* attr;
	TrfAttrib _tmp21_;
	GObject* _tmp22_;
	FolksPostalAddressFieldDetails* _tmp23_;
	FolksPostalAddressFieldDetails* _tmp24_;
	gconstpointer _tmp25_;
	FolksPostalAddress* _tmp26_;
	FolksPostalAddress* _tmp27_;
	gint _tmp28_;
	gchar* _tmp29_;
	TrackerSparqlBuilder* _tmp30_;
	const gchar* _tmp31_;
	TrackerSparqlBuilder* _tmp32_;
	TrackerSparqlBuilder* _tmp33_;
	const gchar* _tmp34_;
	TrackerSparqlBuilder* _tmp35_;
	TrackerSparqlBuilder* _tmp36_;
	FolksPostalAddress* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	TrackerSparqlBuilder* _tmp40_;
	TrackerSparqlBuilder* _tmp41_;
	FolksPostalAddress* _tmp42_;
	const gchar* _tmp43_;
	const gchar* _tmp44_;
	TrackerSparqlBuilder* _tmp45_;
	TrackerSparqlBuilder* _tmp46_;
	FolksPostalAddress* _tmp47_;
	const gchar* _tmp48_;
	const gchar* _tmp49_;
	TrackerSparqlBuilder* _tmp50_;
	TrackerSparqlBuilder* _tmp51_;
	FolksPostalAddress* _tmp52_;
	const gchar* _tmp53_;
	const gchar* _tmp54_;
	TrackerSparqlBuilder* _tmp55_;
	TrackerSparqlBuilder* _tmp56_;
	FolksPostalAddress* _tmp57_;
	const gchar* _tmp58_;
	const gchar* _tmp59_;
	TrackerSparqlBuilder* _tmp60_;
	TrackerSparqlBuilder* _tmp61_;
	FolksPostalAddress* _tmp62_;
	const gchar* _tmp63_;
	const gchar* _tmp64_;
	TrackerSparqlBuilder* _tmp65_;
	TrackerSparqlBuilder* _tmp66_;
	FolksPostalAddress* _tmp67_;
	const gchar* _tmp68_;
	const gchar* _tmp69_;
	GObject* _tmp70_;
	FolksAbstractFieldDetails* _tmp71_;
	GeeCollection* type_p;
	FolksAbstractFieldDetails* _tmp72_;
	GeeCollection* _tmp73_;
	gboolean _tmp74_;
	GeeCollection* _tmp75_;
	GeeCollection* _tmp76_;
	gboolean _tmp77_;
	gboolean _tmp78_;
	GeeCollection* _tmp79_;
	GeeCollection* _tmp80_;
	gboolean _tmp81_;
	FolksAbstractFieldDetails* _tmp82_;
	gconstpointer _tmp83_;
	const gchar* _tmp84_;
	gchar* _tmp85_;
	GObject* _tmp86_;
	FolksAbstractFieldDetails* _tmp87_;
	gint _tmp88_;
	gchar* _tmp89_;
	TrackerSparqlBuilder* _tmp90_;
	const gchar* _tmp91_;
	TrackerSparqlBuilder* _tmp92_;
	TrackerSparqlBuilder* _tmp93_;
	const gchar* _tmp94_;
	TrackerSparqlBuilder* _tmp95_;
	const gchar* _tmp96_;
	TrackerSparqlBuilder* _tmp97_;
	FolksAbstractFieldDetails* _tmp98_;
	gconstpointer _tmp99_;
	const gchar* _tmp100_;
	TrfAttrib _tmp101_;
	TrackerSparqlBuilder* _tmp102_;
	const gchar* _tmp103_;
	gchar** im_params;
	FolksAbstractFieldDetails* _tmp104_;
	GeeCollection* _tmp105_;
	GeeCollection* _tmp106_;
	gint _tmp107_;
	gpointer* _tmp108_;
	gchar** _tmp109_;
	gint _tmp109__length1;
	gint im_params_length1;
	gint _im_params_size_;
	TrackerSparqlBuilder* _tmp110_;
	gchar** _tmp111_;
	gint _tmp111__length1;
	const gchar* _tmp112_;
	TrackerSparqlBuilder* _tmp113_;
	const gchar* _tmp114_;
	TrackerSparqlBuilder* _tmp115_;
	TrackerSparqlBuilder* _tmp116_;
	TrackerSparqlBuilder* _tmp117_;
	const gchar* _tmp118_;
	TrackerSparqlBuilder* _tmp119_;
	const gchar* _tmp120_;
	TrackerSparqlBuilder* _tmp121_;
	TrackerSparqlBuilder* _tmp122_;
	TrackerSparqlBuilder* _tmp123_;
	const gchar* _tmp124_;
	gint _tmp125_;
	TrackerSparqlBuilder* _tmp126_;
	TrackerSparqlBuilder* _tmp127_;
	TrackerSparqlBuilder* _tmp128_;
	TrackerSparqlBuilder* _tmp129_;
	TrackerSparqlBuilder* _tmp130_;
	gchar* filter;
	const gchar* _tmp131_;
	gchar* _tmp132_;
	TrackerSparqlBuilder* _tmp133_;
	TrackerSparqlBuilder* _tmp134_;
	TrackerSparqlBuilder* _tmp135_;
	const gchar* _tmp136_;
	const gchar* _tmp137_;
};

struct _TrfPersonaStoreTrackerUpdateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* query;
	gchar* caller;
	gboolean result;
	gboolean ret;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	TrackerSparqlConnection* _tmp2_;
	const gchar* _tmp3_;
	GError* e1;
	const gchar* _tmp4_;
	GError* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	GError* e2;
	const gchar* _tmp8_;
	GError* _tmp9_;
	const gchar* _tmp10_;
	GError* e3;
	const gchar* _tmp11_;
	GError* _tmp12_;
	const gchar* _tmp13_;
	GError * _inner_error_;
};

struct _TrfPersonaStoreAffiliationsFromPersonaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* urn;
	FolksSmallSet* result;
	const gchar* _tmp0_;
	FolksSmallSet* _tmp1_;
};

struct _TrfPersonaStorePhonesFromAffiliationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* affl;
	FolksSmallSet* result;
	const gchar* _tmp0_;
	FolksSmallSet* _tmp1_;
};

struct _TrfPersonaStorePostalsFromAffiliationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* affl;
	FolksSmallSet* result;
	const gchar* _tmp0_;
	FolksSmallSet* _tmp1_;
};

struct _TrfPersonaStoreImaddrsFromAffiliationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* affl;
	FolksSmallSet* result;
	const gchar* _tmp0_;
	FolksSmallSet* _tmp1_;
};

struct _TrfPersonaStoreEmailsFromAffiliationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* affl;
	FolksSmallSet* result;
	const gchar* _tmp0_;
	FolksSmallSet* _tmp1_;
};

struct _TrfPersonaStoreResourceUsageCountData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* resource;
	gint result;
	gchar* query;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _result_;
	gchar* _tmp3_;
	gint _tmp4_;
};

struct _TrfPersonaStoreDeleteResourceData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* resource_urn;
	gboolean check_count;
	gboolean result;
	gboolean deleted;
	gchar* query_t;
	gchar* _tmp0_;
	gchar* query;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gboolean _tmp5_;
	gint count;
	const gchar* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	const gchar* _tmp9_;
	gboolean _tmp10_;
	const gchar* _tmp11_;
	gboolean _tmp12_;
};

struct _TrfPersonaStoreLinkedResourcesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* urn;
	gchar* subject_type;
	gchar* linking_predicate;
	FolksSmallSet* result;
	gchar* query_t;
	gchar* _tmp0_;
	gchar* query;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	FolksSmallSet* _tmp5_;
};

struct _TrfPersonaStoreUrnFromPersonaData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	FolksPersona* persona;
	gchar* result;
	gchar* id;
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
};

struct _TrfPersonaStoreUrnFromPropertyData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrfPersonaStore* self;
	gchar* class_name;
	gchar* property_name;
	gchar* property_value;
	gchar* result;
	gchar* query;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
};


static gpointer trf_persona_store_parent_class = NULL;
static GeeTreeMap* trf_persona_store__urn_prefix;
static GeeTreeMap* trf_persona_store__urn_prefix = NULL;
static GeeTreeMap* trf_persona_store__prefix_tracker_id;
static GeeTreeMap* trf_persona_store__prefix_tracker_id = NULL;

GType trf_fields_get_type (void) G_GNUC_CONST;
GType trf_affl_info_fields_get_type (void) G_GNUC_CONST;
GType trf_postal_address_fields_get_type (void) G_GNUC_CONST;
GType trf_urls_fields_get_type (void) G_GNUC_CONST;
GType trf_role_fields_get_type (void) G_GNUC_CONST;
GType trf_im_fields_get_type (void) G_GNUC_CONST;
GType trf_phone_fields_get_type (void) G_GNUC_CONST;
GType trf_email_fields_get_type (void) G_GNUC_CONST;
GType trf_tag_fields_get_type (void) G_GNUC_CONST;
GType trf_attrib_get_type (void) G_GNUC_CONST;
#define _REMOVE_ALL_ATTRIBS ((gchar) 0x01)
#define _REMOVE_PHONES ((gchar) 0x02)
#define _REMOVE_POSTALS ((gchar) 0x04)
#define _REMOVE_IM_ADDRS ((gchar) 0x08)
#define _REMOVE_EMAILS ((gchar) 0x10)
GType trf_persona_store_get_type (void) G_GNUC_CONST;
GType trf_persona_get_type (void) G_GNUC_CONST;
GType resources_get_type (void) G_GNUC_CONST;
GType resources_proxy_get_type (void) G_GNUC_CONST;
guint resources_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
#define TRF_PERSONA_STORE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRF_TYPE_PERSONA_STORE, TrfPersonaStorePrivate))
enum  {
	TRF_PERSONA_STORE_DUMMY_PROPERTY,
	TRF_PERSONA_STORE_TYPE_ID,
	TRF_PERSONA_STORE_CAN_ADD_PERSONAS,
	TRF_PERSONA_STORE_CAN_ALIAS_PERSONAS,
	TRF_PERSONA_STORE_CAN_GROUP_PERSONAS,
	TRF_PERSONA_STORE_CAN_REMOVE_PERSONAS,
	TRF_PERSONA_STORE_IS_PREPARED,
	TRF_PERSONA_STORE_ALWAYS_WRITEABLE_PROPERTIES,
	TRF_PERSONA_STORE_IS_QUIESCENT,
	TRF_PERSONA_STORE_PERSONAS
};
#define TRF_PERSONA_STORE__LOCAL_ID_PROPERTY_NAME "folks-linking-ids"
#define TRF_PERSONA_STORE__WSD_PROPERTY_NAME "folks-linking-ws-addrs"
#define TRF_PERSONA_STORE__OBJECT_NAME "org.freedesktop.Tracker1"
#define TRF_PERSONA_STORE__OBJECT_IFACE "org.freedesktop.Tracker1.Resources"
#define TRF_PERSONA_STORE__OBJECT_PATH "/org/freedesktop/Tracker1/Resources"
#define TRF_PERSONA_STORE__default_timeout 100
#define TRF_PERSONA_STORE__INITIAL_QUERY "SELECT " "tracker:id(?_contact) " "nco:fullname(?_contact) " "nco:nameFamily(?_contact) " "nco:nameGiven(?_contact) " "nco:nameAdditional(?_contact) " "nco:nameHonorificPrefix(?_contact) " "nco:nameHonorificSuffix(?_contact) " "nco:nickname(?_contact) " "nco:birthDate(?_contact) " "nie:url(nco:photo(?_contact)) " "(SELECT " "GROUP_CONCAT ( " " fn:concat(tracker:id(?affl),'\t'," " tracker:coalesce(nco:imProtocol(?a),''), " "'\t', tracker:coalesce(nco:imID(?a),''), '\t'," " tracker:coalesce(nco:imNickname(?a),'')), '\\n') " "WHERE { ?_contact nco:hasAffiliation ?affl. " " ?affl nco:hasIMAddress ?a } ) " "(SELECT " "GROUP_CONCAT " " (fn:concat(tracker:id(?affl),'\t', " " nco:phoneNumber(?aff_number)), " "'\\n') " "WHERE { ?_contact nco:hasAffiliation ?affl . " " ?affl nco:hasPhoneNumber ?aff_number  } ) " "(SELECT " "GROUP_CONCAT " " (fn:concat(tracker:id(?affl), '\t', " "  nco:emailAddress(?emailaddress)), " "',') " "WHERE { ?_contact nco:hasAffiliation ?affl . " " ?affl nco:hasEmailAddress ?emailaddress }) " " (SELECT " "GROUP_CONCAT " " (fn:concat(tracker:id(?affl), '\t'," "  tracker:coalesce(nco:blogUrl(?affl),'')," "  '\t'," "  tracker:coalesce(nco:websiteUrl(?affl),'')" "  , '\t'," "  tracker:coalesce(nco:url(?affl),''))," "  '\\n') " "WHERE { ?_contact nco:hasAffiliation ?affl  } )" "(SELECT " "GROUP_CONCAT(tracker:id(?_tag), " "',') " "WHERE { ?_contact nao:hasTag " "?_tag }) " "?_contact " "(SELECT " "GROUP_CONCAT " " (fn:concat(tracker:id(?affl), '\t', " "  tracker:coalesce(nco:role(?affl),''), '\t', " "  tracker:coalesce(nco:department(?affl),''), '\t', " "  tracker:coalesce(nco:title(?affl),'')), " "'\\n') " "WHERE { ?_contact nco:hasAffiliation " "?affl }) " "nco:note(?_contact) " "tracker:id(nco:gender(?_contact)) " "(SELECT " "GROUP_CONCAT " " (fn:concat(tracker:id(?affl), '\t', " "  tracker:coalesce(nco:pobox(?postal),'')" "  , '\t', " "  tracker:coalesce(nco:district(?postal),'')" "  , '\t', " "  tracker:coalesce(nco:county(?postal),'')" "  , '\t', " "  tracker:coalesce(nco:locality(?postal),'')" "  , '\t', " "  tracker:coalesce(nco:postalcode(?postal),'')" "  , '\t', " "  tracker:coalesce(nco:streetAddress(?postal)" "  ,''), '\t', " "  tracker:coalesce(nco:addressLocation(?postal)" "  ,''), '\t', " "  tracker:coalesce(nco:extendedAddress(?postal)" "  ,''), '\t', " "  tracker:coalesce(nco:country(?postal),'')" "  , '\t', " "  tracker:coalesce(nco:region(?postal),'')),  " "'\\n') " "WHERE { ?_contact nco:hasAffiliation " "?affl . ?affl nco:hasPostalAddress ?postal }) " "(SELECT " "GROUP_CONCAT " " (?prop_value,  " "',') " "WHERE { ?_contact nao:hasProperty ?prop . " " ?prop nao:propertyName ?prop_name . " " ?prop nao:propertyValue ?prop_value . " " FILTER (?prop_name = 'folks-linking-ids') } ) " "{ ?_contact a nco:PersonContact . %s } " "ORDER BY tracker:id(?_contact) "
TrfPersonaStore* trf_persona_store_new (void);
TrfPersonaStore* trf_persona_store_construct (GType object_type);
static void trf_persona_store_real_add_persona_from_details_data_free (gpointer _data);
static void trf_persona_store_real_add_persona_from_details (FolksPersonaStore* base, GHashTable* details, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean trf_persona_store_real_add_persona_from_details_co (TrfPersonaStoreAddPersonaFromDetailsData* _data_);
static GValue* _g_value_dup (GValue* self);
#define TRF_ONTOLOGY_DEFS_NCO_NICKNAME "nco:nickname"
#define TRF_ONTOLOGY_DEFS_NCO_FULLNAME "nco:fullname"
#define TRF_ONTOLOGY_DEFS_NCO_FAMILY "nco:nameFamily"
#define TRF_ONTOLOGY_DEFS_NCO_GIVEN "nco:nameGiven"
#define TRF_ONTOLOGY_DEFS_NCO_ADDITIONAL "nco:nameAdditional"
#define TRF_ONTOLOGY_DEFS_NCO_SUFFIX "nco:nameHonorificSuffix"
#define TRF_ONTOLOGY_DEFS_NCO_PREFIX "nco:nameHonorificPrefix"
#define TRF_ONTOLOGY_DEFS_NAO_TAG "nao:hasTag"
#define TRF_ONTOLOGY_DEFS_NAO_FAVORITE "nao:predefined-tag-favorite"
#define TRF_ONTOLOGY_DEFS_NCO_BIRTHDAY "nco:birthDate"
#define TRF_ONTOLOGY_DEFS_NCO_GENDER "nco:gender"
#define TRF_ONTOLOGY_DEFS_NCO_MALE "nco:gender-male"
#define TRF_ONTOLOGY_DEFS_NCO_FEMALE "nco:gender-female"
static void _trf_persona_store_build_update_query_set (TrfPersonaStore* self, TrackerSparqlBuilder* builder, GeeSet* properties, const gchar* contact_var, TrfAttrib attrib, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _trf_persona_store_build_update_query_set_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void trf_persona_store_add_persona_from_details_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
#define TRF_ONTOLOGY_DEFS_NCO_IMADDRESS "nco:IMAddress"
#define TRF_ONTOLOGY_DEFS_NCO_IMID "nco:imID"
#define TRF_ONTOLOGY_DEFS_NCO_IMPROTOCOL "nco:imProtocol"
#define TRF_ONTOLOGY_DEFS_NCO_AFFILIATION "nco:Affiliation"
#define TRF_ONTOLOGY_DEFS_NCO_HAS_IMADDRESS "nco:hasIMAddress"
#define TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION "nco:hasAffiliation"
#define TRF_ONTOLOGY_DEFS_NCO_NOTE "nco:note"
#define TRF_ONTOLOGY_DEFS_NCO_ROLE "nco:role"
#define TRF_ONTOLOGY_DEFS_NCO_TITLE "nco:title"
#define TRF_ONTOLOGY_DEFS_NCO_ORG "nco:org"
#define TRF_ONTOLOGY_DEFS_NCO_POSTAL_ADDRESS "nco:PostalAddress"
#define TRF_ONTOLOGY_DEFS_NCO_POBOX "nco:pobox"
#define TRF_ONTOLOGY_DEFS_NCO_LOCALITY "nco:locality"
#define TRF_ONTOLOGY_DEFS_NCO_POSTALCODE "nco:postalcode"
#define TRF_ONTOLOGY_DEFS_NCO_STREET_ADDRESS "nco:streetAddress"
#define TRF_ONTOLOGY_DEFS_NCO_EXTENDED_ADDRESS "nco:extendedAddress"
#define TRF_ONTOLOGY_DEFS_NCO_COUNTRY "nco:country"
#define TRF_ONTOLOGY_DEFS_NCO_REGION "nco:region"
#define TRF_ONTOLOGY_DEFS_NCO_HAS_POSTAL_ADDRESS "nco:hasPostalAddress"
#define TRF_ONTOLOGY_DEFS_NCO_URL "nco:url"
gchar* trf_persona_store_serialize_local_ids (GeeSet* local_ids);
#define TRF_ONTOLOGY_DEFS_NAO_PROPERTY "nao:Property"
#define TRF_ONTOLOGY_DEFS_NAO_PROPERTY_NAME "nao:propertyName"
#define TRF_ONTOLOGY_DEFS_NAO_PROPERTY_VALUE "nao:propertyValue"
#define TRF_ONTOLOGY_DEFS_NAO_HAS_PROPERTY "nao:hasProperty"
gchar* trf_persona_store_serialize_web_services (GeeMultiMap* ws_obj);
static void _vala_GValue_free (GValue* self);
static void _trf_persona_store_insert_persona (TrfPersonaStore* self, const gchar* query, const gchar* persona_var, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gchar* _trf_persona_store_insert_persona_finish (TrfPersonaStore* self, GAsyncResult* _res_, GError** error);
static void _trf_persona_store_do_add_contacts (TrfPersonaStore* self, const gchar* query, GAsyncReadyCallback _callback_, gpointer _user_data_);
static GeeHashSet* _trf_persona_store_do_add_contacts_finish (TrfPersonaStore* self, GAsyncResult* _res_);
void _trf_persona_store_set_avatar (TrfPersonaStore* self, FolksPersona* persona, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_avatar_finish (TrfPersonaStore* self, GAsyncResult* _res_);
GeeMultiMap* trf_persona_store_unserialize_web_services (const gchar* ws_addrs);
static guint _folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v, gpointer self);
static gboolean _folks_abstract_field_details_equal_static_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self);
GeeSet* trf_persona_store_unserialize_local_ids (const gchar* local_ids);
static void trf_persona_store_real_remove_persona_data_free (gpointer _data);
static void trf_persona_store_real_remove_persona (FolksPersonaStore* base, FolksPersona* persona, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean trf_persona_store_real_remove_persona_co (TrfPersonaStoreRemovePersonaData* _data_);
static void _trf_persona_store_remove_attributes_from_persona (TrfPersonaStore* self, FolksPersona* persona, gchar remove_flag, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gchar* _trf_persona_store_remove_attributes_from_persona_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void trf_persona_store_remove_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_tracker_update (TrfPersonaStore* self, const gchar* query, const gchar* caller, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean _trf_persona_store_tracker_update_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_remove_attributes_from_persona_data_free (gpointer _data);
static gboolean _trf_persona_store_remove_attributes_from_persona_co (TrfPersonaStoreRemoveAttributesFromPersonaData* _data_);
static void _trf_persona_store_urn_from_persona (TrfPersonaStore* self, FolksPersona* persona, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gchar* _trf_persona_store_urn_from_persona_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_remove_attributes_from_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_remove_attributes (TrfPersonaStore* self, const gchar* urn, gchar remove_flag, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _trf_persona_store_remove_attributes_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_build_update_query_set_data_free (gpointer _data);
static gboolean _trf_persona_store_build_update_query_set_co (TrfPersonaStoreBuildUpdateQuerySetData* _data_);
#define TRF_ONTOLOGY_DEFS_NCO_PHONE "nco:PhoneNumber"
#define TRF_ONTOLOGY_DEFS_NCO_PHONE_PROP "nco:phoneNumber"
#define TRF_ONTOLOGY_DEFS_NCO_HAS_PHONE "nco:hasPhoneNumber"
#define TRF_ONTOLOGY_DEFS_NCO_EMAIL "nco:EmailAddress"
#define TRF_ONTOLOGY_DEFS_NCO_EMAIL_PROP "nco:emailAddress"
#define TRF_ONTOLOGY_DEFS_NCO_HAS_EMAIL "nco:hasEmailAddress"
static void _trf_persona_store_urn_from_property (TrfPersonaStore* self, const gchar* class_name, const gchar* property_name, const gchar* property_value, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gchar* _trf_persona_store_urn_from_property_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_build_update_query_set_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_remove_attributes_data_free (gpointer _data);
static gboolean _trf_persona_store_remove_attributes_co (TrfPersonaStoreRemoveAttributesData* _data_);
static void _trf_persona_store_affiliations_from_persona (TrfPersonaStore* self, const gchar* urn, GAsyncReadyCallback _callback_, gpointer _user_data_);
static FolksSmallSet* _trf_persona_store_affiliations_from_persona_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_remove_attributes_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_phones_from_affiliation (TrfPersonaStore* self, const gchar* affl, GAsyncReadyCallback _callback_, gpointer _user_data_);
static FolksSmallSet* _trf_persona_store_phones_from_affiliation_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_delete_resource (TrfPersonaStore* self, const gchar* resource_urn, gboolean check_count, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean _trf_persona_store_delete_resource_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_postals_from_affiliation (TrfPersonaStore* self, const gchar* affl, GAsyncReadyCallback _callback_, gpointer _user_data_);
static FolksSmallSet* _trf_persona_store_postals_from_affiliation_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_imaddrs_from_affiliation (TrfPersonaStore* self, const gchar* affl, GAsyncReadyCallback _callback_, gpointer _user_data_);
static FolksSmallSet* _trf_persona_store_imaddrs_from_affiliation_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_emails_from_affiliation (TrfPersonaStore* self, const gchar* affl, GAsyncReadyCallback _callback_, gpointer _user_data_);
static FolksSmallSet* _trf_persona_store_emails_from_affiliation_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void trf_persona_store_real_prepare_data_free (gpointer _data);
static void trf_persona_store_real_prepare (FolksPersonaStore* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean trf_persona_store_real_prepare_co (TrfPersonaStorePrepareData* _data_);
static void trf_persona_store_prepare_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_build_predicates_table (TrfPersonaStore* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _trf_persona_store_build_predicates_table_finish (TrfPersonaStore* self, GAsyncResult* _res_);
#define TRF_ONTOLOGY_DEFS_PERSON_CLASS "http://www.semanticdesktop.org/ontologies/2007/03/22/nco#PersonContact"
static void _trf_persona_store_graph_updated_cb (TrfPersonaStore* self, GDBusConnection* connection, const gchar* sender_name, const gchar* object_path, const gchar* interface_name, const gchar* signal_name, GVariant* parameters);
static void __trf_persona_store_graph_updated_cb_gd_bus_signal_callback (GDBusConnection* connection, const gchar* sender_name, const gchar* object_path, const gchar* interface_name, const gchar* signal_name, GVariant* parameters, gpointer self);
gint trf_persona_store_get_favorite_id (TrfPersonaStore* self);
gint trf_persona_store_get_gender_male_id (TrfPersonaStore* self);
gint trf_persona_store_get_gender_female_id (TrfPersonaStore* self);
static void _trf_persona_store_build_predicates_table_data_free (gpointer _data);
static gboolean _trf_persona_store_build_predicates_table_co (TrfPersonaStoreBuildPredicatesTableData* _data_);
static void _trf_persona_store_build_urn_prefix_table (TrfPersonaStore* self);
static void _trf_persona_store_build_predicates_table_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
#define TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "<http://www.semanticdesktop.org/ontologies/2007/03/22/"
#define TRF_ONTOLOGY_DEFS_RDF_URL_PREFIX "<http://www.w3.org/1999/02/"
#define TRF_ONTOLOGY_DEFS_RDF_TYPE "ns:type"
#define TRF_ONTOLOGY_DEFS_NCO_PERSON "nco:PersonContact"
#define TRF_ONTOLOGY_DEFS_NCO_WEBSITE "nco:websiteUrl"
#define TRF_ONTOLOGY_DEFS_NCO_BLOG "nco:blogUrl"
#define TRF_ONTOLOGY_DEFS_NAO_URL_PREFIX "<http://www.semanticdesktop.org/ontologies/2007/08/15/"
#define TRF_ONTOLOGY_DEFS_NCO_PHOTO "nco:photo"
static void _trf_persona_store_handle_events (TrfPersonaStore* self, GVariantIter* iter_del, GVariantIter* iter_ins, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _trf_persona_store_handle_events_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_handle_events_data_free (gpointer _data);
static gboolean _trf_persona_store_handle_events_co (TrfPersonaStoreHandleEventsData* _data_);
static void _trf_persona_store_handle_delete_events (TrfPersonaStore* self, GVariantIter* iter_del, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _trf_persona_store_handle_delete_events_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_handle_events_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_handle_insert_events (TrfPersonaStore* self, GVariantIter* iter_ins, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _trf_persona_store_handle_insert_events_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_handle_delete_events_data_free (gpointer _data);
static gboolean _trf_persona_store_handle_delete_events_co (TrfPersonaStoreHandleDeleteEventsData* _data_);
GType event_get_type (void) G_GNUC_CONST;
Event* event_dup (const Event* self);
void event_free (Event* self);
gchar* trf_persona_build_iid (const gchar* store_id, const gchar* tracker_id);
static void _trf_persona_store_do_update (TrfPersonaStore* self, TrfPersona* p, Event* e, gboolean adding, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _trf_persona_store_do_update_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_handle_delete_events_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_handle_insert_events_data_free (gpointer _data);
static gboolean _trf_persona_store_handle_insert_events_co (TrfPersonaStoreHandleInsertEventsData* _data_);
TrfPersona* trf_persona_new (TrfPersonaStore* store, const gchar* tracker_id, TrackerSparqlCursor* cursor);
TrfPersona* trf_persona_construct (GType object_type, TrfPersonaStore* store, const gchar* tracker_id, TrackerSparqlCursor* cursor);
static void _trf_persona_store_handle_insert_events_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_do_add_contacts_data_free (gpointer _data);
static gboolean _trf_persona_store_do_add_contacts_co (TrfPersonaStoreDoAddContactsData* _data_);
static void _trf_persona_store_do_add_contacts_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_do_update_data_free (gpointer _data);
static gboolean _trf_persona_store_do_update_co (TrfPersonaStoreDoUpdateData* _data_);
static void _trf_persona_store_get_property (TrfPersonaStore* self, gint subject_tracker_id, const gchar* property, const gchar* subject_type, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gchar* _trf_persona_store_get_property_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_do_update_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void _trf_persona_update_full_name (TrfPersona* self, const gchar* fn);
void _trf_persona_update_nickname (TrfPersona* self, const gchar* nickname);
void _trf_persona_update_family_name (TrfPersona* self, const gchar* family_name);
void _trf_persona_update_given_name (TrfPersona* self, const gchar* given_name);
void _trf_persona_update_additional_names (TrfPersona* self, const gchar* additional_names);
void _trf_persona_update_suffixes (TrfPersona* self, const gchar* suffixes);
void _trf_persona_update_prefixes (TrfPersona* self, const gchar* prefixes);
void _trf_persona_set_favourite (TrfPersona* self, gboolean is_fav);
gboolean _trf_persona_add_email (TrfPersona* self, const gchar* addr, const gchar* tracker_id);
gboolean _trf_persona_remove_email (TrfPersona* self, const gchar* tracker_id);
gboolean _trf_persona_add_phone (TrfPersona* self, const gchar* phone, const gchar* tracker_id);
gboolean _trf_persona_remove_phone (TrfPersona* self, const gchar* tracker_id);
GType trf_affl_info_get_type (void) G_GNUC_CONST;
static void _trf_persona_store_get_affl_info (TrfPersonaStore* self, const gchar* person_id, const gchar* affiliation_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
static TrfAfflInfo* _trf_persona_store_get_affl_info_finish (TrfPersonaStore* self, GAsyncResult* _res_);
gchar* trf_affl_info_to_string (TrfAfflInfo* self);
const gchar* trf_affl_info_get_im_tracker_id (TrfAfflInfo* self);
const gchar* trf_affl_info_get_im_nickname (TrfAfflInfo* self);
const gchar* trf_affl_info_get_im_proto (TrfAfflInfo* self);
gboolean _trf_persona_add_im_address (TrfPersona* self, const gchar* tracker_id, const gchar* im_proto, const gchar* account_id, gboolean notify);
const gchar* trf_affl_info_get_affl_tracker_id (TrfAfflInfo* self);
const gchar* trf_affl_info_get_im_account_id (TrfAfflInfo* self);
const gchar* trf_affl_info_get_title (TrfAfflInfo* self);
const gchar* trf_affl_info_get_org (TrfAfflInfo* self);
gboolean _trf_persona_add_role (TrfPersona* self, const gchar* tracker_id, const gchar* role, const gchar* title, const gchar* org);
const gchar* trf_affl_info_get_role (TrfAfflInfo* self);
gboolean _trf_persona_add_postal_address (TrfPersona* self, FolksPostalAddressFieldDetails* postal_address_fd);
const gchar* trf_affl_info_get_phone (TrfAfflInfo* self);
const gchar* trf_affl_info_get_email (TrfAfflInfo* self);
const gchar* trf_affl_info_get_website (TrfAfflInfo* self);
gboolean _trf_persona_add_url (TrfPersona* self, const gchar* url, const gchar* tracker_id, const gchar* type);
const gchar* trf_affl_info_get_blog (TrfAfflInfo* self);
const gchar* trf_affl_info_get_url (TrfAfflInfo* self);
gboolean _trf_persona_remove_im_address (TrfPersona* self, const gchar* tracker_id, gboolean notify);
gboolean _trf_persona_remove_role (TrfPersona* self, const gchar* tracker_id);
gboolean _trf_persona_remove_postal_address (TrfPersona* self, const gchar* tracker_id);
gboolean _trf_persona_remove_url (TrfPersona* self, const gchar* tracker_id);
void _trf_persona_set_birthday (TrfPersona* self, const gchar* birthday);
void _trf_persona_set_note (TrfPersona* self, const gchar* note_content);
void _trf_persona_set_gender (TrfPersona* self, gint gender_id);
#define TRF_ONTOLOGY_DEFS_NIE_URL "nie:url"
#define TRF_ONTOLOGY_DEFS_NFO_IMAGE "nfo:Image"
gboolean _trf_persona_set_avatar_from_uri (TrfPersona* self, const gchar* avatar_url);
static void _trf_persona_store_get_nao_property_by_prop_id (TrfPersonaStore* self, gint nao_prop_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gchar** _trf_persona_store_get_nao_property_by_prop_id_finish (TrfPersonaStore* self, GAsyncResult* _res_, int* result_length1);
gboolean _trf_persona_set_local_ids (TrfPersona* self, const gchar* local_ids);
gboolean _trf_persona_set_web_service_addrs (TrfPersona* self, const gchar* ws_addrs);
static void _trf_persona_store_get_nao_property_by_person_id (TrfPersonaStore* self, gint nco_person_id, const gchar* prop_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gchar* _trf_persona_store_get_nao_property_by_person_id_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_get_property_data_free (gpointer _data);
static gboolean _trf_persona_store_get_property_co (TrfPersonaStoreGetPropertyData* _data_);
static void _trf_persona_store_single_value_query (TrfPersonaStore* self, const gchar* query, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gchar* _trf_persona_store_single_value_query_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_get_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_get_nao_property_by_person_id_data_free (gpointer _data);
static gboolean _trf_persona_store_get_nao_property_by_person_id_co (TrfPersonaStoreGetNaoPropertyByPersonIdData* _data_);
static void _trf_persona_store_get_nao_property_by_person_id_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_get_nao_property_by_prop_id_data_free (gpointer _data);
static gboolean _trf_persona_store_get_nao_property_by_prop_id_co (TrfPersonaStoreGetNaoPropertyByPropIdData* _data_);
static void _trf_persona_store_get_nao_property_by_prop_id_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_get_affl_info_data_free (gpointer _data);
static gboolean _trf_persona_store_get_affl_info_co (TrfPersonaStoreGetAfflInfoData* _data_);
TrfAfflInfo* trf_affl_info_new (void);
TrfAfflInfo* trf_affl_info_construct (GType object_type);
#define TRF_ONTOLOGY_DEFS_NCO_DISTRICT "nco:district"
#define TRF_ONTOLOGY_DEFS_NCO_COUNTY "nco:county"
#define TRF_ONTOLOGY_DEFS_NCO_ADDRESS_LOCATION "nco:addressLocation"
#define TRF_ONTOLOGY_DEFS_NCO_IM_NICKNAME "nco:imNickname"
static void _trf_persona_store_get_affl_info_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void trf_affl_info_set_im_tracker_id (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_im_proto (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_im_account_id (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_im_nickname (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_affl_tracker_id (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_role (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_org (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_title (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_email (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_phone (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_website (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_blog (TrfAfflInfo* self, const gchar* value);
void trf_affl_info_set_url (TrfAfflInfo* self, const gchar* value);
static void _trf_persona_store_insert_persona_data_free (gpointer _data);
static gboolean _trf_persona_store_insert_persona_co (TrfPersonaStoreInsertPersonaData* _data_);
static void _trf_persona_store_insert_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_single_value_query_data_free (gpointer _data);
static gboolean _trf_persona_store_single_value_query_co (TrfPersonaStoreSingleValueQueryData* _data_);
static void _trf_persona_store_multi_value_query (TrfPersonaStore* self, const gchar* query, GAsyncReadyCallback _callback_, gpointer _user_data_);
static FolksSmallSet* _trf_persona_store_multi_value_query_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_single_value_query_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_multi_value_query_data_free (gpointer _data);
static gboolean _trf_persona_store_multi_value_query_co (TrfPersonaStoreMultiValueQueryData* _data_);
static void _trf_persona_store_multi_value_query_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_urn_from_tracker_id_data_free (gpointer _data);
static void _trf_persona_store_urn_from_tracker_id (TrfPersonaStore* self, const gchar* tracker_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gchar* _trf_persona_store_urn_from_tracker_id_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_urn_from_tracker_id_co (TrfPersonaStoreUrnFromTrackerIdData* _data_);
static void _trf_persona_store_urn_from_tracker_id_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_nickname_data_free (gpointer _data);
void _trf_persona_store_set_nickname (TrfPersonaStore* self, TrfPersona* persona, const gchar* nickname, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_nickname_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_nickname_co (TrfPersonaStoreSetNicknameData* _data_);
const gchar* trf_persona_get_tracker_id (TrfPersona* self);
static void _trf_persona_store_set_nickname_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_local_ids_data_free (gpointer _data);
void _trf_persona_store_set_local_ids (TrfPersonaStore* self, TrfPersona* persona, GeeSet* local_ids, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_local_ids_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_local_ids_co (TrfPersonaStoreSetLocalIdsData* _data_);
static void _trf_persona_store_set_tracker_property (TrfPersonaStore* self, TrfPersona* persona, const gchar* prop_name, const gchar* prop_value, const gchar* callers_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _trf_persona_store_set_tracker_property_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_set_local_ids_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_web_service_addrs_data_free (gpointer _data);
void _trf_persona_store_set_web_service_addrs (TrfPersonaStore* self, TrfPersona* persona, GeeMultiMap* ws_obj, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_web_service_addrs_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_web_service_addrs_co (TrfPersonaStoreSetWebServiceAddrsData* _data_);
static void _trf_persona_store_set_web_service_addrs_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_tracker_property_data_free (gpointer _data);
static gboolean _trf_persona_store_set_tracker_property_co (TrfPersonaStoreSetTrackerPropertyData* _data_);
static void _trf_persona_store_set_tracker_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_is_favourite_data_free (gpointer _data);
void _trf_persona_store_set_is_favourite (TrfPersonaStore* self, FolksPersona* persona, gboolean is_favourite, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_is_favourite_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_is_favourite_co (TrfPersonaStoreSetIsFavouriteData* _data_);
static void _trf_persona_store_set_is_favourite_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_emails_data_free (gpointer _data);
void _trf_persona_store_set_emails (TrfPersonaStore* self, FolksPersona* persona, GeeSet* emails, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_emails_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_emails_co (TrfPersonaStoreSetEmailsData* _data_);
void _trf_persona_store_set_unique_attrib_set (TrfPersonaStore* self, FolksPersona* persona, GeeSet* properties, TrfAttrib attrib, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_unique_attrib_set_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_set_emails_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_phones_data_free (gpointer _data);
void _trf_persona_store_set_phones (TrfPersonaStore* self, FolksPersona* persona, GeeSet* phone_numbers, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_phones_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_phones_co (TrfPersonaStoreSetPhonesData* _data_);
static void _trf_persona_store_set_phones_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_unique_attrib_set_data_free (gpointer _data);
static gboolean _trf_persona_store_set_unique_attrib_set_co (TrfPersonaStoreSetUniqueAttribSetData* _data_);
static void _trf_persona_store_set_unique_attrib_set_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_urls_data_free (gpointer _data);
void _trf_persona_store_set_urls (TrfPersonaStore* self, FolksPersona* persona, GeeSet* urls, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_urls_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_urls_co (TrfPersonaStoreSetUrlsData* _data_);
static void _trf_persona_store_set_attrib_set (TrfPersonaStore* self, FolksPersona* persona, GeeSet* attribs, TrfAttrib what, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _trf_persona_store_set_attrib_set_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_set_urls_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_im_addresses_data_free (gpointer _data);
void _trf_persona_store_set_im_addresses (TrfPersonaStore* self, FolksPersona* persona, GeeMultiMap* im_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_im_addresses_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_im_addresses_co (TrfPersonaStoreSetImAddressesData* _data_);
static void _trf_persona_store_set_im_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_postal_addresses_data_free (gpointer _data);
void _trf_persona_store_set_postal_addresses (TrfPersonaStore* self, FolksPersona* persona, GeeSet* postal_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_postal_addresses_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_postal_addresses_co (TrfPersonaStoreSetPostalAddressesData* _data_);
static void _trf_persona_store_set_postal_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_roles_data_free (gpointer _data);
void _trf_persona_store_set_roles (TrfPersonaStore* self, FolksPersona* persona, GeeSet* roles, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_roles_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_roles_co (TrfPersonaStoreSetRolesData* _data_);
static void _trf_persona_store_set_roles_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_notes_data_free (gpointer _data);
void _trf_persona_store_set_notes (TrfPersonaStore* self, FolksPersona* persona, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_notes_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_notes_co (TrfPersonaStoreSetNotesData* _data_);
static void _trf_persona_store_set_notes_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_birthday_data_free (gpointer _data);
void _trf_persona_store_set_birthday (TrfPersonaStore* self, FolksPersona* persona, GDateTime* bday, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_birthday_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_birthday_co (TrfPersonaStoreSetBirthdayData* _data_);
static void _trf_persona_store_set_birthday_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_gender_data_free (gpointer _data);
void _trf_persona_store_set_gender (TrfPersonaStore* self, FolksPersona* persona, FolksGender gender, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_gender_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_gender_co (TrfPersonaStoreSetGenderData* _data_);
static void _trf_persona_store_set_gender_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_avatar_data_free (gpointer _data);
static gboolean _trf_persona_store_set_avatar_co (TrfPersonaStoreSetAvatarData* _data_);
#define TRF_ONTOLOGY_DEFS_NIE_DATAOBJECT "nie:DataObject"
static void _trf_persona_store_set_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_structured_name_data_free (gpointer _data);
void _trf_persona_store_set_structured_name (TrfPersonaStore* self, FolksPersona* persona, FolksStructuredName* sname, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_structured_name_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_structured_name_co (TrfPersonaStoreSetStructuredNameData* _data_);
static void _trf_persona_store_set_structured_name_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_full_name_data_free (gpointer _data);
void _trf_persona_store_set_full_name (TrfPersonaStore* self, FolksPersona* persona, const gchar* full_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
void _trf_persona_store_set_full_name_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_set_full_name_co (TrfPersonaStoreSetFullNameData* _data_);
static void _trf_persona_store_set_full_name_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_set_attrib_set_data_free (gpointer _data);
static gboolean _trf_persona_store_set_attrib_set_co (TrfPersonaStoreSetAttribSetData* _data_);
static void _trf_persona_store_set_attrib_set_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_tracker_update_data_free (gpointer _data);
static gboolean _trf_persona_store_tracker_update_co (TrfPersonaStoreTrackerUpdateData* _data_);
static void _trf_persona_store_tracker_update_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_affiliations_from_persona_data_free (gpointer _data);
static gboolean _trf_persona_store_affiliations_from_persona_co (TrfPersonaStoreAffiliationsFromPersonaData* _data_);
static void _trf_persona_store_linked_resources (TrfPersonaStore* self, const gchar* urn, const gchar* subject_type, const gchar* linking_predicate, GAsyncReadyCallback _callback_, gpointer _user_data_);
static FolksSmallSet* _trf_persona_store_linked_resources_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static void _trf_persona_store_affiliations_from_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_phones_from_affiliation_data_free (gpointer _data);
static gboolean _trf_persona_store_phones_from_affiliation_co (TrfPersonaStorePhonesFromAffiliationData* _data_);
static void _trf_persona_store_phones_from_affiliation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_postals_from_affiliation_data_free (gpointer _data);
static gboolean _trf_persona_store_postals_from_affiliation_co (TrfPersonaStorePostalsFromAffiliationData* _data_);
static void _trf_persona_store_postals_from_affiliation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_imaddrs_from_affiliation_data_free (gpointer _data);
static gboolean _trf_persona_store_imaddrs_from_affiliation_co (TrfPersonaStoreImaddrsFromAffiliationData* _data_);
static void _trf_persona_store_imaddrs_from_affiliation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_emails_from_affiliation_data_free (gpointer _data);
static gboolean _trf_persona_store_emails_from_affiliation_co (TrfPersonaStoreEmailsFromAffiliationData* _data_);
static void _trf_persona_store_emails_from_affiliation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_resource_usage_count_data_free (gpointer _data);
static void _trf_persona_store_resource_usage_count (TrfPersonaStore* self, const gchar* resource, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gint _trf_persona_store_resource_usage_count_finish (TrfPersonaStore* self, GAsyncResult* _res_);
static gboolean _trf_persona_store_resource_usage_count_co (TrfPersonaStoreResourceUsageCountData* _data_);
static void _trf_persona_store_resource_usage_count_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_delete_resource_data_free (gpointer _data);
static gboolean _trf_persona_store_delete_resource_co (TrfPersonaStoreDeleteResourceData* _data_);
static void _trf_persona_store_delete_resource_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_linked_resources_data_free (gpointer _data);
static gboolean _trf_persona_store_linked_resources_co (TrfPersonaStoreLinkedResourcesData* _data_);
static void _trf_persona_store_linked_resources_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_urn_from_persona_data_free (gpointer _data);
static gboolean _trf_persona_store_urn_from_persona_co (TrfPersonaStoreUrnFromPersonaData* _data_);
static void _trf_persona_store_urn_from_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _trf_persona_store_urn_from_property_data_free (gpointer _data);
static gboolean _trf_persona_store_urn_from_property_co (TrfPersonaStoreUrnFromPropertyData* _data_);
static void _trf_persona_store_urn_from_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static GObject * trf_persona_store_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void trf_persona_store_finalize (GObject* obj);
static void _vala_trf_persona_store_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);

static const gchar* TRF_PERSONA_STORE__always_writeable_properties[16] = {"alias", "phone-numbers", "email-addresses", "avatar", "structured-name", "full-name", "gender", "birthday", "roles", "notes", "urls", "im-addresses", "is-favourite", "local-ids", "web-service-addresses", NULL};

GType trf_fields_get_type (void) {
	static volatile gsize trf_fields_type_id__volatile = 0;
	if (g_once_init_enter (&trf_fields_type_id__volatile)) {
		static const GEnumValue values[] = {{TRF_FIELDS_TRACKER_ID, "TRF_FIELDS_TRACKER_ID", "tracker-id"}, {TRF_FIELDS_FULL_NAME, "TRF_FIELDS_FULL_NAME", "full-name"}, {TRF_FIELDS_FAMILY_NAME, "TRF_FIELDS_FAMILY_NAME", "family-name"}, {TRF_FIELDS_GIVEN_NAME, "TRF_FIELDS_GIVEN_NAME", "given-name"}, {TRF_FIELDS_ADDITIONAL_NAMES, "TRF_FIELDS_ADDITIONAL_NAMES", "additional-names"}, {TRF_FIELDS_PREFIXES, "TRF_FIELDS_PREFIXES", "prefixes"}, {TRF_FIELDS_SUFFIXES, "TRF_FIELDS_SUFFIXES", "suffixes"}, {TRF_FIELDS_NICKNAME, "TRF_FIELDS_NICKNAME", "nickname"}, {TRF_FIELDS_BIRTHDAY, "TRF_FIELDS_BIRTHDAY", "birthday"}, {TRF_FIELDS_AVATAR_URL, "TRF_FIELDS_AVATAR_URL", "avatar-url"}, {TRF_FIELDS_IM_ADDRESSES, "TRF_FIELDS_IM_ADDRESSES", "im-addresses"}, {TRF_FIELDS_PHONES, "TRF_FIELDS_PHONES", "phones"}, {TRF_FIELDS_EMAILS, "TRF_FIELDS_EMAILS", "emails"}, {TRF_FIELDS_URLS, "TRF_FIELDS_URLS", "urls"}, {TRF_FIELDS_FAVOURITE, "TRF_FIELDS_FAVOURITE", "favourite"}, {TRF_FIELDS_CONTACT_URN, "TRF_FIELDS_CONTACT_URN", "contact-urn"}, {TRF_FIELDS_ROLES, "TRF_FIELDS_ROLES", "roles"}, {TRF_FIELDS_NOTE, "TRF_FIELDS_NOTE", "note"}, {TRF_FIELDS_GENDER, "TRF_FIELDS_GENDER", "gender"}, {TRF_FIELDS_POSTAL_ADDRESS, "TRF_FIELDS_POSTAL_ADDRESS", "postal-address"}, {TRF_FIELDS_LOCAL_IDS_PROPERTY, "TRF_FIELDS_LOCAL_IDS_PROPERTY", "local-ids-property"}, {0, NULL, NULL}};
		GType trf_fields_type_id;
		trf_fields_type_id = g_enum_register_static ("TrfFields", values);
		g_once_init_leave (&trf_fields_type_id__volatile, trf_fields_type_id);
	}
	return trf_fields_type_id__volatile;
}


GType trf_affl_info_fields_get_type (void) {
	static volatile gsize trf_affl_info_fields_type_id__volatile = 0;
	if (g_once_init_enter (&trf_affl_info_fields_type_id__volatile)) {
		static const GEnumValue values[] = {{TRF_AFFL_INFO_FIELDS_IM_TRACKER_ID, "TRF_AFFL_INFO_FIELDS_IM_TRACKER_ID", "im-tracker-id"}, {TRF_AFFL_INFO_FIELDS_IM_PROTOCOL, "TRF_AFFL_INFO_FIELDS_IM_PROTOCOL", "im-protocol"}, {TRF_AFFL_INFO_FIELDS_IM_ACCOUNT_ID, "TRF_AFFL_INFO_FIELDS_IM_ACCOUNT_ID", "im-account-id"}, {TRF_AFFL_INFO_FIELDS_AFFL_TRACKER_ID, "TRF_AFFL_INFO_FIELDS_AFFL_TRACKER_ID", "affl-tracker-id"}, {TRF_AFFL_INFO_FIELDS_AFFL_ROLE, "TRF_AFFL_INFO_FIELDS_AFFL_ROLE", "affl-role"}, {TRF_AFFL_INFO_FIELDS_AFFL_ORG, "TRF_AFFL_INFO_FIELDS_AFFL_ORG", "affl-org"}, {TRF_AFFL_INFO_FIELDS_AFFL_TITLE, "TRF_AFFL_INFO_FIELDS_AFFL_TITLE", "affl-title"}, {TRF_AFFL_INFO_FIELDS_AFFL_POBOX, "TRF_AFFL_INFO_FIELDS_AFFL_POBOX", "affl-pobox"}, {TRF_AFFL_INFO_FIELDS_AFFL_DISTRICT, "TRF_AFFL_INFO_FIELDS_AFFL_DISTRICT", "affl-district"}, {TRF_AFFL_INFO_FIELDS_AFFL_COUNTY, "TRF_AFFL_INFO_FIELDS_AFFL_COUNTY", "affl-county"}, {TRF_AFFL_INFO_FIELDS_AFFL_LOCALITY, "TRF_AFFL_INFO_FIELDS_AFFL_LOCALITY", "affl-locality"}, {TRF_AFFL_INFO_FIELDS_AFFL_POSTALCODE, "TRF_AFFL_INFO_FIELDS_AFFL_POSTALCODE", "affl-postalcode"}, {TRF_AFFL_INFO_FIELDS_AFFL_STREET_ADDRESS, "TRF_AFFL_INFO_FIELDS_AFFL_STREET_ADDRESS", "affl-street-address"}, {TRF_AFFL_INFO_FIELDS_AFFL_ADDRESS_LOCATION, "TRF_AFFL_INFO_FIELDS_AFFL_ADDRESS_LOCATION", "affl-address-location"}, {TRF_AFFL_INFO_FIELDS_AFFL_EXTENDED_ADDRESS, "TRF_AFFL_INFO_FIELDS_AFFL_EXTENDED_ADDRESS", "affl-extended-address"}, {TRF_AFFL_INFO_FIELDS_AFFL_COUNTRY, "TRF_AFFL_INFO_FIELDS_AFFL_COUNTRY", "affl-country"}, {TRF_AFFL_INFO_FIELDS_AFFL_REGION, "TRF_AFFL_INFO_FIELDS_AFFL_REGION", "affl-region"}, {TRF_AFFL_INFO_FIELDS_AFFL_EMAIL, "TRF_AFFL_INFO_FIELDS_AFFL_EMAIL", "affl-email"}, {TRF_AFFL_INFO_FIELDS_AFFL_PHONE, "TRF_AFFL_INFO_FIELDS_AFFL_PHONE", "affl-phone"}, {TRF_AFFL_INFO_FIELDS_AFFL_WEBSITE, "TRF_AFFL_INFO_FIELDS_AFFL_WEBSITE", "affl-website"}, {TRF_AFFL_INFO_FIELDS_AFFL_BLOG, "TRF_AFFL_INFO_FIELDS_AFFL_BLOG", "affl-blog"}, {TRF_AFFL_INFO_FIELDS_AFFL_URL, "TRF_AFFL_INFO_FIELDS_AFFL_URL", "affl-url"}, {TRF_AFFL_INFO_FIELDS_IM_NICKNAME, "TRF_AFFL_INFO_FIELDS_IM_NICKNAME", "im-nickname"}, {0, NULL, NULL}};
		GType trf_affl_info_fields_type_id;
		trf_affl_info_fields_type_id = g_enum_register_static ("TrfAfflInfoFields", values);
		g_once_init_leave (&trf_affl_info_fields_type_id__volatile, trf_affl_info_fields_type_id);
	}
	return trf_affl_info_fields_type_id__volatile;
}


GType trf_postal_address_fields_get_type (void) {
	static volatile gsize trf_postal_address_fields_type_id__volatile = 0;
	if (g_once_init_enter (&trf_postal_address_fields_type_id__volatile)) {
		static const GEnumValue values[] = {{TRF_POSTAL_ADDRESS_FIELDS_TRACKER_ID, "TRF_POSTAL_ADDRESS_FIELDS_TRACKER_ID", "tracker-id"}, {TRF_POSTAL_ADDRESS_FIELDS_POBOX, "TRF_POSTAL_ADDRESS_FIELDS_POBOX", "pobox"}, {TRF_POSTAL_ADDRESS_FIELDS_DISTRICT, "TRF_POSTAL_ADDRESS_FIELDS_DISTRICT", "district"}, {TRF_POSTAL_ADDRESS_FIELDS_COUNTY, "TRF_POSTAL_ADDRESS_FIELDS_COUNTY", "county"}, {TRF_POSTAL_ADDRESS_FIELDS_LOCALITY, "TRF_POSTAL_ADDRESS_FIELDS_LOCALITY", "locality"}, {TRF_POSTAL_ADDRESS_FIELDS_POSTALCODE, "TRF_POSTAL_ADDRESS_FIELDS_POSTALCODE", "postalcode"}, {TRF_POSTAL_ADDRESS_FIELDS_STREET_ADDRESS, "TRF_POSTAL_ADDRESS_FIELDS_STREET_ADDRESS", "street-address"}, {TRF_POSTAL_ADDRESS_FIELDS_ADDRESS_LOCATION, "TRF_POSTAL_ADDRESS_FIELDS_ADDRESS_LOCATION", "address-location"}, {TRF_POSTAL_ADDRESS_FIELDS_EXTENDED_ADDRESS, "TRF_POSTAL_ADDRESS_FIELDS_EXTENDED_ADDRESS", "extended-address"}, {TRF_POSTAL_ADDRESS_FIELDS_COUNTRY, "TRF_POSTAL_ADDRESS_FIELDS_COUNTRY", "country"}, {TRF_POSTAL_ADDRESS_FIELDS_REGION, "TRF_POSTAL_ADDRESS_FIELDS_REGION", "region"}, {0, NULL, NULL}};
		GType trf_postal_address_fields_type_id;
		trf_postal_address_fields_type_id = g_enum_register_static ("TrfPostalAddressFields", values);
		g_once_init_leave (&trf_postal_address_fields_type_id__volatile, trf_postal_address_fields_type_id);
	}
	return trf_postal_address_fields_type_id__volatile;
}


GType trf_urls_fields_get_type (void) {
	static volatile gsize trf_urls_fields_type_id__volatile = 0;
	if (g_once_init_enter (&trf_urls_fields_type_id__volatile)) {
		static const GEnumValue values[] = {{TRF_URLS_FIELDS_TRACKER_ID, "TRF_URLS_FIELDS_TRACKER_ID", "tracker-id"}, {TRF_URLS_FIELDS_BLOG, "TRF_URLS_FIELDS_BLOG", "blog"}, {TRF_URLS_FIELDS_WEBSITE, "TRF_URLS_FIELDS_WEBSITE", "website"}, {TRF_URLS_FIELDS_URL, "TRF_URLS_FIELDS_URL", "url"}, {0, NULL, NULL}};
		GType trf_urls_fields_type_id;
		trf_urls_fields_type_id = g_enum_register_static ("TrfUrlsFields", values);
		g_once_init_leave (&trf_urls_fields_type_id__volatile, trf_urls_fields_type_id);
	}
	return trf_urls_fields_type_id__volatile;
}


GType trf_role_fields_get_type (void) {
	static volatile gsize trf_role_fields_type_id__volatile = 0;
	if (g_once_init_enter (&trf_role_fields_type_id__volatile)) {
		static const GEnumValue values[] = {{TRF_ROLE_FIELDS_TRACKER_ID, "TRF_ROLE_FIELDS_TRACKER_ID", "tracker-id"}, {TRF_ROLE_FIELDS_ROLE, "TRF_ROLE_FIELDS_ROLE", "role"}, {TRF_ROLE_FIELDS_DEPARTMENT, "TRF_ROLE_FIELDS_DEPARTMENT", "department"}, {TRF_ROLE_FIELDS_TITLE, "TRF_ROLE_FIELDS_TITLE", "title"}, {0, NULL, NULL}};
		GType trf_role_fields_type_id;
		trf_role_fields_type_id = g_enum_register_static ("TrfRoleFields", values);
		g_once_init_leave (&trf_role_fields_type_id__volatile, trf_role_fields_type_id);
	}
	return trf_role_fields_type_id__volatile;
}


GType trf_im_fields_get_type (void) {
	static volatile gsize trf_im_fields_type_id__volatile = 0;
	if (g_once_init_enter (&trf_im_fields_type_id__volatile)) {
		static const GEnumValue values[] = {{TRF_IM_FIELDS_TRACKER_ID, "TRF_IM_FIELDS_TRACKER_ID", "tracker-id"}, {TRF_IM_FIELDS_PROTO, "TRF_IM_FIELDS_PROTO", "proto"}, {TRF_IM_FIELDS_ID, "TRF_IM_FIELDS_ID", "id"}, {TRF_IM_FIELDS_IM_NICKNAME, "TRF_IM_FIELDS_IM_NICKNAME", "im-nickname"}, {0, NULL, NULL}};
		GType trf_im_fields_type_id;
		trf_im_fields_type_id = g_enum_register_static ("TrfIMFields", values);
		g_once_init_leave (&trf_im_fields_type_id__volatile, trf_im_fields_type_id);
	}
	return trf_im_fields_type_id__volatile;
}


GType trf_phone_fields_get_type (void) {
	static volatile gsize trf_phone_fields_type_id__volatile = 0;
	if (g_once_init_enter (&trf_phone_fields_type_id__volatile)) {
		static const GEnumValue values[] = {{TRF_PHONE_FIELDS_TRACKER_ID, "TRF_PHONE_FIELDS_TRACKER_ID", "tracker-id"}, {TRF_PHONE_FIELDS_PHONE, "TRF_PHONE_FIELDS_PHONE", "phone"}, {0, NULL, NULL}};
		GType trf_phone_fields_type_id;
		trf_phone_fields_type_id = g_enum_register_static ("TrfPhoneFields", values);
		g_once_init_leave (&trf_phone_fields_type_id__volatile, trf_phone_fields_type_id);
	}
	return trf_phone_fields_type_id__volatile;
}


GType trf_email_fields_get_type (void) {
	static volatile gsize trf_email_fields_type_id__volatile = 0;
	if (g_once_init_enter (&trf_email_fields_type_id__volatile)) {
		static const GEnumValue values[] = {{TRF_EMAIL_FIELDS_TRACKER_ID, "TRF_EMAIL_FIELDS_TRACKER_ID", "tracker-id"}, {TRF_EMAIL_FIELDS_EMAIL, "TRF_EMAIL_FIELDS_EMAIL", "email"}, {0, NULL, NULL}};
		GType trf_email_fields_type_id;
		trf_email_fields_type_id = g_enum_register_static ("TrfEmailFields", values);
		g_once_init_leave (&trf_email_fields_type_id__volatile, trf_email_fields_type_id);
	}
	return trf_email_fields_type_id__volatile;
}


GType trf_tag_fields_get_type (void) {
	static volatile gsize trf_tag_fields_type_id__volatile = 0;
	if (g_once_init_enter (&trf_tag_fields_type_id__volatile)) {
		static const GEnumValue values[] = {{TRF_TAG_FIELDS_TRACKER_ID, "TRF_TAG_FIELDS_TRACKER_ID", "tracker-id"}, {0, NULL, NULL}};
		GType trf_tag_fields_type_id;
		trf_tag_fields_type_id = g_enum_register_static ("TrfTagFields", values);
		g_once_init_leave (&trf_tag_fields_type_id__volatile, trf_tag_fields_type_id);
	}
	return trf_tag_fields_type_id__volatile;
}


GType trf_attrib_get_type (void) {
	static volatile gsize trf_attrib_type_id__volatile = 0;
	if (g_once_init_enter (&trf_attrib_type_id__volatile)) {
		static const GEnumValue values[] = {{TRF_ATTRIB_EMAILS, "TRF_ATTRIB_EMAILS", "emails"}, {TRF_ATTRIB_PHONES, "TRF_ATTRIB_PHONES", "phones"}, {TRF_ATTRIB_URLS, "TRF_ATTRIB_URLS", "urls"}, {TRF_ATTRIB_IM_ADDRESSES, "TRF_ATTRIB_IM_ADDRESSES", "im-addresses"}, {TRF_ATTRIB_POSTAL_ADDRESSES, "TRF_ATTRIB_POSTAL_ADDRESSES", "postal-addresses"}, {0, NULL, NULL}};
		GType trf_attrib_type_id;
		trf_attrib_type_id = g_enum_register_static ("TrfAttrib", values);
		g_once_init_leave (&trf_attrib_type_id__volatile, trf_attrib_type_id);
	}
	return trf_attrib_type_id__volatile;
}


/**
   * Create a new PersonaStore.
   *
   * Create a new persona store to store the {@link Persona}s for the contacts
   */
TrfPersonaStore* trf_persona_store_construct (GType object_type) {
	TrfPersonaStore * self = NULL;
	self = (TrfPersonaStore*) g_object_new (object_type, "id", BACKEND_NAME, "display-name", BACKEND_NAME, NULL);
	return self;
}


TrfPersonaStore* trf_persona_store_new (void) {
	return trf_persona_store_construct (TRF_TYPE_PERSONA_STORE);
}


static void trf_persona_store_real_add_persona_from_details_data_free (gpointer _data) {
	TrfPersonaStoreAddPersonaFromDetailsData* _data_;
	_data_ = _data;
	_g_hash_table_unref0 (_data_->details);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreAddPersonaFromDetailsData, _data_);
}


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


static gpointer _g_hash_table_ref0 (gpointer self) {
	return self ? g_hash_table_ref (self) : NULL;
}


static void trf_persona_store_real_add_persona_from_details (FolksPersonaStore* base, GHashTable* details, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStore * self;
	TrfPersonaStoreAddPersonaFromDetailsData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	GHashTable* _tmp1_ = NULL;
	GHashTable* _tmp2_ = NULL;
	self = (TrfPersonaStore*) base;
	_data_ = g_slice_new0 (TrfPersonaStoreAddPersonaFromDetailsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, trf_persona_store_real_add_persona_from_details);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, trf_persona_store_real_add_persona_from_details_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = details;
	_tmp2_ = _g_hash_table_ref0 (_tmp1_);
	_g_hash_table_unref0 (_data_->details);
	_data_->details = _tmp2_;
	trf_persona_store_real_add_persona_from_details_co (_data_);
}


static FolksPersona* trf_persona_store_real_add_persona_from_details_finish (FolksPersonaStore* base, GAsyncResult* _res_, GError** error) {
	FolksPersona* result;
	TrfPersonaStoreAddPersonaFromDetailsData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


/**
   * Add a new {@link Persona} to the PersonaStore.
   *
   * Accepted keys for ``details`` are:
   * - PersonaStore.detail_key (PersonaDetail.IM_ADDRESSES)
   * - PersonaStore.detail_key (PersonaDetail.NICKNAME)
   * - PersonaStore.detail_key (PersonaDetail.FULL_NAME)
   * - PersonaStore.detail_key (PersonaDetail.IS_FAVOURITE)
   * - PersonaStore.detail_key (PersonaDetail.STRUCTURED_NAME)
   * - PersonaStore.detail_key (PersonaDetail.AVATAR)
   * - PersonaStore.detail_key (PersonaDetail.BIRTHDAY)
   * - PersonaStore.detail_key (PersonaDetail.GENDER)
   * - PersonaStore.detail_key (PersonaDetail.EMAIL_ADDRESSES)
   * - PersonaStore.detail_key (PersonaDetail.IM_ADDRESSES)
   * - PersonaStore.detail_key (PersonaDetail.NOTES)
   * - PersonaStore.detail_key (PersonaDetail.PHONE_NUMBERS)
   * - PersonaStore.detail_key (PersonaDetail.POSTAL_ADDRESSES)
   * - PersonaStore.detail_key (PersonaDetail.ROLES)
   * - PersonaStore.detail_key (PersonaDetail.URL)
   * - PersonaStore.detail_key (PersonaDetail.WEB_SERVICE_ADDRESSES)
   *
   * See {@link Folks.PersonaStore.add_persona_from_details}.
   *
   * @throws Folks.PersonaStoreError.INVALID_ARGUMENT if an unrecognised detail
   * key was passed in ``details``
   */
static GValue* _g_value_dup (GValue* self) {
	return g_boxed_copy (G_TYPE_VALUE, self);
}


static gpointer __g_value_dup0 (gpointer self) {
	return self ? _g_value_dup (self) : NULL;
}


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


static void trf_persona_store_add_persona_from_details_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreAddPersonaFromDetailsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	trf_persona_store_real_add_persona_from_details_co (_data_);
}


static void _vala_GValue_free (GValue* self) {
	g_value_unset (self);
	g_free (self);
}


static gboolean trf_persona_store_real_add_persona_from_details_co (TrfPersonaStoreAddPersonaFromDetailsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->avatar = NULL;
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = tracker_sparql_builder_new_update ();
	_data_->builder = _data_->_tmp0_;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->builder;
	tracker_sparql_builder_insert_open (_data_->_tmp1_, NULL);
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->builder;
	tracker_sparql_builder_subject (_data_->_tmp2_, "_:p");
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->builder;
	tracker_sparql_builder_predicate (_data_->_tmp3_, "a");
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->builder;
	tracker_sparql_builder_object (_data_->_tmp4_, "nco:PersonContact");
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->details;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = g_hash_table_get_keys (_data_->_tmp5_);
	{
		_data_->k_collection = _data_->_tmp6_;
		for (_data_->k_it = _data_->k_collection; _data_->k_it != NULL; _data_->k_it = _data_->k_it->next) {
			_data_->k = (const gchar*) _data_->k_it->data;
			{
				_data_->_tmp7_ = NULL;
				_data_->_tmp7_ = _data_->details;
				_data_->_tmp8_ = NULL;
				_data_->_tmp8_ = _data_->k;
				_data_->_tmp9_ = NULL;
				_data_->_tmp9_ = g_hash_table_lookup (_data_->_tmp7_, _data_->_tmp8_);
				_data_->_tmp10_ = NULL;
				_data_->_tmp10_ = __g_value_dup0 ((GValue*) _data_->_tmp9_);
				_data_->v = _data_->_tmp10_;
				_data_->_tmp11_ = NULL;
				_data_->_tmp11_ = _data_->k;
				_data_->_tmp12_ = NULL;
				_data_->_tmp12_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_NICKNAME);
				if (g_strcmp0 (_data_->_tmp11_, _data_->_tmp12_) == 0) {
					_data_->_tmp13_ = NULL;
					_data_->_tmp13_ = _data_->builder;
					tracker_sparql_builder_subject (_data_->_tmp13_, "_:p");
					_data_->_tmp14_ = NULL;
					_data_->_tmp14_ = _data_->builder;
					tracker_sparql_builder_predicate (_data_->_tmp14_, TRF_ONTOLOGY_DEFS_NCO_NICKNAME);
					_data_->_tmp15_ = NULL;
					_data_->_tmp15_ = _data_->builder;
					_data_->_tmp16_ = NULL;
					_data_->_tmp16_ = _data_->v;
					_data_->_tmp17_ = NULL;
					_data_->_tmp17_ = g_value_get_string (_data_->_tmp16_);
					tracker_sparql_builder_object_string (_data_->_tmp15_, _data_->_tmp17_);
				} else {
					_data_->_tmp18_ = NULL;
					_data_->_tmp18_ = _data_->k;
					_data_->_tmp19_ = NULL;
					_data_->_tmp19_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_FULL_NAME);
					if (g_strcmp0 (_data_->_tmp18_, _data_->_tmp19_) == 0) {
						_data_->_tmp20_ = NULL;
						_data_->_tmp20_ = _data_->builder;
						tracker_sparql_builder_subject (_data_->_tmp20_, "_:p");
						_data_->_tmp21_ = NULL;
						_data_->_tmp21_ = _data_->builder;
						tracker_sparql_builder_predicate (_data_->_tmp21_, TRF_ONTOLOGY_DEFS_NCO_FULLNAME);
						_data_->_tmp22_ = NULL;
						_data_->_tmp22_ = _data_->builder;
						_data_->_tmp23_ = NULL;
						_data_->_tmp23_ = _data_->v;
						_data_->_tmp24_ = NULL;
						_data_->_tmp24_ = g_value_get_string (_data_->_tmp23_);
						tracker_sparql_builder_object_string (_data_->_tmp22_, _data_->_tmp24_);
					} else {
						_data_->_tmp25_ = NULL;
						_data_->_tmp25_ = _data_->k;
						_data_->_tmp26_ = NULL;
						_data_->_tmp26_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_STRUCTURED_NAME);
						if (g_strcmp0 (_data_->_tmp25_, _data_->_tmp26_) == 0) {
							_data_->_tmp27_ = NULL;
							_data_->_tmp27_ = _data_->v;
							_data_->_tmp28_ = NULL;
							_data_->_tmp28_ = g_value_get_object (_data_->_tmp27_);
							_data_->_tmp29_ = NULL;
							_data_->_tmp29_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp28_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName));
							_data_->sname = _data_->_tmp29_;
							_data_->_tmp30_ = NULL;
							_data_->_tmp30_ = _data_->builder;
							tracker_sparql_builder_subject (_data_->_tmp30_, "_:p");
							_data_->_tmp31_ = NULL;
							_data_->_tmp31_ = _data_->builder;
							tracker_sparql_builder_predicate (_data_->_tmp31_, TRF_ONTOLOGY_DEFS_NCO_FAMILY);
							_data_->_tmp32_ = NULL;
							_data_->_tmp32_ = _data_->builder;
							_data_->_tmp33_ = NULL;
							_data_->_tmp33_ = _data_->sname;
							_data_->_tmp34_ = NULL;
							_data_->_tmp34_ = folks_structured_name_get_family_name (_data_->_tmp33_);
							_data_->_tmp35_ = NULL;
							_data_->_tmp35_ = _data_->_tmp34_;
							tracker_sparql_builder_object_string (_data_->_tmp32_, _data_->_tmp35_);
							_data_->_tmp36_ = NULL;
							_data_->_tmp36_ = _data_->builder;
							tracker_sparql_builder_predicate (_data_->_tmp36_, TRF_ONTOLOGY_DEFS_NCO_GIVEN);
							_data_->_tmp37_ = NULL;
							_data_->_tmp37_ = _data_->builder;
							_data_->_tmp38_ = NULL;
							_data_->_tmp38_ = _data_->sname;
							_data_->_tmp39_ = NULL;
							_data_->_tmp39_ = folks_structured_name_get_given_name (_data_->_tmp38_);
							_data_->_tmp40_ = NULL;
							_data_->_tmp40_ = _data_->_tmp39_;
							tracker_sparql_builder_object_string (_data_->_tmp37_, _data_->_tmp40_);
							_data_->_tmp41_ = NULL;
							_data_->_tmp41_ = _data_->builder;
							tracker_sparql_builder_predicate (_data_->_tmp41_, TRF_ONTOLOGY_DEFS_NCO_ADDITIONAL);
							_data_->_tmp42_ = NULL;
							_data_->_tmp42_ = _data_->builder;
							_data_->_tmp43_ = NULL;
							_data_->_tmp43_ = _data_->sname;
							_data_->_tmp44_ = NULL;
							_data_->_tmp44_ = folks_structured_name_get_additional_names (_data_->_tmp43_);
							_data_->_tmp45_ = NULL;
							_data_->_tmp45_ = _data_->_tmp44_;
							tracker_sparql_builder_object_string (_data_->_tmp42_, _data_->_tmp45_);
							_data_->_tmp46_ = NULL;
							_data_->_tmp46_ = _data_->builder;
							tracker_sparql_builder_predicate (_data_->_tmp46_, TRF_ONTOLOGY_DEFS_NCO_SUFFIX);
							_data_->_tmp47_ = NULL;
							_data_->_tmp47_ = _data_->builder;
							_data_->_tmp48_ = NULL;
							_data_->_tmp48_ = _data_->sname;
							_data_->_tmp49_ = NULL;
							_data_->_tmp49_ = folks_structured_name_get_suffixes (_data_->_tmp48_);
							_data_->_tmp50_ = NULL;
							_data_->_tmp50_ = _data_->_tmp49_;
							tracker_sparql_builder_object_string (_data_->_tmp47_, _data_->_tmp50_);
							_data_->_tmp51_ = NULL;
							_data_->_tmp51_ = _data_->builder;
							tracker_sparql_builder_predicate (_data_->_tmp51_, TRF_ONTOLOGY_DEFS_NCO_PREFIX);
							_data_->_tmp52_ = NULL;
							_data_->_tmp52_ = _data_->builder;
							_data_->_tmp53_ = NULL;
							_data_->_tmp53_ = _data_->sname;
							_data_->_tmp54_ = NULL;
							_data_->_tmp54_ = folks_structured_name_get_prefixes (_data_->_tmp53_);
							_data_->_tmp55_ = NULL;
							_data_->_tmp55_ = _data_->_tmp54_;
							tracker_sparql_builder_object_string (_data_->_tmp52_, _data_->_tmp55_);
							_g_object_unref0 (_data_->sname);
						} else {
							_data_->_tmp56_ = NULL;
							_data_->_tmp56_ = _data_->k;
							_data_->_tmp57_ = NULL;
							_data_->_tmp57_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_IS_FAVOURITE);
							if (g_strcmp0 (_data_->_tmp56_, _data_->_tmp57_) == 0) {
								_data_->_tmp58_ = NULL;
								_data_->_tmp58_ = _data_->v;
								_data_->_tmp59_ = FALSE;
								_data_->_tmp59_ = g_value_get_boolean (_data_->_tmp58_);
								if (_data_->_tmp59_) {
									_data_->_tmp60_ = NULL;
									_data_->_tmp60_ = _data_->builder;
									tracker_sparql_builder_subject (_data_->_tmp60_, "_:p");
									_data_->_tmp61_ = NULL;
									_data_->_tmp61_ = _data_->builder;
									tracker_sparql_builder_predicate (_data_->_tmp61_, TRF_ONTOLOGY_DEFS_NAO_TAG);
									_data_->_tmp62_ = NULL;
									_data_->_tmp62_ = _data_->builder;
									tracker_sparql_builder_object (_data_->_tmp62_, TRF_ONTOLOGY_DEFS_NAO_FAVORITE);
								}
							} else {
								_data_->_tmp63_ = NULL;
								_data_->_tmp63_ = _data_->k;
								_data_->_tmp64_ = NULL;
								_data_->_tmp64_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_AVATAR);
								if (g_strcmp0 (_data_->_tmp63_, _data_->_tmp64_) == 0) {
									_data_->_tmp65_ = NULL;
									_data_->_tmp65_ = _data_->v;
									_data_->_tmp66_ = NULL;
									_data_->_tmp66_ = g_value_get_object (_data_->_tmp65_);
									_data_->_tmp67_ = NULL;
									_data_->_tmp67_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp66_, g_loadable_icon_get_type (), GLoadableIcon));
									_data_->new_avatar = _data_->_tmp67_;
									_data_->_tmp68_ = NULL;
									_data_->_tmp68_ = _data_->new_avatar;
									if (_data_->_tmp68_ != NULL) {
										_data_->_tmp69_ = NULL;
										_data_->_tmp69_ = _data_->new_avatar;
										_data_->_tmp70_ = NULL;
										_data_->_tmp70_ = _g_object_ref0 (_data_->_tmp69_);
										_g_object_unref0 (_data_->avatar);
										_data_->avatar = _data_->_tmp70_;
									}
									_g_object_unref0 (_data_->new_avatar);
								} else {
									_data_->_tmp71_ = NULL;
									_data_->_tmp71_ = _data_->k;
									_data_->_tmp72_ = NULL;
									_data_->_tmp72_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_BIRTHDAY);
									if (g_strcmp0 (_data_->_tmp71_, _data_->_tmp72_) == 0) {
										_data_->_tmp73_ = NULL;
										_data_->_tmp73_ = _data_->v;
										_data_->_tmp74_ = NULL;
										_data_->_tmp74_ = g_value_get_boxed (_data_->_tmp73_);
										_data_->_tmp75_ = NULL;
										_data_->_tmp75_ = _g_date_time_ref0 ((GDateTime*) _data_->_tmp74_);
										_data_->birthday = _data_->_tmp75_;
										_data_->_tmp76_ = NULL;
										_data_->_tmp76_ = _data_->builder;
										tracker_sparql_builder_subject (_data_->_tmp76_, "_:p");
										_data_->_tmp77_ = NULL;
										_data_->_tmp77_ = _data_->builder;
										tracker_sparql_builder_predicate (_data_->_tmp77_, TRF_ONTOLOGY_DEFS_NCO_BIRTHDAY);
										_data_->_tmp78_ = NULL;
										_data_->_tmp78_ = _data_->birthday;
										memset (&_data_->_tmp79_, 0, sizeof (GTimeVal));
										g_date_time_to_timeval (_data_->_tmp78_, &_data_->_tmp79_);
										_data_->tv = _data_->_tmp79_;
										_data_->_tmp80_ = NULL;
										_data_->_tmp80_ = _data_->builder;
										_data_->_tmp81_ = NULL;
										_data_->_tmp81_ = g_time_val_to_iso8601 (&_data_->tv);
										_data_->_tmp82_ = NULL;
										_data_->_tmp82_ = _data_->_tmp81_;
										tracker_sparql_builder_object_string (_data_->_tmp80_, _data_->_tmp82_);
										_g_free0 (_data_->_tmp82_);
										_g_date_time_unref0 (_data_->birthday);
									} else {
										_data_->_tmp83_ = NULL;
										_data_->_tmp83_ = _data_->k;
										_data_->_tmp84_ = NULL;
										_data_->_tmp84_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_GENDER);
										if (g_strcmp0 (_data_->_tmp83_, _data_->_tmp84_) == 0) {
											_data_->_tmp85_ = NULL;
											_data_->_tmp85_ = _data_->v;
											_data_->_tmp86_ = 0;
											_data_->_tmp86_ = g_value_get_enum (_data_->_tmp85_);
											_data_->gender = (FolksGender) _data_->_tmp86_;
											_data_->_tmp87_ = 0;
											_data_->_tmp87_ = _data_->gender;
											if (_data_->_tmp87_ != FOLKS_GENDER_UNSPECIFIED) {
												_data_->_tmp88_ = NULL;
												_data_->_tmp88_ = _data_->builder;
												tracker_sparql_builder_subject (_data_->_tmp88_, "_:p");
												_data_->_tmp89_ = NULL;
												_data_->_tmp89_ = _data_->builder;
												tracker_sparql_builder_predicate (_data_->_tmp89_, TRF_ONTOLOGY_DEFS_NCO_GENDER);
												_data_->_tmp90_ = 0;
												_data_->_tmp90_ = _data_->gender;
												if (_data_->_tmp90_ == FOLKS_GENDER_MALE) {
													_data_->_tmp91_ = NULL;
													_data_->_tmp91_ = _data_->builder;
													tracker_sparql_builder_object (_data_->_tmp91_, TRF_ONTOLOGY_DEFS_NCO_MALE);
												} else {
													_data_->_tmp92_ = NULL;
													_data_->_tmp92_ = _data_->builder;
													tracker_sparql_builder_object (_data_->_tmp92_, TRF_ONTOLOGY_DEFS_NCO_FEMALE);
												}
											}
										} else {
											_data_->_tmp93_ = NULL;
											_data_->_tmp93_ = _data_->k;
											_data_->_tmp94_ = NULL;
											_data_->_tmp94_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_EMAIL_ADDRESSES);
											if (g_strcmp0 (_data_->_tmp93_, _data_->_tmp94_) == 0) {
												_data_->_tmp95_ = NULL;
												_data_->_tmp95_ = _data_->v;
												_data_->_tmp96_ = NULL;
												_data_->_tmp96_ = g_value_get_object (_data_->_tmp95_);
												_data_->_tmp97_ = NULL;
												_data_->_tmp97_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp96_, GEE_TYPE_SET, GeeSet));
												_data_->email_addresses = _data_->_tmp97_;
												_data_->_tmp98_ = NULL;
												_data_->_tmp98_ = _data_->builder;
												_data_->_tmp99_ = NULL;
												_data_->_tmp99_ = _data_->email_addresses;
												_data_->_state_ = 1;
												_trf_persona_store_build_update_query_set (_data_->self, _data_->_tmp98_, _data_->_tmp99_, "_:p", TRF_ATTRIB_EMAILS, trf_persona_store_add_persona_from_details_ready, _data_);
												return FALSE;
												_state_1:
												_trf_persona_store_build_update_query_set_finish (_data_->self, _data_->_res_);
												_g_object_unref0 (_data_->email_addresses);
											} else {
												_data_->_tmp100_ = NULL;
												_data_->_tmp100_ = _data_->k;
												_data_->_tmp101_ = NULL;
												_data_->_tmp101_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_IM_ADDRESSES);
												if (g_strcmp0 (_data_->_tmp100_, _data_->_tmp101_) == 0) {
													_data_->_tmp102_ = NULL;
													_data_->_tmp102_ = _data_->v;
													_data_->_tmp103_ = NULL;
													_data_->_tmp103_ = g_value_get_object (_data_->_tmp102_);
													_data_->_tmp104_ = NULL;
													_data_->_tmp104_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp103_, GEE_TYPE_MULTI_MAP, GeeMultiMap));
													_data_->im_addresses = _data_->_tmp104_;
													_data_->im_cnt = 0;
													{
														_data_->_tmp105_ = NULL;
														_data_->_tmp105_ = _data_->im_addresses;
														_data_->_tmp106_ = NULL;
														_data_->_tmp106_ = gee_multi_map_get_keys (_data_->_tmp105_);
														_data_->_tmp107_ = NULL;
														_data_->_tmp107_ = _data_->_tmp106_;
														_data_->_tmp108_ = NULL;
														_data_->_tmp108_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp107_);
														_data_->_tmp109_ = NULL;
														_data_->_tmp109_ = _data_->_tmp108_;
														_g_object_unref0 (_data_->_tmp107_);
														_data_->_proto_it = _data_->_tmp109_;
														while (TRUE) {
															_data_->_tmp110_ = NULL;
															_data_->_tmp110_ = _data_->_proto_it;
															_data_->_tmp111_ = FALSE;
															_data_->_tmp111_ = gee_iterator_next (_data_->_tmp110_);
															if (!_data_->_tmp111_) {
																break;
															}
															_data_->_tmp112_ = NULL;
															_data_->_tmp112_ = _data_->_proto_it;
															_data_->_tmp113_ = NULL;
															_data_->_tmp113_ = gee_iterator_get (_data_->_tmp112_);
															_data_->proto = (gchar*) _data_->_tmp113_;
															_data_->_tmp114_ = NULL;
															_data_->_tmp114_ = _data_->im_addresses;
															_data_->_tmp115_ = NULL;
															_data_->_tmp115_ = _data_->proto;
															_data_->_tmp116_ = NULL;
															_data_->_tmp116_ = gee_multi_map_get (_data_->_tmp114_, _data_->_tmp115_);
															_data_->addrs_a = _data_->_tmp116_;
															{
																_data_->_tmp117_ = NULL;
																_data_->_tmp117_ = _data_->addrs_a;
																_data_->_tmp118_ = NULL;
																_data_->_tmp118_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp117_);
																_data_->_im_fd_it = _data_->_tmp118_;
																while (TRUE) {
																	_data_->_tmp119_ = NULL;
																	_data_->_tmp119_ = _data_->_im_fd_it;
																	_data_->_tmp120_ = FALSE;
																	_data_->_tmp120_ = gee_iterator_next (_data_->_tmp119_);
																	if (!_data_->_tmp120_) {
																		break;
																	}
																	_data_->_tmp121_ = NULL;
																	_data_->_tmp121_ = _data_->_im_fd_it;
																	_data_->_tmp122_ = NULL;
																	_data_->_tmp122_ = gee_iterator_get (_data_->_tmp121_);
																	_data_->im_fd = (FolksImFieldDetails*) _data_->_tmp122_;
																	_data_->_tmp123_ = 0;
																	_data_->_tmp123_ = _data_->im_cnt;
																	_data_->_tmp124_ = NULL;
																	_data_->_tmp124_ = g_strdup_printf ("_:im_affl%d", _data_->_tmp123_);
																	_data_->im_affl = _data_->_tmp124_;
																	_data_->_tmp125_ = 0;
																	_data_->_tmp125_ = _data_->im_cnt;
																	_data_->_tmp126_ = NULL;
																	_data_->_tmp126_ = g_strdup_printf ("_:im%d", _data_->_tmp125_);
																	_data_->im = _data_->_tmp126_;
																	_data_->_tmp127_ = NULL;
																	_data_->_tmp127_ = _data_->builder;
																	_data_->_tmp128_ = NULL;
																	_data_->_tmp128_ = _data_->im;
																	tracker_sparql_builder_subject (_data_->_tmp127_, _data_->_tmp128_);
																	_data_->_tmp129_ = NULL;
																	_data_->_tmp129_ = _data_->builder;
																	tracker_sparql_builder_predicate (_data_->_tmp129_, "a");
																	_data_->_tmp130_ = NULL;
																	_data_->_tmp130_ = _data_->builder;
																	tracker_sparql_builder_object (_data_->_tmp130_, TRF_ONTOLOGY_DEFS_NCO_IMADDRESS);
																	_data_->_tmp131_ = NULL;
																	_data_->_tmp131_ = _data_->builder;
																	tracker_sparql_builder_predicate (_data_->_tmp131_, TRF_ONTOLOGY_DEFS_NCO_IMID);
																	_data_->_tmp132_ = NULL;
																	_data_->_tmp132_ = _data_->builder;
																	_data_->_tmp133_ = NULL;
																	_data_->_tmp133_ = _data_->im_fd;
																	_data_->_tmp134_ = NULL;
																	_data_->_tmp134_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp133_);
																	_data_->_tmp135_ = NULL;
																	_data_->_tmp135_ = _data_->_tmp134_;
																	tracker_sparql_builder_object_string (_data_->_tmp132_, (const gchar*) _data_->_tmp135_);
																	_data_->_tmp136_ = NULL;
																	_data_->_tmp136_ = _data_->builder;
																	tracker_sparql_builder_predicate (_data_->_tmp136_, TRF_ONTOLOGY_DEFS_NCO_IMPROTOCOL);
																	_data_->_tmp137_ = NULL;
																	_data_->_tmp137_ = _data_->builder;
																	_data_->_tmp138_ = NULL;
																	_data_->_tmp138_ = _data_->proto;
																	tracker_sparql_builder_object_string (_data_->_tmp137_, _data_->_tmp138_);
																	_data_->_tmp139_ = NULL;
																	_data_->_tmp139_ = _data_->builder;
																	_data_->_tmp140_ = NULL;
																	_data_->_tmp140_ = _data_->im_affl;
																	tracker_sparql_builder_subject (_data_->_tmp139_, _data_->_tmp140_);
																	_data_->_tmp141_ = NULL;
																	_data_->_tmp141_ = _data_->builder;
																	tracker_sparql_builder_predicate (_data_->_tmp141_, "a");
																	_data_->_tmp142_ = NULL;
																	_data_->_tmp142_ = _data_->builder;
																	tracker_sparql_builder_object (_data_->_tmp142_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION);
																	_data_->_tmp143_ = NULL;
																	_data_->_tmp143_ = _data_->builder;
																	tracker_sparql_builder_predicate (_data_->_tmp143_, TRF_ONTOLOGY_DEFS_NCO_HAS_IMADDRESS);
																	_data_->_tmp144_ = NULL;
																	_data_->_tmp144_ = _data_->builder;
																	_data_->_tmp145_ = NULL;
																	_data_->_tmp145_ = _data_->im;
																	tracker_sparql_builder_object (_data_->_tmp144_, _data_->_tmp145_);
																	_data_->_tmp146_ = NULL;
																	_data_->_tmp146_ = _data_->builder;
																	tracker_sparql_builder_subject (_data_->_tmp146_, "_:p");
																	_data_->_tmp147_ = NULL;
																	_data_->_tmp147_ = _data_->builder;
																	tracker_sparql_builder_predicate (_data_->_tmp147_, TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION);
																	_data_->_tmp148_ = NULL;
																	_data_->_tmp148_ = _data_->builder;
																	_data_->_tmp149_ = NULL;
																	_data_->_tmp149_ = _data_->im_affl;
																	tracker_sparql_builder_object (_data_->_tmp148_, _data_->_tmp149_);
																	_data_->_tmp150_ = 0;
																	_data_->_tmp150_ = _data_->im_cnt;
																	_data_->im_cnt = _data_->_tmp150_ + 1;
																	_g_free0 (_data_->im);
																	_g_free0 (_data_->im_affl);
																	_g_object_unref0 (_data_->im_fd);
																}
																_g_object_unref0 (_data_->_im_fd_it);
															}
															_g_object_unref0 (_data_->addrs_a);
															_g_free0 (_data_->proto);
														}
														_g_object_unref0 (_data_->_proto_it);
													}
													_g_object_unref0 (_data_->im_addresses);
												} else {
													_data_->_tmp151_ = NULL;
													_data_->_tmp151_ = _data_->k;
													_data_->_tmp152_ = NULL;
													_data_->_tmp152_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_NOTES);
													if (g_strcmp0 (_data_->_tmp151_, _data_->_tmp152_) == 0) {
														_data_->_tmp153_ = NULL;
														_data_->_tmp153_ = _data_->v;
														_data_->_tmp154_ = NULL;
														_data_->_tmp154_ = g_value_get_object (_data_->_tmp153_);
														_data_->_tmp155_ = NULL;
														_data_->_tmp155_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp154_, GEE_TYPE_SET, GeeSet));
														_data_->notes = _data_->_tmp155_;
														{
															_data_->_tmp156_ = NULL;
															_data_->_tmp156_ = _data_->notes;
															_data_->_tmp157_ = NULL;
															_data_->_tmp157_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp156_);
															_data_->_n_it = _data_->_tmp157_;
															while (TRUE) {
																_data_->_tmp158_ = NULL;
																_data_->_tmp158_ = _data_->_n_it;
																_data_->_tmp159_ = FALSE;
																_data_->_tmp159_ = gee_iterator_next (_data_->_tmp158_);
																if (!_data_->_tmp159_) {
																	break;
																}
																_data_->_tmp160_ = NULL;
																_data_->_tmp160_ = _data_->_n_it;
																_data_->_tmp161_ = NULL;
																_data_->_tmp161_ = gee_iterator_get (_data_->_tmp160_);
																_data_->n = (FolksNoteFieldDetails*) _data_->_tmp161_;
																_data_->_tmp162_ = NULL;
																_data_->_tmp162_ = _data_->builder;
																tracker_sparql_builder_subject (_data_->_tmp162_, "_:p");
																_data_->_tmp163_ = NULL;
																_data_->_tmp163_ = _data_->builder;
																tracker_sparql_builder_predicate (_data_->_tmp163_, TRF_ONTOLOGY_DEFS_NCO_NOTE);
																_data_->_tmp164_ = NULL;
																_data_->_tmp164_ = _data_->builder;
																_data_->_tmp165_ = NULL;
																_data_->_tmp165_ = _data_->n;
																_data_->_tmp166_ = NULL;
																_data_->_tmp166_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp165_);
																_data_->_tmp167_ = NULL;
																_data_->_tmp167_ = _data_->_tmp166_;
																tracker_sparql_builder_object_string (_data_->_tmp164_, (const gchar*) _data_->_tmp167_);
																_g_object_unref0 (_data_->n);
															}
															_g_object_unref0 (_data_->_n_it);
														}
														_g_object_unref0 (_data_->notes);
													} else {
														_data_->_tmp168_ = NULL;
														_data_->_tmp168_ = _data_->k;
														_data_->_tmp169_ = NULL;
														_data_->_tmp169_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_PHONE_NUMBERS);
														if (g_strcmp0 (_data_->_tmp168_, _data_->_tmp169_) == 0) {
															_data_->_tmp170_ = NULL;
															_data_->_tmp170_ = _data_->v;
															_data_->_tmp171_ = NULL;
															_data_->_tmp171_ = g_value_get_object (_data_->_tmp170_);
															_data_->_tmp172_ = NULL;
															_data_->_tmp172_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp171_, GEE_TYPE_SET, GeeSet));
															_data_->phone_numbers = _data_->_tmp172_;
															_data_->_tmp173_ = NULL;
															_data_->_tmp173_ = _data_->builder;
															_data_->_tmp174_ = NULL;
															_data_->_tmp174_ = _data_->phone_numbers;
															_data_->_state_ = 2;
															_trf_persona_store_build_update_query_set (_data_->self, _data_->_tmp173_, _data_->_tmp174_, "_:p", TRF_ATTRIB_PHONES, trf_persona_store_add_persona_from_details_ready, _data_);
															return FALSE;
															_state_2:
															_trf_persona_store_build_update_query_set_finish (_data_->self, _data_->_res_);
															_g_object_unref0 (_data_->phone_numbers);
														} else {
															_data_->_tmp175_ = NULL;
															_data_->_tmp175_ = _data_->k;
															_data_->_tmp176_ = NULL;
															_data_->_tmp176_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_ROLES);
															if (g_strcmp0 (_data_->_tmp175_, _data_->_tmp176_) == 0) {
																_data_->_tmp177_ = NULL;
																_data_->_tmp177_ = _data_->v;
																_data_->_tmp178_ = NULL;
																_data_->_tmp178_ = g_value_get_object (_data_->_tmp177_);
																_data_->_tmp179_ = NULL;
																_data_->_tmp179_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp178_, GEE_TYPE_SET, GeeSet));
																_data_->roles = _data_->_tmp179_;
																_data_->roles_cnt = 0;
																{
																	_data_->_tmp180_ = NULL;
																	_data_->_tmp180_ = _data_->roles;
																	_data_->_tmp181_ = NULL;
																	_data_->_tmp181_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp180_);
																	_data_->_role_fd_it = _data_->_tmp181_;
																	while (TRUE) {
																		_data_->_tmp182_ = NULL;
																		_data_->_tmp182_ = _data_->_role_fd_it;
																		_data_->_tmp183_ = FALSE;
																		_data_->_tmp183_ = gee_iterator_next (_data_->_tmp182_);
																		if (!_data_->_tmp183_) {
																			break;
																		}
																		_data_->_tmp184_ = NULL;
																		_data_->_tmp184_ = _data_->_role_fd_it;
																		_data_->_tmp185_ = NULL;
																		_data_->_tmp185_ = gee_iterator_get (_data_->_tmp184_);
																		_data_->role_fd = (FolksRoleFieldDetails*) _data_->_tmp185_;
																		_data_->_tmp186_ = 0;
																		_data_->_tmp186_ = _data_->roles_cnt;
																		_data_->_tmp187_ = NULL;
																		_data_->_tmp187_ = g_strdup_printf ("_:role_affl%d", _data_->_tmp186_);
																		_data_->role_affl = _data_->_tmp187_;
																		_data_->_tmp188_ = NULL;
																		_data_->_tmp188_ = _data_->builder;
																		_data_->_tmp189_ = NULL;
																		_data_->_tmp189_ = _data_->role_affl;
																		tracker_sparql_builder_subject (_data_->_tmp188_, _data_->_tmp189_);
																		_data_->_tmp190_ = NULL;
																		_data_->_tmp190_ = _data_->builder;
																		tracker_sparql_builder_predicate (_data_->_tmp190_, "a");
																		_data_->_tmp191_ = NULL;
																		_data_->_tmp191_ = _data_->builder;
																		tracker_sparql_builder_object (_data_->_tmp191_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION);
																		_data_->_tmp192_ = NULL;
																		_data_->_tmp192_ = _data_->builder;
																		tracker_sparql_builder_predicate (_data_->_tmp192_, TRF_ONTOLOGY_DEFS_NCO_ROLE);
																		_data_->_tmp193_ = NULL;
																		_data_->_tmp193_ = _data_->builder;
																		_data_->_tmp194_ = NULL;
																		_data_->_tmp194_ = _data_->role_fd;
																		_data_->_tmp195_ = NULL;
																		_data_->_tmp195_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp194_);
																		_data_->_tmp196_ = NULL;
																		_data_->_tmp196_ = _data_->_tmp195_;
																		_data_->_tmp197_ = NULL;
																		_data_->_tmp197_ = folks_role_get_role ((FolksRole*) _data_->_tmp196_);
																		_data_->_tmp198_ = NULL;
																		_data_->_tmp198_ = _data_->_tmp197_;
																		tracker_sparql_builder_object_string (_data_->_tmp193_, _data_->_tmp198_);
																		_data_->_tmp199_ = NULL;
																		_data_->_tmp199_ = _data_->builder;
																		tracker_sparql_builder_predicate (_data_->_tmp199_, TRF_ONTOLOGY_DEFS_NCO_TITLE);
																		_data_->_tmp200_ = NULL;
																		_data_->_tmp200_ = _data_->builder;
																		_data_->_tmp201_ = NULL;
																		_data_->_tmp201_ = _data_->role_fd;
																		_data_->_tmp202_ = NULL;
																		_data_->_tmp202_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp201_);
																		_data_->_tmp203_ = NULL;
																		_data_->_tmp203_ = _data_->_tmp202_;
																		_data_->_tmp204_ = NULL;
																		_data_->_tmp204_ = folks_role_get_title ((FolksRole*) _data_->_tmp203_);
																		_data_->_tmp205_ = NULL;
																		_data_->_tmp205_ = _data_->_tmp204_;
																		tracker_sparql_builder_object_string (_data_->_tmp200_, _data_->_tmp205_);
																		_data_->_tmp206_ = NULL;
																		_data_->_tmp206_ = _data_->builder;
																		tracker_sparql_builder_predicate (_data_->_tmp206_, TRF_ONTOLOGY_DEFS_NCO_ORG);
																		_data_->_tmp207_ = NULL;
																		_data_->_tmp207_ = _data_->builder;
																		_data_->_tmp208_ = NULL;
																		_data_->_tmp208_ = _data_->role_fd;
																		_data_->_tmp209_ = NULL;
																		_data_->_tmp209_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp208_);
																		_data_->_tmp210_ = NULL;
																		_data_->_tmp210_ = _data_->_tmp209_;
																		_data_->_tmp211_ = NULL;
																		_data_->_tmp211_ = folks_role_get_organisation_name ((FolksRole*) _data_->_tmp210_);
																		_data_->_tmp212_ = NULL;
																		_data_->_tmp212_ = _data_->_tmp211_;
																		tracker_sparql_builder_object_string (_data_->_tmp207_, _data_->_tmp212_);
																		_data_->_tmp213_ = NULL;
																		_data_->_tmp213_ = _data_->builder;
																		tracker_sparql_builder_subject (_data_->_tmp213_, "_:p");
																		_data_->_tmp214_ = NULL;
																		_data_->_tmp214_ = _data_->builder;
																		tracker_sparql_builder_predicate (_data_->_tmp214_, TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION);
																		_data_->_tmp215_ = NULL;
																		_data_->_tmp215_ = _data_->builder;
																		_data_->_tmp216_ = NULL;
																		_data_->_tmp216_ = _data_->role_affl;
																		tracker_sparql_builder_object (_data_->_tmp215_, _data_->_tmp216_);
																		_data_->_tmp217_ = 0;
																		_data_->_tmp217_ = _data_->roles_cnt;
																		_data_->roles_cnt = _data_->_tmp217_ + 1;
																		_g_free0 (_data_->role_affl);
																		_g_object_unref0 (_data_->role_fd);
																	}
																	_g_object_unref0 (_data_->_role_fd_it);
																}
																_g_object_unref0 (_data_->roles);
															} else {
																_data_->_tmp218_ = NULL;
																_data_->_tmp218_ = _data_->k;
																_data_->_tmp219_ = NULL;
																_data_->_tmp219_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_POSTAL_ADDRESSES);
																if (g_strcmp0 (_data_->_tmp218_, _data_->_tmp219_) == 0) {
																	_data_->_tmp220_ = NULL;
																	_data_->_tmp220_ = _data_->v;
																	_data_->_tmp221_ = NULL;
																	_data_->_tmp221_ = g_value_get_object (_data_->_tmp220_);
																	_data_->_tmp222_ = NULL;
																	_data_->_tmp222_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp221_, GEE_TYPE_SET, GeeSet));
																	_data_->postal_addresses = _data_->_tmp222_;
																	_data_->postal_cnt = 0;
																	{
																		_data_->_tmp223_ = NULL;
																		_data_->_tmp223_ = _data_->postal_addresses;
																		_data_->_tmp224_ = NULL;
																		_data_->_tmp224_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp223_);
																		_data_->_pafd_it = _data_->_tmp224_;
																		while (TRUE) {
																			_data_->_tmp225_ = NULL;
																			_data_->_tmp225_ = _data_->_pafd_it;
																			_data_->_tmp226_ = FALSE;
																			_data_->_tmp226_ = gee_iterator_next (_data_->_tmp225_);
																			if (!_data_->_tmp226_) {
																				break;
																			}
																			_data_->_tmp227_ = NULL;
																			_data_->_tmp227_ = _data_->_pafd_it;
																			_data_->_tmp228_ = NULL;
																			_data_->_tmp228_ = gee_iterator_get (_data_->_tmp227_);
																			_data_->pafd = (FolksPostalAddressFieldDetails*) _data_->_tmp228_;
																			_data_->_tmp229_ = NULL;
																			_data_->_tmp229_ = _data_->pafd;
																			_data_->_tmp230_ = NULL;
																			_data_->_tmp230_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp229_);
																			_data_->_tmp231_ = NULL;
																			_data_->_tmp231_ = _data_->_tmp230_;
																			_data_->_tmp232_ = NULL;
																			_data_->_tmp232_ = _g_object_ref0 ((FolksPostalAddress*) _data_->_tmp231_);
																			_data_->pa = _data_->_tmp232_;
																			_data_->_tmp233_ = 0;
																			_data_->_tmp233_ = _data_->postal_cnt;
																			_data_->_tmp234_ = NULL;
																			_data_->_tmp234_ = g_strdup_printf ("_:postal_affl%d", _data_->_tmp233_);
																			_data_->postal_affl = _data_->_tmp234_;
																			_data_->_tmp235_ = 0;
																			_data_->_tmp235_ = _data_->postal_cnt;
																			_data_->_tmp236_ = NULL;
																			_data_->_tmp236_ = g_strdup_printf ("_:postal%d", _data_->_tmp235_);
																			_data_->postal = _data_->_tmp236_;
																			_data_->_tmp237_ = NULL;
																			_data_->_tmp237_ = _data_->builder;
																			_data_->_tmp238_ = NULL;
																			_data_->_tmp238_ = _data_->postal;
																			tracker_sparql_builder_subject (_data_->_tmp237_, _data_->_tmp238_);
																			_data_->_tmp239_ = NULL;
																			_data_->_tmp239_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp239_, "a");
																			_data_->_tmp240_ = NULL;
																			_data_->_tmp240_ = _data_->builder;
																			tracker_sparql_builder_object (_data_->_tmp240_, TRF_ONTOLOGY_DEFS_NCO_POSTAL_ADDRESS);
																			_data_->_tmp241_ = NULL;
																			_data_->_tmp241_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp241_, TRF_ONTOLOGY_DEFS_NCO_POBOX);
																			_data_->_tmp242_ = NULL;
																			_data_->_tmp242_ = _data_->builder;
																			_data_->_tmp243_ = NULL;
																			_data_->_tmp243_ = _data_->pa;
																			_data_->_tmp244_ = NULL;
																			_data_->_tmp244_ = folks_postal_address_get_po_box (_data_->_tmp243_);
																			_data_->_tmp245_ = NULL;
																			_data_->_tmp245_ = _data_->_tmp244_;
																			tracker_sparql_builder_object_string (_data_->_tmp242_, _data_->_tmp245_);
																			_data_->_tmp246_ = NULL;
																			_data_->_tmp246_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp246_, TRF_ONTOLOGY_DEFS_NCO_LOCALITY);
																			_data_->_tmp247_ = NULL;
																			_data_->_tmp247_ = _data_->builder;
																			_data_->_tmp248_ = NULL;
																			_data_->_tmp248_ = _data_->pa;
																			_data_->_tmp249_ = NULL;
																			_data_->_tmp249_ = folks_postal_address_get_locality (_data_->_tmp248_);
																			_data_->_tmp250_ = NULL;
																			_data_->_tmp250_ = _data_->_tmp249_;
																			tracker_sparql_builder_object_string (_data_->_tmp247_, _data_->_tmp250_);
																			_data_->_tmp251_ = NULL;
																			_data_->_tmp251_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp251_, TRF_ONTOLOGY_DEFS_NCO_POSTALCODE);
																			_data_->_tmp252_ = NULL;
																			_data_->_tmp252_ = _data_->builder;
																			_data_->_tmp253_ = NULL;
																			_data_->_tmp253_ = _data_->pa;
																			_data_->_tmp254_ = NULL;
																			_data_->_tmp254_ = folks_postal_address_get_postal_code (_data_->_tmp253_);
																			_data_->_tmp255_ = NULL;
																			_data_->_tmp255_ = _data_->_tmp254_;
																			tracker_sparql_builder_object_string (_data_->_tmp252_, _data_->_tmp255_);
																			_data_->_tmp256_ = NULL;
																			_data_->_tmp256_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp256_, TRF_ONTOLOGY_DEFS_NCO_STREET_ADDRESS);
																			_data_->_tmp257_ = NULL;
																			_data_->_tmp257_ = _data_->builder;
																			_data_->_tmp258_ = NULL;
																			_data_->_tmp258_ = _data_->pa;
																			_data_->_tmp259_ = NULL;
																			_data_->_tmp259_ = folks_postal_address_get_street (_data_->_tmp258_);
																			_data_->_tmp260_ = NULL;
																			_data_->_tmp260_ = _data_->_tmp259_;
																			tracker_sparql_builder_object_string (_data_->_tmp257_, _data_->_tmp260_);
																			_data_->_tmp261_ = NULL;
																			_data_->_tmp261_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp261_, TRF_ONTOLOGY_DEFS_NCO_EXTENDED_ADDRESS);
																			_data_->_tmp262_ = NULL;
																			_data_->_tmp262_ = _data_->builder;
																			_data_->_tmp263_ = NULL;
																			_data_->_tmp263_ = _data_->pa;
																			_data_->_tmp264_ = NULL;
																			_data_->_tmp264_ = folks_postal_address_get_extension (_data_->_tmp263_);
																			_data_->_tmp265_ = NULL;
																			_data_->_tmp265_ = _data_->_tmp264_;
																			tracker_sparql_builder_object_string (_data_->_tmp262_, _data_->_tmp265_);
																			_data_->_tmp266_ = NULL;
																			_data_->_tmp266_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp266_, TRF_ONTOLOGY_DEFS_NCO_COUNTRY);
																			_data_->_tmp267_ = NULL;
																			_data_->_tmp267_ = _data_->builder;
																			_data_->_tmp268_ = NULL;
																			_data_->_tmp268_ = _data_->pa;
																			_data_->_tmp269_ = NULL;
																			_data_->_tmp269_ = folks_postal_address_get_country (_data_->_tmp268_);
																			_data_->_tmp270_ = NULL;
																			_data_->_tmp270_ = _data_->_tmp269_;
																			tracker_sparql_builder_object_string (_data_->_tmp267_, _data_->_tmp270_);
																			_data_->_tmp271_ = NULL;
																			_data_->_tmp271_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp271_, TRF_ONTOLOGY_DEFS_NCO_REGION);
																			_data_->_tmp272_ = NULL;
																			_data_->_tmp272_ = _data_->builder;
																			_data_->_tmp273_ = NULL;
																			_data_->_tmp273_ = _data_->pa;
																			_data_->_tmp274_ = NULL;
																			_data_->_tmp274_ = folks_postal_address_get_region (_data_->_tmp273_);
																			_data_->_tmp275_ = NULL;
																			_data_->_tmp275_ = _data_->_tmp274_;
																			tracker_sparql_builder_object_string (_data_->_tmp272_, _data_->_tmp275_);
																			_data_->_tmp276_ = NULL;
																			_data_->_tmp276_ = _data_->builder;
																			_data_->_tmp277_ = NULL;
																			_data_->_tmp277_ = _data_->postal_affl;
																			tracker_sparql_builder_subject (_data_->_tmp276_, _data_->_tmp277_);
																			_data_->_tmp278_ = NULL;
																			_data_->_tmp278_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp278_, "a");
																			_data_->_tmp279_ = NULL;
																			_data_->_tmp279_ = _data_->builder;
																			tracker_sparql_builder_object (_data_->_tmp279_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION);
																			_data_->_tmp280_ = NULL;
																			_data_->_tmp280_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp280_, TRF_ONTOLOGY_DEFS_NCO_HAS_POSTAL_ADDRESS);
																			_data_->_tmp281_ = NULL;
																			_data_->_tmp281_ = _data_->builder;
																			_data_->_tmp282_ = NULL;
																			_data_->_tmp282_ = _data_->postal;
																			tracker_sparql_builder_object (_data_->_tmp281_, _data_->_tmp282_);
																			_data_->_tmp283_ = NULL;
																			_data_->_tmp283_ = _data_->builder;
																			tracker_sparql_builder_subject (_data_->_tmp283_, "_:p");
																			_data_->_tmp284_ = NULL;
																			_data_->_tmp284_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp284_, TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION);
																			_data_->_tmp285_ = NULL;
																			_data_->_tmp285_ = _data_->builder;
																			_data_->_tmp286_ = NULL;
																			_data_->_tmp286_ = _data_->postal_affl;
																			tracker_sparql_builder_object (_data_->_tmp285_, _data_->_tmp286_);
																			_data_->_tmp287_ = 0;
																			_data_->_tmp287_ = _data_->postal_cnt;
																			_data_->postal_cnt = _data_->_tmp287_ + 1;
																			_g_free0 (_data_->postal);
																			_g_free0 (_data_->postal_affl);
																			_g_object_unref0 (_data_->pa);
																			_g_object_unref0 (_data_->pafd);
																		}
																		_g_object_unref0 (_data_->_pafd_it);
																	}
																	_g_object_unref0 (_data_->postal_addresses);
																} else {
																	_data_->_tmp288_ = NULL;
																	_data_->_tmp288_ = _data_->k;
																	_data_->_tmp289_ = NULL;
																	_data_->_tmp289_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_URLS);
																	if (g_strcmp0 (_data_->_tmp288_, _data_->_tmp289_) == 0) {
																		_data_->_tmp290_ = NULL;
																		_data_->_tmp290_ = _data_->v;
																		_data_->_tmp291_ = NULL;
																		_data_->_tmp291_ = g_value_get_object (_data_->_tmp290_);
																		_data_->_tmp292_ = NULL;
																		_data_->_tmp292_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp291_, GEE_TYPE_SET, GeeSet));
																		_data_->url_fds = _data_->_tmp292_;
																		_data_->url_cnt = 0;
																		{
																			_data_->_tmp293_ = NULL;
																			_data_->_tmp293_ = _data_->url_fds;
																			_data_->_tmp294_ = NULL;
																			_data_->_tmp294_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp293_);
																			_data_->_url_fd_it = _data_->_tmp294_;
																			while (TRUE) {
																				_data_->_tmp295_ = NULL;
																				_data_->_tmp295_ = _data_->_url_fd_it;
																				_data_->_tmp296_ = FALSE;
																				_data_->_tmp296_ = gee_iterator_next (_data_->_tmp295_);
																				if (!_data_->_tmp296_) {
																					break;
																				}
																				_data_->_tmp297_ = NULL;
																				_data_->_tmp297_ = _data_->_url_fd_it;
																				_data_->_tmp298_ = NULL;
																				_data_->_tmp298_ = gee_iterator_get (_data_->_tmp297_);
																				_data_->url_fd = (FolksUrlFieldDetails*) _data_->_tmp298_;
																				_data_->_tmp299_ = 0;
																				_data_->_tmp299_ = _data_->url_cnt;
																				_data_->_tmp300_ = NULL;
																				_data_->_tmp300_ = g_strdup_printf ("_:url_affl%d", _data_->_tmp299_);
																				_data_->url_affl = _data_->_tmp300_;
																				_data_->_tmp301_ = NULL;
																				_data_->_tmp301_ = _data_->builder;
																				_data_->_tmp302_ = NULL;
																				_data_->_tmp302_ = _data_->url_affl;
																				tracker_sparql_builder_subject (_data_->_tmp301_, _data_->_tmp302_);
																				_data_->_tmp303_ = NULL;
																				_data_->_tmp303_ = _data_->builder;
																				tracker_sparql_builder_predicate (_data_->_tmp303_, "a");
																				_data_->_tmp304_ = NULL;
																				_data_->_tmp304_ = _data_->builder;
																				tracker_sparql_builder_object (_data_->_tmp304_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION);
																				_data_->_tmp305_ = NULL;
																				_data_->_tmp305_ = _data_->builder;
																				tracker_sparql_builder_predicate (_data_->_tmp305_, TRF_ONTOLOGY_DEFS_NCO_URL);
																				_data_->_tmp306_ = NULL;
																				_data_->_tmp306_ = _data_->builder;
																				_data_->_tmp307_ = NULL;
																				_data_->_tmp307_ = _data_->url_fd;
																				_data_->_tmp308_ = NULL;
																				_data_->_tmp308_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp307_);
																				_data_->_tmp309_ = NULL;
																				_data_->_tmp309_ = _data_->_tmp308_;
																				tracker_sparql_builder_object_string (_data_->_tmp306_, (const gchar*) _data_->_tmp309_);
																				_data_->_tmp310_ = NULL;
																				_data_->_tmp310_ = _data_->builder;
																				tracker_sparql_builder_subject (_data_->_tmp310_, "_:p");
																				_data_->_tmp311_ = NULL;
																				_data_->_tmp311_ = _data_->builder;
																				tracker_sparql_builder_predicate (_data_->_tmp311_, TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION);
																				_data_->_tmp312_ = NULL;
																				_data_->_tmp312_ = _data_->builder;
																				_data_->_tmp313_ = NULL;
																				_data_->_tmp313_ = _data_->url_affl;
																				tracker_sparql_builder_object (_data_->_tmp312_, _data_->_tmp313_);
																				_data_->_tmp314_ = 0;
																				_data_->_tmp314_ = _data_->url_cnt;
																				_data_->url_cnt = _data_->_tmp314_ + 1;
																				_g_free0 (_data_->url_affl);
																				_g_object_unref0 (_data_->url_fd);
																			}
																			_g_object_unref0 (_data_->_url_fd_it);
																		}
																		_g_object_unref0 (_data_->url_fds);
																	} else {
																		_data_->_tmp315_ = NULL;
																		_data_->_tmp315_ = _data_->k;
																		_data_->_tmp316_ = NULL;
																		_data_->_tmp316_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_LOCAL_IDS);
																		if (g_strcmp0 (_data_->_tmp315_, _data_->_tmp316_) == 0) {
																			_data_->_tmp317_ = NULL;
																			_data_->_tmp317_ = _data_->v;
																			_data_->_tmp318_ = NULL;
																			_data_->_tmp318_ = g_value_get_object (_data_->_tmp317_);
																			_data_->_tmp319_ = NULL;
																			_data_->_tmp319_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp318_, GEE_TYPE_SET, GeeSet));
																			_data_->local_ids = _data_->_tmp319_;
																			_data_->_tmp320_ = NULL;
																			_data_->_tmp320_ = _data_->local_ids;
																			_data_->_tmp321_ = NULL;
																			_data_->_tmp321_ = trf_persona_store_serialize_local_ids (_data_->_tmp320_);
																			_data_->ids = _data_->_tmp321_;
																			_data_->_tmp322_ = NULL;
																			_data_->_tmp322_ = _data_->builder;
																			tracker_sparql_builder_subject (_data_->_tmp322_, "_:folks_ids");
																			_data_->_tmp323_ = NULL;
																			_data_->_tmp323_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp323_, "a");
																			_data_->_tmp324_ = NULL;
																			_data_->_tmp324_ = _data_->builder;
																			tracker_sparql_builder_object (_data_->_tmp324_, TRF_ONTOLOGY_DEFS_NAO_PROPERTY);
																			_data_->_tmp325_ = NULL;
																			_data_->_tmp325_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp325_, TRF_ONTOLOGY_DEFS_NAO_PROPERTY_NAME);
																			_data_->_tmp326_ = NULL;
																			_data_->_tmp326_ = _data_->builder;
																			tracker_sparql_builder_object_string (_data_->_tmp326_, TRF_PERSONA_STORE__LOCAL_ID_PROPERTY_NAME);
																			_data_->_tmp327_ = NULL;
																			_data_->_tmp327_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp327_, TRF_ONTOLOGY_DEFS_NAO_PROPERTY_VALUE);
																			_data_->_tmp328_ = NULL;
																			_data_->_tmp328_ = _data_->builder;
																			_data_->_tmp329_ = NULL;
																			_data_->_tmp329_ = _data_->ids;
																			tracker_sparql_builder_object_string (_data_->_tmp328_, _data_->_tmp329_);
																			_data_->_tmp330_ = NULL;
																			_data_->_tmp330_ = _data_->builder;
																			tracker_sparql_builder_subject (_data_->_tmp330_, "_:p");
																			_data_->_tmp331_ = NULL;
																			_data_->_tmp331_ = _data_->builder;
																			tracker_sparql_builder_predicate (_data_->_tmp331_, TRF_ONTOLOGY_DEFS_NAO_HAS_PROPERTY);
																			_data_->_tmp332_ = NULL;
																			_data_->_tmp332_ = _data_->builder;
																			tracker_sparql_builder_object (_data_->_tmp332_, "_:folks_ids");
																			_g_free0 (_data_->ids);
																			_g_object_unref0 (_data_->local_ids);
																		} else {
																			_data_->_tmp333_ = NULL;
																			_data_->_tmp333_ = _data_->k;
																			_data_->_tmp334_ = NULL;
																			_data_->_tmp334_ = folks_persona_store_detail_key (FOLKS_PERSONA_DETAIL_WEB_SERVICE_ADDRESSES);
																			if (g_strcmp0 (_data_->_tmp333_, _data_->_tmp334_) == 0) {
																				_data_->_tmp335_ = NULL;
																				_data_->_tmp335_ = _data_->v;
																				_data_->_tmp336_ = NULL;
																				_data_->_tmp336_ = g_value_get_object (_data_->_tmp335_);
																				_data_->_tmp337_ = NULL;
																				_data_->_tmp337_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp336_, GEE_TYPE_MULTI_MAP, GeeMultiMap));
																				_data_->ws_obj = _data_->_tmp337_;
																				_data_->_tmp338_ = NULL;
																				_data_->_tmp338_ = _data_->ws_obj;
																				_data_->_tmp339_ = NULL;
																				_data_->_tmp339_ = trf_persona_store_serialize_web_services (_data_->_tmp338_);
																				_data_->ws_addrs = _data_->_tmp339_;
																				_data_->_tmp340_ = NULL;
																				_data_->_tmp340_ = _data_->builder;
																				tracker_sparql_builder_subject (_data_->_tmp340_, "_:folks_ws_ids");
																				_data_->_tmp341_ = NULL;
																				_data_->_tmp341_ = _data_->builder;
																				tracker_sparql_builder_predicate (_data_->_tmp341_, "a");
																				_data_->_tmp342_ = NULL;
																				_data_->_tmp342_ = _data_->builder;
																				tracker_sparql_builder_object (_data_->_tmp342_, TRF_ONTOLOGY_DEFS_NAO_PROPERTY);
																				_data_->_tmp343_ = NULL;
																				_data_->_tmp343_ = _data_->builder;
																				tracker_sparql_builder_predicate (_data_->_tmp343_, TRF_ONTOLOGY_DEFS_NAO_PROPERTY_NAME);
																				_data_->_tmp344_ = NULL;
																				_data_->_tmp344_ = _data_->builder;
																				tracker_sparql_builder_object_string (_data_->_tmp344_, TRF_PERSONA_STORE__WSD_PROPERTY_NAME);
																				_data_->_tmp345_ = NULL;
																				_data_->_tmp345_ = _data_->builder;
																				tracker_sparql_builder_predicate (_data_->_tmp345_, TRF_ONTOLOGY_DEFS_NAO_PROPERTY_VALUE);
																				_data_->_tmp346_ = NULL;
																				_data_->_tmp346_ = _data_->builder;
																				_data_->_tmp347_ = NULL;
																				_data_->_tmp347_ = _data_->ws_addrs;
																				tracker_sparql_builder_object_string (_data_->_tmp346_, _data_->_tmp347_);
																				_data_->_tmp348_ = NULL;
																				_data_->_tmp348_ = _data_->builder;
																				tracker_sparql_builder_subject (_data_->_tmp348_, "_:p");
																				_data_->_tmp349_ = NULL;
																				_data_->_tmp349_ = _data_->builder;
																				tracker_sparql_builder_predicate (_data_->_tmp349_, TRF_ONTOLOGY_DEFS_NAO_HAS_PROPERTY);
																				_data_->_tmp350_ = NULL;
																				_data_->_tmp350_ = _data_->builder;
																				tracker_sparql_builder_object (_data_->_tmp350_, "_:folks_ws_ids");
																				_g_free0 (_data_->ws_addrs);
																				_g_object_unref0 (_data_->ws_obj);
																			} else {
																				_data_->_tmp351_ = NULL;
																				_data_->_tmp351_ = _ ("Unrecognized parameter '%s' passed to persona store '%s'.");
																				_data_->_tmp352_ = NULL;
																				_data_->_tmp352_ = _data_->k;
																				_data_->_tmp353_ = NULL;
																				_data_->_tmp353_ = folks_persona_store_get_id ((FolksPersonaStore*) _data_->self);
																				_data_->_tmp354_ = NULL;
																				_data_->_tmp354_ = _data_->_tmp353_;
																				_data_->_tmp355_ = NULL;
																				_data_->_tmp355_ = g_error_new (FOLKS_PERSONA_STORE_ERROR, FOLKS_PERSONA_STORE_ERROR_INVALID_ARGUMENT, _data_->_tmp351_, _data_->_tmp352_, _data_->_tmp354_);
																				_data_->_inner_error_ = _data_->_tmp355_;
																				if (_data_->_inner_error_->domain == FOLKS_PERSONA_STORE_ERROR) {
																					g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
																					g_error_free (_data_->_inner_error_);
																					__vala_GValue_free0 (_data_->v);
																					_g_list_free0 (_data_->k_collection);
																					_g_object_unref0 (_data_->builder);
																					_g_object_unref0 (_data_->avatar);
																					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 {
																					__vala_GValue_free0 (_data_->v);
																					_g_list_free0 (_data_->k_collection);
																					_g_object_unref0 (_data_->builder);
																					_g_object_unref0 (_data_->avatar);
																					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;
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
				__vala_GValue_free0 (_data_->v);
			}
		}
		_g_list_free0 (_data_->k_collection);
	}
	_data_->_tmp356_ = NULL;
	_data_->_tmp356_ = _data_->builder;
	tracker_sparql_builder_insert_close (_data_->_tmp356_);
	_data_->ret = NULL;
	_data_->_tmp357_ = NULL;
	_data_->_tmp357_ = _data_->builder;
	_data_->_tmp358_ = NULL;
	_data_->_tmp358_ = tracker_sparql_builder_get_result (_data_->_tmp357_);
	_data_->_tmp359_ = NULL;
	_data_->_tmp359_ = _data_->_tmp358_;
	_data_->_state_ = 3;
	_trf_persona_store_insert_persona (_data_->self, _data_->_tmp359_, "p", trf_persona_store_add_persona_from_details_ready, _data_);
	return FALSE;
	_state_3:
	_data_->_tmp360_ = NULL;
	_data_->_tmp360_ = _trf_persona_store_insert_persona_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
	_data_->contact_urn = _data_->_tmp360_;
	if (_data_->_inner_error_ != NULL) {
		if (_data_->_inner_error_->domain == FOLKS_PERSONA_STORE_ERROR) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_object_unref0 (_data_->ret);
			_g_object_unref0 (_data_->builder);
			_g_object_unref0 (_data_->avatar);
			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_->ret);
			_g_object_unref0 (_data_->builder);
			_g_object_unref0 (_data_->avatar);
			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_->_tmp361_ = NULL;
	_data_->_tmp361_ = _data_->contact_urn;
	if (_data_->_tmp361_ != NULL) {
		_data_->_tmp362_ = NULL;
		_data_->_tmp362_ = _data_->contact_urn;
		_data_->_tmp363_ = NULL;
		_data_->_tmp363_ = g_strdup_printf (" FILTER(?_contact = <%s>) ", _data_->_tmp362_);
		_data_->filter = _data_->_tmp363_;
		_data_->_tmp364_ = NULL;
		_data_->_tmp364_ = _data_->filter;
		_data_->_tmp365_ = NULL;
		_data_->_tmp365_ = g_strdup_printf (TRF_PERSONA_STORE__INITIAL_QUERY, _data_->_tmp364_);
		_data_->query = _data_->_tmp365_;
		_data_->_tmp366_ = NULL;
		_data_->_tmp366_ = _data_->query;
		_data_->_state_ = 4;
		_trf_persona_store_do_add_contacts (_data_->self, _data_->_tmp366_, trf_persona_store_add_persona_from_details_ready, _data_);
		return FALSE;
		_state_4:
		_data_->_tmp367_ = NULL;
		_data_->_tmp367_ = _trf_persona_store_do_add_contacts_finish (_data_->self, _data_->_res_);
		_data_->ret_personas = _data_->_tmp367_;
		{
			_data_->_tmp368_ = NULL;
			_data_->_tmp368_ = _data_->ret_personas;
			_data_->_tmp369_ = NULL;
			_data_->_tmp369_ = gee_abstract_collection_iterator ((GeeAbstractCollection*) _data_->_tmp368_);
			_data_->_p_it = _data_->_tmp369_;
			while (TRUE) {
				_data_->_tmp370_ = NULL;
				_data_->_tmp370_ = _data_->_p_it;
				_data_->_tmp371_ = FALSE;
				_data_->_tmp371_ = gee_iterator_next (_data_->_tmp370_);
				if (!_data_->_tmp371_) {
					break;
				}
				_data_->_tmp372_ = NULL;
				_data_->_tmp372_ = _data_->_p_it;
				_data_->_tmp373_ = NULL;
				_data_->_tmp373_ = gee_iterator_get (_data_->_tmp372_);
				_data_->p = (TrfPersona*) _data_->_tmp373_;
				_data_->_tmp374_ = NULL;
				_data_->_tmp374_ = _data_->p;
				_data_->_tmp375_ = NULL;
				_data_->_tmp375_ = _g_object_ref0 (_data_->_tmp374_);
				_g_object_unref0 (_data_->ret);
				_data_->ret = _data_->_tmp375_;
				_g_object_unref0 (_data_->p);
				break;
			}
			_g_object_unref0 (_data_->_p_it);
		}
		_g_object_unref0 (_data_->ret_personas);
		_g_free0 (_data_->query);
		_g_free0 (_data_->filter);
	} else {
		g_debug ("trf-persona-store.vala:767: Failed to inserting the new persona  into " \
"Tracker.");
	}
	_data_->_tmp377_ = NULL;
	_data_->_tmp377_ = _data_->ret;
	if (_data_->_tmp377_ != NULL) {
		_data_->_tmp378_ = NULL;
		_data_->_tmp378_ = _data_->avatar;
		_data_->_tmp376_ = _data_->_tmp378_ != NULL;
	} else {
		_data_->_tmp376_ = FALSE;
	}
	if (_data_->_tmp376_) {
		_data_->_tmp379_ = NULL;
		_data_->_tmp379_ = _data_->ret;
		_data_->_tmp380_ = NULL;
		_data_->_tmp380_ = _data_->avatar;
		_data_->_state_ = 5;
		_trf_persona_store_set_avatar (_data_->self, (FolksPersona*) _data_->_tmp379_, _data_->_tmp380_, trf_persona_store_add_persona_from_details_ready, _data_);
		return FALSE;
		_state_5:
		_trf_persona_store_set_avatar_finish (_data_->self, _data_->_res_);
	}
	_data_->result = (FolksPersona*) _data_->ret;
	_g_free0 (_data_->contact_urn);
	_g_object_unref0 (_data_->builder);
	_g_object_unref0 (_data_->avatar);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->contact_urn);
	_g_object_unref0 (_data_->ret);
	_g_object_unref0 (_data_->builder);
	_g_object_unref0 (_data_->avatar);
	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;
}


/**
   * Returns "service1:addr1,addr2;service2:addr3,.."
   *
   * @since 0.5.1
   */
gchar* trf_persona_store_serialize_web_services (GeeMultiMap* ws_obj) {
	gchar* result = NULL;
	gchar* str = NULL;
	gchar* _tmp0_ = NULL;
	g_return_val_if_fail (ws_obj != NULL, NULL);
	_tmp0_ = g_strdup ("");
	str = _tmp0_;
	{
		GeeIterator* _service_it = NULL;
		GeeMultiMap* _tmp1_ = NULL;
		GeeSet* _tmp2_ = NULL;
		GeeSet* _tmp3_ = NULL;
		GeeIterator* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		_tmp1_ = ws_obj;
		_tmp2_ = gee_multi_map_get_keys (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_service_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			gchar* service = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			const gchar* _tmp10_ = NULL;
			const gchar* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			gchar* _tmp15_ = NULL;
			gchar* _tmp16_ = NULL;
			gchar* _tmp17_ = NULL;
			GeeCollection* ws_fds = NULL;
			GeeMultiMap* _tmp18_ = NULL;
			const gchar* _tmp19_ = NULL;
			GeeCollection* _tmp20_ = NULL;
			gboolean first = FALSE;
			_tmp6_ = _service_it;
			_tmp7_ = gee_iterator_next (_tmp6_);
			if (!_tmp7_) {
				break;
			}
			_tmp8_ = _service_it;
			_tmp9_ = gee_iterator_get (_tmp8_);
			service = (gchar*) _tmp9_;
			_tmp10_ = str;
			if (g_strcmp0 (_tmp10_, "") != 0) {
				const gchar* _tmp11_ = NULL;
				gchar* _tmp12_ = NULL;
				_tmp11_ = str;
				_tmp12_ = g_strconcat (_tmp11_, ";", NULL);
				_g_free0 (str);
				str = _tmp12_;
			}
			_tmp13_ = str;
			_tmp14_ = service;
			_tmp15_ = g_strconcat (_tmp14_, ":", NULL);
			_tmp16_ = _tmp15_;
			_tmp17_ = g_strconcat (_tmp13_, _tmp16_, NULL);
			_g_free0 (str);
			str = _tmp17_;
			_g_free0 (_tmp16_);
			_tmp18_ = ws_obj;
			_tmp19_ = service;
			_tmp20_ = gee_multi_map_get (_tmp18_, _tmp19_);
			ws_fds = _tmp20_;
			first = TRUE;
			{
				GeeIterator* _ws_fd_it = NULL;
				GeeCollection* _tmp21_ = NULL;
				GeeIterator* _tmp22_ = NULL;
				_tmp21_ = ws_fds;
				_tmp22_ = gee_iterable_iterator ((GeeIterable*) _tmp21_);
				_ws_fd_it = _tmp22_;
				while (TRUE) {
					GeeIterator* _tmp23_ = NULL;
					gboolean _tmp24_ = FALSE;
					FolksWebServiceFieldDetails* ws_fd = NULL;
					GeeIterator* _tmp25_ = NULL;
					gpointer _tmp26_ = NULL;
					gboolean _tmp27_ = FALSE;
					const gchar* _tmp30_ = NULL;
					FolksWebServiceFieldDetails* _tmp31_ = NULL;
					gconstpointer _tmp32_ = NULL;
					const gchar* _tmp33_ = NULL;
					gchar* _tmp34_ = NULL;
					_tmp23_ = _ws_fd_it;
					_tmp24_ = gee_iterator_next (_tmp23_);
					if (!_tmp24_) {
						break;
					}
					_tmp25_ = _ws_fd_it;
					_tmp26_ = gee_iterator_get (_tmp25_);
					ws_fd = (FolksWebServiceFieldDetails*) _tmp26_;
					_tmp27_ = first;
					if (_tmp27_ == FALSE) {
						const gchar* _tmp28_ = NULL;
						gchar* _tmp29_ = NULL;
						_tmp28_ = str;
						_tmp29_ = g_strconcat (_tmp28_, ",", NULL);
						_g_free0 (str);
						str = _tmp29_;
					}
					_tmp30_ = str;
					_tmp31_ = ws_fd;
					_tmp32_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp31_);
					_tmp33_ = _tmp32_;
					_tmp34_ = g_strconcat (_tmp30_, (const gchar*) _tmp33_, NULL);
					_g_free0 (str);
					str = _tmp34_;
					first = FALSE;
					_g_object_unref0 (ws_fd);
				}
				_g_object_unref0 (_ws_fd_it);
			}
			_g_object_unref0 (ws_fds);
			_g_free0 (service);
		}
		_g_object_unref0 (_service_it);
	}
	result = str;
	return result;
}


/**
   * Transforms "service1:addr1,addr2;service2:addr3,.." to
   *   --->  HashMultiMap<string, string>
   *
   * @since 0.5.1
   */
static guint _folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v, gpointer self) {
	guint result;
	result = folks_abstract_field_details_hash_static ((FolksAbstractFieldDetails*) v);
	return result;
}


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


GeeMultiMap* trf_persona_store_unserialize_web_services (const gchar* ws_addrs) {
	GeeMultiMap* result = NULL;
	GeeHashMultiMap* ret = NULL;
	GeeHashMultiMap* _tmp0_ = NULL;
	gchar** services = NULL;
	const gchar* _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
	gchar** _tmp3_ = NULL;
	gint services_length1 = 0;
	gint _services_size_ = 0;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	g_return_val_if_fail (ws_addrs != NULL, NULL);
	_tmp0_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_TYPE_WEB_SERVICE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	ret = _tmp0_;
	_tmp1_ = ws_addrs;
	_tmp3_ = _tmp2_ = g_strsplit (_tmp1_, ";", 0);
	services = _tmp3_;
	services_length1 = _vala_array_length (_tmp2_);
	_services_size_ = services_length1;
	_tmp4_ = services;
	_tmp4__length1 = services_length1;
	{
		gchar** service_line_collection = NULL;
		gint service_line_collection_length1 = 0;
		gint _service_line_collection_size_ = 0;
		gint service_line_it = 0;
		service_line_collection = _tmp4_;
		service_line_collection_length1 = _tmp4__length1;
		for (service_line_it = 0; service_line_it < _tmp4__length1; service_line_it = service_line_it + 1) {
			gchar* _tmp5_ = NULL;
			gchar* service_line = NULL;
			_tmp5_ = g_strdup (service_line_collection[service_line_it]);
			service_line = _tmp5_;
			{
				gchar** service_t = NULL;
				const gchar* _tmp6_ = NULL;
				gchar** _tmp7_ = NULL;
				gchar** _tmp8_ = NULL;
				gint service_t_length1 = 0;
				gint _service_t_size_ = 0;
				gchar* service_name = NULL;
				gchar** _tmp9_ = NULL;
				gint _tmp9__length1 = 0;
				const gchar* _tmp10_ = NULL;
				gchar* _tmp11_ = NULL;
				gchar** addrs = NULL;
				gchar** _tmp12_ = NULL;
				gint _tmp12__length1 = 0;
				const gchar* _tmp13_ = NULL;
				gchar** _tmp14_ = NULL;
				gchar** _tmp15_ = NULL;
				gint addrs_length1 = 0;
				gint _addrs_size_ = 0;
				gchar** _tmp16_ = NULL;
				gint _tmp16__length1 = 0;
				_tmp6_ = service_line;
				_tmp8_ = _tmp7_ = g_strsplit (_tmp6_, ":", 0);
				service_t = _tmp8_;
				service_t_length1 = _vala_array_length (_tmp7_);
				_service_t_size_ = service_t_length1;
				_tmp9_ = service_t;
				_tmp9__length1 = service_t_length1;
				_tmp10_ = _tmp9_[0];
				_tmp11_ = g_strdup (_tmp10_);
				service_name = _tmp11_;
				_tmp12_ = service_t;
				_tmp12__length1 = service_t_length1;
				_tmp13_ = _tmp12_[1];
				_tmp15_ = _tmp14_ = g_strsplit (_tmp13_, ",", 0);
				addrs = _tmp15_;
				addrs_length1 = _vala_array_length (_tmp14_);
				_addrs_size_ = addrs_length1;
				_tmp16_ = addrs;
				_tmp16__length1 = addrs_length1;
				{
					gchar** a_collection = NULL;
					gint a_collection_length1 = 0;
					gint _a_collection_size_ = 0;
					gint a_it = 0;
					a_collection = _tmp16_;
					a_collection_length1 = _tmp16__length1;
					for (a_it = 0; a_it < _tmp16__length1; a_it = a_it + 1) {
						gchar* _tmp17_ = NULL;
						gchar* a = NULL;
						_tmp17_ = g_strdup (a_collection[a_it]);
						a = _tmp17_;
						{
							GeeHashMultiMap* _tmp18_ = NULL;
							const gchar* _tmp19_ = NULL;
							const gchar* _tmp20_ = NULL;
							FolksWebServiceFieldDetails* _tmp21_ = NULL;
							FolksWebServiceFieldDetails* _tmp22_ = NULL;
							_tmp18_ = ret;
							_tmp19_ = service_name;
							_tmp20_ = a;
							_tmp21_ = folks_web_service_field_details_new (_tmp20_, NULL);
							_tmp22_ = _tmp21_;
							gee_multi_map_set ((GeeMultiMap*) _tmp18_, _tmp19_, _tmp22_);
							_g_object_unref0 (_tmp22_);
							_g_free0 (a);
						}
					}
				}
				addrs = (_vala_array_free (addrs, addrs_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (service_name);
				service_t = (_vala_array_free (service_t, service_t_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (service_line);
			}
		}
	}
	result = (GeeMultiMap*) ret;
	services = (_vala_array_free (services, services_length1, (GDestroyNotify) g_free), NULL);
	return result;
}


/**
   * Transform Set<string> to "id1,id2,.."
   *
   * @since 0.5.1
   */
gchar* trf_persona_store_serialize_local_ids (GeeSet* local_ids) {
	gchar* result = NULL;
	gchar* str = NULL;
	gchar* _tmp0_ = NULL;
	g_return_val_if_fail (local_ids != NULL, NULL);
	_tmp0_ = g_strdup ("");
	str = _tmp0_;
	{
		GeeIterator* _id_it = NULL;
		GeeSet* _tmp1_ = NULL;
		GeeIterator* _tmp2_ = NULL;
		_tmp1_ = local_ids;
		_tmp2_ = gee_iterable_iterator ((GeeIterable*) _tmp1_);
		_id_it = _tmp2_;
		while (TRUE) {
			GeeIterator* _tmp3_ = NULL;
			gboolean _tmp4_ = FALSE;
			gchar* id = NULL;
			GeeIterator* _tmp5_ = NULL;
			gpointer _tmp6_ = NULL;
			const gchar* _tmp7_ = NULL;
			const gchar* _tmp10_ = NULL;
			const gchar* _tmp11_ = NULL;
			gchar* _tmp12_ = NULL;
			_tmp3_ = _id_it;
			_tmp4_ = gee_iterator_next (_tmp3_);
			if (!_tmp4_) {
				break;
			}
			_tmp5_ = _id_it;
			_tmp6_ = gee_iterator_get (_tmp5_);
			id = (gchar*) _tmp6_;
			_tmp7_ = str;
			if (g_strcmp0 (_tmp7_, "") != 0) {
				const gchar* _tmp8_ = NULL;
				gchar* _tmp9_ = NULL;
				_tmp8_ = str;
				_tmp9_ = g_strconcat (_tmp8_, ",", NULL);
				_g_free0 (str);
				str = _tmp9_;
			}
			_tmp10_ = str;
			_tmp11_ = id;
			_tmp12_ = g_strconcat (_tmp10_, _tmp11_, NULL);
			_g_free0 (str);
			str = _tmp12_;
			_g_free0 (id);
		}
		_g_object_unref0 (_id_it);
	}
	result = str;
	return result;
}


/**
   * Transform from id1,id2,.. to HashSet<string>
   *
   * @since 0.5.1
   */
GeeSet* trf_persona_store_unserialize_local_ids (const gchar* local_ids) {
	GeeSet* result = NULL;
	GeeHashSet* ids = NULL;
	GeeHashSet* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	g_return_val_if_fail (local_ids != NULL, NULL);
	_tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	ids = _tmp0_;
	_tmp1_ = local_ids;
	if (g_strcmp0 (_tmp1_, "") != 0) {
		gchar** ids_a = NULL;
		const gchar* _tmp2_ = NULL;
		gchar** _tmp3_ = NULL;
		gchar** _tmp4_ = NULL;
		gint ids_a_length1 = 0;
		gint _ids_a_size_ = 0;
		gchar** _tmp5_ = NULL;
		gint _tmp5__length1 = 0;
		_tmp2_ = local_ids;
		_tmp4_ = _tmp3_ = g_strsplit (_tmp2_, ",", 0);
		ids_a = _tmp4_;
		ids_a_length1 = _vala_array_length (_tmp3_);
		_ids_a_size_ = ids_a_length1;
		_tmp5_ = ids_a;
		_tmp5__length1 = ids_a_length1;
		{
			gchar** id_collection = NULL;
			gint id_collection_length1 = 0;
			gint _id_collection_size_ = 0;
			gint id_it = 0;
			id_collection = _tmp5_;
			id_collection_length1 = _tmp5__length1;
			for (id_it = 0; id_it < _tmp5__length1; id_it = id_it + 1) {
				gchar* _tmp6_ = NULL;
				gchar* id = NULL;
				_tmp6_ = g_strdup (id_collection[id_it]);
				id = _tmp6_;
				{
					GeeHashSet* _tmp7_ = NULL;
					const gchar* _tmp8_ = NULL;
					_tmp7_ = ids;
					_tmp8_ = id;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, _tmp8_);
					_g_free0 (id);
				}
			}
		}
		ids_a = (_vala_array_free (ids_a, ids_a_length1, (GDestroyNotify) g_free), NULL);
	}
	result = (GeeSet*) ids;
	return result;
}


static void trf_persona_store_real_remove_persona_data_free (gpointer _data) {
	TrfPersonaStoreRemovePersonaData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreRemovePersonaData, _data_);
}


static void trf_persona_store_real_remove_persona (FolksPersonaStore* base, FolksPersona* persona, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStore * self;
	TrfPersonaStoreRemovePersonaData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	self = (TrfPersonaStore*) base;
	_data_ = g_slice_new0 (TrfPersonaStoreRemovePersonaData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, trf_persona_store_real_remove_persona);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, trf_persona_store_real_remove_persona_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	trf_persona_store_real_remove_persona_co (_data_);
}


static void trf_persona_store_real_remove_persona_finish (FolksPersonaStore* base, GAsyncResult* _res_, GError** error) {
	TrfPersonaStoreRemovePersonaData* _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_));
}


/**
   * Remove a {@link Persona} from the PersonaStore.
   *
   * See {@link Folks.PersonaStore.remove_persona}. This method is not safe to
   * call multiple times concurrently on the same persona.
   *
   * @throws Folks.PersonaStoreError currently unused
   */
static void trf_persona_store_remove_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreRemovePersonaData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	trf_persona_store_real_remove_persona_co (_data_);
}


static gboolean trf_persona_store_real_remove_persona_co (TrfPersonaStoreRemovePersonaData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_state_ = 1;
	_trf_persona_store_remove_attributes_from_persona (_data_->self, _data_->_tmp0_, _REMOVE_ALL_ATTRIBS, trf_persona_store_remove_persona_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _trf_persona_store_remove_attributes_from_persona_finish (_data_->self, _data_->_res_);
	_data_->urn = _data_->_tmp1_;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = g_strdup (" DELETE { " " %s ?p ?o " "} " "WHERE { " " %s ?p ?o " "} ");
	_data_->q = _data_->_tmp2_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup_printf (_data_->q, _data_->urn, _data_->urn);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_state_ = 2;
	_trf_persona_store_tracker_update (_data_->self, _data_->_tmp4_, "remove_persona", trf_persona_store_remove_persona_ready, _data_);
	return FALSE;
	_state_2:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->_tmp4_);
	_g_free0 (_data_->q);
	_g_free0 (_data_->urn);
	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 _trf_persona_store_remove_attributes_from_persona_data_free (gpointer _data) {
	TrfPersonaStoreRemoveAttributesFromPersonaData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreRemoveAttributesFromPersonaData, _data_);
}


static void _trf_persona_store_remove_attributes_from_persona (TrfPersonaStore* self, FolksPersona* persona, gchar remove_flag, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreRemoveAttributesFromPersonaData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	gchar _tmp3_ = '\0';
	_data_ = g_slice_new0 (TrfPersonaStoreRemoveAttributesFromPersonaData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_remove_attributes_from_persona);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_remove_attributes_from_persona_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = remove_flag;
	_data_->remove_flag = _tmp3_;
	_trf_persona_store_remove_attributes_from_persona_co (_data_);
}


static gchar* _trf_persona_store_remove_attributes_from_persona_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	gchar* result;
	TrfPersonaStoreRemoveAttributesFromPersonaData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_remove_attributes_from_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreRemoveAttributesFromPersonaData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_remove_attributes_from_persona_co (_data_);
}


static gboolean _trf_persona_store_remove_attributes_from_persona_co (TrfPersonaStoreRemoveAttributesFromPersonaData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_state_ = 1;
	_trf_persona_store_urn_from_persona (_data_->self, _data_->_tmp0_, _trf_persona_store_remove_attributes_from_persona_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _trf_persona_store_urn_from_persona_finish (_data_->self, _data_->_res_);
	_data_->urn = _data_->_tmp1_;
	_data_->_tmp2_ = '\0';
	_data_->_tmp2_ = _data_->remove_flag;
	_data_->_state_ = 2;
	_trf_persona_store_remove_attributes (_data_->self, _data_->urn, _data_->_tmp2_, _trf_persona_store_remove_attributes_from_persona_ready, _data_);
	return FALSE;
	_state_2:
	_trf_persona_store_remove_attributes_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->urn;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->urn);
	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 _trf_persona_store_build_update_query_set_data_free (gpointer _data) {
	TrfPersonaStoreBuildUpdateQuerySetData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->builder);
	_g_object_unref0 (_data_->properties);
	_g_free0 (_data_->contact_var);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreBuildUpdateQuerySetData, _data_);
}


static void _trf_persona_store_build_update_query_set (TrfPersonaStore* self, TrackerSparqlBuilder* builder, GeeSet* properties, const gchar* contact_var, TrfAttrib attrib, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreBuildUpdateQuerySetData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	TrackerSparqlBuilder* _tmp1_ = NULL;
	TrackerSparqlBuilder* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	TrfAttrib _tmp7_ = 0;
	_data_ = g_slice_new0 (TrfPersonaStoreBuildUpdateQuerySetData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_build_update_query_set);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_build_update_query_set_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = builder;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->builder);
	_data_->builder = _tmp2_;
	_tmp3_ = properties;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->properties);
	_data_->properties = _tmp4_;
	_tmp5_ = contact_var;
	_tmp6_ = g_strdup (_tmp5_);
	_g_free0 (_data_->contact_var);
	_data_->contact_var = _tmp6_;
	_tmp7_ = attrib;
	_data_->attrib = _tmp7_;
	_trf_persona_store_build_update_query_set_co (_data_);
}


static void _trf_persona_store_build_update_query_set_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreBuildUpdateQuerySetData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_build_update_query_set_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreBuildUpdateQuerySetData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_build_update_query_set_co (_data_);
}


static gboolean _trf_persona_store_build_update_query_set_co (TrfPersonaStoreBuildUpdateQuerySetData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->affl_var = NULL;
	_data_->obj_var = NULL;
	_data_->related_attrib = NULL;
	_data_->related_prop = NULL;
	_data_->related_connection = NULL;
	_data_->_tmp0_ = 0;
	_data_->_tmp0_ = _data_->attrib;
	switch (_data_->_tmp0_) {
		case TRF_ATTRIB_PHONES:
		{
			_data_->related_attrib = TRF_ONTOLOGY_DEFS_NCO_PHONE;
			_data_->related_prop = TRF_ONTOLOGY_DEFS_NCO_PHONE_PROP;
			_data_->related_connection = TRF_ONTOLOGY_DEFS_NCO_HAS_PHONE;
			_data_->_tmp1_ = NULL;
			_data_->_tmp1_ = g_strdup ("_:phone_affl%d");
			_g_free0 (_data_->affl_var);
			_data_->affl_var = _data_->_tmp1_;
			_data_->_tmp2_ = NULL;
			_data_->_tmp2_ = g_strdup ("_:phone%d");
			_g_free0 (_data_->obj_var);
			_data_->obj_var = _data_->_tmp2_;
			break;
		}
		case TRF_ATTRIB_EMAILS:
		{
			_data_->related_attrib = TRF_ONTOLOGY_DEFS_NCO_EMAIL;
			_data_->related_prop = TRF_ONTOLOGY_DEFS_NCO_EMAIL_PROP;
			_data_->related_connection = TRF_ONTOLOGY_DEFS_NCO_HAS_EMAIL;
			_data_->_tmp3_ = NULL;
			_data_->_tmp3_ = g_strdup ("_:email_affl%d");
			_g_free0 (_data_->affl_var);
			_data_->affl_var = _data_->_tmp3_;
			_data_->_tmp4_ = NULL;
			_data_->_tmp4_ = g_strdup ("_:email%d");
			_g_free0 (_data_->obj_var);
			_data_->obj_var = _data_->_tmp4_;
			break;
		}
		default:
		break;
	}
	_data_->cnt = 0;
	{
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->properties;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp5_);
		_data_->_p_it = _data_->_tmp6_;
		while (TRUE) {
			_data_->_tmp7_ = NULL;
			_data_->_tmp7_ = _data_->_p_it;
			_data_->_tmp8_ = FALSE;
			_data_->_tmp8_ = gee_iterator_next (_data_->_tmp7_);
			if (!_data_->_tmp8_) {
				break;
			}
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = _data_->_p_it;
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = gee_iterator_get (_data_->_tmp9_);
			_data_->p = (FolksAbstractFieldDetails*) _data_->_tmp10_;
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = _data_->affl_var;
			_data_->_tmp12_ = 0;
			_data_->_tmp12_ = _data_->cnt;
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = g_strdup_printf (_data_->_tmp11_, _data_->_tmp12_);
			_data_->affl = _data_->_tmp13_;
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = _data_->related_attrib;
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = _data_->related_prop;
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = _data_->p;
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = folks_abstract_field_details_get_value (_data_->_tmp16_);
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = _data_->_tmp17_;
			_data_->_state_ = 1;
			_trf_persona_store_urn_from_property (_data_->self, _data_->_tmp14_, _data_->_tmp15_, (const gchar*) _data_->_tmp18_, _trf_persona_store_build_update_query_set_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp19_ = NULL;
			_data_->_tmp19_ = _trf_persona_store_urn_from_property_finish (_data_->self, _data_->_res_);
			_data_->obj = _data_->_tmp19_;
			_data_->_tmp20_ = NULL;
			_data_->_tmp20_ = _data_->obj;
			if (g_strcmp0 (_data_->_tmp20_, "") == 0) {
				_data_->_tmp21_ = NULL;
				_data_->_tmp21_ = _data_->obj_var;
				_data_->_tmp22_ = 0;
				_data_->_tmp22_ = _data_->cnt;
				_data_->_tmp23_ = NULL;
				_data_->_tmp23_ = g_strdup_printf (_data_->_tmp21_, _data_->_tmp22_);
				_g_free0 (_data_->obj);
				_data_->obj = _data_->_tmp23_;
				_data_->_tmp24_ = NULL;
				_data_->_tmp24_ = _data_->builder;
				_data_->_tmp25_ = NULL;
				_data_->_tmp25_ = _data_->obj;
				tracker_sparql_builder_subject (_data_->_tmp24_, _data_->_tmp25_);
				_data_->_tmp26_ = NULL;
				_data_->_tmp26_ = _data_->builder;
				tracker_sparql_builder_predicate (_data_->_tmp26_, "a");
				_data_->_tmp27_ = NULL;
				_data_->_tmp27_ = _data_->builder;
				_data_->_tmp28_ = NULL;
				_data_->_tmp28_ = _data_->related_attrib;
				tracker_sparql_builder_object (_data_->_tmp27_, _data_->_tmp28_);
				_data_->_tmp29_ = NULL;
				_data_->_tmp29_ = _data_->builder;
				_data_->_tmp30_ = NULL;
				_data_->_tmp30_ = _data_->related_prop;
				tracker_sparql_builder_predicate (_data_->_tmp29_, _data_->_tmp30_);
				_data_->_tmp31_ = NULL;
				_data_->_tmp31_ = _data_->builder;
				_data_->_tmp32_ = NULL;
				_data_->_tmp32_ = _data_->p;
				_data_->_tmp33_ = NULL;
				_data_->_tmp33_ = folks_abstract_field_details_get_value (_data_->_tmp32_);
				_data_->_tmp34_ = NULL;
				_data_->_tmp34_ = _data_->_tmp33_;
				tracker_sparql_builder_object_string (_data_->_tmp31_, (const gchar*) _data_->_tmp34_);
			}
			_data_->_tmp35_ = NULL;
			_data_->_tmp35_ = _data_->builder;
			_data_->_tmp36_ = NULL;
			_data_->_tmp36_ = _data_->affl;
			tracker_sparql_builder_subject (_data_->_tmp35_, _data_->_tmp36_);
			_data_->_tmp37_ = NULL;
			_data_->_tmp37_ = _data_->builder;
			tracker_sparql_builder_predicate (_data_->_tmp37_, "a");
			_data_->_tmp38_ = NULL;
			_data_->_tmp38_ = _data_->builder;
			tracker_sparql_builder_object (_data_->_tmp38_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION);
			_data_->_tmp39_ = NULL;
			_data_->_tmp39_ = _data_->builder;
			_data_->_tmp40_ = NULL;
			_data_->_tmp40_ = _data_->related_connection;
			tracker_sparql_builder_predicate (_data_->_tmp39_, _data_->_tmp40_);
			_data_->_tmp41_ = NULL;
			_data_->_tmp41_ = _data_->builder;
			_data_->_tmp42_ = NULL;
			_data_->_tmp42_ = _data_->obj;
			tracker_sparql_builder_object (_data_->_tmp41_, _data_->_tmp42_);
			_data_->_tmp43_ = NULL;
			_data_->_tmp43_ = _data_->builder;
			_data_->_tmp44_ = NULL;
			_data_->_tmp44_ = _data_->contact_var;
			tracker_sparql_builder_subject (_data_->_tmp43_, _data_->_tmp44_);
			_data_->_tmp45_ = NULL;
			_data_->_tmp45_ = _data_->builder;
			tracker_sparql_builder_predicate (_data_->_tmp45_, TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION);
			_data_->_tmp46_ = NULL;
			_data_->_tmp46_ = _data_->builder;
			_data_->_tmp47_ = NULL;
			_data_->_tmp47_ = _data_->affl;
			tracker_sparql_builder_object (_data_->_tmp46_, _data_->_tmp47_);
			_data_->_tmp48_ = 0;
			_data_->_tmp48_ = _data_->cnt;
			_data_->cnt = _data_->_tmp48_ + 1;
			_g_free0 (_data_->obj);
			_g_free0 (_data_->affl);
			_g_object_unref0 (_data_->p);
		}
		_g_object_unref0 (_data_->_p_it);
	}
	_g_free0 (_data_->obj_var);
	_g_free0 (_data_->affl_var);
	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 _trf_persona_store_remove_attributes_data_free (gpointer _data) {
	TrfPersonaStoreRemoveAttributesData* _data_;
	_data_ = _data;
	_g_free0 (_data_->urn);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreRemoveAttributesData, _data_);
}


static void _trf_persona_store_remove_attributes (TrfPersonaStore* self, const gchar* urn, gchar remove_flag, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreRemoveAttributesData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar _tmp3_ = '\0';
	_data_ = g_slice_new0 (TrfPersonaStoreRemoveAttributesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_remove_attributes);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_remove_attributes_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = urn;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->urn);
	_data_->urn = _tmp2_;
	_tmp3_ = remove_flag;
	_data_->remove_flag = _tmp3_;
	_trf_persona_store_remove_attributes_co (_data_);
}


static void _trf_persona_store_remove_attributes_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreRemoveAttributesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_remove_attributes_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreRemoveAttributesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_remove_attributes_co (_data_);
}


static gboolean _trf_persona_store_remove_attributes_co (TrfPersonaStoreRemoveAttributesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		case 6:
		goto _state_6;
		case 7:
		goto _state_7;
		case 8:
		goto _state_8;
		case 9:
		goto _state_9;
		case 10:
		goto _state_10;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->urn;
	_data_->_state_ = 1;
	_trf_persona_store_affiliations_from_persona (_data_->self, _data_->_tmp0_, _trf_persona_store_remove_attributes_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _trf_persona_store_affiliations_from_persona_finish (_data_->self, _data_->_res_);
	_data_->affiliations = _data_->_tmp1_;
	{
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = _data_->affiliations;
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
		_data_->_affl_list = _data_->_tmp3_;
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _data_->_affl_list;
		_data_->_tmp5_ = 0;
		_data_->_tmp5_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp4_);
		_data_->_tmp6_ = 0;
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_affl_size = _data_->_tmp6_;
		_data_->_affl_index = -1;
		while (TRUE) {
			_data_->_tmp7_ = 0;
			_data_->_tmp7_ = _data_->_affl_index;
			_data_->_affl_index = _data_->_tmp7_ + 1;
			_data_->_tmp8_ = 0;
			_data_->_tmp8_ = _data_->_affl_index;
			_data_->_tmp9_ = 0;
			_data_->_tmp9_ = _data_->_affl_size;
			if (!(_data_->_tmp8_ < _data_->_tmp9_)) {
				break;
			}
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_affl_list;
			_data_->_tmp11_ = 0;
			_data_->_tmp11_ = _data_->_affl_index;
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = folks_small_set_get (_data_->_tmp10_, _data_->_tmp11_);
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = g_strdup ((const gchar*) _data_->_tmp12_);
			_data_->affl = _data_->_tmp13_;
			_data_->got_attrib = FALSE;
			_data_->_tmp15_ = '\0';
			_data_->_tmp15_ = _data_->remove_flag;
			if ((_data_->_tmp15_ & _REMOVE_ALL_ATTRIBS) == _REMOVE_ALL_ATTRIBS) {
				_data_->_tmp14_ = TRUE;
			} else {
				_data_->_tmp16_ = '\0';
				_data_->_tmp16_ = _data_->remove_flag;
				_data_->_tmp14_ = (_data_->_tmp16_ & _REMOVE_PHONES) == _REMOVE_PHONES;
			}
			if (_data_->_tmp14_) {
				_data_->_tmp17_ = NULL;
				_data_->_tmp17_ = _data_->affl;
				_data_->_state_ = 2;
				_trf_persona_store_phones_from_affiliation (_data_->self, _data_->_tmp17_, _trf_persona_store_remove_attributes_ready, _data_);
				return FALSE;
				_state_2:
				_data_->_tmp18_ = NULL;
				_data_->_tmp18_ = _trf_persona_store_phones_from_affiliation_finish (_data_->self, _data_->_res_);
				_data_->phones = _data_->_tmp18_;
				{
					_data_->_tmp19_ = NULL;
					_data_->_tmp19_ = _data_->phones;
					_data_->_tmp20_ = NULL;
					_data_->_tmp20_ = _g_object_ref0 (_data_->_tmp19_);
					_data_->_phone_list = _data_->_tmp20_;
					_data_->_tmp21_ = NULL;
					_data_->_tmp21_ = _data_->_phone_list;
					_data_->_tmp22_ = 0;
					_data_->_tmp22_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp21_);
					_data_->_tmp23_ = 0;
					_data_->_tmp23_ = _data_->_tmp22_;
					_data_->_phone_size = _data_->_tmp23_;
					_data_->_phone_index = -1;
					while (TRUE) {
						_data_->_tmp24_ = 0;
						_data_->_tmp24_ = _data_->_phone_index;
						_data_->_phone_index = _data_->_tmp24_ + 1;
						_data_->_tmp25_ = 0;
						_data_->_tmp25_ = _data_->_phone_index;
						_data_->_tmp26_ = 0;
						_data_->_tmp26_ = _data_->_phone_size;
						if (!(_data_->_tmp25_ < _data_->_tmp26_)) {
							break;
						}
						_data_->_tmp27_ = NULL;
						_data_->_tmp27_ = _data_->_phone_list;
						_data_->_tmp28_ = 0;
						_data_->_tmp28_ = _data_->_phone_index;
						_data_->_tmp29_ = NULL;
						_data_->_tmp29_ = folks_small_set_get (_data_->_tmp27_, _data_->_tmp28_);
						_data_->_tmp30_ = NULL;
						_data_->_tmp30_ = g_strdup ((const gchar*) _data_->_tmp29_);
						_data_->phone = _data_->_tmp30_;
						_data_->got_attrib = TRUE;
						_data_->_tmp31_ = NULL;
						_data_->_tmp31_ = _data_->phone;
						_data_->_state_ = 3;
						_trf_persona_store_delete_resource (_data_->self, _data_->_tmp31_, TRUE, _trf_persona_store_remove_attributes_ready, _data_);
						return FALSE;
						_state_3:
						_trf_persona_store_delete_resource_finish (_data_->self, _data_->_res_);
						_g_free0 (_data_->phone);
					}
					_g_object_unref0 (_data_->_phone_list);
				}
				_g_object_unref0 (_data_->phones);
			}
			_data_->_tmp33_ = '\0';
			_data_->_tmp33_ = _data_->remove_flag;
			if ((_data_->_tmp33_ & _REMOVE_ALL_ATTRIBS) == _REMOVE_ALL_ATTRIBS) {
				_data_->_tmp32_ = TRUE;
			} else {
				_data_->_tmp34_ = '\0';
				_data_->_tmp34_ = _data_->remove_flag;
				_data_->_tmp32_ = (_data_->_tmp34_ & _REMOVE_POSTALS) == _REMOVE_POSTALS;
			}
			if (_data_->_tmp32_) {
				_data_->_tmp35_ = NULL;
				_data_->_tmp35_ = _data_->affl;
				_data_->_state_ = 4;
				_trf_persona_store_postals_from_affiliation (_data_->self, _data_->_tmp35_, _trf_persona_store_remove_attributes_ready, _data_);
				return FALSE;
				_state_4:
				_data_->_tmp36_ = NULL;
				_data_->_tmp36_ = _trf_persona_store_postals_from_affiliation_finish (_data_->self, _data_->_res_);
				_data_->postals = _data_->_tmp36_;
				{
					_data_->_tmp37_ = NULL;
					_data_->_tmp37_ = _data_->postals;
					_data_->_tmp38_ = NULL;
					_data_->_tmp38_ = _g_object_ref0 (_data_->_tmp37_);
					_data_->_postal_list = _data_->_tmp38_;
					_data_->_tmp39_ = NULL;
					_data_->_tmp39_ = _data_->_postal_list;
					_data_->_tmp40_ = 0;
					_data_->_tmp40_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp39_);
					_data_->_tmp41_ = 0;
					_data_->_tmp41_ = _data_->_tmp40_;
					_data_->_postal_size = _data_->_tmp41_;
					_data_->_postal_index = -1;
					while (TRUE) {
						_data_->_tmp42_ = 0;
						_data_->_tmp42_ = _data_->_postal_index;
						_data_->_postal_index = _data_->_tmp42_ + 1;
						_data_->_tmp43_ = 0;
						_data_->_tmp43_ = _data_->_postal_index;
						_data_->_tmp44_ = 0;
						_data_->_tmp44_ = _data_->_postal_size;
						if (!(_data_->_tmp43_ < _data_->_tmp44_)) {
							break;
						}
						_data_->_tmp45_ = NULL;
						_data_->_tmp45_ = _data_->_postal_list;
						_data_->_tmp46_ = 0;
						_data_->_tmp46_ = _data_->_postal_index;
						_data_->_tmp47_ = NULL;
						_data_->_tmp47_ = folks_small_set_get (_data_->_tmp45_, _data_->_tmp46_);
						_data_->_tmp48_ = NULL;
						_data_->_tmp48_ = g_strdup ((const gchar*) _data_->_tmp47_);
						_data_->postal = _data_->_tmp48_;
						_data_->got_attrib = TRUE;
						_data_->_tmp49_ = NULL;
						_data_->_tmp49_ = _data_->postal;
						_data_->_state_ = 5;
						_trf_persona_store_delete_resource (_data_->self, _data_->_tmp49_, TRUE, _trf_persona_store_remove_attributes_ready, _data_);
						return FALSE;
						_state_5:
						_trf_persona_store_delete_resource_finish (_data_->self, _data_->_res_);
						_g_free0 (_data_->postal);
					}
					_g_object_unref0 (_data_->_postal_list);
				}
				_g_object_unref0 (_data_->postals);
			}
			_data_->_tmp51_ = '\0';
			_data_->_tmp51_ = _data_->remove_flag;
			if ((_data_->_tmp51_ & _REMOVE_ALL_ATTRIBS) == _REMOVE_ALL_ATTRIBS) {
				_data_->_tmp50_ = TRUE;
			} else {
				_data_->_tmp52_ = '\0';
				_data_->_tmp52_ = _data_->remove_flag;
				_data_->_tmp50_ = (_data_->_tmp52_ & _REMOVE_IM_ADDRS) == _REMOVE_IM_ADDRS;
			}
			if (_data_->_tmp50_) {
				_data_->_tmp53_ = NULL;
				_data_->_tmp53_ = _data_->affl;
				_data_->_state_ = 6;
				_trf_persona_store_imaddrs_from_affiliation (_data_->self, _data_->_tmp53_, _trf_persona_store_remove_attributes_ready, _data_);
				return FALSE;
				_state_6:
				_data_->_tmp54_ = NULL;
				_data_->_tmp54_ = _trf_persona_store_imaddrs_from_affiliation_finish (_data_->self, _data_->_res_);
				_data_->im_addrs = _data_->_tmp54_;
				{
					_data_->_tmp55_ = NULL;
					_data_->_tmp55_ = _data_->im_addrs;
					_data_->_tmp56_ = NULL;
					_data_->_tmp56_ = _g_object_ref0 (_data_->_tmp55_);
					_data_->_im_addr_list = _data_->_tmp56_;
					_data_->_tmp57_ = NULL;
					_data_->_tmp57_ = _data_->_im_addr_list;
					_data_->_tmp58_ = 0;
					_data_->_tmp58_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp57_);
					_data_->_tmp59_ = 0;
					_data_->_tmp59_ = _data_->_tmp58_;
					_data_->_im_addr_size = _data_->_tmp59_;
					_data_->_im_addr_index = -1;
					while (TRUE) {
						_data_->_tmp60_ = 0;
						_data_->_tmp60_ = _data_->_im_addr_index;
						_data_->_im_addr_index = _data_->_tmp60_ + 1;
						_data_->_tmp61_ = 0;
						_data_->_tmp61_ = _data_->_im_addr_index;
						_data_->_tmp62_ = 0;
						_data_->_tmp62_ = _data_->_im_addr_size;
						if (!(_data_->_tmp61_ < _data_->_tmp62_)) {
							break;
						}
						_data_->_tmp63_ = NULL;
						_data_->_tmp63_ = _data_->_im_addr_list;
						_data_->_tmp64_ = 0;
						_data_->_tmp64_ = _data_->_im_addr_index;
						_data_->_tmp65_ = NULL;
						_data_->_tmp65_ = folks_small_set_get (_data_->_tmp63_, _data_->_tmp64_);
						_data_->_tmp66_ = NULL;
						_data_->_tmp66_ = g_strdup ((const gchar*) _data_->_tmp65_);
						_data_->im_addr = _data_->_tmp66_;
						_data_->got_attrib = TRUE;
						_data_->_tmp67_ = NULL;
						_data_->_tmp67_ = _data_->im_addr;
						_data_->_state_ = 7;
						_trf_persona_store_delete_resource (_data_->self, _data_->_tmp67_, TRUE, _trf_persona_store_remove_attributes_ready, _data_);
						return FALSE;
						_state_7:
						_trf_persona_store_delete_resource_finish (_data_->self, _data_->_res_);
						_g_free0 (_data_->im_addr);
					}
					_g_object_unref0 (_data_->_im_addr_list);
				}
				_g_object_unref0 (_data_->im_addrs);
			}
			_data_->_tmp69_ = '\0';
			_data_->_tmp69_ = _data_->remove_flag;
			if ((_data_->_tmp69_ & _REMOVE_ALL_ATTRIBS) == _REMOVE_ALL_ATTRIBS) {
				_data_->_tmp68_ = TRUE;
			} else {
				_data_->_tmp70_ = '\0';
				_data_->_tmp70_ = _data_->remove_flag;
				_data_->_tmp68_ = (_data_->_tmp70_ & _REMOVE_EMAILS) == _REMOVE_EMAILS;
			}
			if (_data_->_tmp68_) {
				_data_->_tmp71_ = NULL;
				_data_->_tmp71_ = _data_->affl;
				_data_->_state_ = 8;
				_trf_persona_store_emails_from_affiliation (_data_->self, _data_->_tmp71_, _trf_persona_store_remove_attributes_ready, _data_);
				return FALSE;
				_state_8:
				_data_->_tmp72_ = NULL;
				_data_->_tmp72_ = _trf_persona_store_emails_from_affiliation_finish (_data_->self, _data_->_res_);
				_data_->emails = _data_->_tmp72_;
				{
					_data_->_tmp73_ = NULL;
					_data_->_tmp73_ = _data_->emails;
					_data_->_tmp74_ = NULL;
					_data_->_tmp74_ = _g_object_ref0 (_data_->_tmp73_);
					_data_->_email_list = _data_->_tmp74_;
					_data_->_tmp75_ = NULL;
					_data_->_tmp75_ = _data_->_email_list;
					_data_->_tmp76_ = 0;
					_data_->_tmp76_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp75_);
					_data_->_tmp77_ = 0;
					_data_->_tmp77_ = _data_->_tmp76_;
					_data_->_email_size = _data_->_tmp77_;
					_data_->_email_index = -1;
					while (TRUE) {
						_data_->_tmp78_ = 0;
						_data_->_tmp78_ = _data_->_email_index;
						_data_->_email_index = _data_->_tmp78_ + 1;
						_data_->_tmp79_ = 0;
						_data_->_tmp79_ = _data_->_email_index;
						_data_->_tmp80_ = 0;
						_data_->_tmp80_ = _data_->_email_size;
						if (!(_data_->_tmp79_ < _data_->_tmp80_)) {
							break;
						}
						_data_->_tmp81_ = NULL;
						_data_->_tmp81_ = _data_->_email_list;
						_data_->_tmp82_ = 0;
						_data_->_tmp82_ = _data_->_email_index;
						_data_->_tmp83_ = NULL;
						_data_->_tmp83_ = folks_small_set_get (_data_->_tmp81_, _data_->_tmp82_);
						_data_->_tmp84_ = NULL;
						_data_->_tmp84_ = g_strdup ((const gchar*) _data_->_tmp83_);
						_data_->email = _data_->_tmp84_;
						_data_->got_attrib = TRUE;
						_data_->_tmp85_ = NULL;
						_data_->_tmp85_ = _data_->email;
						_data_->_state_ = 9;
						_trf_persona_store_delete_resource (_data_->self, _data_->_tmp85_, TRUE, _trf_persona_store_remove_attributes_ready, _data_);
						return FALSE;
						_state_9:
						_trf_persona_store_delete_resource_finish (_data_->self, _data_->_res_);
						_g_free0 (_data_->email);
					}
					_g_object_unref0 (_data_->_email_list);
				}
				_g_object_unref0 (_data_->emails);
			}
			_data_->_tmp87_ = FALSE;
			_data_->_tmp87_ = _data_->got_attrib;
			if (_data_->_tmp87_) {
				_data_->_tmp86_ = TRUE;
			} else {
				_data_->_tmp88_ = '\0';
				_data_->_tmp88_ = _data_->remove_flag;
				_data_->_tmp86_ = (_data_->_tmp88_ & _REMOVE_ALL_ATTRIBS) == _REMOVE_ALL_ATTRIBS;
			}
			if (_data_->_tmp86_) {
				_data_->_tmp89_ = NULL;
				_data_->_tmp89_ = _data_->affl;
				_data_->_state_ = 10;
				_trf_persona_store_delete_resource (_data_->self, _data_->_tmp89_, TRUE, _trf_persona_store_remove_attributes_ready, _data_);
				return FALSE;
				_state_10:
				_trf_persona_store_delete_resource_finish (_data_->self, _data_->_res_);
			}
			_g_free0 (_data_->affl);
		}
		_g_object_unref0 (_data_->_affl_list);
	}
	_g_object_unref0 (_data_->affiliations);
	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 trf_persona_store_real_prepare_data_free (gpointer _data) {
	TrfPersonaStorePrepareData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStorePrepareData, _data_);
}


static void trf_persona_store_real_prepare (FolksPersonaStore* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStore * self;
	TrfPersonaStorePrepareData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	self = (TrfPersonaStore*) base;
	_data_ = g_slice_new0 (TrfPersonaStorePrepareData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, trf_persona_store_real_prepare);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, trf_persona_store_real_prepare_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	trf_persona_store_real_prepare_co (_data_);
}


static void trf_persona_store_real_prepare_finish (FolksPersonaStore* base, GAsyncResult* _res_, GError** error) {
	TrfPersonaStorePrepareData* _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_));
}


/**
   * Prepare the PersonaStore for use.
   *
   * TODO: we should throw different errors dependening on what went wrong
   *       when we were trying to setup the PersonaStore.
   *
   * See {@link Folks.PersonaStore.prepare}.
   *
   * @throws Folks.PersonaStoreError.INVALID_ARGUMENT if connecting to D-Bus
   * failed
   */
static void trf_persona_store_prepare_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStorePrepareData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	trf_persona_store_real_prepare_co (_data_);
}


static void __trf_persona_store_graph_updated_cb_gd_bus_signal_callback (GDBusConnection* connection, const gchar* sender_name, const gchar* object_path, const gchar* interface_name, const gchar* signal_name, GVariant* parameters, gpointer self) {
	_trf_persona_store_graph_updated_cb ((TrfPersonaStore*) self, connection, sender_name, object_path, interface_name, signal_name, parameters);
}


static gboolean trf_persona_store_real_prepare_co (TrfPersonaStorePrepareData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = folks_persona_store_get_id ((FolksPersonaStore*) _data_->self);
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->_tmp0_;
	folks_internal_profiling_start ("preparing Trf.PersonaStore (ID: %s)", _data_->_tmp1_, NULL);
	_data_->_tmp3_ = FALSE;
	_data_->_tmp3_ = _data_->self->priv->_is_prepared;
	if (_data_->_tmp3_) {
		_data_->_tmp2_ = TRUE;
	} else {
		_data_->_tmp4_ = FALSE;
		_data_->_tmp4_ = _data_->self->priv->_prepare_pending;
		_data_->_tmp2_ = _data_->_tmp4_;
	}
	if (_data_->_tmp2_) {
		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_->self->priv->_prepare_pending = TRUE;
		{
			_data_->_state_ = 1;
			tracker_sparql_connection_get_async (NULL, trf_persona_store_prepare_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp6_ = NULL;
			_data_->_tmp6_ = tracker_sparql_connection_get_finish (_data_->_res_, &_data_->_inner_error_);
			_data_->_tmp5_ = _data_->_tmp6_;
			if (_data_->_inner_error_ != NULL) {
				if (_data_->_inner_error_->domain == G_IO_ERROR) {
					goto __catch2_g_io_error;
				}
				if (_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) {
					goto __catch2_tracker_sparql_error;
				}
				if (_data_->_inner_error_->domain == G_DBUS_ERROR) {
					goto __catch2_g_dbus_error;
				}
				goto __finally2;
			}
			_data_->_tmp7_ = NULL;
			_data_->_tmp7_ = _data_->_tmp5_;
			_data_->_tmp5_ = NULL;
			_g_object_unref0 (_data_->self->priv->_connection);
			_data_->self->priv->_connection = _data_->_tmp7_;
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = folks_persona_store_get_id ((FolksPersonaStore*) _data_->self);
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = _data_->_tmp8_;
			folks_internal_profiling_point ("got connection in " "Trf.PersonaStore (ID: %s)", _data_->_tmp9_);
			_data_->_state_ = 2;
			_trf_persona_store_build_predicates_table (_data_->self, trf_persona_store_prepare_ready, _data_);
			return FALSE;
			_state_2:
			_trf_persona_store_build_predicates_table_finish (_data_->self, _data_->_res_);
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = folks_persona_store_get_id ((FolksPersonaStore*) _data_->self);
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = _data_->_tmp10_;
			folks_internal_profiling_point ("build predicates table in " "Trf.PersonaStore (ID: %s)", _data_->_tmp11_);
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = g_strdup_printf (TRF_PERSONA_STORE__INITIAL_QUERY, "");
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = _data_->_tmp12_;
			_data_->_state_ = 3;
			_trf_persona_store_do_add_contacts (_data_->self, _data_->_tmp13_, trf_persona_store_prepare_ready, _data_);
			return FALSE;
			_state_3:
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = _trf_persona_store_do_add_contacts_finish (_data_->self, _data_->_res_);
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = _data_->_tmp14_;
			_g_object_unref0 (_data_->_tmp15_);
			_g_free0 (_data_->_tmp13_);
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = folks_persona_store_get_id ((FolksPersonaStore*) _data_->self);
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = _data_->_tmp16_;
			folks_internal_profiling_point ("added contacts in " "Trf.PersonaStore (ID: %s)", _data_->_tmp17_);
			_data_->_state_ = 4;
			g_async_initable_new_async (TYPE_RESOURCES_PROXY, 0, NULL, trf_persona_store_prepare_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, "g-name", TRF_PERSONA_STORE__OBJECT_NAME, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", TRF_PERSONA_STORE__OBJECT_PATH, "g-interface-name", "org.freedesktop.Tracker1.Resources", NULL);
			return FALSE;
			_state_4:
			_data_->_tmp19_ = NULL;
			_data_->_tmp19_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
			_data_->_tmp18_ = (Resources*) _data_->_tmp19_;
			if (_data_->_inner_error_ != NULL) {
				_g_object_unref0 (_data_->_tmp5_);
				if (_data_->_inner_error_->domain == G_IO_ERROR) {
					goto __catch2_g_io_error;
				}
				if (_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) {
					goto __catch2_tracker_sparql_error;
				}
				if (_data_->_inner_error_->domain == G_DBUS_ERROR) {
					goto __catch2_g_dbus_error;
				}
				_g_object_unref0 (_data_->_tmp5_);
				{
					_data_->self->priv->_prepare_pending = FALSE;
				}
				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_ = NULL;
			_data_->_tmp20_ = _data_->_tmp18_;
			_data_->_tmp18_ = NULL;
			_g_object_unref0 (_data_->self->priv->_resources_object);
			_data_->self->priv->_resources_object = _data_->_tmp20_;
			_data_->_tmp21_ = NULL;
			_data_->_tmp21_ = _data_->self->priv->_resources_object;
			_data_->_tmp22_ = NULL;
			g_object_get ((GDBusProxy*) _data_->_tmp21_, "g-connection", &_data_->_tmp22_, NULL);
			_data_->_tmp23_ = NULL;
			_data_->_tmp23_ = _data_->_tmp22_;
			_data_->_tmp24_ = NULL;
			_data_->_tmp24_ = _data_->_tmp23_;
			g_dbus_connection_signal_subscribe (_data_->_tmp24_, TRF_PERSONA_STORE__OBJECT_NAME, TRF_PERSONA_STORE__OBJECT_IFACE, "GraphUpdated", TRF_PERSONA_STORE__OBJECT_PATH, TRF_ONTOLOGY_DEFS_PERSON_CLASS, G_DBUS_SIGNAL_FLAGS_NONE, __trf_persona_store_graph_updated_cb_gd_bus_signal_callback, g_object_ref (_data_->self), g_object_unref);
			_g_object_unref0 (_data_->_tmp24_);
			_data_->_tmp25_ = NULL;
			_data_->_tmp25_ = folks_persona_store_get_id ((FolksPersonaStore*) _data_->self);
			_data_->_tmp26_ = NULL;
			_data_->_tmp26_ = _data_->_tmp25_;
			folks_internal_profiling_point ("got resources proxy in " "Trf.PersonaStore (ID: %s)", _data_->_tmp26_);
			_data_->self->priv->_is_prepared = TRUE;
			g_object_notify ((GObject*) _data_->self, "is-prepared");
			_data_->self->priv->_is_quiescent = TRUE;
			g_object_notify ((GObject*) _data_->self, "is-quiescent");
			_g_object_unref0 (_data_->_tmp18_);
			_g_object_unref0 (_data_->_tmp5_);
		}
		goto __finally2;
		__catch2_g_io_error:
		{
			_data_->e1 = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp27_ = NULL;
			_data_->_tmp27_ = _data_->e1;
			if (!g_error_matches (_data_->_tmp27_, G_IO_ERROR, G_IO_ERROR_CLOSED)) {
				_data_->_tmp28_ = NULL;
				_data_->_tmp28_ = _data_->e1;
				_data_->_tmp29_ = NULL;
				_data_->_tmp29_ = _data_->_tmp28_->message;
				g_warning ("trf-persona-store.vala:1140: Could not connect to D-Bus service: %s", _data_->_tmp29_);
			}
			g_signal_emit_by_name ((FolksPersonaStore*) _data_->self, "removed");
			_data_->_tmp30_ = NULL;
			_data_->_tmp30_ = _data_->e1;
			_data_->_tmp31_ = NULL;
			_data_->_tmp31_ = _data_->_tmp30_->message;
			_data_->_tmp32_ = NULL;
			_data_->_tmp32_ = g_error_new_literal (FOLKS_PERSONA_STORE_ERROR, FOLKS_PERSONA_STORE_ERROR_INVALID_ARGUMENT, _data_->_tmp31_);
			_data_->_inner_error_ = _data_->_tmp32_;
			_g_error_free0 (_data_->e1);
			goto __finally2;
		}
		goto __finally2;
		__catch2_tracker_sparql_error:
		{
			_data_->e2 = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp33_ = NULL;
			_data_->_tmp33_ = _data_->e2;
			_data_->_tmp34_ = NULL;
			_data_->_tmp34_ = _data_->_tmp33_->message;
			g_warning ("trf-persona-store.vala:1149: Error fetching SPARQL connection handler:" \
" %s", _data_->_tmp34_);
			g_signal_emit_by_name ((FolksPersonaStore*) _data_->self, "removed");
			_data_->_tmp35_ = NULL;
			_data_->_tmp35_ = _data_->e2;
			_data_->_tmp36_ = NULL;
			_data_->_tmp36_ = _data_->_tmp35_->message;
			_data_->_tmp37_ = NULL;
			_data_->_tmp37_ = g_error_new_literal (FOLKS_PERSONA_STORE_ERROR, FOLKS_PERSONA_STORE_ERROR_INVALID_ARGUMENT, _data_->_tmp36_);
			_data_->_inner_error_ = _data_->_tmp37_;
			_g_error_free0 (_data_->e2);
			goto __finally2;
		}
		goto __finally2;
		__catch2_g_dbus_error:
		{
			_data_->e3 = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp38_ = NULL;
			_data_->_tmp38_ = _data_->e3;
			_data_->_tmp39_ = NULL;
			_data_->_tmp39_ = _data_->_tmp38_->message;
			g_warning ("trf-persona-store.vala:1156: Could not connect to D-Bus service: %s", _data_->_tmp39_);
			g_signal_emit_by_name ((FolksPersonaStore*) _data_->self, "removed");
			_data_->_tmp40_ = NULL;
			_data_->_tmp40_ = _data_->e3;
			_data_->_tmp41_ = NULL;
			_data_->_tmp41_ = _data_->_tmp40_->message;
			_data_->_tmp42_ = NULL;
			_data_->_tmp42_ = g_error_new_literal (FOLKS_PERSONA_STORE_ERROR, FOLKS_PERSONA_STORE_ERROR_INVALID_ARGUMENT, _data_->_tmp41_);
			_data_->_inner_error_ = _data_->_tmp42_;
			_g_error_free0 (_data_->e3);
			goto __finally2;
		}
		__finally2:
		if (_data_->_inner_error_ != NULL) {
			goto __finally1;
		}
	}
	__finally1:
	{
		_data_->self->priv->_prepare_pending = FALSE;
	}
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp43_ = NULL;
	_data_->_tmp43_ = folks_persona_store_get_id ((FolksPersonaStore*) _data_->self);
	_data_->_tmp44_ = NULL;
	_data_->_tmp44_ = _data_->_tmp43_;
	folks_internal_profiling_end ("preparing Trf.PersonaStore (ID: %s)", _data_->_tmp44_, NULL);
	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;
}


gint trf_persona_store_get_favorite_id (TrfPersonaStore* self) {
	gint result = 0;
	GeeTreeMap* _tmp0_ = NULL;
	gpointer _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = trf_persona_store__prefix_tracker_id;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, TRF_ONTOLOGY_DEFS_NAO_FAVORITE);
	result = (gint) ((gintptr) _tmp1_);
	return result;
}


gint trf_persona_store_get_gender_male_id (TrfPersonaStore* self) {
	gint result = 0;
	GeeTreeMap* _tmp0_ = NULL;
	gpointer _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = trf_persona_store__prefix_tracker_id;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, TRF_ONTOLOGY_DEFS_NCO_MALE);
	result = (gint) ((gintptr) _tmp1_);
	return result;
}


gint trf_persona_store_get_gender_female_id (TrfPersonaStore* self) {
	gint result = 0;
	GeeTreeMap* _tmp0_ = NULL;
	gpointer _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = trf_persona_store__prefix_tracker_id;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, TRF_ONTOLOGY_DEFS_NCO_FEMALE);
	result = (gint) ((gintptr) _tmp1_);
	return result;
}


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


static void _trf_persona_store_build_predicates_table (TrfPersonaStore* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreBuildPredicatesTableData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreBuildPredicatesTableData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_build_predicates_table);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_build_predicates_table_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_trf_persona_store_build_predicates_table_co (_data_);
}


static void _trf_persona_store_build_predicates_table_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreBuildPredicatesTableData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_build_predicates_table_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreBuildPredicatesTableData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_build_predicates_table_co (_data_);
}


static gboolean _trf_persona_store_build_predicates_table_co (TrfPersonaStoreBuildPredicatesTableData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = trf_persona_store__prefix_tracker_id;
	if (_data_->_tmp0_ != NULL) {
		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;
	}
	_trf_persona_store_build_urn_prefix_table (_data_->self);
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = gee_tree_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_INT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (trf_persona_store__prefix_tracker_id);
	trf_persona_store__prefix_tracker_id = _data_->_tmp1_;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = g_strdup ("SELECT  ");
	_data_->query = _data_->_tmp2_;
	{
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = trf_persona_store__urn_prefix;
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = gee_abstract_map_get_keys ((GeeMap*) _data_->_tmp3_);
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->_tmp4_;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp6_);
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->_tmp7_;
		_g_object_unref0 (_data_->_tmp6_);
		_data_->_urn_t_it = _data_->_tmp8_;
		while (TRUE) {
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = _data_->_urn_t_it;
			_data_->_tmp10_ = FALSE;
			_data_->_tmp10_ = gee_iterator_next (_data_->_tmp9_);
			if (!_data_->_tmp10_) {
				break;
			}
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = _data_->_urn_t_it;
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = gee_iterator_get (_data_->_tmp11_);
			_data_->urn_t = (gchar*) _data_->_tmp12_;
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = _data_->query;
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = _data_->urn_t;
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = g_strconcat (" tracker:id(", _data_->_tmp14_, NULL);
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = _data_->_tmp15_;
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = g_strconcat (_data_->_tmp16_, ")", NULL);
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = _data_->_tmp17_;
			_data_->_tmp19_ = NULL;
			_data_->_tmp19_ = g_strconcat (_data_->_tmp13_, _data_->_tmp18_, NULL);
			_g_free0 (_data_->query);
			_data_->query = _data_->_tmp19_;
			_g_free0 (_data_->_tmp18_);
			_g_free0 (_data_->_tmp16_);
			_g_free0 (_data_->urn_t);
		}
		_g_object_unref0 (_data_->_urn_t_it);
	}
	_data_->_tmp20_ = NULL;
	_data_->_tmp20_ = _data_->query;
	_data_->_tmp21_ = NULL;
	_data_->_tmp21_ = g_strconcat (_data_->_tmp20_, " WHERE {} ", NULL);
	_g_free0 (_data_->query);
	_data_->query = _data_->_tmp21_;
	{
		_data_->_tmp22_ = NULL;
		_data_->_tmp22_ = _data_->self->priv->_connection;
		_data_->_tmp23_ = NULL;
		_data_->_tmp23_ = _data_->query;
		_data_->_state_ = 1;
		tracker_sparql_connection_query_async (_data_->_tmp22_, _data_->_tmp23_, NULL, _trf_persona_store_build_predicates_table_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp24_ = NULL;
		_data_->_tmp24_ = tracker_sparql_connection_query_finish (_data_->_tmp22_, _data_->_res_, &_data_->_inner_error_);
		_data_->cursor = _data_->_tmp24_;
		if (_data_->_inner_error_ != NULL) {
			if (_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) {
				goto __catch3_tracker_sparql_error;
			}
			goto __catch3_g_error;
		}
		while (TRUE) {
			_data_->_tmp26_ = NULL;
			_data_->_tmp26_ = _data_->cursor;
			_data_->_tmp27_ = FALSE;
			_data_->_tmp27_ = tracker_sparql_cursor_next (_data_->_tmp26_, NULL, &_data_->_inner_error_);
			_data_->_tmp25_ = _data_->_tmp27_;
			if (_data_->_inner_error_ != NULL) {
				_g_object_unref0 (_data_->cursor);
				if (_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) {
					goto __catch3_tracker_sparql_error;
				}
				goto __catch3_g_error;
			}
			if (!_data_->_tmp25_) {
				break;
			}
			_data_->i = 0;
			{
				_data_->_tmp28_ = NULL;
				_data_->_tmp28_ = trf_persona_store__urn_prefix;
				_data_->_tmp29_ = NULL;
				_data_->_tmp29_ = gee_abstract_map_get_keys ((GeeMap*) _data_->_tmp28_);
				_data_->_tmp30_ = NULL;
				_data_->_tmp30_ = _data_->_tmp29_;
				_data_->_tmp31_ = NULL;
				_data_->_tmp31_ = _data_->_tmp30_;
				_data_->_tmp32_ = NULL;
				_data_->_tmp32_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp31_);
				_data_->_tmp33_ = NULL;
				_data_->_tmp33_ = _data_->_tmp32_;
				_g_object_unref0 (_data_->_tmp31_);
				_data_->_urn_it = _data_->_tmp33_;
				while (TRUE) {
					_data_->_tmp34_ = NULL;
					_data_->_tmp34_ = _data_->_urn_it;
					_data_->_tmp35_ = FALSE;
					_data_->_tmp35_ = gee_iterator_next (_data_->_tmp34_);
					if (!_data_->_tmp35_) {
						break;
					}
					_data_->_tmp36_ = NULL;
					_data_->_tmp36_ = _data_->_urn_it;
					_data_->_tmp37_ = NULL;
					_data_->_tmp37_ = gee_iterator_get (_data_->_tmp36_);
					_data_->urn = (gchar*) _data_->_tmp37_;
					_data_->_tmp38_ = NULL;
					_data_->_tmp38_ = _data_->cursor;
					_data_->_tmp39_ = 0;
					_data_->_tmp39_ = _data_->i;
					_data_->_tmp40_ = 0LL;
					_data_->_tmp40_ = tracker_sparql_cursor_get_integer (_data_->_tmp38_, _data_->_tmp39_);
					_data_->tracker_id = (gint) _data_->_tmp40_;
					_data_->_tmp41_ = NULL;
					_data_->_tmp41_ = trf_persona_store__urn_prefix;
					_data_->_tmp42_ = NULL;
					_data_->_tmp42_ = _data_->urn;
					_data_->_tmp43_ = NULL;
					_data_->_tmp43_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp41_, _data_->_tmp42_);
					_data_->_tmp44_ = NULL;
					_data_->_tmp44_ = (gchar*) _data_->_tmp43_;
					_data_->_tmp45_ = NULL;
					_data_->_tmp45_ = g_strdup (_data_->_tmp44_);
					_data_->_tmp46_ = NULL;
					_data_->_tmp46_ = _data_->_tmp45_;
					_g_free0 (_data_->_tmp44_);
					_data_->prefix = _data_->_tmp46_;
					_data_->_tmp47_ = NULL;
					_data_->_tmp47_ = trf_persona_store__prefix_tracker_id;
					_data_->_tmp48_ = NULL;
					_data_->_tmp48_ = _data_->prefix;
					_data_->_tmp49_ = 0;
					_data_->_tmp49_ = _data_->tracker_id;
					gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp47_, _data_->_tmp48_, (gpointer) ((gintptr) _data_->_tmp49_));
					_data_->_tmp50_ = 0;
					_data_->_tmp50_ = _data_->i;
					_data_->i = _data_->_tmp50_ + 1;
					_g_free0 (_data_->prefix);
					_g_free0 (_data_->urn);
				}
				_g_object_unref0 (_data_->_urn_it);
			}
		}
		_g_object_unref0 (_data_->cursor);
	}
	goto __finally3;
	__catch3_tracker_sparql_error:
	{
		_data_->e1 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp51_ = NULL;
		_data_->_tmp51_ = _data_->query;
		_data_->_tmp52_ = NULL;
		_data_->_tmp52_ = _data_->e1;
		_data_->_tmp53_ = NULL;
		_data_->_tmp53_ = _data_->_tmp52_->message;
		g_warning ("trf-persona-store.vala:1225: Couldn't build predicates table: %s %s", _data_->_tmp51_, _data_->_tmp53_);
		_g_error_free0 (_data_->e1);
	}
	goto __finally3;
	__catch3_g_error:
	{
		_data_->e2 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp54_ = NULL;
		_data_->_tmp54_ = _data_->query;
		_data_->_tmp55_ = NULL;
		_data_->_tmp55_ = _data_->e2;
		_data_->_tmp56_ = NULL;
		_data_->_tmp56_ = _data_->_tmp55_->message;
		g_warning ("trf-persona-store.vala:1229: Couldn't build predicates table: %s %s", _data_->_tmp54_, _data_->_tmp56_);
		_g_error_free0 (_data_->e2);
	}
	__finally3:
	if (_data_->_inner_error_ != NULL) {
		_g_free0 (_data_->query);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_g_free0 (_data_->query);
	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 _trf_persona_store_build_urn_prefix_table (TrfPersonaStore* self) {
	GeeTreeMap* _tmp0_ = NULL;
	GeeTreeMap* _tmp1_ = NULL;
	GeeTreeMap* _tmp2_ = NULL;
	GeeTreeMap* _tmp3_ = NULL;
	GeeTreeMap* _tmp4_ = NULL;
	GeeTreeMap* _tmp5_ = NULL;
	GeeTreeMap* _tmp6_ = NULL;
	GeeTreeMap* _tmp7_ = NULL;
	GeeTreeMap* _tmp8_ = NULL;
	GeeTreeMap* _tmp9_ = NULL;
	GeeTreeMap* _tmp10_ = NULL;
	GeeTreeMap* _tmp11_ = NULL;
	GeeTreeMap* _tmp12_ = NULL;
	GeeTreeMap* _tmp13_ = NULL;
	GeeTreeMap* _tmp14_ = NULL;
	GeeTreeMap* _tmp15_ = NULL;
	GeeTreeMap* _tmp16_ = NULL;
	GeeTreeMap* _tmp17_ = NULL;
	GeeTreeMap* _tmp18_ = NULL;
	GeeTreeMap* _tmp19_ = NULL;
	GeeTreeMap* _tmp20_ = NULL;
	GeeTreeMap* _tmp21_ = NULL;
	GeeTreeMap* _tmp22_ = NULL;
	GeeTreeMap* _tmp23_ = NULL;
	GeeTreeMap* _tmp24_ = NULL;
	GeeTreeMap* _tmp25_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = trf_persona_store__urn_prefix;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = gee_tree_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (trf_persona_store__urn_prefix);
	trf_persona_store__urn_prefix = _tmp1_;
	_tmp2_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp2_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#fullname>", TRF_ONTOLOGY_DEFS_NCO_FULLNAME);
	_tmp3_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#nameFamily>", TRF_ONTOLOGY_DEFS_NCO_FAMILY);
	_tmp4_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp4_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#nameGiven>", TRF_ONTOLOGY_DEFS_NCO_GIVEN);
	_tmp5_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#nameAdditional>", TRF_ONTOLOGY_DEFS_NCO_ADDITIONAL);
	_tmp6_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp6_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#nameHonorificSuffix>", TRF_ONTOLOGY_DEFS_NCO_SUFFIX);
	_tmp7_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#nameHonorificPrefix>", TRF_ONTOLOGY_DEFS_NCO_PREFIX);
	_tmp8_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp8_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#nickname>", TRF_ONTOLOGY_DEFS_NCO_NICKNAME);
	_tmp9_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, TRF_ONTOLOGY_DEFS_RDF_URL_PREFIX "22-rdf-syntax-ns#type>", TRF_ONTOLOGY_DEFS_RDF_TYPE);
	_tmp10_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp10_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#PersonContact>", TRF_ONTOLOGY_DEFS_NCO_PERSON);
	_tmp11_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp11_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#websiteUrl>", TRF_ONTOLOGY_DEFS_NCO_WEBSITE);
	_tmp12_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp12_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#blogUrl>", TRF_ONTOLOGY_DEFS_NCO_BLOG);
	_tmp13_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp13_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#url>", TRF_ONTOLOGY_DEFS_NCO_URL);
	_tmp14_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp14_, TRF_ONTOLOGY_DEFS_NAO_URL_PREFIX "nao#predefined-tag-favorite>", TRF_ONTOLOGY_DEFS_NAO_FAVORITE);
	_tmp15_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp15_, TRF_ONTOLOGY_DEFS_NAO_URL_PREFIX "nao#hasTag>", TRF_ONTOLOGY_DEFS_NAO_TAG);
	_tmp16_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp16_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#hasEmailAddress>", TRF_ONTOLOGY_DEFS_NCO_HAS_EMAIL);
	_tmp17_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp17_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#hasPhoneNumber>", TRF_ONTOLOGY_DEFS_NCO_HAS_PHONE);
	_tmp18_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp18_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#hasAffiliation>", TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION);
	_tmp19_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp19_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#birthDate>", TRF_ONTOLOGY_DEFS_NCO_BIRTHDAY);
	_tmp20_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp20_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#note>", TRF_ONTOLOGY_DEFS_NCO_NOTE);
	_tmp21_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp21_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#gender>", TRF_ONTOLOGY_DEFS_NCO_GENDER);
	_tmp22_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp22_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#gender-male>", TRF_ONTOLOGY_DEFS_NCO_MALE);
	_tmp23_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp23_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#gender-female>", TRF_ONTOLOGY_DEFS_NCO_FEMALE);
	_tmp24_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp24_, TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#photo>", TRF_ONTOLOGY_DEFS_NCO_PHOTO);
	_tmp25_ = trf_persona_store__urn_prefix;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, TRF_ONTOLOGY_DEFS_NAO_URL_PREFIX "nao#hasProperty>", TRF_ONTOLOGY_DEFS_NAO_PROPERTY);
}


static void _trf_persona_store_graph_updated_cb (TrfPersonaStore* self, GDBusConnection* connection, const gchar* sender_name, const gchar* object_path, const gchar* interface_name, const gchar* signal_name, GVariant* parameters) {
	gchar* class_name = NULL;
	gchar* _tmp0_ = NULL;
	GVariantIter* iter_del = NULL;
	GVariantIter* iter_ins = NULL;
	GVariant* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	GVariantIter* _tmp3_ = NULL;
	GVariantIter* _tmp4_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (connection != NULL);
	g_return_if_fail (sender_name != NULL);
	g_return_if_fail (object_path != NULL);
	g_return_if_fail (interface_name != NULL);
	g_return_if_fail (signal_name != NULL);
	g_return_if_fail (parameters != NULL);
	_tmp0_ = g_strdup ("");
	class_name = _tmp0_;
	iter_del = NULL;
	iter_ins = NULL;
	_tmp1_ = parameters;
	g_variant_get (_tmp1_, "(sa(iiii)a(iiii))", &class_name, &iter_del, &iter_ins, NULL);
	_tmp2_ = class_name;
	if (g_strcmp0 (_tmp2_, TRF_ONTOLOGY_DEFS_PERSON_CLASS) != 0) {
		_g_variant_iter_free0 (iter_ins);
		_g_variant_iter_free0 (iter_del);
		_g_free0 (class_name);
		return;
	}
	_tmp3_ = iter_del;
	iter_del = NULL;
	_tmp4_ = iter_ins;
	iter_ins = NULL;
	_trf_persona_store_handle_events (self, _tmp3_, _tmp4_, NULL, NULL);
	_g_variant_iter_free0 (iter_ins);
	_g_variant_iter_free0 (iter_del);
	_g_free0 (class_name);
}


static void _trf_persona_store_handle_events_data_free (gpointer _data) {
	TrfPersonaStoreHandleEventsData* _data_;
	_data_ = _data;
	_g_variant_iter_free0 (_data_->iter_del);
	_g_variant_iter_free0 (_data_->iter_ins);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreHandleEventsData, _data_);
}


static void _trf_persona_store_handle_events (TrfPersonaStore* self, GVariantIter* iter_del, GVariantIter* iter_ins, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreHandleEventsData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreHandleEventsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_handle_events);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_handle_events_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_g_variant_iter_free0 (_data_->iter_del);
	_data_->iter_del = iter_del;
	_g_variant_iter_free0 (_data_->iter_ins);
	_data_->iter_ins = iter_ins;
	_trf_persona_store_handle_events_co (_data_);
}


static void _trf_persona_store_handle_events_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreHandleEventsData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_handle_events_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreHandleEventsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_handle_events_co (_data_);
}


static gboolean _trf_persona_store_handle_events_co (TrfPersonaStoreHandleEventsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->iter_del;
	_data_->iter_del = NULL;
	_data_->_state_ = 1;
	_trf_persona_store_handle_delete_events (_data_->self, _data_->_tmp0_, _trf_persona_store_handle_events_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_handle_delete_events_finish (_data_->self, _data_->_res_);
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->iter_ins;
	_data_->iter_ins = NULL;
	_data_->_state_ = 2;
	_trf_persona_store_handle_insert_events (_data_->self, _data_->_tmp1_, _trf_persona_store_handle_events_ready, _data_);
	return FALSE;
	_state_2:
	_trf_persona_store_handle_insert_events_finish (_data_->self, _data_->_res_);
	_g_variant_iter_free0 (_data_->iter_del);
	_g_variant_iter_free0 (_data_->iter_ins);
	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 _trf_persona_store_handle_delete_events_data_free (gpointer _data) {
	TrfPersonaStoreHandleDeleteEventsData* _data_;
	_data_ = _data;
	_g_variant_iter_free0 (_data_->iter_del);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreHandleDeleteEventsData, _data_);
}


static void _trf_persona_store_handle_delete_events (TrfPersonaStore* self, GVariantIter* iter_del, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreHandleDeleteEventsData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreHandleDeleteEventsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_handle_delete_events);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_handle_delete_events_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_g_variant_iter_free0 (_data_->iter_del);
	_data_->iter_del = iter_del;
	_trf_persona_store_handle_delete_events_co (_data_);
}


static void _trf_persona_store_handle_delete_events_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreHandleDeleteEventsData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_handle_delete_events_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreHandleDeleteEventsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_handle_delete_events_co (_data_);
}


static gboolean _trf_persona_store_handle_delete_events_co (TrfPersonaStoreHandleDeleteEventsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = gee_hash_set_new (TRF_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	_data_->removed_personas = _data_->_tmp0_;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_store__prefix_tracker_id;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp1_, TRF_ONTOLOGY_DEFS_NCO_PERSON);
	_data_->nco_person_id = (gint) ((gintptr) _data_->_tmp2_);
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = trf_persona_store__prefix_tracker_id;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp3_, TRF_ONTOLOGY_DEFS_RDF_TYPE);
	_data_->rdf_type_id = (gint) ((gintptr) _data_->_tmp4_);
	memset (&_data_->e, 0, sizeof (Event));
	while (TRUE) {
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->iter_del;
		_data_->_tmp6_ = FALSE;
		_data_->_tmp6_ = g_variant_iter_next (_data_->_tmp5_, "(iiii)", &_data_->e.graph_id, &_data_->e.subject_id, &_data_->e.pred_id, &_data_->e.object_id, NULL);
		if (!_data_->_tmp6_) {
			break;
		}
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = folks_persona_store_get_id ((FolksPersonaStore*) _data_->self);
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->_tmp7_;
		memset (&_data_->_tmp9_, 0, sizeof (Event));
		_data_->_tmp9_ = _data_->e;
		_data_->_tmp10_ = 0;
		_data_->_tmp10_ = _data_->_tmp9_.subject_id;
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = g_strdup_printf ("%i", _data_->_tmp10_);
		_data_->_tmp12_ = NULL;
		_data_->_tmp12_ = _data_->_tmp11_;
		_data_->_tmp13_ = NULL;
		_data_->_tmp13_ = trf_persona_build_iid (_data_->_tmp8_, _data_->_tmp12_);
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = _data_->_tmp13_;
		_g_free0 (_data_->_tmp12_);
		_data_->p_id = _data_->_tmp14_;
		memset (&_data_->_tmp16_, 0, sizeof (Event));
		_data_->_tmp16_ = _data_->e;
		_data_->_tmp17_ = 0;
		_data_->_tmp17_ = _data_->_tmp16_.pred_id;
		_data_->_tmp18_ = 0;
		_data_->_tmp18_ = _data_->rdf_type_id;
		if (_data_->_tmp17_ == _data_->_tmp18_) {
			memset (&_data_->_tmp19_, 0, sizeof (Event));
			_data_->_tmp19_ = _data_->e;
			_data_->_tmp20_ = 0;
			_data_->_tmp20_ = _data_->_tmp19_.object_id;
			_data_->_tmp21_ = 0;
			_data_->_tmp21_ = _data_->nco_person_id;
			_data_->_tmp15_ = _data_->_tmp20_ == _data_->_tmp21_;
		} else {
			_data_->_tmp15_ = FALSE;
		}
		if (_data_->_tmp15_) {
			_data_->_tmp22_ = NULL;
			_data_->_tmp22_ = _data_->self->priv->_personas;
			_data_->_tmp23_ = NULL;
			_data_->_tmp23_ = _data_->p_id;
			_data_->_tmp24_ = NULL;
			_data_->_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp22_, _data_->_tmp23_);
			_data_->removed_p = (TrfPersona*) _data_->_tmp24_;
			_data_->_tmp25_ = NULL;
			_data_->_tmp25_ = _data_->removed_p;
			if (_data_->_tmp25_ != NULL) {
				_data_->_tmp26_ = NULL;
				_data_->_tmp26_ = _data_->removed_personas;
				_data_->_tmp27_ = NULL;
				_data_->_tmp27_ = _data_->removed_p;
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp26_, _data_->_tmp27_);
				_data_->_tmp28_ = NULL;
				_data_->_tmp28_ = _data_->self->priv->_personas;
				_data_->_tmp29_ = NULL;
				_data_->_tmp29_ = _data_->removed_p;
				_data_->_tmp30_ = NULL;
				_data_->_tmp30_ = folks_persona_get_iid ((FolksPersona*) _data_->_tmp29_);
				_data_->_tmp31_ = NULL;
				_data_->_tmp31_ = _data_->_tmp30_;
				gee_abstract_map_unset ((GeeAbstractMap*) _data_->_tmp28_, _data_->_tmp31_, NULL);
			}
			_g_object_unref0 (_data_->removed_p);
		} else {
			_data_->_tmp32_ = NULL;
			_data_->_tmp32_ = _data_->self->priv->_personas;
			_data_->_tmp33_ = NULL;
			_data_->_tmp33_ = _data_->p_id;
			_data_->_tmp34_ = NULL;
			_data_->_tmp34_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp32_, _data_->_tmp33_);
			_data_->persona = (TrfPersona*) _data_->_tmp34_;
			_data_->_tmp35_ = NULL;
			_data_->_tmp35_ = _data_->persona;
			if (_data_->_tmp35_ != NULL) {
				_data_->_tmp36_ = NULL;
				_data_->_tmp36_ = _data_->persona;
				memset (&_data_->_tmp37_, 0, sizeof (Event));
				_data_->_tmp37_ = _data_->e;
				_data_->_state_ = 1;
				_trf_persona_store_do_update (_data_->self, _data_->_tmp36_, &_data_->_tmp37_, FALSE, _trf_persona_store_handle_delete_events_ready, _data_);
				return FALSE;
				_state_1:
				_trf_persona_store_do_update_finish (_data_->self, _data_->_res_);
			}
			_g_object_unref0 (_data_->persona);
		}
		_g_free0 (_data_->p_id);
	}
	_data_->_tmp38_ = NULL;
	_data_->_tmp38_ = _data_->removed_personas;
	_data_->_tmp39_ = 0;
	_data_->_tmp39_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp38_);
	_data_->_tmp40_ = 0;
	_data_->_tmp40_ = _data_->_tmp39_;
	if (_data_->_tmp40_ > 0) {
		_data_->_tmp41_ = NULL;
		_data_->_tmp41_ = _data_->removed_personas;
		_folks_persona_store_emit_personas_changed ((FolksPersonaStore*) _data_->self, NULL, (GeeSet*) _data_->_tmp41_, NULL, NULL, FOLKS_GROUP_DETAILS_CHANGE_REASON_NONE);
	}
	_g_object_unref0 (_data_->removed_personas);
	_g_variant_iter_free0 (_data_->iter_del);
	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 _trf_persona_store_handle_insert_events_data_free (gpointer _data) {
	TrfPersonaStoreHandleInsertEventsData* _data_;
	_data_ = _data;
	_g_variant_iter_free0 (_data_->iter_ins);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreHandleInsertEventsData, _data_);
}


static void _trf_persona_store_handle_insert_events (TrfPersonaStore* self, GVariantIter* iter_ins, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreHandleInsertEventsData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreHandleInsertEventsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_handle_insert_events);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_handle_insert_events_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_g_variant_iter_free0 (_data_->iter_ins);
	_data_->iter_ins = iter_ins;
	_trf_persona_store_handle_insert_events_co (_data_);
}


static void _trf_persona_store_handle_insert_events_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreHandleInsertEventsData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_handle_insert_events_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreHandleInsertEventsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_handle_insert_events_co (_data_);
}


static gboolean _trf_persona_store_handle_insert_events_co (TrfPersonaStoreHandleInsertEventsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = gee_hash_set_new (TRF_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	_data_->added_personas = _data_->_tmp0_;
	memset (&_data_->e, 0, sizeof (Event));
	while (TRUE) {
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = _data_->iter_ins;
		_data_->_tmp2_ = FALSE;
		_data_->_tmp2_ = g_variant_iter_next (_data_->_tmp1_, "(iiii)", &_data_->e.graph_id, &_data_->e.subject_id, &_data_->e.pred_id, &_data_->e.object_id, NULL);
		if (!_data_->_tmp2_) {
			break;
		}
		memset (&_data_->_tmp3_, 0, sizeof (Event));
		_data_->_tmp3_ = _data_->e;
		_data_->_tmp4_ = 0;
		_data_->_tmp4_ = _data_->_tmp3_.subject_id;
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = g_strdup_printf ("%i", _data_->_tmp4_);
		_data_->subject_tracker_id = _data_->_tmp5_;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = folks_persona_store_get_id ((FolksPersonaStore*) _data_->self);
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->subject_tracker_id;
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = trf_persona_build_iid (_data_->_tmp7_, _data_->_tmp8_);
		_data_->p_id = _data_->_tmp9_;
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = _data_->self->priv->_personas;
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = _data_->p_id;
		_data_->_tmp12_ = NULL;
		_data_->_tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp10_, _data_->_tmp11_);
		_g_object_unref0 (_data_->persona);
		_data_->persona = (TrfPersona*) _data_->_tmp12_;
		_data_->_tmp13_ = NULL;
		_data_->_tmp13_ = _data_->persona;
		if (_data_->_tmp13_ == NULL) {
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = _data_->subject_tracker_id;
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = trf_persona_new (_data_->self, _data_->_tmp14_, NULL);
			_g_object_unref0 (_data_->persona);
			_data_->persona = _data_->_tmp15_;
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = _data_->self->priv->_personas;
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = _data_->persona;
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = folks_persona_get_iid ((FolksPersona*) _data_->_tmp17_);
			_data_->_tmp19_ = NULL;
			_data_->_tmp19_ = _data_->_tmp18_;
			_data_->_tmp20_ = NULL;
			_data_->_tmp20_ = _data_->persona;
			gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp16_, _data_->_tmp19_, _data_->_tmp20_);
			_data_->_tmp21_ = NULL;
			_data_->_tmp21_ = _data_->added_personas;
			_data_->_tmp22_ = NULL;
			_data_->_tmp22_ = _data_->persona;
			gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp21_, _data_->_tmp22_);
		}
		_data_->_tmp23_ = NULL;
		_data_->_tmp23_ = _data_->persona;
		memset (&_data_->_tmp24_, 0, sizeof (Event));
		_data_->_tmp24_ = _data_->e;
		_data_->_state_ = 1;
		_trf_persona_store_do_update (_data_->self, _data_->_tmp23_, &_data_->_tmp24_, TRUE, _trf_persona_store_handle_insert_events_ready, _data_);
		return FALSE;
		_state_1:
		_trf_persona_store_do_update_finish (_data_->self, _data_->_res_);
		_g_object_unref0 (_data_->persona);
		_g_free0 (_data_->p_id);
		_g_free0 (_data_->subject_tracker_id);
	}
	_data_->_tmp25_ = NULL;
	_data_->_tmp25_ = _data_->added_personas;
	_data_->_tmp26_ = 0;
	_data_->_tmp26_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp25_);
	_data_->_tmp27_ = 0;
	_data_->_tmp27_ = _data_->_tmp26_;
	if (_data_->_tmp27_ > 0) {
		_data_->_tmp28_ = NULL;
		_data_->_tmp28_ = _data_->added_personas;
		_folks_persona_store_emit_personas_changed ((FolksPersonaStore*) _data_->self, (GeeSet*) _data_->_tmp28_, NULL, NULL, NULL, FOLKS_GROUP_DETAILS_CHANGE_REASON_NONE);
	}
	_g_object_unref0 (_data_->added_personas);
	_g_variant_iter_free0 (_data_->iter_ins);
	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 _trf_persona_store_do_add_contacts_data_free (gpointer _data) {
	TrfPersonaStoreDoAddContactsData* _data_;
	_data_ = _data;
	_g_free0 (_data_->query);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreDoAddContactsData, _data_);
}


static void _trf_persona_store_do_add_contacts (TrfPersonaStore* self, const gchar* query, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreDoAddContactsData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreDoAddContactsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_do_add_contacts);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_do_add_contacts_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = query;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->query);
	_data_->query = _tmp2_;
	_trf_persona_store_do_add_contacts_co (_data_);
}


static GeeHashSet* _trf_persona_store_do_add_contacts_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	GeeHashSet* result;
	TrfPersonaStoreDoAddContactsData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_do_add_contacts_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreDoAddContactsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_do_add_contacts_co (_data_);
}


static gboolean _trf_persona_store_do_add_contacts_co (TrfPersonaStoreDoAddContactsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = gee_hash_set_new (TRF_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	_data_->added_personas = _data_->_tmp0_;
	{
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = _data_->self->priv->_connection;
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = _data_->query;
		_data_->_state_ = 1;
		tracker_sparql_connection_query_async (_data_->_tmp1_, _data_->_tmp2_, NULL, _trf_persona_store_do_add_contacts_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = tracker_sparql_connection_query_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
		_data_->cursor = _data_->_tmp3_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch4_g_error;
		}
		while (TRUE) {
			_data_->_tmp5_ = NULL;
			_data_->_tmp5_ = _data_->cursor;
			_data_->_tmp6_ = FALSE;
			_data_->_tmp6_ = tracker_sparql_cursor_next (_data_->_tmp5_, NULL, &_data_->_inner_error_);
			_data_->_tmp4_ = _data_->_tmp6_;
			if (_data_->_inner_error_ != NULL) {
				_g_object_unref0 (_data_->cursor);
				goto __catch4_g_error;
			}
			if (!_data_->_tmp4_) {
				break;
			}
			_data_->_tmp7_ = NULL;
			_data_->_tmp7_ = _data_->cursor;
			_data_->_tmp8_ = 0LL;
			_data_->_tmp8_ = tracker_sparql_cursor_get_integer (_data_->_tmp7_, (gint) TRF_FIELDS_TRACKER_ID);
			_data_->tracker_id = (gint) _data_->_tmp8_;
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = folks_persona_store_get_id ((FolksPersonaStore*) _data_->self);
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_tmp9_;
			_data_->_tmp11_ = 0;
			_data_->_tmp11_ = _data_->tracker_id;
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = g_strdup_printf ("%i", _data_->_tmp11_);
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = _data_->_tmp12_;
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = trf_persona_build_iid (_data_->_tmp10_, _data_->_tmp13_);
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = _data_->_tmp14_;
			_g_free0 (_data_->_tmp13_);
			_data_->p_id = _data_->_tmp15_;
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = _data_->self->priv->_personas;
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = _data_->p_id;
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp16_, _data_->_tmp17_);
			_data_->_tmp19_ = NULL;
			_data_->_tmp19_ = (TrfPersona*) _data_->_tmp18_;
			_data_->_tmp20_ = FALSE;
			_data_->_tmp20_ = _data_->_tmp19_ == NULL;
			_g_object_unref0 (_data_->_tmp19_);
			if (_data_->_tmp20_) {
				_data_->_tmp21_ = 0;
				_data_->_tmp21_ = _data_->tracker_id;
				_data_->_tmp22_ = NULL;
				_data_->_tmp22_ = g_strdup_printf ("%i", _data_->_tmp21_);
				_data_->_tmp23_ = NULL;
				_data_->_tmp23_ = _data_->_tmp22_;
				_data_->_tmp24_ = NULL;
				_data_->_tmp24_ = _data_->cursor;
				_data_->_tmp25_ = NULL;
				_data_->_tmp25_ = trf_persona_new (_data_->self, _data_->_tmp23_, _data_->_tmp24_);
				_data_->_tmp26_ = NULL;
				_data_->_tmp26_ = _data_->_tmp25_;
				_g_free0 (_data_->_tmp23_);
				_data_->persona = _data_->_tmp26_;
				_data_->_tmp27_ = NULL;
				_data_->_tmp27_ = _data_->self->priv->_personas;
				_data_->_tmp28_ = NULL;
				_data_->_tmp28_ = _data_->persona;
				_data_->_tmp29_ = NULL;
				_data_->_tmp29_ = folks_persona_get_iid ((FolksPersona*) _data_->_tmp28_);
				_data_->_tmp30_ = NULL;
				_data_->_tmp30_ = _data_->_tmp29_;
				_data_->_tmp31_ = NULL;
				_data_->_tmp31_ = _data_->persona;
				gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp27_, _data_->_tmp30_, _data_->_tmp31_);
				_data_->_tmp32_ = NULL;
				_data_->_tmp32_ = _data_->added_personas;
				_data_->_tmp33_ = NULL;
				_data_->_tmp33_ = _data_->persona;
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp32_, _data_->_tmp33_);
				_g_object_unref0 (_data_->persona);
			}
			_g_free0 (_data_->p_id);
		}
		_data_->_tmp34_ = NULL;
		_data_->_tmp34_ = _data_->added_personas;
		_data_->_tmp35_ = 0;
		_data_->_tmp35_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp34_);
		_data_->_tmp36_ = 0;
		_data_->_tmp36_ = _data_->_tmp35_;
		if (_data_->_tmp36_ > 0) {
			_data_->_tmp37_ = NULL;
			_data_->_tmp37_ = _data_->added_personas;
			_folks_persona_store_emit_personas_changed ((FolksPersonaStore*) _data_->self, (GeeSet*) _data_->_tmp37_, NULL, NULL, NULL, FOLKS_GROUP_DETAILS_CHANGE_REASON_NONE);
		}
		_g_object_unref0 (_data_->cursor);
	}
	goto __finally4;
	__catch4_g_error:
	{
		_data_->e = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp38_ = NULL;
		_data_->_tmp38_ = _data_->query;
		_data_->_tmp39_ = NULL;
		_data_->_tmp39_ = _data_->e;
		_data_->_tmp40_ = NULL;
		_data_->_tmp40_ = _data_->_tmp39_->message;
		g_warning ("trf-persona-store.vala:1419: Couldn't perform queries: %s %s", _data_->_tmp38_, _data_->_tmp40_);
		_g_error_free0 (_data_->e);
	}
	__finally4:
	if (_data_->_inner_error_ != NULL) {
		_g_object_unref0 (_data_->added_personas);
		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_->result = _data_->added_personas;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->added_personas);
	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 _trf_persona_store_do_update_data_free (gpointer _data) {
	TrfPersonaStoreDoUpdateData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->p);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreDoUpdateData, _data_);
}


static void _trf_persona_store_do_update (TrfPersonaStore* self, TrfPersona* p, Event* e, gboolean adding, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreDoUpdateData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	TrfPersona* _tmp1_ = NULL;
	TrfPersona* _tmp2_ = NULL;
	Event _tmp3_ = {0};
	gboolean _tmp4_ = FALSE;
	_data_ = g_slice_new0 (TrfPersonaStoreDoUpdateData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_do_update);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_do_update_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = p;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->p);
	_data_->p = _tmp2_;
	_tmp3_ = *e;
	_data_->e = _tmp3_;
	_tmp4_ = adding;
	_data_->adding = _tmp4_;
	_trf_persona_store_do_update_co (_data_);
}


static void _trf_persona_store_do_update_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreDoUpdateData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_do_update_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreDoUpdateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_do_update_co (_data_);
}


static gboolean _trf_persona_store_do_update_co (TrfPersonaStoreDoUpdateData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		case 6:
		goto _state_6;
		case 7:
		goto _state_7;
		case 8:
		goto _state_8;
		case 9:
		goto _state_9;
		case 10:
		goto _state_10;
		case 11:
		goto _state_11;
		case 12:
		goto _state_12;
		case 13:
		goto _state_13;
		case 14:
		goto _state_14;
		case 15:
		goto _state_15;
		case 16:
		goto _state_16;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	memset (&_data_->_tmp0_, 0, sizeof (Event));
	_data_->_tmp0_ = _data_->e;
	_data_->_tmp1_ = 0;
	_data_->_tmp1_ = _data_->_tmp0_.pred_id;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = trf_persona_store__prefix_tracker_id;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp2_, TRF_ONTOLOGY_DEFS_NCO_FULLNAME);
	if (_data_->_tmp1_ == ((gint) ((gintptr) _data_->_tmp3_))) {
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = g_strdup ("");
		_data_->fullname = _data_->_tmp4_;
		_data_->_tmp5_ = FALSE;
		_data_->_tmp5_ = _data_->adding;
		if (_data_->_tmp5_) {
			memset (&_data_->_tmp6_, 0, sizeof (Event));
			_data_->_tmp6_ = _data_->e;
			_data_->_tmp7_ = 0;
			_data_->_tmp7_ = _data_->_tmp6_.subject_id;
			_data_->_state_ = 1;
			_trf_persona_store_get_property (_data_->self, _data_->_tmp7_, TRF_ONTOLOGY_DEFS_NCO_FULLNAME, TRF_ONTOLOGY_DEFS_NCO_PERSON, _trf_persona_store_do_update_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
			_g_free0 (_data_->fullname);
			_data_->fullname = _data_->_tmp8_;
		}
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = _data_->p;
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = _data_->fullname;
		_trf_persona_update_full_name (_data_->_tmp9_, _data_->_tmp10_);
		_g_free0 (_data_->fullname);
	} else {
		memset (&_data_->_tmp11_, 0, sizeof (Event));
		_data_->_tmp11_ = _data_->e;
		_data_->_tmp12_ = 0;
		_data_->_tmp12_ = _data_->_tmp11_.pred_id;
		_data_->_tmp13_ = NULL;
		_data_->_tmp13_ = trf_persona_store__prefix_tracker_id;
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp13_, TRF_ONTOLOGY_DEFS_NCO_NICKNAME);
		if (_data_->_tmp12_ == ((gint) ((gintptr) _data_->_tmp14_))) {
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = g_strdup ("");
			_data_->nickname = _data_->_tmp15_;
			_data_->_tmp16_ = FALSE;
			_data_->_tmp16_ = _data_->adding;
			if (_data_->_tmp16_) {
				memset (&_data_->_tmp17_, 0, sizeof (Event));
				_data_->_tmp17_ = _data_->e;
				_data_->_tmp18_ = 0;
				_data_->_tmp18_ = _data_->_tmp17_.subject_id;
				_data_->_state_ = 2;
				_trf_persona_store_get_property (_data_->self, _data_->_tmp18_, TRF_ONTOLOGY_DEFS_NCO_NICKNAME, TRF_ONTOLOGY_DEFS_NCO_PERSON, _trf_persona_store_do_update_ready, _data_);
				return FALSE;
				_state_2:
				_data_->_tmp19_ = NULL;
				_data_->_tmp19_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
				_g_free0 (_data_->nickname);
				_data_->nickname = _data_->_tmp19_;
			}
			_data_->_tmp20_ = NULL;
			_data_->_tmp20_ = _data_->p;
			_data_->_tmp21_ = NULL;
			_data_->_tmp21_ = _data_->nickname;
			_trf_persona_update_nickname (_data_->_tmp20_, _data_->_tmp21_);
			_g_free0 (_data_->nickname);
		} else {
			memset (&_data_->_tmp22_, 0, sizeof (Event));
			_data_->_tmp22_ = _data_->e;
			_data_->_tmp23_ = 0;
			_data_->_tmp23_ = _data_->_tmp22_.pred_id;
			_data_->_tmp24_ = NULL;
			_data_->_tmp24_ = trf_persona_store__prefix_tracker_id;
			_data_->_tmp25_ = NULL;
			_data_->_tmp25_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp24_, TRF_ONTOLOGY_DEFS_NCO_FAMILY);
			if (_data_->_tmp23_ == ((gint) ((gintptr) _data_->_tmp25_))) {
				_data_->_tmp26_ = NULL;
				_data_->_tmp26_ = g_strdup ("");
				_data_->family_name = _data_->_tmp26_;
				_data_->_tmp27_ = FALSE;
				_data_->_tmp27_ = _data_->adding;
				if (_data_->_tmp27_) {
					memset (&_data_->_tmp28_, 0, sizeof (Event));
					_data_->_tmp28_ = _data_->e;
					_data_->_tmp29_ = 0;
					_data_->_tmp29_ = _data_->_tmp28_.subject_id;
					_data_->_state_ = 3;
					_trf_persona_store_get_property (_data_->self, _data_->_tmp29_, TRF_ONTOLOGY_DEFS_NCO_FAMILY, TRF_ONTOLOGY_DEFS_NCO_PERSON, _trf_persona_store_do_update_ready, _data_);
					return FALSE;
					_state_3:
					_data_->_tmp30_ = NULL;
					_data_->_tmp30_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
					_g_free0 (_data_->family_name);
					_data_->family_name = _data_->_tmp30_;
				}
				_data_->_tmp31_ = NULL;
				_data_->_tmp31_ = _data_->p;
				_data_->_tmp32_ = NULL;
				_data_->_tmp32_ = _data_->family_name;
				_trf_persona_update_family_name (_data_->_tmp31_, _data_->_tmp32_);
				_g_free0 (_data_->family_name);
			} else {
				memset (&_data_->_tmp33_, 0, sizeof (Event));
				_data_->_tmp33_ = _data_->e;
				_data_->_tmp34_ = 0;
				_data_->_tmp34_ = _data_->_tmp33_.pred_id;
				_data_->_tmp35_ = NULL;
				_data_->_tmp35_ = trf_persona_store__prefix_tracker_id;
				_data_->_tmp36_ = NULL;
				_data_->_tmp36_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp35_, TRF_ONTOLOGY_DEFS_NCO_GIVEN);
				if (_data_->_tmp34_ == ((gint) ((gintptr) _data_->_tmp36_))) {
					_data_->_tmp37_ = NULL;
					_data_->_tmp37_ = g_strdup ("");
					_data_->given_name = _data_->_tmp37_;
					_data_->_tmp38_ = FALSE;
					_data_->_tmp38_ = _data_->adding;
					if (_data_->_tmp38_) {
						memset (&_data_->_tmp39_, 0, sizeof (Event));
						_data_->_tmp39_ = _data_->e;
						_data_->_tmp40_ = 0;
						_data_->_tmp40_ = _data_->_tmp39_.subject_id;
						_data_->_state_ = 4;
						_trf_persona_store_get_property (_data_->self, _data_->_tmp40_, TRF_ONTOLOGY_DEFS_NCO_GIVEN, TRF_ONTOLOGY_DEFS_NCO_PERSON, _trf_persona_store_do_update_ready, _data_);
						return FALSE;
						_state_4:
						_data_->_tmp41_ = NULL;
						_data_->_tmp41_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
						_g_free0 (_data_->given_name);
						_data_->given_name = _data_->_tmp41_;
					}
					_data_->_tmp42_ = NULL;
					_data_->_tmp42_ = _data_->p;
					_data_->_tmp43_ = NULL;
					_data_->_tmp43_ = _data_->given_name;
					_trf_persona_update_given_name (_data_->_tmp42_, _data_->_tmp43_);
					_g_free0 (_data_->given_name);
				} else {
					memset (&_data_->_tmp44_, 0, sizeof (Event));
					_data_->_tmp44_ = _data_->e;
					_data_->_tmp45_ = 0;
					_data_->_tmp45_ = _data_->_tmp44_.pred_id;
					_data_->_tmp46_ = NULL;
					_data_->_tmp46_ = trf_persona_store__prefix_tracker_id;
					_data_->_tmp47_ = NULL;
					_data_->_tmp47_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp46_, TRF_ONTOLOGY_DEFS_NCO_ADDITIONAL);
					if (_data_->_tmp45_ == ((gint) ((gintptr) _data_->_tmp47_))) {
						_data_->_tmp48_ = NULL;
						_data_->_tmp48_ = g_strdup ("");
						_data_->additional_name = _data_->_tmp48_;
						_data_->_tmp49_ = FALSE;
						_data_->_tmp49_ = _data_->adding;
						if (_data_->_tmp49_) {
							memset (&_data_->_tmp50_, 0, sizeof (Event));
							_data_->_tmp50_ = _data_->e;
							_data_->_tmp51_ = 0;
							_data_->_tmp51_ = _data_->_tmp50_.subject_id;
							_data_->_state_ = 5;
							_trf_persona_store_get_property (_data_->self, _data_->_tmp51_, TRF_ONTOLOGY_DEFS_NCO_ADDITIONAL, TRF_ONTOLOGY_DEFS_NCO_PERSON, _trf_persona_store_do_update_ready, _data_);
							return FALSE;
							_state_5:
							_data_->_tmp52_ = NULL;
							_data_->_tmp52_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
							_g_free0 (_data_->additional_name);
							_data_->additional_name = _data_->_tmp52_;
						}
						_data_->_tmp53_ = NULL;
						_data_->_tmp53_ = _data_->p;
						_data_->_tmp54_ = NULL;
						_data_->_tmp54_ = _data_->additional_name;
						_trf_persona_update_additional_names (_data_->_tmp53_, _data_->_tmp54_);
						_g_free0 (_data_->additional_name);
					} else {
						memset (&_data_->_tmp55_, 0, sizeof (Event));
						_data_->_tmp55_ = _data_->e;
						_data_->_tmp56_ = 0;
						_data_->_tmp56_ = _data_->_tmp55_.pred_id;
						_data_->_tmp57_ = NULL;
						_data_->_tmp57_ = trf_persona_store__prefix_tracker_id;
						_data_->_tmp58_ = NULL;
						_data_->_tmp58_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp57_, TRF_ONTOLOGY_DEFS_NCO_SUFFIX);
						if (_data_->_tmp56_ == ((gint) ((gintptr) _data_->_tmp58_))) {
							_data_->_tmp59_ = NULL;
							_data_->_tmp59_ = g_strdup ("");
							_data_->suffix_name = _data_->_tmp59_;
							_data_->_tmp60_ = FALSE;
							_data_->_tmp60_ = _data_->adding;
							if (_data_->_tmp60_) {
								memset (&_data_->_tmp61_, 0, sizeof (Event));
								_data_->_tmp61_ = _data_->e;
								_data_->_tmp62_ = 0;
								_data_->_tmp62_ = _data_->_tmp61_.subject_id;
								_data_->_state_ = 6;
								_trf_persona_store_get_property (_data_->self, _data_->_tmp62_, TRF_ONTOLOGY_DEFS_NCO_SUFFIX, TRF_ONTOLOGY_DEFS_NCO_PERSON, _trf_persona_store_do_update_ready, _data_);
								return FALSE;
								_state_6:
								_data_->_tmp63_ = NULL;
								_data_->_tmp63_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
								_g_free0 (_data_->suffix_name);
								_data_->suffix_name = _data_->_tmp63_;
							}
							_data_->_tmp64_ = NULL;
							_data_->_tmp64_ = _data_->p;
							_data_->_tmp65_ = NULL;
							_data_->_tmp65_ = _data_->suffix_name;
							_trf_persona_update_suffixes (_data_->_tmp64_, _data_->_tmp65_);
							_g_free0 (_data_->suffix_name);
						} else {
							memset (&_data_->_tmp66_, 0, sizeof (Event));
							_data_->_tmp66_ = _data_->e;
							_data_->_tmp67_ = 0;
							_data_->_tmp67_ = _data_->_tmp66_.pred_id;
							_data_->_tmp68_ = NULL;
							_data_->_tmp68_ = trf_persona_store__prefix_tracker_id;
							_data_->_tmp69_ = NULL;
							_data_->_tmp69_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp68_, TRF_ONTOLOGY_DEFS_NCO_PREFIX);
							if (_data_->_tmp67_ == ((gint) ((gintptr) _data_->_tmp69_))) {
								_data_->_tmp70_ = NULL;
								_data_->_tmp70_ = g_strdup ("");
								_data_->prefix_name = _data_->_tmp70_;
								_data_->_tmp71_ = FALSE;
								_data_->_tmp71_ = _data_->adding;
								if (_data_->_tmp71_) {
									memset (&_data_->_tmp72_, 0, sizeof (Event));
									_data_->_tmp72_ = _data_->e;
									_data_->_tmp73_ = 0;
									_data_->_tmp73_ = _data_->_tmp72_.subject_id;
									_data_->_state_ = 7;
									_trf_persona_store_get_property (_data_->self, _data_->_tmp73_, TRF_ONTOLOGY_DEFS_NCO_PREFIX, TRF_ONTOLOGY_DEFS_NCO_PERSON, _trf_persona_store_do_update_ready, _data_);
									return FALSE;
									_state_7:
									_data_->_tmp74_ = NULL;
									_data_->_tmp74_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
									_g_free0 (_data_->prefix_name);
									_data_->prefix_name = _data_->_tmp74_;
								}
								_data_->_tmp75_ = NULL;
								_data_->_tmp75_ = _data_->p;
								_data_->_tmp76_ = NULL;
								_data_->_tmp76_ = _data_->prefix_name;
								_trf_persona_update_prefixes (_data_->_tmp75_, _data_->_tmp76_);
								_g_free0 (_data_->prefix_name);
							} else {
								memset (&_data_->_tmp77_, 0, sizeof (Event));
								_data_->_tmp77_ = _data_->e;
								_data_->_tmp78_ = 0;
								_data_->_tmp78_ = _data_->_tmp77_.pred_id;
								_data_->_tmp79_ = NULL;
								_data_->_tmp79_ = trf_persona_store__prefix_tracker_id;
								_data_->_tmp80_ = NULL;
								_data_->_tmp80_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp79_, TRF_ONTOLOGY_DEFS_NAO_TAG);
								if (_data_->_tmp78_ == ((gint) ((gintptr) _data_->_tmp80_))) {
									memset (&_data_->_tmp81_, 0, sizeof (Event));
									_data_->_tmp81_ = _data_->e;
									_data_->_tmp82_ = 0;
									_data_->_tmp82_ = _data_->_tmp81_.object_id;
									_data_->_tmp83_ = 0;
									_data_->_tmp83_ = trf_persona_store_get_favorite_id (_data_->self);
									if (_data_->_tmp82_ == _data_->_tmp83_) {
										_data_->_tmp84_ = FALSE;
										_data_->_tmp84_ = _data_->adding;
										if (_data_->_tmp84_) {
											_data_->_tmp85_ = NULL;
											_data_->_tmp85_ = _data_->p;
											_trf_persona_set_favourite (_data_->_tmp85_, TRUE);
										} else {
											_data_->_tmp86_ = NULL;
											_data_->_tmp86_ = _data_->p;
											_trf_persona_set_favourite (_data_->_tmp86_, FALSE);
										}
									}
								} else {
									memset (&_data_->_tmp87_, 0, sizeof (Event));
									_data_->_tmp87_ = _data_->e;
									_data_->_tmp88_ = 0;
									_data_->_tmp88_ = _data_->_tmp87_.pred_id;
									_data_->_tmp89_ = NULL;
									_data_->_tmp89_ = trf_persona_store__prefix_tracker_id;
									_data_->_tmp90_ = NULL;
									_data_->_tmp90_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp89_, TRF_ONTOLOGY_DEFS_NCO_HAS_EMAIL);
									if (_data_->_tmp88_ == ((gint) ((gintptr) _data_->_tmp90_))) {
										_data_->_tmp91_ = FALSE;
										_data_->_tmp91_ = _data_->adding;
										if (_data_->_tmp91_) {
											memset (&_data_->_tmp92_, 0, sizeof (Event));
											_data_->_tmp92_ = _data_->e;
											_data_->_tmp93_ = 0;
											_data_->_tmp93_ = _data_->_tmp92_.object_id;
											_data_->_state_ = 8;
											_trf_persona_store_get_property (_data_->self, _data_->_tmp93_, TRF_ONTOLOGY_DEFS_NCO_EMAIL_PROP, TRF_ONTOLOGY_DEFS_NCO_EMAIL, _trf_persona_store_do_update_ready, _data_);
											return FALSE;
											_state_8:
											_data_->_tmp94_ = NULL;
											_data_->_tmp94_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
											_data_->email = _data_->_tmp94_;
											_data_->_tmp95_ = NULL;
											_data_->_tmp95_ = _data_->p;
											_data_->_tmp96_ = NULL;
											_data_->_tmp96_ = _data_->email;
											memset (&_data_->_tmp97_, 0, sizeof (Event));
											_data_->_tmp97_ = _data_->e;
											_data_->_tmp98_ = 0;
											_data_->_tmp98_ = _data_->_tmp97_.object_id;
											_data_->_tmp99_ = NULL;
											_data_->_tmp99_ = g_strdup_printf ("%i", _data_->_tmp98_);
											_data_->_tmp100_ = NULL;
											_data_->_tmp100_ = _data_->_tmp99_;
											_trf_persona_add_email (_data_->_tmp95_, _data_->_tmp96_, _data_->_tmp100_);
											_g_free0 (_data_->_tmp100_);
											_g_free0 (_data_->email);
										} else {
											_data_->_tmp101_ = NULL;
											_data_->_tmp101_ = _data_->p;
											memset (&_data_->_tmp102_, 0, sizeof (Event));
											_data_->_tmp102_ = _data_->e;
											_data_->_tmp103_ = 0;
											_data_->_tmp103_ = _data_->_tmp102_.object_id;
											_data_->_tmp104_ = NULL;
											_data_->_tmp104_ = g_strdup_printf ("%i", _data_->_tmp103_);
											_data_->_tmp105_ = NULL;
											_data_->_tmp105_ = _data_->_tmp104_;
											_trf_persona_remove_email (_data_->_tmp101_, _data_->_tmp105_);
											_g_free0 (_data_->_tmp105_);
										}
									} else {
										memset (&_data_->_tmp106_, 0, sizeof (Event));
										_data_->_tmp106_ = _data_->e;
										_data_->_tmp107_ = 0;
										_data_->_tmp107_ = _data_->_tmp106_.pred_id;
										_data_->_tmp108_ = NULL;
										_data_->_tmp108_ = trf_persona_store__prefix_tracker_id;
										_data_->_tmp109_ = NULL;
										_data_->_tmp109_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp108_, TRF_ONTOLOGY_DEFS_NCO_HAS_PHONE);
										if (_data_->_tmp107_ == ((gint) ((gintptr) _data_->_tmp109_))) {
											_data_->_tmp110_ = FALSE;
											_data_->_tmp110_ = _data_->adding;
											if (_data_->_tmp110_) {
												memset (&_data_->_tmp111_, 0, sizeof (Event));
												_data_->_tmp111_ = _data_->e;
												_data_->_tmp112_ = 0;
												_data_->_tmp112_ = _data_->_tmp111_.object_id;
												_data_->_state_ = 9;
												_trf_persona_store_get_property (_data_->self, _data_->_tmp112_, TRF_ONTOLOGY_DEFS_NCO_PHONE_PROP, TRF_ONTOLOGY_DEFS_NCO_PHONE, _trf_persona_store_do_update_ready, _data_);
												return FALSE;
												_state_9:
												_data_->_tmp113_ = NULL;
												_data_->_tmp113_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
												_data_->phone = _data_->_tmp113_;
												_data_->_tmp114_ = NULL;
												_data_->_tmp114_ = _data_->p;
												_data_->_tmp115_ = NULL;
												_data_->_tmp115_ = _data_->phone;
												memset (&_data_->_tmp116_, 0, sizeof (Event));
												_data_->_tmp116_ = _data_->e;
												_data_->_tmp117_ = 0;
												_data_->_tmp117_ = _data_->_tmp116_.object_id;
												_data_->_tmp118_ = NULL;
												_data_->_tmp118_ = g_strdup_printf ("%i", _data_->_tmp117_);
												_data_->_tmp119_ = NULL;
												_data_->_tmp119_ = _data_->_tmp118_;
												_trf_persona_add_phone (_data_->_tmp114_, _data_->_tmp115_, _data_->_tmp119_);
												_g_free0 (_data_->_tmp119_);
												_g_free0 (_data_->phone);
											} else {
												_data_->_tmp120_ = NULL;
												_data_->_tmp120_ = _data_->p;
												memset (&_data_->_tmp121_, 0, sizeof (Event));
												_data_->_tmp121_ = _data_->e;
												_data_->_tmp122_ = 0;
												_data_->_tmp122_ = _data_->_tmp121_.object_id;
												_data_->_tmp123_ = NULL;
												_data_->_tmp123_ = g_strdup_printf ("%i", _data_->_tmp122_);
												_data_->_tmp124_ = NULL;
												_data_->_tmp124_ = _data_->_tmp123_;
												_trf_persona_remove_phone (_data_->_tmp120_, _data_->_tmp124_);
												_g_free0 (_data_->_tmp124_);
											}
										} else {
											memset (&_data_->_tmp125_, 0, sizeof (Event));
											_data_->_tmp125_ = _data_->e;
											_data_->_tmp126_ = 0;
											_data_->_tmp126_ = _data_->_tmp125_.pred_id;
											_data_->_tmp127_ = NULL;
											_data_->_tmp127_ = trf_persona_store__prefix_tracker_id;
											_data_->_tmp128_ = NULL;
											_data_->_tmp128_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp127_, TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION);
											if (_data_->_tmp126_ == ((gint) ((gintptr) _data_->_tmp128_))) {
												_data_->_tmp129_ = FALSE;
												_data_->_tmp129_ = _data_->adding;
												if (_data_->_tmp129_) {
													memset (&_data_->_tmp130_, 0, sizeof (Event));
													_data_->_tmp130_ = _data_->e;
													_data_->_tmp131_ = 0;
													_data_->_tmp131_ = _data_->_tmp130_.subject_id;
													_data_->_tmp132_ = NULL;
													_data_->_tmp132_ = g_strdup_printf ("%i", _data_->_tmp131_);
													_data_->_tmp133_ = NULL;
													_data_->_tmp133_ = _data_->_tmp132_;
													memset (&_data_->_tmp134_, 0, sizeof (Event));
													_data_->_tmp134_ = _data_->e;
													_data_->_tmp135_ = 0;
													_data_->_tmp135_ = _data_->_tmp134_.object_id;
													_data_->_tmp136_ = NULL;
													_data_->_tmp136_ = g_strdup_printf ("%i", _data_->_tmp135_);
													_data_->_tmp137_ = NULL;
													_data_->_tmp137_ = _data_->_tmp136_;
													_data_->_state_ = 10;
													_trf_persona_store_get_affl_info (_data_->self, _data_->_tmp133_, _data_->_tmp137_, _trf_persona_store_do_update_ready, _data_);
													return FALSE;
													_state_10:
													_data_->_tmp138_ = NULL;
													_data_->_tmp138_ = _trf_persona_store_get_affl_info_finish (_data_->self, _data_->_res_);
													_data_->_tmp139_ = NULL;
													_data_->_tmp139_ = _data_->_tmp138_;
													_g_free0 (_data_->_tmp137_);
													_g_free0 (_data_->_tmp133_);
													_data_->affl_info = _data_->_tmp139_;
													_data_->_tmp140_ = NULL;
													_data_->_tmp140_ = _data_->affl_info;
													_data_->_tmp141_ = NULL;
													_data_->_tmp141_ = trf_affl_info_to_string (_data_->_tmp140_);
													_data_->_tmp142_ = NULL;
													_data_->_tmp142_ = _data_->_tmp141_;
													g_debug ("trf-persona-store.vala:1563: affl_info : %s", _data_->_tmp142_);
													_g_free0 (_data_->_tmp142_);
													_data_->_tmp143_ = NULL;
													_data_->_tmp143_ = _data_->affl_info;
													_data_->_tmp144_ = NULL;
													_data_->_tmp144_ = trf_affl_info_get_im_tracker_id (_data_->_tmp143_);
													_data_->_tmp145_ = NULL;
													_data_->_tmp145_ = _data_->_tmp144_;
													if (_data_->_tmp145_ != NULL) {
														_data_->_tmp146_ = NULL;
														_data_->_tmp146_ = _data_->p;
														_data_->_tmp147_ = NULL;
														_data_->_tmp147_ = _data_->affl_info;
														_data_->_tmp148_ = NULL;
														_data_->_tmp148_ = trf_affl_info_get_im_nickname (_data_->_tmp147_);
														_data_->_tmp149_ = NULL;
														_data_->_tmp149_ = _data_->_tmp148_;
														_trf_persona_update_nickname (_data_->_tmp146_, _data_->_tmp149_);
														_data_->_tmp150_ = NULL;
														_data_->_tmp150_ = _data_->affl_info;
														_data_->_tmp151_ = NULL;
														_data_->_tmp151_ = trf_affl_info_get_im_proto (_data_->_tmp150_);
														_data_->_tmp152_ = NULL;
														_data_->_tmp152_ = _data_->_tmp151_;
														if (_data_->_tmp152_ != NULL) {
															_data_->_tmp153_ = NULL;
															_data_->_tmp153_ = _data_->p;
															_data_->_tmp154_ = NULL;
															_data_->_tmp154_ = _data_->affl_info;
															_data_->_tmp155_ = NULL;
															_data_->_tmp155_ = trf_affl_info_get_affl_tracker_id (_data_->_tmp154_);
															_data_->_tmp156_ = NULL;
															_data_->_tmp156_ = _data_->_tmp155_;
															_data_->_tmp157_ = NULL;
															_data_->_tmp157_ = _data_->affl_info;
															_data_->_tmp158_ = NULL;
															_data_->_tmp158_ = trf_affl_info_get_im_proto (_data_->_tmp157_);
															_data_->_tmp159_ = NULL;
															_data_->_tmp159_ = _data_->_tmp158_;
															_data_->_tmp160_ = NULL;
															_data_->_tmp160_ = _data_->affl_info;
															_data_->_tmp161_ = NULL;
															_data_->_tmp161_ = trf_affl_info_get_im_account_id (_data_->_tmp160_);
															_data_->_tmp162_ = NULL;
															_data_->_tmp162_ = _data_->_tmp161_;
															_trf_persona_add_im_address (_data_->_tmp153_, _data_->_tmp156_, _data_->_tmp159_, _data_->_tmp162_, TRUE);
														}
													}
													_data_->_tmp163_ = NULL;
													_data_->_tmp163_ = _data_->affl_info;
													_data_->_tmp164_ = NULL;
													_data_->_tmp164_ = trf_affl_info_get_affl_tracker_id (_data_->_tmp163_);
													_data_->_tmp165_ = NULL;
													_data_->_tmp165_ = _data_->_tmp164_;
													if (_data_->_tmp165_ != NULL) {
														_data_->_tmp167_ = NULL;
														_data_->_tmp167_ = _data_->affl_info;
														_data_->_tmp168_ = NULL;
														_data_->_tmp168_ = trf_affl_info_get_title (_data_->_tmp167_);
														_data_->_tmp169_ = NULL;
														_data_->_tmp169_ = _data_->_tmp168_;
														if (_data_->_tmp169_ != NULL) {
															_data_->_tmp166_ = TRUE;
														} else {
															_data_->_tmp170_ = NULL;
															_data_->_tmp170_ = _data_->affl_info;
															_data_->_tmp171_ = NULL;
															_data_->_tmp171_ = trf_affl_info_get_org (_data_->_tmp170_);
															_data_->_tmp172_ = NULL;
															_data_->_tmp172_ = _data_->_tmp171_;
															_data_->_tmp166_ = _data_->_tmp172_ != NULL;
														}
														if (_data_->_tmp166_) {
															_data_->_tmp173_ = NULL;
															_data_->_tmp173_ = _data_->p;
															_data_->_tmp174_ = NULL;
															_data_->_tmp174_ = _data_->affl_info;
															_data_->_tmp175_ = NULL;
															_data_->_tmp175_ = trf_affl_info_get_affl_tracker_id (_data_->_tmp174_);
															_data_->_tmp176_ = NULL;
															_data_->_tmp176_ = _data_->_tmp175_;
															_data_->_tmp177_ = NULL;
															_data_->_tmp177_ = _data_->affl_info;
															_data_->_tmp178_ = NULL;
															_data_->_tmp178_ = trf_affl_info_get_role (_data_->_tmp177_);
															_data_->_tmp179_ = NULL;
															_data_->_tmp179_ = _data_->_tmp178_;
															_data_->_tmp180_ = NULL;
															_data_->_tmp180_ = _data_->affl_info;
															_data_->_tmp181_ = NULL;
															_data_->_tmp181_ = trf_affl_info_get_title (_data_->_tmp180_);
															_data_->_tmp182_ = NULL;
															_data_->_tmp182_ = _data_->_tmp181_;
															_data_->_tmp183_ = NULL;
															_data_->_tmp183_ = _data_->affl_info;
															_data_->_tmp184_ = NULL;
															_data_->_tmp184_ = trf_affl_info_get_org (_data_->_tmp183_);
															_data_->_tmp185_ = NULL;
															_data_->_tmp185_ = _data_->_tmp184_;
															_trf_persona_add_role (_data_->_tmp173_, _data_->_tmp176_, _data_->_tmp179_, _data_->_tmp182_, _data_->_tmp185_);
														}
													}
													_data_->_tmp186_ = NULL;
													_data_->_tmp186_ = _data_->affl_info;
													_data_->_tmp187_ = NULL;
													_data_->_tmp187_ = _data_->_tmp186_->postal_address_fd;
													if (_data_->_tmp187_ != NULL) {
														_data_->_tmp188_ = NULL;
														_data_->_tmp188_ = _data_->p;
														_data_->_tmp189_ = NULL;
														_data_->_tmp189_ = _data_->affl_info;
														_data_->_tmp190_ = NULL;
														_data_->_tmp190_ = _data_->_tmp189_->postal_address_fd;
														_trf_persona_add_postal_address (_data_->_tmp188_, _data_->_tmp190_);
													}
													_data_->_tmp191_ = NULL;
													_data_->_tmp191_ = _data_->affl_info;
													_data_->_tmp192_ = NULL;
													_data_->_tmp192_ = trf_affl_info_get_phone (_data_->_tmp191_);
													_data_->_tmp193_ = NULL;
													_data_->_tmp193_ = _data_->_tmp192_;
													if (_data_->_tmp193_ != NULL) {
														_data_->_tmp194_ = NULL;
														_data_->_tmp194_ = _data_->p;
														_data_->_tmp195_ = NULL;
														_data_->_tmp195_ = _data_->affl_info;
														_data_->_tmp196_ = NULL;
														_data_->_tmp196_ = trf_affl_info_get_phone (_data_->_tmp195_);
														_data_->_tmp197_ = NULL;
														_data_->_tmp197_ = _data_->_tmp196_;
														memset (&_data_->_tmp198_, 0, sizeof (Event));
														_data_->_tmp198_ = _data_->e;
														_data_->_tmp199_ = 0;
														_data_->_tmp199_ = _data_->_tmp198_.object_id;
														_data_->_tmp200_ = NULL;
														_data_->_tmp200_ = g_strdup_printf ("%i", _data_->_tmp199_);
														_data_->_tmp201_ = NULL;
														_data_->_tmp201_ = _data_->_tmp200_;
														_trf_persona_add_phone (_data_->_tmp194_, _data_->_tmp197_, _data_->_tmp201_);
														_g_free0 (_data_->_tmp201_);
													}
													_data_->_tmp202_ = NULL;
													_data_->_tmp202_ = _data_->affl_info;
													_data_->_tmp203_ = NULL;
													_data_->_tmp203_ = trf_affl_info_get_email (_data_->_tmp202_);
													_data_->_tmp204_ = NULL;
													_data_->_tmp204_ = _data_->_tmp203_;
													if (_data_->_tmp204_ != NULL) {
														_data_->_tmp205_ = NULL;
														_data_->_tmp205_ = _data_->p;
														_data_->_tmp206_ = NULL;
														_data_->_tmp206_ = _data_->affl_info;
														_data_->_tmp207_ = NULL;
														_data_->_tmp207_ = trf_affl_info_get_email (_data_->_tmp206_);
														_data_->_tmp208_ = NULL;
														_data_->_tmp208_ = _data_->_tmp207_;
														memset (&_data_->_tmp209_, 0, sizeof (Event));
														_data_->_tmp209_ = _data_->e;
														_data_->_tmp210_ = 0;
														_data_->_tmp210_ = _data_->_tmp209_.object_id;
														_data_->_tmp211_ = NULL;
														_data_->_tmp211_ = g_strdup_printf ("%i", _data_->_tmp210_);
														_data_->_tmp212_ = NULL;
														_data_->_tmp212_ = _data_->_tmp211_;
														_trf_persona_add_email (_data_->_tmp205_, _data_->_tmp208_, _data_->_tmp212_);
														_g_free0 (_data_->_tmp212_);
													}
													_data_->_tmp213_ = NULL;
													_data_->_tmp213_ = _data_->affl_info;
													_data_->_tmp214_ = NULL;
													_data_->_tmp214_ = trf_affl_info_get_website (_data_->_tmp213_);
													_data_->_tmp215_ = NULL;
													_data_->_tmp215_ = _data_->_tmp214_;
													if (_data_->_tmp215_ != NULL) {
														_data_->_tmp216_ = NULL;
														_data_->_tmp216_ = _data_->p;
														_data_->_tmp217_ = NULL;
														_data_->_tmp217_ = _data_->affl_info;
														_data_->_tmp218_ = NULL;
														_data_->_tmp218_ = trf_affl_info_get_website (_data_->_tmp217_);
														_data_->_tmp219_ = NULL;
														_data_->_tmp219_ = _data_->_tmp218_;
														_data_->_tmp220_ = NULL;
														_data_->_tmp220_ = _data_->affl_info;
														_data_->_tmp221_ = NULL;
														_data_->_tmp221_ = trf_affl_info_get_affl_tracker_id (_data_->_tmp220_);
														_data_->_tmp222_ = NULL;
														_data_->_tmp222_ = _data_->_tmp221_;
														_trf_persona_add_url (_data_->_tmp216_, _data_->_tmp219_, _data_->_tmp222_, FOLKS_URL_FIELD_DETAILS_PARAM_TYPE_HOME_PAGE);
													}
													_data_->_tmp223_ = NULL;
													_data_->_tmp223_ = _data_->affl_info;
													_data_->_tmp224_ = NULL;
													_data_->_tmp224_ = trf_affl_info_get_blog (_data_->_tmp223_);
													_data_->_tmp225_ = NULL;
													_data_->_tmp225_ = _data_->_tmp224_;
													if (_data_->_tmp225_ != NULL) {
														_data_->_tmp226_ = NULL;
														_data_->_tmp226_ = _data_->p;
														_data_->_tmp227_ = NULL;
														_data_->_tmp227_ = _data_->affl_info;
														_data_->_tmp228_ = NULL;
														_data_->_tmp228_ = trf_affl_info_get_blog (_data_->_tmp227_);
														_data_->_tmp229_ = NULL;
														_data_->_tmp229_ = _data_->_tmp228_;
														_data_->_tmp230_ = NULL;
														_data_->_tmp230_ = _data_->affl_info;
														_data_->_tmp231_ = NULL;
														_data_->_tmp231_ = trf_affl_info_get_affl_tracker_id (_data_->_tmp230_);
														_data_->_tmp232_ = NULL;
														_data_->_tmp232_ = _data_->_tmp231_;
														_trf_persona_add_url (_data_->_tmp226_, _data_->_tmp229_, _data_->_tmp232_, FOLKS_URL_FIELD_DETAILS_PARAM_TYPE_BLOG);
													}
													_data_->_tmp233_ = NULL;
													_data_->_tmp233_ = _data_->affl_info;
													_data_->_tmp234_ = NULL;
													_data_->_tmp234_ = trf_affl_info_get_url (_data_->_tmp233_);
													_data_->_tmp235_ = NULL;
													_data_->_tmp235_ = _data_->_tmp234_;
													if (_data_->_tmp235_ != NULL) {
														_data_->_tmp236_ = NULL;
														_data_->_tmp236_ = _data_->p;
														_data_->_tmp237_ = NULL;
														_data_->_tmp237_ = _data_->affl_info;
														_data_->_tmp238_ = NULL;
														_data_->_tmp238_ = trf_affl_info_get_url (_data_->_tmp237_);
														_data_->_tmp239_ = NULL;
														_data_->_tmp239_ = _data_->_tmp238_;
														_data_->_tmp240_ = NULL;
														_data_->_tmp240_ = _data_->affl_info;
														_data_->_tmp241_ = NULL;
														_data_->_tmp241_ = trf_affl_info_get_affl_tracker_id (_data_->_tmp240_);
														_data_->_tmp242_ = NULL;
														_data_->_tmp242_ = _data_->_tmp241_;
														_trf_persona_add_url (_data_->_tmp236_, _data_->_tmp239_, _data_->_tmp242_, NULL);
													}
													_g_object_unref0 (_data_->affl_info);
												} else {
													_data_->_tmp243_ = NULL;
													_data_->_tmp243_ = _data_->p;
													memset (&_data_->_tmp244_, 0, sizeof (Event));
													_data_->_tmp244_ = _data_->e;
													_data_->_tmp245_ = 0;
													_data_->_tmp245_ = _data_->_tmp244_.object_id;
													_data_->_tmp246_ = NULL;
													_data_->_tmp246_ = g_strdup_printf ("%i", _data_->_tmp245_);
													_data_->_tmp247_ = NULL;
													_data_->_tmp247_ = _data_->_tmp246_;
													_trf_persona_remove_im_address (_data_->_tmp243_, _data_->_tmp247_, TRUE);
													_g_free0 (_data_->_tmp247_);
													_data_->_tmp248_ = NULL;
													_data_->_tmp248_ = _data_->p;
													memset (&_data_->_tmp249_, 0, sizeof (Event));
													_data_->_tmp249_ = _data_->e;
													_data_->_tmp250_ = 0;
													_data_->_tmp250_ = _data_->_tmp249_.object_id;
													_data_->_tmp251_ = NULL;
													_data_->_tmp251_ = g_strdup_printf ("%i", _data_->_tmp250_);
													_data_->_tmp252_ = NULL;
													_data_->_tmp252_ = _data_->_tmp251_;
													_trf_persona_remove_role (_data_->_tmp248_, _data_->_tmp252_);
													_g_free0 (_data_->_tmp252_);
													_data_->_tmp253_ = NULL;
													_data_->_tmp253_ = _data_->p;
													memset (&_data_->_tmp254_, 0, sizeof (Event));
													_data_->_tmp254_ = _data_->e;
													_data_->_tmp255_ = 0;
													_data_->_tmp255_ = _data_->_tmp254_.object_id;
													_data_->_tmp256_ = NULL;
													_data_->_tmp256_ = g_strdup_printf ("%i", _data_->_tmp255_);
													_data_->_tmp257_ = NULL;
													_data_->_tmp257_ = _data_->_tmp256_;
													_trf_persona_remove_postal_address (_data_->_tmp253_, _data_->_tmp257_);
													_g_free0 (_data_->_tmp257_);
													_data_->_tmp258_ = NULL;
													_data_->_tmp258_ = _data_->p;
													memset (&_data_->_tmp259_, 0, sizeof (Event));
													_data_->_tmp259_ = _data_->e;
													_data_->_tmp260_ = 0;
													_data_->_tmp260_ = _data_->_tmp259_.object_id;
													_data_->_tmp261_ = NULL;
													_data_->_tmp261_ = g_strdup_printf ("%i", _data_->_tmp260_);
													_data_->_tmp262_ = NULL;
													_data_->_tmp262_ = _data_->_tmp261_;
													_trf_persona_remove_phone (_data_->_tmp258_, _data_->_tmp262_);
													_g_free0 (_data_->_tmp262_);
													_data_->_tmp263_ = NULL;
													_data_->_tmp263_ = _data_->p;
													memset (&_data_->_tmp264_, 0, sizeof (Event));
													_data_->_tmp264_ = _data_->e;
													_data_->_tmp265_ = 0;
													_data_->_tmp265_ = _data_->_tmp264_.object_id;
													_data_->_tmp266_ = NULL;
													_data_->_tmp266_ = g_strdup_printf ("%i", _data_->_tmp265_);
													_data_->_tmp267_ = NULL;
													_data_->_tmp267_ = _data_->_tmp266_;
													_trf_persona_remove_email (_data_->_tmp263_, _data_->_tmp267_);
													_g_free0 (_data_->_tmp267_);
													_data_->_tmp268_ = NULL;
													_data_->_tmp268_ = _data_->p;
													memset (&_data_->_tmp269_, 0, sizeof (Event));
													_data_->_tmp269_ = _data_->e;
													_data_->_tmp270_ = 0;
													_data_->_tmp270_ = _data_->_tmp269_.object_id;
													_data_->_tmp271_ = NULL;
													_data_->_tmp271_ = g_strdup_printf ("%i", _data_->_tmp270_);
													_data_->_tmp272_ = NULL;
													_data_->_tmp272_ = _data_->_tmp271_;
													_trf_persona_remove_url (_data_->_tmp268_, _data_->_tmp272_);
													_g_free0 (_data_->_tmp272_);
												}
											} else {
												memset (&_data_->_tmp273_, 0, sizeof (Event));
												_data_->_tmp273_ = _data_->e;
												_data_->_tmp274_ = 0;
												_data_->_tmp274_ = _data_->_tmp273_.pred_id;
												_data_->_tmp275_ = NULL;
												_data_->_tmp275_ = trf_persona_store__prefix_tracker_id;
												_data_->_tmp276_ = NULL;
												_data_->_tmp276_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp275_, TRF_ONTOLOGY_DEFS_NCO_BIRTHDAY);
												if (_data_->_tmp274_ == ((gint) ((gintptr) _data_->_tmp276_))) {
													_data_->_tmp277_ = NULL;
													_data_->_tmp277_ = g_strdup ("");
													_data_->bday = _data_->_tmp277_;
													_data_->_tmp278_ = FALSE;
													_data_->_tmp278_ = _data_->adding;
													if (_data_->_tmp278_) {
														memset (&_data_->_tmp279_, 0, sizeof (Event));
														_data_->_tmp279_ = _data_->e;
														_data_->_tmp280_ = 0;
														_data_->_tmp280_ = _data_->_tmp279_.subject_id;
														_data_->_state_ = 11;
														_trf_persona_store_get_property (_data_->self, _data_->_tmp280_, TRF_ONTOLOGY_DEFS_NCO_BIRTHDAY, TRF_ONTOLOGY_DEFS_NCO_PERSON, _trf_persona_store_do_update_ready, _data_);
														return FALSE;
														_state_11:
														_data_->_tmp281_ = NULL;
														_data_->_tmp281_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
														_g_free0 (_data_->bday);
														_data_->bday = _data_->_tmp281_;
													}
													_data_->_tmp282_ = NULL;
													_data_->_tmp282_ = _data_->p;
													_data_->_tmp283_ = NULL;
													_data_->_tmp283_ = _data_->bday;
													_trf_persona_set_birthday (_data_->_tmp282_, _data_->_tmp283_);
													_g_free0 (_data_->bday);
												} else {
													memset (&_data_->_tmp284_, 0, sizeof (Event));
													_data_->_tmp284_ = _data_->e;
													_data_->_tmp285_ = 0;
													_data_->_tmp285_ = _data_->_tmp284_.pred_id;
													_data_->_tmp286_ = NULL;
													_data_->_tmp286_ = trf_persona_store__prefix_tracker_id;
													_data_->_tmp287_ = NULL;
													_data_->_tmp287_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp286_, TRF_ONTOLOGY_DEFS_NCO_NOTE);
													if (_data_->_tmp285_ == ((gint) ((gintptr) _data_->_tmp287_))) {
														_data_->_tmp288_ = NULL;
														_data_->_tmp288_ = g_strdup ("");
														_data_->note = _data_->_tmp288_;
														_data_->_tmp289_ = FALSE;
														_data_->_tmp289_ = _data_->adding;
														if (_data_->_tmp289_) {
															memset (&_data_->_tmp290_, 0, sizeof (Event));
															_data_->_tmp290_ = _data_->e;
															_data_->_tmp291_ = 0;
															_data_->_tmp291_ = _data_->_tmp290_.subject_id;
															_data_->_state_ = 12;
															_trf_persona_store_get_property (_data_->self, _data_->_tmp291_, TRF_ONTOLOGY_DEFS_NCO_NOTE, TRF_ONTOLOGY_DEFS_NCO_PERSON, _trf_persona_store_do_update_ready, _data_);
															return FALSE;
															_state_12:
															_data_->_tmp292_ = NULL;
															_data_->_tmp292_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
															_g_free0 (_data_->note);
															_data_->note = _data_->_tmp292_;
														}
														_data_->_tmp293_ = NULL;
														_data_->_tmp293_ = _data_->p;
														_data_->_tmp294_ = NULL;
														_data_->_tmp294_ = _data_->note;
														_trf_persona_set_note (_data_->_tmp293_, _data_->_tmp294_);
														_g_free0 (_data_->note);
													} else {
														memset (&_data_->_tmp295_, 0, sizeof (Event));
														_data_->_tmp295_ = _data_->e;
														_data_->_tmp296_ = 0;
														_data_->_tmp296_ = _data_->_tmp295_.pred_id;
														_data_->_tmp297_ = NULL;
														_data_->_tmp297_ = trf_persona_store__prefix_tracker_id;
														_data_->_tmp298_ = NULL;
														_data_->_tmp298_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp297_, TRF_ONTOLOGY_DEFS_NCO_GENDER);
														if (_data_->_tmp296_ == ((gint) ((gintptr) _data_->_tmp298_))) {
															_data_->_tmp299_ = FALSE;
															_data_->_tmp299_ = _data_->adding;
															if (_data_->_tmp299_) {
																_data_->_tmp300_ = NULL;
																_data_->_tmp300_ = _data_->p;
																memset (&_data_->_tmp301_, 0, sizeof (Event));
																_data_->_tmp301_ = _data_->e;
																_data_->_tmp302_ = 0;
																_data_->_tmp302_ = _data_->_tmp301_.object_id;
																_trf_persona_set_gender (_data_->_tmp300_, _data_->_tmp302_);
															} else {
																_data_->_tmp303_ = NULL;
																_data_->_tmp303_ = _data_->p;
																_trf_persona_set_gender (_data_->_tmp303_, 0);
															}
														} else {
															memset (&_data_->_tmp304_, 0, sizeof (Event));
															_data_->_tmp304_ = _data_->e;
															_data_->_tmp305_ = 0;
															_data_->_tmp305_ = _data_->_tmp304_.pred_id;
															_data_->_tmp306_ = NULL;
															_data_->_tmp306_ = trf_persona_store__prefix_tracker_id;
															_data_->_tmp307_ = NULL;
															_data_->_tmp307_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp306_, TRF_ONTOLOGY_DEFS_NCO_PHOTO);
															if (_data_->_tmp305_ == ((gint) ((gintptr) _data_->_tmp307_))) {
																_data_->_tmp308_ = NULL;
																_data_->_tmp308_ = g_strdup ("");
																_data_->avatar_url = _data_->_tmp308_;
																_data_->_tmp309_ = FALSE;
																_data_->_tmp309_ = _data_->adding;
																if (_data_->_tmp309_) {
																	memset (&_data_->_tmp310_, 0, sizeof (Event));
																	_data_->_tmp310_ = _data_->e;
																	_data_->_tmp311_ = 0;
																	_data_->_tmp311_ = _data_->_tmp310_.object_id;
																	_data_->_state_ = 13;
																	_trf_persona_store_get_property (_data_->self, _data_->_tmp311_, TRF_ONTOLOGY_DEFS_NIE_URL, TRF_ONTOLOGY_DEFS_NFO_IMAGE, _trf_persona_store_do_update_ready, _data_);
																	return FALSE;
																	_state_13:
																	_data_->_tmp312_ = NULL;
																	_data_->_tmp312_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
																	_g_free0 (_data_->avatar_url);
																	_data_->avatar_url = _data_->_tmp312_;
																}
																_data_->_tmp313_ = NULL;
																_data_->_tmp313_ = _data_->p;
																_data_->_tmp314_ = NULL;
																_data_->_tmp314_ = _data_->avatar_url;
																_trf_persona_set_avatar_from_uri (_data_->_tmp313_, _data_->_tmp314_);
																_g_free0 (_data_->avatar_url);
															} else {
																memset (&_data_->_tmp315_, 0, sizeof (Event));
																_data_->_tmp315_ = _data_->e;
																_data_->_tmp316_ = 0;
																_data_->_tmp316_ = _data_->_tmp315_.pred_id;
																_data_->_tmp317_ = NULL;
																_data_->_tmp317_ = trf_persona_store__prefix_tracker_id;
																_data_->_tmp318_ = NULL;
																_data_->_tmp318_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp317_, TRF_ONTOLOGY_DEFS_NAO_PROPERTY);
																if (_data_->_tmp316_ == ((gint) ((gintptr) _data_->_tmp318_))) {
																	_data_->_tmp319_ = FALSE;
																	_data_->_tmp319_ = _data_->adding;
																	if (_data_->_tmp319_) {
																		memset (&_data_->_tmp320_, 0, sizeof (Event));
																		_data_->_tmp320_ = _data_->e;
																		_data_->_tmp321_ = 0;
																		_data_->_tmp321_ = _data_->_tmp320_.object_id;
																		_data_->_tmp322_ = 0;
																		_data_->_state_ = 14;
																		_trf_persona_store_get_nao_property_by_prop_id (_data_->self, _data_->_tmp321_, _trf_persona_store_do_update_ready, _data_);
																		return FALSE;
																		_state_14:
																		_data_->_tmp323_ = NULL;
																		_data_->_tmp323_ = _trf_persona_store_get_nao_property_by_prop_id_finish (_data_->self, _data_->_res_, &_data_->_tmp322_);
																		_data_->prop_info_length1 = 0;
																		_data_->_prop_info_size_ = 0;
																		_data_->prop_info = _data_->_tmp323_;
																		_data_->prop_info_length1 = _data_->_tmp322_;
																		_data_->_prop_info_size_ = _data_->prop_info_length1;
																		_data_->_tmp324_ = NULL;
																		_data_->_tmp324__length1 = 0;
																		_data_->_tmp324_ = _data_->prop_info;
																		_data_->_tmp324__length1 = _data_->prop_info_length1;
																		_data_->_tmp325_ = NULL;
																		_data_->_tmp325_ = _data_->_tmp324_[0];
																		if (g_strcmp0 (_data_->_tmp325_, TRF_PERSONA_STORE__LOCAL_ID_PROPERTY_NAME) == 0) {
																			_data_->_tmp326_ = NULL;
																			_data_->_tmp326_ = _data_->p;
																			_data_->_tmp327_ = NULL;
																			_data_->_tmp327__length1 = 0;
																			_data_->_tmp327_ = _data_->prop_info;
																			_data_->_tmp327__length1 = _data_->prop_info_length1;
																			_data_->_tmp328_ = NULL;
																			_data_->_tmp328_ = _data_->_tmp327_[1];
																			_trf_persona_set_local_ids (_data_->_tmp326_, _data_->_tmp328_);
																		} else {
																			_data_->_tmp329_ = NULL;
																			_data_->_tmp329__length1 = 0;
																			_data_->_tmp329_ = _data_->prop_info;
																			_data_->_tmp329__length1 = _data_->prop_info_length1;
																			_data_->_tmp330_ = NULL;
																			_data_->_tmp330_ = _data_->_tmp329_[0];
																			if (g_strcmp0 (_data_->_tmp330_, TRF_PERSONA_STORE__WSD_PROPERTY_NAME) == 0) {
																				_data_->_tmp331_ = NULL;
																				_data_->_tmp331_ = _data_->p;
																				_data_->_tmp332_ = NULL;
																				_data_->_tmp332__length1 = 0;
																				_data_->_tmp332_ = _data_->prop_info;
																				_data_->_tmp332__length1 = _data_->prop_info_length1;
																				_data_->_tmp333_ = NULL;
																				_data_->_tmp333_ = _data_->_tmp332_[1];
																				_trf_persona_set_web_service_addrs (_data_->_tmp331_, _data_->_tmp333_);
																			}
																		}
																		_data_->prop_info = (_vala_array_free (_data_->prop_info, _data_->prop_info_length1, (GDestroyNotify) g_free), NULL);
																	} else {
																		memset (&_data_->_tmp334_, 0, sizeof (Event));
																		_data_->_tmp334_ = _data_->e;
																		_data_->_tmp335_ = 0;
																		_data_->_tmp335_ = _data_->_tmp334_.subject_id;
																		_data_->_state_ = 15;
																		_trf_persona_store_get_nao_property_by_person_id (_data_->self, _data_->_tmp335_, TRF_PERSONA_STORE__LOCAL_ID_PROPERTY_NAME, _trf_persona_store_do_update_ready, _data_);
																		return FALSE;
																		_state_15:
																		_data_->_tmp336_ = NULL;
																		_data_->_tmp336_ = _trf_persona_store_get_nao_property_by_person_id_finish (_data_->self, _data_->_res_);
																		_data_->local_ids = _data_->_tmp336_;
																		memset (&_data_->_tmp337_, 0, sizeof (Event));
																		_data_->_tmp337_ = _data_->e;
																		_data_->_tmp338_ = 0;
																		_data_->_tmp338_ = _data_->_tmp337_.subject_id;
																		_data_->_state_ = 16;
																		_trf_persona_store_get_nao_property_by_person_id (_data_->self, _data_->_tmp338_, TRF_PERSONA_STORE__WSD_PROPERTY_NAME, _trf_persona_store_do_update_ready, _data_);
																		return FALSE;
																		_state_16:
																		_data_->_tmp339_ = NULL;
																		_data_->_tmp339_ = _trf_persona_store_get_nao_property_by_person_id_finish (_data_->self, _data_->_res_);
																		_data_->ws_addrs = _data_->_tmp339_;
																		_data_->_tmp340_ = NULL;
																		_data_->_tmp340_ = _data_->p;
																		_data_->_tmp341_ = NULL;
																		_data_->_tmp341_ = _data_->local_ids;
																		_trf_persona_set_local_ids (_data_->_tmp340_, _data_->_tmp341_);
																		_data_->_tmp342_ = NULL;
																		_data_->_tmp342_ = _data_->p;
																		_data_->_tmp343_ = NULL;
																		_data_->_tmp343_ = _data_->ws_addrs;
																		_trf_persona_set_web_service_addrs (_data_->_tmp342_, _data_->_tmp343_);
																		_g_free0 (_data_->ws_addrs);
																		_g_free0 (_data_->local_ids);
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	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 _trf_persona_store_get_property_data_free (gpointer _data) {
	TrfPersonaStoreGetPropertyData* _data_;
	_data_ = _data;
	_g_free0 (_data_->property);
	_g_free0 (_data_->subject_type);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreGetPropertyData, _data_);
}


static void _trf_persona_store_get_property (TrfPersonaStore* self, gint subject_tracker_id, const gchar* property, const gchar* subject_type, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreGetPropertyData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreGetPropertyData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_get_property);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_get_property_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = subject_tracker_id;
	_data_->subject_tracker_id = _tmp1_;
	_tmp2_ = property;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (_data_->property);
	_data_->property = _tmp3_;
	_tmp4_ = subject_type;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 (_data_->subject_type);
	_data_->subject_type = _tmp5_;
	_trf_persona_store_get_property_co (_data_);
}


static gchar* _trf_persona_store_get_property_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	gchar* result;
	TrfPersonaStoreGetPropertyData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_get_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreGetPropertyData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_get_property_co (_data_);
}


static gboolean _trf_persona_store_get_property_co (TrfPersonaStoreGetPropertyData* _data_) {
	static const char query_template[] = "SELECT ?property WHERE" " { ?p a %s ; " "   %s ?property " " . FILTER(tracker:id(?p) = %d ) }";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->subject_type;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->property;
	_data_->_tmp2_ = 0;
	_data_->_tmp2_ = _data_->subject_tracker_id;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup_printf (query_template, _data_->_tmp0_, _data_->_tmp1_, _data_->_tmp2_);
	_data_->query = _data_->_tmp3_;
	_data_->_state_ = 1;
	_trf_persona_store_single_value_query (_data_->self, _data_->query, _trf_persona_store_get_property_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _trf_persona_store_single_value_query_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->_tmp4_;
	_g_free0 (_data_->query);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->query);
	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 _trf_persona_store_get_nao_property_by_person_id_data_free (gpointer _data) {
	TrfPersonaStoreGetNaoPropertyByPersonIdData* _data_;
	_data_ = _data;
	_g_free0 (_data_->prop_name);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreGetNaoPropertyByPersonIdData, _data_);
}


static void _trf_persona_store_get_nao_property_by_person_id (TrfPersonaStore* self, gint nco_person_id, const gchar* prop_name, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreGetNaoPropertyByPersonIdData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreGetNaoPropertyByPersonIdData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_get_nao_property_by_person_id);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_get_nao_property_by_person_id_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = nco_person_id;
	_data_->nco_person_id = _tmp1_;
	_tmp2_ = prop_name;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (_data_->prop_name);
	_data_->prop_name = _tmp3_;
	_trf_persona_store_get_nao_property_by_person_id_co (_data_);
}


static gchar* _trf_persona_store_get_nao_property_by_person_id_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	gchar* result;
	TrfPersonaStoreGetNaoPropertyByPersonIdData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_get_nao_property_by_person_id_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreGetNaoPropertyByPersonIdData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_get_nao_property_by_person_id_co (_data_);
}


static gboolean _trf_persona_store_get_nao_property_by_person_id_co (TrfPersonaStoreGetNaoPropertyByPersonIdData* _data_) {
	static const char query_t[] = "SELECT " " ?prop_value " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " ; " TRF_ONTOLOGY_DEFS_NAO_HAS_PROPERTY " ?prop . " " ?prop " TRF_ONTOLOGY_DEFS_NAO_PROPERTY_NAME " ?prop_name . " " ?prop " TRF_ONTOLOGY_DEFS_NAO_PROPERTY_VALUE " ?prop_value . " " FILTER (tracker:id(?p) = %d && ?prop_name = '%s') } ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = 0;
	_data_->_tmp0_ = _data_->nco_person_id;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->prop_name;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = g_strdup_printf (query_t, _data_->_tmp0_, _data_->_tmp1_);
	_data_->query = _data_->_tmp2_;
	_data_->_state_ = 1;
	_trf_persona_store_single_value_query (_data_->self, _data_->query, _trf_persona_store_get_nao_property_by_person_id_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _trf_persona_store_single_value_query_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->_tmp3_;
	_g_free0 (_data_->query);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->query);
	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 _trf_persona_store_get_nao_property_by_prop_id_data_free (gpointer _data) {
	TrfPersonaStoreGetNaoPropertyByPropIdData* _data_;
	_data_ = _data;
	_data_->result = (_vala_array_free (_data_->result, _data_->result_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreGetNaoPropertyByPropIdData, _data_);
}


static void _trf_persona_store_get_nao_property_by_prop_id (TrfPersonaStore* self, gint nao_prop_id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreGetNaoPropertyByPropIdData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	_data_ = g_slice_new0 (TrfPersonaStoreGetNaoPropertyByPropIdData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_get_nao_property_by_prop_id);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_get_nao_property_by_prop_id_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = nao_prop_id;
	_data_->nao_prop_id = _tmp1_;
	_trf_persona_store_get_nao_property_by_prop_id_co (_data_);
}


static gchar** _trf_persona_store_get_nao_property_by_prop_id_finish (TrfPersonaStore* self, GAsyncResult* _res_, int* result_length1) {
	gchar** result;
	TrfPersonaStoreGetNaoPropertyByPropIdData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	*result_length1 = _data_->result_length1;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_get_nao_property_by_prop_id_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreGetNaoPropertyByPropIdData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_get_nao_property_by_prop_id_co (_data_);
}


static gboolean _trf_persona_store_get_nao_property_by_prop_id_co (TrfPersonaStoreGetNaoPropertyByPropIdData* _data_) {
	static const char query_t[] = "SELECT " " fn:concat(?prop_name, '\t', ?prop_value)" "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " ; " TRF_ONTOLOGY_DEFS_NAO_HAS_PROPERTY " ?prop . " " ?prop " TRF_ONTOLOGY_DEFS_NAO_PROPERTY_NAME " ?prop_name . " " ?prop " TRF_ONTOLOGY_DEFS_NAO_PROPERTY_VALUE " ?prop_value . " " FILTER (tracker:id(?prop) = %d) } ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = 0;
	_data_->_tmp0_ = _data_->nao_prop_id;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = g_strdup_printf (query_t, _data_->_tmp0_);
	_data_->query = _data_->_tmp1_;
	_data_->_state_ = 1;
	_trf_persona_store_single_value_query (_data_->self, _data_->query, _trf_persona_store_get_nao_property_by_prop_id_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _trf_persona_store_single_value_query_finish (_data_->self, _data_->_res_);
	_data_->ret = _data_->_tmp2_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->_tmp3_ = g_strsplit (_data_->ret, "\t", 0);
	_data_->_tmp5_ = NULL;
	_data_->_tmp5__length1 = 0;
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp5__length1 = _vala_array_length (_data_->_tmp3_);
	_data_->result_length1 = _data_->_tmp5__length1;
	_data_->result = _data_->_tmp5_;
	_g_free0 (_data_->ret);
	_g_free0 (_data_->query);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->ret);
	_g_free0 (_data_->query);
	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 _trf_persona_store_get_affl_info_data_free (gpointer _data) {
	TrfPersonaStoreGetAfflInfoData* _data_;
	_data_ = _data;
	_g_free0 (_data_->person_id);
	_g_free0 (_data_->affiliation_id);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreGetAfflInfoData, _data_);
}


static void _trf_persona_store_get_affl_info (TrfPersonaStore* self, const gchar* person_id, const gchar* affiliation_id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreGetAfflInfoData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreGetAfflInfoData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_get_affl_info);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_get_affl_info_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = person_id;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->person_id);
	_data_->person_id = _tmp2_;
	_tmp3_ = affiliation_id;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (_data_->affiliation_id);
	_data_->affiliation_id = _tmp4_;
	_trf_persona_store_get_affl_info_co (_data_);
}


static TrfAfflInfo* _trf_persona_store_get_affl_info_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfAfflInfo* result;
	TrfPersonaStoreGetAfflInfoData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_get_affl_info_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreGetAfflInfoData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_get_affl_info_co (_data_);
}


static gboolean _trf_persona_store_get_affl_info_co (TrfPersonaStoreGetAfflInfoData* _data_) {
	static const char query_template[] = "SELECT " "tracker:id(?i) " TRF_ONTOLOGY_DEFS_NCO_IMPROTOCOL "(?i) " TRF_ONTOLOGY_DEFS_NCO_IMID "(?i) " "tracker:id(?a) " TRF_ONTOLOGY_DEFS_NCO_ROLE "(?a) " TRF_ONTOLOGY_DEFS_NCO_ORG "(?a) " TRF_ONTOLOGY_DEFS_NCO_TITLE "(?a) " TRF_ONTOLOGY_DEFS_NCO_POBOX "(?postal) " TRF_ONTOLOGY_DEFS_NCO_DISTRICT "(?postal) " TRF_ONTOLOGY_DEFS_NCO_COUNTY "(?postal) " TRF_ONTOLOGY_DEFS_NCO_LOCALITY "(?postal) " TRF_ONTOLOGY_DEFS_NCO_POSTALCODE "(?postal) " TRF_ONTOLOGY_DEFS_NCO_STREET_ADDRESS "(?postal) " TRF_ONTOLOGY_DEFS_NCO_ADDRESS_LOCATION "(?postal) " TRF_ONTOLOGY_DEFS_NCO_EXTENDED_ADDRESS "(?postal) " TRF_ONTOLOGY_DEFS_NCO_COUNTRY "(?postal) " TRF_ONTOLOGY_DEFS_NCO_REGION "(?postal) " TRF_ONTOLOGY_DEFS_NCO_EMAIL_PROP "(?e) " TRF_ONTOLOGY_DEFS_NCO_PHONE_PROP "(?number) " TRF_ONTOLOGY_DEFS_NCO_WEBSITE "(?a) " TRF_ONTOLOGY_DEFS_NCO_BLOG "(?a) " TRF_ONTOLOGY_DEFS_NCO_URL "(?a) " TRF_ONTOLOGY_DEFS_NCO_IM_NICKNAME "(?i) " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " ; " TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION " ?a . " " OPTIONAL { ?a " TRF_ONTOLOGY_DEFS_NCO_HAS_IMADDRESS " ?i } . " " OPTIONAL { ?a " TRF_ONTOLOGY_DEFS_NCO_HAS_POSTAL_ADDRESS "               ?postal } . " " OPTIONAL { ?a " TRF_ONTOLOGY_DEFS_NCO_HAS_EMAIL " ?e } . " " OPTIONAL { ?a " TRF_ONTOLOGY_DEFS_NCO_HAS_PHONE " ?number }  " " FILTER(tracker:id(?p) = %s" " && tracker:id(?a) = %s" " ) } ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = trf_affl_info_new ();
	_data_->affl_info = _data_->_tmp0_;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->person_id;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->affiliation_id;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup_printf (query_template, _data_->_tmp1_, _data_->_tmp2_);
	_data_->query = _data_->_tmp3_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->query;
	g_debug ("trf-persona-store.vala:1793: _get_affl_info: %s", _data_->_tmp4_);
	{
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->self->priv->_connection;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = _data_->query;
		_data_->_state_ = 1;
		tracker_sparql_connection_query_async (_data_->_tmp5_, _data_->_tmp6_, NULL, _trf_persona_store_get_affl_info_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = tracker_sparql_connection_query_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error_);
		_data_->cursor = _data_->_tmp7_;
		if (_data_->_inner_error_ != NULL) {
			if (_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) {
				goto __catch5_tracker_sparql_error;
			}
			goto __catch5_g_error;
		}
		while (TRUE) {
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = _data_->cursor;
			_data_->_state_ = 2;
			tracker_sparql_cursor_next_async (_data_->_tmp9_, NULL, _trf_persona_store_get_affl_info_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp10_ = FALSE;
			_data_->_tmp10_ = tracker_sparql_cursor_next_finish (_data_->_tmp9_, _data_->_res_, &_data_->_inner_error_);
			_data_->_tmp8_ = _data_->_tmp10_;
			if (_data_->_inner_error_ != NULL) {
				_g_object_unref0 (_data_->cursor);
				if (_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) {
					goto __catch5_tracker_sparql_error;
				}
				goto __catch5_g_error;
			}
			if (!_data_->_tmp8_) {
				break;
			}
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = _data_->affl_info;
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = _data_->cursor;
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = tracker_sparql_cursor_get_string (_data_->_tmp12_, (gint) TRF_AFFL_INFO_FIELDS_IM_TRACKER_ID, NULL);
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = g_strdup (_data_->_tmp13_);
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = _data_->_tmp14_;
			trf_affl_info_set_im_tracker_id (_data_->_tmp11_, _data_->_tmp15_);
			_g_free0 (_data_->_tmp15_);
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = _data_->affl_info;
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = _data_->cursor;
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = tracker_sparql_cursor_get_string (_data_->_tmp17_, (gint) TRF_AFFL_INFO_FIELDS_IM_PROTOCOL, NULL);
			_data_->_tmp19_ = NULL;
			_data_->_tmp19_ = g_strdup (_data_->_tmp18_);
			_data_->_tmp20_ = NULL;
			_data_->_tmp20_ = _data_->_tmp19_;
			trf_affl_info_set_im_proto (_data_->_tmp16_, _data_->_tmp20_);
			_g_free0 (_data_->_tmp20_);
			_data_->_tmp21_ = NULL;
			_data_->_tmp21_ = _data_->affl_info;
			_data_->_tmp22_ = NULL;
			_data_->_tmp22_ = _data_->cursor;
			_data_->_tmp23_ = NULL;
			_data_->_tmp23_ = tracker_sparql_cursor_get_string (_data_->_tmp22_, (gint) TRF_AFFL_INFO_FIELDS_IM_ACCOUNT_ID, NULL);
			_data_->_tmp24_ = NULL;
			_data_->_tmp24_ = g_strdup (_data_->_tmp23_);
			_data_->_tmp25_ = NULL;
			_data_->_tmp25_ = _data_->_tmp24_;
			trf_affl_info_set_im_account_id (_data_->_tmp21_, _data_->_tmp25_);
			_g_free0 (_data_->_tmp25_);
			_data_->_tmp26_ = NULL;
			_data_->_tmp26_ = _data_->affl_info;
			_data_->_tmp27_ = NULL;
			_data_->_tmp27_ = _data_->cursor;
			_data_->_tmp28_ = NULL;
			_data_->_tmp28_ = tracker_sparql_cursor_get_string (_data_->_tmp27_, (gint) TRF_AFFL_INFO_FIELDS_IM_NICKNAME, NULL);
			_data_->_tmp29_ = NULL;
			_data_->_tmp29_ = g_strdup (_data_->_tmp28_);
			_data_->_tmp30_ = NULL;
			_data_->_tmp30_ = _data_->_tmp29_;
			trf_affl_info_set_im_nickname (_data_->_tmp26_, _data_->_tmp30_);
			_g_free0 (_data_->_tmp30_);
			_data_->_tmp31_ = NULL;
			_data_->_tmp31_ = _data_->affl_info;
			_data_->_tmp32_ = NULL;
			_data_->_tmp32_ = _data_->cursor;
			_data_->_tmp33_ = NULL;
			_data_->_tmp33_ = tracker_sparql_cursor_get_string (_data_->_tmp32_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_TRACKER_ID, NULL);
			_data_->_tmp34_ = NULL;
			_data_->_tmp34_ = g_strdup (_data_->_tmp33_);
			_data_->_tmp35_ = NULL;
			_data_->_tmp35_ = _data_->_tmp34_;
			trf_affl_info_set_affl_tracker_id (_data_->_tmp31_, _data_->_tmp35_);
			_g_free0 (_data_->_tmp35_);
			_data_->_tmp36_ = NULL;
			_data_->_tmp36_ = _data_->affl_info;
			_data_->_tmp37_ = NULL;
			_data_->_tmp37_ = _data_->cursor;
			_data_->_tmp38_ = NULL;
			_data_->_tmp38_ = tracker_sparql_cursor_get_string (_data_->_tmp37_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_ROLE, NULL);
			_data_->_tmp39_ = NULL;
			_data_->_tmp39_ = g_strdup (_data_->_tmp38_);
			_data_->_tmp40_ = NULL;
			_data_->_tmp40_ = _data_->_tmp39_;
			trf_affl_info_set_role (_data_->_tmp36_, _data_->_tmp40_);
			_g_free0 (_data_->_tmp40_);
			_data_->_tmp41_ = NULL;
			_data_->_tmp41_ = _data_->affl_info;
			_data_->_tmp42_ = NULL;
			_data_->_tmp42_ = _data_->cursor;
			_data_->_tmp43_ = NULL;
			_data_->_tmp43_ = tracker_sparql_cursor_get_string (_data_->_tmp42_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_ORG, NULL);
			_data_->_tmp44_ = NULL;
			_data_->_tmp44_ = g_strdup (_data_->_tmp43_);
			_data_->_tmp45_ = NULL;
			_data_->_tmp45_ = _data_->_tmp44_;
			trf_affl_info_set_org (_data_->_tmp41_, _data_->_tmp45_);
			_g_free0 (_data_->_tmp45_);
			_data_->_tmp46_ = NULL;
			_data_->_tmp46_ = _data_->affl_info;
			_data_->_tmp47_ = NULL;
			_data_->_tmp47_ = _data_->cursor;
			_data_->_tmp48_ = NULL;
			_data_->_tmp48_ = tracker_sparql_cursor_get_string (_data_->_tmp47_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_TITLE, NULL);
			_data_->_tmp49_ = NULL;
			_data_->_tmp49_ = g_strdup (_data_->_tmp48_);
			_data_->_tmp50_ = NULL;
			_data_->_tmp50_ = _data_->_tmp49_;
			trf_affl_info_set_title (_data_->_tmp46_, _data_->_tmp50_);
			_g_free0 (_data_->_tmp50_);
			_data_->_tmp51_ = NULL;
			_data_->_tmp51_ = _data_->cursor;
			_data_->_tmp52_ = NULL;
			_data_->_tmp52_ = tracker_sparql_cursor_get_string (_data_->_tmp51_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_POBOX, NULL);
			_data_->_tmp53_ = NULL;
			_data_->_tmp53_ = g_strdup (_data_->_tmp52_);
			_data_->po_box = _data_->_tmp53_;
			_data_->_tmp54_ = NULL;
			_data_->_tmp54_ = _data_->cursor;
			_data_->_tmp55_ = NULL;
			_data_->_tmp55_ = tracker_sparql_cursor_get_string (_data_->_tmp54_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_EXTENDED_ADDRESS, NULL);
			_data_->_tmp56_ = NULL;
			_data_->_tmp56_ = g_strdup (_data_->_tmp55_);
			_data_->extension = _data_->_tmp56_;
			_data_->_tmp57_ = NULL;
			_data_->_tmp57_ = _data_->cursor;
			_data_->_tmp58_ = NULL;
			_data_->_tmp58_ = tracker_sparql_cursor_get_string (_data_->_tmp57_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_STREET_ADDRESS, NULL);
			_data_->_tmp59_ = NULL;
			_data_->_tmp59_ = g_strdup (_data_->_tmp58_);
			_data_->street = _data_->_tmp59_;
			_data_->_tmp60_ = NULL;
			_data_->_tmp60_ = _data_->cursor;
			_data_->_tmp61_ = NULL;
			_data_->_tmp61_ = tracker_sparql_cursor_get_string (_data_->_tmp60_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_LOCALITY, NULL);
			_data_->_tmp62_ = NULL;
			_data_->_tmp62_ = g_strdup (_data_->_tmp61_);
			_data_->locality = _data_->_tmp62_;
			_data_->_tmp63_ = NULL;
			_data_->_tmp63_ = _data_->cursor;
			_data_->_tmp64_ = NULL;
			_data_->_tmp64_ = tracker_sparql_cursor_get_string (_data_->_tmp63_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_REGION, NULL);
			_data_->_tmp65_ = NULL;
			_data_->_tmp65_ = g_strdup (_data_->_tmp64_);
			_data_->region = _data_->_tmp65_;
			_data_->_tmp66_ = NULL;
			_data_->_tmp66_ = _data_->cursor;
			_data_->_tmp67_ = NULL;
			_data_->_tmp67_ = tracker_sparql_cursor_get_string (_data_->_tmp66_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_POSTALCODE, NULL);
			_data_->_tmp68_ = NULL;
			_data_->_tmp68_ = g_strdup (_data_->_tmp67_);
			_data_->postal_code = _data_->_tmp68_;
			_data_->_tmp69_ = NULL;
			_data_->_tmp69_ = _data_->cursor;
			_data_->_tmp70_ = NULL;
			_data_->_tmp70_ = tracker_sparql_cursor_get_string (_data_->_tmp69_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_COUNTRY, NULL);
			_data_->_tmp71_ = NULL;
			_data_->_tmp71_ = g_strdup (_data_->_tmp70_);
			_data_->country = _data_->_tmp71_;
			_data_->_tmp72_ = NULL;
			_data_->_tmp72_ = _data_->po_box;
			_data_->_tmp73_ = NULL;
			_data_->_tmp73_ = _data_->extension;
			_data_->_tmp74_ = NULL;
			_data_->_tmp74_ = _data_->street;
			_data_->_tmp75_ = NULL;
			_data_->_tmp75_ = _data_->locality;
			_data_->_tmp76_ = NULL;
			_data_->_tmp76_ = _data_->region;
			_data_->_tmp77_ = NULL;
			_data_->_tmp77_ = _data_->postal_code;
			_data_->_tmp78_ = NULL;
			_data_->_tmp78_ = _data_->country;
			_data_->_tmp79_ = NULL;
			_data_->_tmp79_ = _data_->affl_info;
			_data_->_tmp80_ = NULL;
			_data_->_tmp80_ = trf_affl_info_get_affl_tracker_id (_data_->_tmp79_);
			_data_->_tmp81_ = NULL;
			_data_->_tmp81_ = _data_->_tmp80_;
			_data_->_tmp82_ = NULL;
			_data_->_tmp82_ = folks_postal_address_new (_data_->_tmp72_, _data_->_tmp73_, _data_->_tmp74_, _data_->_tmp75_, _data_->_tmp76_, _data_->_tmp77_, _data_->_tmp78_, NULL, _data_->_tmp81_);
			_data_->postal_address = _data_->_tmp82_;
			_data_->_tmp83_ = NULL;
			_data_->_tmp83_ = _data_->postal_address;
			_data_->_tmp84_ = FALSE;
			_data_->_tmp84_ = folks_postal_address_is_empty (_data_->_tmp83_);
			if (!_data_->_tmp84_) {
				_data_->_tmp85_ = NULL;
				_data_->_tmp85_ = _data_->affl_info;
				_data_->_tmp86_ = NULL;
				_data_->_tmp86_ = _data_->postal_address;
				_data_->_tmp87_ = NULL;
				_data_->_tmp87_ = folks_postal_address_field_details_new (_data_->_tmp86_, NULL);
				_g_object_unref0 (_data_->_tmp85_->postal_address_fd);
				_data_->_tmp85_->postal_address_fd = _data_->_tmp87_;
			}
			_data_->_tmp88_ = NULL;
			_data_->_tmp88_ = _data_->affl_info;
			_data_->_tmp89_ = NULL;
			_data_->_tmp89_ = _data_->cursor;
			_data_->_tmp90_ = NULL;
			_data_->_tmp90_ = tracker_sparql_cursor_get_string (_data_->_tmp89_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_EMAIL, NULL);
			_data_->_tmp91_ = NULL;
			_data_->_tmp91_ = g_strdup (_data_->_tmp90_);
			_data_->_tmp92_ = NULL;
			_data_->_tmp92_ = _data_->_tmp91_;
			trf_affl_info_set_email (_data_->_tmp88_, _data_->_tmp92_);
			_g_free0 (_data_->_tmp92_);
			_data_->_tmp93_ = NULL;
			_data_->_tmp93_ = _data_->affl_info;
			_data_->_tmp94_ = NULL;
			_data_->_tmp94_ = _data_->cursor;
			_data_->_tmp95_ = NULL;
			_data_->_tmp95_ = tracker_sparql_cursor_get_string (_data_->_tmp94_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_PHONE, NULL);
			_data_->_tmp96_ = NULL;
			_data_->_tmp96_ = g_strdup (_data_->_tmp95_);
			_data_->_tmp97_ = NULL;
			_data_->_tmp97_ = _data_->_tmp96_;
			trf_affl_info_set_phone (_data_->_tmp93_, _data_->_tmp97_);
			_g_free0 (_data_->_tmp97_);
			_data_->_tmp98_ = NULL;
			_data_->_tmp98_ = _data_->affl_info;
			_data_->_tmp99_ = NULL;
			_data_->_tmp99_ = _data_->cursor;
			_data_->_tmp100_ = NULL;
			_data_->_tmp100_ = tracker_sparql_cursor_get_string (_data_->_tmp99_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_WEBSITE, NULL);
			_data_->_tmp101_ = NULL;
			_data_->_tmp101_ = g_strdup (_data_->_tmp100_);
			_data_->_tmp102_ = NULL;
			_data_->_tmp102_ = _data_->_tmp101_;
			trf_affl_info_set_website (_data_->_tmp98_, _data_->_tmp102_);
			_g_free0 (_data_->_tmp102_);
			_data_->_tmp103_ = NULL;
			_data_->_tmp103_ = _data_->affl_info;
			_data_->_tmp104_ = NULL;
			_data_->_tmp104_ = _data_->cursor;
			_data_->_tmp105_ = NULL;
			_data_->_tmp105_ = tracker_sparql_cursor_get_string (_data_->_tmp104_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_BLOG, NULL);
			_data_->_tmp106_ = NULL;
			_data_->_tmp106_ = g_strdup (_data_->_tmp105_);
			_data_->_tmp107_ = NULL;
			_data_->_tmp107_ = _data_->_tmp106_;
			trf_affl_info_set_blog (_data_->_tmp103_, _data_->_tmp107_);
			_g_free0 (_data_->_tmp107_);
			_data_->_tmp108_ = NULL;
			_data_->_tmp108_ = _data_->affl_info;
			_data_->_tmp109_ = NULL;
			_data_->_tmp109_ = _data_->cursor;
			_data_->_tmp110_ = NULL;
			_data_->_tmp110_ = tracker_sparql_cursor_get_string (_data_->_tmp109_, (gint) TRF_AFFL_INFO_FIELDS_AFFL_URL, NULL);
			_data_->_tmp111_ = NULL;
			_data_->_tmp111_ = g_strdup (_data_->_tmp110_);
			_data_->_tmp112_ = NULL;
			_data_->_tmp112_ = _data_->_tmp111_;
			trf_affl_info_set_url (_data_->_tmp108_, _data_->_tmp112_);
			_g_free0 (_data_->_tmp112_);
			_g_object_unref0 (_data_->postal_address);
			_g_free0 (_data_->country);
			_g_free0 (_data_->postal_code);
			_g_free0 (_data_->region);
			_g_free0 (_data_->locality);
			_g_free0 (_data_->street);
			_g_free0 (_data_->extension);
			_g_free0 (_data_->po_box);
		}
		_g_object_unref0 (_data_->cursor);
	}
	goto __finally5;
	__catch5_tracker_sparql_error:
	{
		_data_->e1 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp113_ = NULL;
		_data_->_tmp113_ = _data_->query;
		_data_->_tmp114_ = NULL;
		_data_->_tmp114_ = _data_->e1;
		_data_->_tmp115_ = NULL;
		_data_->_tmp115_ = _data_->_tmp114_->message;
		g_warning ("trf-persona-store.vala:1857: Couldn't fetch affiliation info: %s %s", _data_->_tmp113_, _data_->_tmp115_);
		_g_error_free0 (_data_->e1);
	}
	goto __finally5;
	__catch5_g_error:
	{
		_data_->e2 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp116_ = NULL;
		_data_->_tmp116_ = _data_->query;
		_data_->_tmp117_ = NULL;
		_data_->_tmp117_ = _data_->e2;
		_data_->_tmp118_ = NULL;
		_data_->_tmp118_ = _data_->_tmp117_->message;
		g_warning ("trf-persona-store.vala:1862: Couldn't fetch affiliation info: %s %s", _data_->_tmp116_, _data_->_tmp118_);
		_g_error_free0 (_data_->e2);
	}
	__finally5:
	if (_data_->_inner_error_ != NULL) {
		_g_free0 (_data_->query);
		_g_object_unref0 (_data_->affl_info);
		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_->result = _data_->affl_info;
	_g_free0 (_data_->query);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->query);
	_g_object_unref0 (_data_->affl_info);
	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 _trf_persona_store_insert_persona_data_free (gpointer _data) {
	TrfPersonaStoreInsertPersonaData* _data_;
	_data_ = _data;
	_g_free0 (_data_->query);
	_g_free0 (_data_->persona_var);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreInsertPersonaData, _data_);
}


static void _trf_persona_store_insert_persona (TrfPersonaStore* self, const gchar* query, const gchar* persona_var, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreInsertPersonaData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreInsertPersonaData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_insert_persona);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_insert_persona_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = query;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->query);
	_data_->query = _tmp2_;
	_tmp3_ = persona_var;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (_data_->persona_var);
	_data_->persona_var = _tmp4_;
	_trf_persona_store_insert_persona_co (_data_);
}


static gchar* _trf_persona_store_insert_persona_finish (TrfPersonaStore* self, GAsyncResult* _res_, GError** error) {
	gchar* result;
	TrfPersonaStoreInsertPersonaData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_insert_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreInsertPersonaData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_insert_persona_co (_data_);
}


static gboolean _trf_persona_store_insert_persona_co (TrfPersonaStoreInsertPersonaData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->contact_urn = NULL;
	_data_->_tmp0_ = FALSE;
	_data_->_tmp0_ = folks_persona_store_get_is_prepared ((FolksPersonaStore*) _data_->self);
	_data_->_tmp1_ = FALSE;
	_data_->_tmp1_ = _data_->_tmp0_;
	if (!_data_->_tmp1_) {
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = g_error_new_literal (FOLKS_PERSONA_STORE_ERROR, FOLKS_PERSONA_STORE_ERROR_CREATE_FAILED, "Cannot insert persona before store is prepared");
		_data_->_inner_error_ = _data_->_tmp2_;
		if (_data_->_inner_error_->domain == FOLKS_PERSONA_STORE_ERROR) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_free0 (_data_->contact_urn);
			_g_variant_unref0 (_data_->variant);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			_g_free0 (_data_->contact_urn);
			_g_variant_unref0 (_data_->variant);
			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_->_tmp3_ = NULL;
		_data_->_tmp3_ = _data_->query;
		g_debug ("trf-persona-store.vala:1883: _insert_persona: %s", _data_->_tmp3_);
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _data_->self->priv->_connection;
		g_debug ("trf-persona-store.vala:1884: _connection is %p", _data_->_tmp4_);
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = _data_->self->priv->_connection;
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = _data_->query;
		_data_->_state_ = 1;
		tracker_sparql_connection_update_blank_async (_data_->_tmp6_, _data_->_tmp7_, G_PRIORITY_DEFAULT, NULL, _trf_persona_store_insert_persona_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = tracker_sparql_connection_update_blank_finish (_data_->_tmp6_, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp5_ = _data_->_tmp8_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch6_g_error;
		}
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = _data_->_tmp5_;
		_data_->_tmp5_ = NULL;
		_g_variant_unref0 (_data_->variant);
		_data_->variant = _data_->_tmp9_;
		_data_->anon_var = NULL;
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = _data_->variant;
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = g_variant_iter_new (_data_->_tmp10_);
		_g_variant_iter_free0 (_data_->iter1);
		_data_->iter1 = _data_->_tmp11_;
		while (TRUE) {
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = _data_->iter1;
			_data_->_tmp13_ = FALSE;
			_data_->_tmp13_ = g_variant_iter_next (_data_->_tmp12_, "aa{ss}", &_data_->iter2, NULL);
			if (!_data_->_tmp13_) {
				break;
			}
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = _data_->iter2;
			if (_data_->_tmp14_ == NULL) {
				continue;
			}
			while (TRUE) {
				_data_->_tmp15_ = NULL;
				_data_->_tmp15_ = _data_->iter2;
				_data_->_tmp16_ = FALSE;
				_data_->_tmp16_ = g_variant_iter_next (_data_->_tmp15_, "a{ss}", &_data_->iter3, NULL);
				if (!_data_->_tmp16_) {
					break;
				}
				_data_->_tmp17_ = NULL;
				_data_->_tmp17_ = _data_->iter3;
				if (_data_->_tmp17_ == NULL) {
					continue;
				}
				while (TRUE) {
					_data_->_tmp18_ = NULL;
					_data_->_tmp18_ = _data_->iter3;
					_data_->_tmp19_ = FALSE;
					_data_->_tmp19_ = g_variant_iter_next (_data_->_tmp18_, "{ss}", &_data_->anon_var, &_data_->contact_urn, NULL);
					if (!_data_->_tmp19_) {
						break;
					}
					_data_->_tmp20_ = NULL;
					_data_->_tmp20_ = _data_->anon_var;
					_data_->_tmp21_ = NULL;
					_data_->_tmp21_ = _data_->persona_var;
					if (g_strcmp0 (_data_->_tmp20_, _data_->_tmp21_) == 0) {
						_data_->result = _data_->contact_urn;
						_g_free0 (_data_->anon_var);
						_g_variant_iter_free0 (_data_->iter3);
						_g_variant_iter_free0 (_data_->iter2);
						_g_variant_iter_free0 (_data_->iter1);
						_g_variant_unref0 (_data_->_tmp5_);
						_g_variant_unref0 (_data_->variant);
						if (_data_->_state_ == 0) {
							g_simple_async_result_complete_in_idle (_data_->_async_result);
						} else {
							g_simple_async_result_complete (_data_->_async_result);
						}
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
				}
			}
		}
		_g_free0 (_data_->anon_var);
		_g_variant_iter_free0 (_data_->iter3);
		_g_variant_iter_free0 (_data_->iter2);
		_g_variant_iter_free0 (_data_->iter1);
		_g_variant_unref0 (_data_->_tmp5_);
	}
	goto __finally6;
	__catch6_g_error:
	{
		_data_->e = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_g_free0 (_data_->contact_urn);
		_data_->contact_urn = NULL;
		_data_->_tmp22_ = NULL;
		_data_->_tmp22_ = _data_->e;
		_data_->_tmp23_ = NULL;
		_data_->_tmp23_ = _data_->_tmp22_->message;
		g_warning ("trf-persona-store.vala:1917: Couldn't insert nco:PersonContact: %s", _data_->_tmp23_);
		_g_error_free0 (_data_->e);
	}
	__finally6:
	if (_data_->_inner_error_ != NULL) {
		if (_data_->_inner_error_->domain == FOLKS_PERSONA_STORE_ERROR) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_free0 (_data_->contact_urn);
			_g_variant_unref0 (_data_->variant);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			_g_free0 (_data_->contact_urn);
			_g_variant_unref0 (_data_->variant);
			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_->result = NULL;
	_g_free0 (_data_->contact_urn);
	_g_variant_unref0 (_data_->variant);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->contact_urn);
	_g_variant_unref0 (_data_->variant);
	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 _trf_persona_store_single_value_query_data_free (gpointer _data) {
	TrfPersonaStoreSingleValueQueryData* _data_;
	_data_ = _data;
	_g_free0 (_data_->query);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSingleValueQueryData, _data_);
}


static void _trf_persona_store_single_value_query (TrfPersonaStore* self, const gchar* query, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSingleValueQueryData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSingleValueQueryData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_single_value_query);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_single_value_query_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = query;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->query);
	_data_->query = _tmp2_;
	_trf_persona_store_single_value_query_co (_data_);
}


static gchar* _trf_persona_store_single_value_query_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	gchar* result;
	TrfPersonaStoreSingleValueQueryData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_single_value_query_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSingleValueQueryData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_single_value_query_co (_data_);
}


static gboolean _trf_persona_store_single_value_query_co (TrfPersonaStoreSingleValueQueryData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->query;
	_data_->_state_ = 1;
	_trf_persona_store_multi_value_query (_data_->self, _data_->_tmp0_, _trf_persona_store_single_value_query_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _trf_persona_store_multi_value_query_finish (_data_->self, _data_->_res_);
	_data_->rows = _data_->_tmp1_;
	{
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = _data_->rows;
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
		_data_->_r_list = _data_->_tmp3_;
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _data_->_r_list;
		_data_->_tmp5_ = 0;
		_data_->_tmp5_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp4_);
		_data_->_tmp6_ = 0;
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_r_size = _data_->_tmp6_;
		_data_->_r_index = -1;
		while (TRUE) {
			_data_->_tmp7_ = 0;
			_data_->_tmp7_ = _data_->_r_index;
			_data_->_r_index = _data_->_tmp7_ + 1;
			_data_->_tmp8_ = 0;
			_data_->_tmp8_ = _data_->_r_index;
			_data_->_tmp9_ = 0;
			_data_->_tmp9_ = _data_->_r_size;
			if (!(_data_->_tmp8_ < _data_->_tmp9_)) {
				break;
			}
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_r_list;
			_data_->_tmp11_ = 0;
			_data_->_tmp11_ = _data_->_r_index;
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = folks_small_set_get (_data_->_tmp10_, _data_->_tmp11_);
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = g_strdup ((const gchar*) _data_->_tmp12_);
			_data_->r = _data_->_tmp13_;
			_data_->result = _data_->r;
			_g_object_unref0 (_data_->_r_list);
			_g_object_unref0 (_data_->rows);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_object_unref0 (_data_->_r_list);
	}
	_data_->_tmp14_ = NULL;
	_data_->_tmp14_ = g_strdup ("");
	_data_->result = _data_->_tmp14_;
	_g_object_unref0 (_data_->rows);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->rows);
	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 _trf_persona_store_multi_value_query_data_free (gpointer _data) {
	TrfPersonaStoreMultiValueQueryData* _data_;
	_data_ = _data;
	_g_free0 (_data_->query);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreMultiValueQueryData, _data_);
}


static void _trf_persona_store_multi_value_query (TrfPersonaStore* self, const gchar* query, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreMultiValueQueryData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreMultiValueQueryData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_multi_value_query);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_multi_value_query_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = query;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->query);
	_data_->query = _tmp2_;
	_trf_persona_store_multi_value_query_co (_data_);
}


static FolksSmallSet* _trf_persona_store_multi_value_query_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	FolksSmallSet* result;
	TrfPersonaStoreMultiValueQueryData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_multi_value_query_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreMultiValueQueryData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_multi_value_query_co (_data_);
}


static gboolean _trf_persona_store_multi_value_query_co (TrfPersonaStoreMultiValueQueryData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	_data_->ret = _data_->_tmp0_;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->query;
	g_debug ("trf-persona-store.vala:1939: [_multi_value_query] %s", _data_->_tmp1_);
	{
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = _data_->self->priv->_connection;
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _data_->query;
		_data_->_state_ = 1;
		tracker_sparql_connection_query_async (_data_->_tmp2_, _data_->_tmp3_, NULL, _trf_persona_store_multi_value_query_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = tracker_sparql_connection_query_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
		_data_->cursor = _data_->_tmp4_;
		if (_data_->_inner_error_ != NULL) {
			if (_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) {
				goto __catch7_tracker_sparql_error;
			}
			goto __catch7_g_error;
		}
		while (TRUE) {
			_data_->_tmp6_ = NULL;
			_data_->_tmp6_ = _data_->cursor;
			_data_->_tmp7_ = FALSE;
			_data_->_tmp7_ = tracker_sparql_cursor_next (_data_->_tmp6_, NULL, &_data_->_inner_error_);
			_data_->_tmp5_ = _data_->_tmp7_;
			if (_data_->_inner_error_ != NULL) {
				_g_object_unref0 (_data_->cursor);
				if (_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) {
					goto __catch7_tracker_sparql_error;
				}
				goto __catch7_g_error;
			}
			if (!_data_->_tmp5_) {
				break;
			}
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = _data_->cursor;
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = tracker_sparql_cursor_get_string (_data_->_tmp8_, 0, NULL);
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = g_strdup (_data_->_tmp9_);
			_data_->prop = _data_->_tmp10_;
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = _data_->prop;
			if (_data_->_tmp11_ != NULL) {
				_data_->_tmp12_ = NULL;
				_data_->_tmp12_ = _data_->ret;
				_data_->_tmp13_ = NULL;
				_data_->_tmp13_ = _data_->prop;
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp12_, _data_->_tmp13_);
			}
			_g_free0 (_data_->prop);
		}
		_g_object_unref0 (_data_->cursor);
	}
	goto __finally7;
	__catch7_tracker_sparql_error:
	{
		_data_->e1 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = _data_->query;
		_data_->_tmp15_ = NULL;
		_data_->_tmp15_ = _data_->e1;
		_data_->_tmp16_ = NULL;
		_data_->_tmp16_ = _data_->_tmp15_->message;
		g_warning ("trf-persona-store.vala:1953: Couldn't run query: %s %s", _data_->_tmp14_, _data_->_tmp16_);
		_g_error_free0 (_data_->e1);
	}
	goto __finally7;
	__catch7_g_error:
	{
		_data_->e2 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp17_ = NULL;
		_data_->_tmp17_ = _data_->query;
		_data_->_tmp18_ = NULL;
		_data_->_tmp18_ = _data_->e2;
		_data_->_tmp19_ = NULL;
		_data_->_tmp19_ = _data_->_tmp18_->message;
		g_warning ("trf-persona-store.vala:1957: Couldn't run query: %s %s", _data_->_tmp17_, _data_->_tmp19_);
		_g_error_free0 (_data_->e2);
	}
	__finally7:
	if (_data_->_inner_error_ != NULL) {
		_g_object_unref0 (_data_->ret);
		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_->result = _data_->ret;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->ret);
	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 _trf_persona_store_urn_from_tracker_id_data_free (gpointer _data) {
	TrfPersonaStoreUrnFromTrackerIdData* _data_;
	_data_ = _data;
	_g_free0 (_data_->tracker_id);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreUrnFromTrackerIdData, _data_);
}


static void _trf_persona_store_urn_from_tracker_id (TrfPersonaStore* self, const gchar* tracker_id, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreUrnFromTrackerIdData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreUrnFromTrackerIdData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_urn_from_tracker_id);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_urn_from_tracker_id_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = tracker_id;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->tracker_id);
	_data_->tracker_id = _tmp2_;
	_trf_persona_store_urn_from_tracker_id_co (_data_);
}


static gchar* _trf_persona_store_urn_from_tracker_id_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	gchar* result;
	TrfPersonaStoreUrnFromTrackerIdData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_urn_from_tracker_id_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreUrnFromTrackerIdData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_urn_from_tracker_id_co (_data_);
}


static gboolean _trf_persona_store_urn_from_tracker_id_co (TrfPersonaStoreUrnFromTrackerIdData* _data_) {
	static const char query[] = "SELECT fn:concat('<', tracker:uri(%s), '>') " "WHERE {}";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->tracker_id;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = g_strdup_printf (query, _data_->_tmp0_);
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_state_ = 1;
	_trf_persona_store_single_value_query (_data_->self, _data_->_tmp2_, _trf_persona_store_urn_from_tracker_id_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _trf_persona_store_single_value_query_finish (_data_->self, _data_->_res_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->_tmp3_;
	_g_free0 (_data_->_tmp2_);
	_data_->result = _data_->_tmp4_;
	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;
	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 _trf_persona_store_set_nickname_data_free (gpointer _data) {
	TrfPersonaStoreSetNicknameData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_free0 (_data_->nickname);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetNicknameData, _data_);
}


void _trf_persona_store_set_nickname (TrfPersonaStore* self, TrfPersona* persona, const gchar* nickname, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetNicknameData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	TrfPersona* _tmp1_ = NULL;
	TrfPersona* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetNicknameData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_nickname);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_nickname_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = nickname;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (_data_->nickname);
	_data_->nickname = _tmp4_;
	_trf_persona_store_set_nickname_co (_data_);
}


void _trf_persona_store_set_nickname_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetNicknameData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_nickname_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetNicknameData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_nickname_co (_data_);
}


static gboolean _trf_persona_store_set_nickname_co (TrfPersonaStoreSetNicknameData* _data_) {
	static const char query_t[] = "DELETE { " " ?p " TRF_ONTOLOGY_DEFS_NCO_NICKNAME " ?n  " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " ; " TRF_ONTOLOGY_DEFS_NCO_NICKNAME " ?n . " " FILTER(tracker:id(?p) = %s) " "} " "INSERT { " " ?p " TRF_ONTOLOGY_DEFS_NCO_NICKNAME " '%s' " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " . " "FILTER (tracker:id(?p) = %s) " "} ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (_data_->_tmp0_);
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->nickname;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->persona;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = trf_persona_get_tracker_id (_data_->_tmp4_);
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = g_strdup_printf (query_t, _data_->_tmp2_, _data_->_tmp3_, _data_->_tmp6_);
	_data_->query = _data_->_tmp7_;
	_data_->_state_ = 1;
	_trf_persona_store_tracker_update (_data_->self, _data_->query, "change_nickname", _trf_persona_store_set_nickname_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->query);
	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 _trf_persona_store_set_local_ids_data_free (gpointer _data) {
	TrfPersonaStoreSetLocalIdsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->local_ids);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetLocalIdsData, _data_);
}


void _trf_persona_store_set_local_ids (TrfPersonaStore* self, TrfPersona* persona, GeeSet* local_ids, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetLocalIdsData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	TrfPersona* _tmp1_ = NULL;
	TrfPersona* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetLocalIdsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_local_ids);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_local_ids_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = local_ids;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->local_ids);
	_data_->local_ids = _tmp4_;
	_trf_persona_store_set_local_ids_co (_data_);
}


void _trf_persona_store_set_local_ids_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetLocalIdsData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_local_ids_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetLocalIdsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_local_ids_co (_data_);
}


static gboolean _trf_persona_store_set_local_ids_co (TrfPersonaStoreSetLocalIdsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->local_ids;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_store_serialize_local_ids (_data_->_tmp0_);
	_data_->ids = _data_->_tmp1_;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->persona;
	_data_->_state_ = 1;
	_trf_persona_store_set_tracker_property (_data_->self, _data_->_tmp2_, TRF_PERSONA_STORE__LOCAL_ID_PROPERTY_NAME, _data_->ids, "_set_local_ids", _trf_persona_store_set_local_ids_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_set_tracker_property_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->ids);
	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 _trf_persona_store_set_web_service_addrs_data_free (gpointer _data) {
	TrfPersonaStoreSetWebServiceAddrsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->ws_obj);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetWebServiceAddrsData, _data_);
}


void _trf_persona_store_set_web_service_addrs (TrfPersonaStore* self, TrfPersona* persona, GeeMultiMap* ws_obj, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetWebServiceAddrsData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	TrfPersona* _tmp1_ = NULL;
	TrfPersona* _tmp2_ = NULL;
	GeeMultiMap* _tmp3_ = NULL;
	GeeMultiMap* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetWebServiceAddrsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_web_service_addrs);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_web_service_addrs_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = ws_obj;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->ws_obj);
	_data_->ws_obj = _tmp4_;
	_trf_persona_store_set_web_service_addrs_co (_data_);
}


void _trf_persona_store_set_web_service_addrs_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetWebServiceAddrsData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_web_service_addrs_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetWebServiceAddrsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_web_service_addrs_co (_data_);
}


static gboolean _trf_persona_store_set_web_service_addrs_co (TrfPersonaStoreSetWebServiceAddrsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->ws_obj;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_store_serialize_web_services (_data_->_tmp0_);
	_data_->ws_addrs = _data_->_tmp1_;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->persona;
	_data_->_state_ = 1;
	_trf_persona_store_set_tracker_property (_data_->self, _data_->_tmp2_, TRF_PERSONA_STORE__WSD_PROPERTY_NAME, _data_->ws_addrs, "_set_web_service_addrs", _trf_persona_store_set_web_service_addrs_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_set_tracker_property_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->ws_addrs);
	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 _trf_persona_store_set_tracker_property_data_free (gpointer _data) {
	TrfPersonaStoreSetTrackerPropertyData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_free0 (_data_->prop_name);
	_g_free0 (_data_->prop_value);
	_g_free0 (_data_->callers_name);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetTrackerPropertyData, _data_);
}


static void _trf_persona_store_set_tracker_property (TrfPersonaStore* self, TrfPersona* persona, const gchar* prop_name, const gchar* prop_value, const gchar* callers_name, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetTrackerPropertyData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	TrfPersona* _tmp1_ = NULL;
	TrfPersona* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetTrackerPropertyData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_tracker_property);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_tracker_property_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = prop_name;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (_data_->prop_name);
	_data_->prop_name = _tmp4_;
	_tmp5_ = prop_value;
	_tmp6_ = g_strdup (_tmp5_);
	_g_free0 (_data_->prop_value);
	_data_->prop_value = _tmp6_;
	_tmp7_ = callers_name;
	_tmp8_ = g_strdup (_tmp7_);
	_g_free0 (_data_->callers_name);
	_data_->callers_name = _tmp8_;
	_trf_persona_store_set_tracker_property_co (_data_);
}


static void _trf_persona_store_set_tracker_property_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetTrackerPropertyData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_tracker_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetTrackerPropertyData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_tracker_property_co (_data_);
}


static gboolean _trf_persona_store_set_tracker_property_co (TrfPersonaStoreSetTrackerPropertyData* _data_) {
	static const char query_t[] = "DELETE " " { ?p " TRF_ONTOLOGY_DEFS_NAO_HAS_PROPERTY " ?prop } " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " ; " TRF_ONTOLOGY_DEFS_NAO_HAS_PROPERTY " ?prop . " " ?prop " TRF_ONTOLOGY_DEFS_NAO_PROPERTY_NAME " ?prop_name . " " FILTER (tracker:id(?p) = %s && ?name = '%s' ) } " "INSERT { " " _:prop a " TRF_ONTOLOGY_DEFS_NAO_PROPERTY " ; " TRF_ONTOLOGY_DEFS_NAO_PROPERTY_NAME " '%s' ; " TRF_ONTOLOGY_DEFS_NAO_PROPERTY_VALUE " '%s' . " " ?p " TRF_ONTOLOGY_DEFS_NAO_HAS_PROPERTY " _:prop " "} " "WHERE { " " ?p a nco:PersonContact . " "FILTER (tracker:id(?p) = %s) } ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (_data_->_tmp0_);
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->prop_name;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->prop_name;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->prop_value;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = _data_->persona;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = trf_persona_get_tracker_id (_data_->_tmp6_);
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = g_strdup_printf (query_t, _data_->_tmp2_, _data_->_tmp3_, _data_->_tmp4_, _data_->_tmp5_, _data_->_tmp8_);
	_data_->query = _data_->_tmp9_;
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = _data_->callers_name;
	_data_->_state_ = 1;
	_trf_persona_store_tracker_update (_data_->self, _data_->query, _data_->_tmp10_, _trf_persona_store_set_tracker_property_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->query);
	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 _trf_persona_store_set_is_favourite_data_free (gpointer _data) {
	TrfPersonaStoreSetIsFavouriteData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetIsFavouriteData, _data_);
}


void _trf_persona_store_set_is_favourite (TrfPersonaStore* self, FolksPersona* persona, gboolean is_favourite, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetIsFavouriteData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	_data_ = g_slice_new0 (TrfPersonaStoreSetIsFavouriteData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_is_favourite);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_is_favourite_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = is_favourite;
	_data_->is_favourite = _tmp3_;
	_trf_persona_store_set_is_favourite_co (_data_);
}


void _trf_persona_store_set_is_favourite_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetIsFavouriteData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_is_favourite_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetIsFavouriteData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_is_favourite_co (_data_);
}


static gboolean _trf_persona_store_set_is_favourite_co (TrfPersonaStoreSetIsFavouriteData* _data_) {
	static const char ins_q[] = "INSERT { " " ?p " TRF_ONTOLOGY_DEFS_NAO_TAG " " TRF_ONTOLOGY_DEFS_NAO_FAVORITE "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " FILTER (tracker:id(?p) = %s) " "} ";
	static const char del_q[] = "DELETE { " " ?p " TRF_ONTOLOGY_DEFS_NAO_TAG " " TRF_ONTOLOGY_DEFS_NAO_FAVORITE " " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " FILTER (tracker:id(?p) = %s) " "} ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = FALSE;
	_data_->_tmp0_ = _data_->is_favourite;
	if (_data_->_tmp0_) {
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = _data_->persona;
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp1_, TRF_TYPE_PERSONA, TrfPersona));
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = g_strdup_printf (ins_q, _data_->_tmp3_);
		_g_free0 (_data_->query);
		_data_->query = _data_->_tmp4_;
	} else {
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->persona;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp5_, TRF_TYPE_PERSONA, TrfPersona));
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = g_strdup_printf (del_q, _data_->_tmp7_);
		_g_free0 (_data_->query);
		_data_->query = _data_->_tmp8_;
	}
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = _data_->query;
	_data_->_state_ = 1;
	_trf_persona_store_tracker_update (_data_->self, _data_->_tmp9_, "change_is_favourite", _trf_persona_store_set_is_favourite_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->query);
	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 _trf_persona_store_set_emails_data_free (gpointer _data) {
	TrfPersonaStoreSetEmailsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->emails);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetEmailsData, _data_);
}


void _trf_persona_store_set_emails (TrfPersonaStore* self, FolksPersona* persona, GeeSet* emails, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetEmailsData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetEmailsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_emails);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_emails_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = emails;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->emails);
	_data_->emails = _tmp4_;
	_trf_persona_store_set_emails_co (_data_);
}


void _trf_persona_store_set_emails_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetEmailsData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_emails_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetEmailsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_emails_co (_data_);
}


static gboolean _trf_persona_store_set_emails_co (TrfPersonaStoreSetEmailsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->emails;
	_data_->_state_ = 1;
	_trf_persona_store_set_unique_attrib_set (_data_->self, _data_->_tmp0_, _data_->_tmp1_, TRF_ATTRIB_EMAILS, _trf_persona_store_set_emails_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_set_unique_attrib_set_finish (_data_->self, _data_->_res_);
	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 _trf_persona_store_set_phones_data_free (gpointer _data) {
	TrfPersonaStoreSetPhonesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->phone_numbers);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetPhonesData, _data_);
}


void _trf_persona_store_set_phones (TrfPersonaStore* self, FolksPersona* persona, GeeSet* phone_numbers, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetPhonesData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetPhonesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_phones);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_phones_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = phone_numbers;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->phone_numbers);
	_data_->phone_numbers = _tmp4_;
	_trf_persona_store_set_phones_co (_data_);
}


void _trf_persona_store_set_phones_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetPhonesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_phones_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetPhonesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_phones_co (_data_);
}


static gboolean _trf_persona_store_set_phones_co (TrfPersonaStoreSetPhonesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->phone_numbers;
	_data_->_state_ = 1;
	_trf_persona_store_set_unique_attrib_set (_data_->self, _data_->_tmp0_, _data_->_tmp1_, TRF_ATTRIB_PHONES, _trf_persona_store_set_phones_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_set_unique_attrib_set_finish (_data_->self, _data_->_res_);
	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 _trf_persona_store_set_unique_attrib_set_data_free (gpointer _data) {
	TrfPersonaStoreSetUniqueAttribSetData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->properties);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetUniqueAttribSetData, _data_);
}


void _trf_persona_store_set_unique_attrib_set (TrfPersonaStore* self, FolksPersona* persona, GeeSet* properties, TrfAttrib attrib, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetUniqueAttribSetData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	TrfAttrib _tmp5_ = 0;
	_data_ = g_slice_new0 (TrfPersonaStoreSetUniqueAttribSetData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_unique_attrib_set);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_unique_attrib_set_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = properties;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->properties);
	_data_->properties = _tmp4_;
	_tmp5_ = attrib;
	_data_->attrib = _tmp5_;
	_trf_persona_store_set_unique_attrib_set_co (_data_);
}


void _trf_persona_store_set_unique_attrib_set_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetUniqueAttribSetData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_unique_attrib_set_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetUniqueAttribSetData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_unique_attrib_set_co (_data_);
}


static gboolean _trf_persona_store_set_unique_attrib_set_co (TrfPersonaStoreSetUniqueAttribSetData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->query_name = NULL;
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRF_TYPE_PERSONA, TrfPersona));
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->p_id = _data_->_tmp3_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = tracker_sparql_builder_new_update ();
	_data_->builder = _data_->_tmp4_;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->builder;
	tracker_sparql_builder_insert_open (_data_->_tmp5_, NULL);
	_data_->_tmp6_ = 0;
	_data_->_tmp6_ = _data_->attrib;
	switch (_data_->_tmp6_) {
		case TRF_ATTRIB_PHONES:
		{
			_data_->_tmp7_ = NULL;
			_data_->_tmp7_ = g_strdup ("_set_phones");
			_g_free0 (_data_->query_name);
			_data_->query_name = _data_->_tmp7_;
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = _data_->persona;
			_data_->_state_ = 1;
			_trf_persona_store_remove_attributes_from_persona (_data_->self, _data_->_tmp8_, _REMOVE_PHONES, _trf_persona_store_set_unique_attrib_set_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = _trf_persona_store_remove_attributes_from_persona_finish (_data_->self, _data_->_res_);
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_tmp9_;
			_g_free0 (_data_->_tmp10_);
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = _data_->builder;
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = _data_->properties;
			_data_->_state_ = 2;
			_trf_persona_store_build_update_query_set (_data_->self, _data_->_tmp11_, _data_->_tmp12_, "?contact", TRF_ATTRIB_PHONES, _trf_persona_store_set_unique_attrib_set_ready, _data_);
			return FALSE;
			_state_2:
			_trf_persona_store_build_update_query_set_finish (_data_->self, _data_->_res_);
			break;
		}
		case TRF_ATTRIB_EMAILS:
		{
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = g_strdup ("_set_emailss");
			_g_free0 (_data_->query_name);
			_data_->query_name = _data_->_tmp13_;
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = _data_->persona;
			_data_->_state_ = 3;
			_trf_persona_store_remove_attributes_from_persona (_data_->self, _data_->_tmp14_, _REMOVE_EMAILS, _trf_persona_store_set_unique_attrib_set_ready, _data_);
			return FALSE;
			_state_3:
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = _trf_persona_store_remove_attributes_from_persona_finish (_data_->self, _data_->_res_);
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = _data_->_tmp15_;
			_g_free0 (_data_->_tmp16_);
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = _data_->builder;
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = _data_->properties;
			_data_->_state_ = 4;
			_trf_persona_store_build_update_query_set (_data_->self, _data_->_tmp17_, _data_->_tmp18_, "?contact", TRF_ATTRIB_EMAILS, _trf_persona_store_set_unique_attrib_set_ready, _data_);
			return FALSE;
			_state_4:
			_trf_persona_store_build_update_query_set_finish (_data_->self, _data_->_res_);
			break;
		}
		default:
		break;
	}
	_data_->_tmp19_ = NULL;
	_data_->_tmp19_ = _data_->builder;
	tracker_sparql_builder_insert_close (_data_->_tmp19_);
	_data_->_tmp20_ = NULL;
	_data_->_tmp20_ = _data_->builder;
	tracker_sparql_builder_where_open (_data_->_tmp20_);
	_data_->_tmp21_ = NULL;
	_data_->_tmp21_ = _data_->builder;
	tracker_sparql_builder_subject (_data_->_tmp21_, "?contact");
	_data_->_tmp22_ = NULL;
	_data_->_tmp22_ = _data_->builder;
	tracker_sparql_builder_predicate (_data_->_tmp22_, "a");
	_data_->_tmp23_ = NULL;
	_data_->_tmp23_ = _data_->builder;
	tracker_sparql_builder_object (_data_->_tmp23_, TRF_ONTOLOGY_DEFS_NCO_PERSON);
	_data_->_tmp24_ = NULL;
	_data_->_tmp24_ = _data_->p_id;
	_data_->_tmp25_ = NULL;
	_data_->_tmp25_ = g_strdup_printf (" FILTER(tracker:id(?contact) = %s) ", _data_->_tmp24_);
	_data_->filter = _data_->_tmp25_;
	_data_->_tmp26_ = NULL;
	_data_->_tmp26_ = _data_->builder;
	tracker_sparql_builder_append (_data_->_tmp26_, _data_->filter);
	_data_->_tmp27_ = NULL;
	_data_->_tmp27_ = _data_->builder;
	tracker_sparql_builder_where_close (_data_->_tmp27_);
	_data_->_tmp28_ = NULL;
	_data_->_tmp28_ = _data_->builder;
	_data_->_tmp29_ = NULL;
	_data_->_tmp29_ = tracker_sparql_builder_get_result (_data_->_tmp28_);
	_data_->_tmp30_ = NULL;
	_data_->_tmp30_ = _data_->_tmp29_;
	_data_->_tmp31_ = NULL;
	_data_->_tmp31_ = _data_->query_name;
	_data_->_state_ = 5;
	_trf_persona_store_tracker_update (_data_->self, _data_->_tmp30_, _data_->_tmp31_, _trf_persona_store_set_unique_attrib_set_ready, _data_);
	return FALSE;
	_state_5:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->filter);
	_g_object_unref0 (_data_->builder);
	_g_free0 (_data_->p_id);
	_g_free0 (_data_->query_name);
	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 _trf_persona_store_set_urls_data_free (gpointer _data) {
	TrfPersonaStoreSetUrlsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->urls);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetUrlsData, _data_);
}


void _trf_persona_store_set_urls (TrfPersonaStore* self, FolksPersona* persona, GeeSet* urls, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetUrlsData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetUrlsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_urls);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_urls_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = urls;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->urls);
	_data_->urls = _tmp4_;
	_trf_persona_store_set_urls_co (_data_);
}


void _trf_persona_store_set_urls_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetUrlsData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_urls_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetUrlsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_urls_co (_data_);
}


static gboolean _trf_persona_store_set_urls_co (TrfPersonaStoreSetUrlsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->urls;
	_data_->_state_ = 1;
	_trf_persona_store_set_attrib_set (_data_->self, _data_->_tmp0_, _data_->_tmp1_, TRF_ATTRIB_URLS, _trf_persona_store_set_urls_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_set_attrib_set_finish (_data_->self, _data_->_res_);
	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 _trf_persona_store_set_im_addresses_data_free (gpointer _data) {
	TrfPersonaStoreSetImAddressesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->im_addresses);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetImAddressesData, _data_);
}


void _trf_persona_store_set_im_addresses (TrfPersonaStore* self, FolksPersona* persona, GeeMultiMap* im_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetImAddressesData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	GeeMultiMap* _tmp3_ = NULL;
	GeeMultiMap* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetImAddressesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_im_addresses);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_im_addresses_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = im_addresses;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->im_addresses);
	_data_->im_addresses = _tmp4_;
	_trf_persona_store_set_im_addresses_co (_data_);
}


void _trf_persona_store_set_im_addresses_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetImAddressesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_im_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetImAddressesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_im_addresses_co (_data_);
}


static gboolean _trf_persona_store_set_im_addresses_co (TrfPersonaStoreSetImAddressesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = folks_small_set_new (FOLKS_TYPE_IM_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
	_data_->ims = _data_->_tmp0_;
	{
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = _data_->im_addresses;
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = gee_multi_map_get_keys (_data_->_tmp1_);
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _data_->_tmp2_;
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp3_);
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->_tmp4_;
		_g_object_unref0 (_data_->_tmp3_);
		_data_->_proto_it = _data_->_tmp5_;
		while (TRUE) {
			_data_->_tmp6_ = NULL;
			_data_->_tmp6_ = _data_->_proto_it;
			_data_->_tmp7_ = FALSE;
			_data_->_tmp7_ = gee_iterator_next (_data_->_tmp6_);
			if (!_data_->_tmp7_) {
				break;
			}
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = _data_->_proto_it;
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = gee_iterator_get (_data_->_tmp8_);
			_data_->proto = (gchar*) _data_->_tmp9_;
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->im_addresses;
			_data_->_tmp11_ = NULL;
			_data_->_tmp11_ = _data_->proto;
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = gee_multi_map_get (_data_->_tmp10_, _data_->_tmp11_);
			_data_->addrs = _data_->_tmp12_;
			{
				_data_->_tmp13_ = NULL;
				_data_->_tmp13_ = _data_->addrs;
				_data_->_tmp14_ = NULL;
				_data_->_tmp14_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp13_);
				_data_->_im_fd_it = _data_->_tmp14_;
				while (TRUE) {
					_data_->_tmp15_ = NULL;
					_data_->_tmp15_ = _data_->_im_fd_it;
					_data_->_tmp16_ = FALSE;
					_data_->_tmp16_ = gee_iterator_next (_data_->_tmp15_);
					if (!_data_->_tmp16_) {
						break;
					}
					_data_->_tmp17_ = NULL;
					_data_->_tmp17_ = _data_->_im_fd_it;
					_data_->_tmp18_ = NULL;
					_data_->_tmp18_ = gee_iterator_get (_data_->_tmp17_);
					_data_->im_fd = (FolksImFieldDetails*) _data_->_tmp18_;
					_data_->_tmp19_ = NULL;
					_data_->_tmp19_ = _data_->im_fd;
					_data_->_tmp20_ = NULL;
					_data_->_tmp20_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp19_);
					_data_->_tmp21_ = NULL;
					_data_->_tmp21_ = _data_->_tmp20_;
					_data_->_tmp22_ = NULL;
					_data_->_tmp22_ = folks_im_field_details_new ((const gchar*) _data_->_tmp21_, NULL);
					_data_->new_im_fd = _data_->_tmp22_;
					_data_->_tmp23_ = NULL;
					_data_->_tmp23_ = _data_->new_im_fd;
					_data_->_tmp24_ = NULL;
					_data_->_tmp24_ = _data_->proto;
					folks_abstract_field_details_set_parameter ((FolksAbstractFieldDetails*) _data_->_tmp23_, "proto", _data_->_tmp24_);
					_data_->_tmp25_ = NULL;
					_data_->_tmp25_ = _data_->ims;
					_data_->_tmp26_ = NULL;
					_data_->_tmp26_ = _data_->new_im_fd;
					gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp25_, _data_->_tmp26_);
					_g_object_unref0 (_data_->new_im_fd);
					_g_object_unref0 (_data_->im_fd);
				}
				_g_object_unref0 (_data_->_im_fd_it);
			}
			_g_object_unref0 (_data_->addrs);
			_g_free0 (_data_->proto);
		}
		_g_object_unref0 (_data_->_proto_it);
	}
	_data_->_tmp27_ = NULL;
	_data_->_tmp27_ = _data_->persona;
	_data_->_tmp28_ = NULL;
	_data_->_tmp28_ = _data_->ims;
	_data_->_state_ = 1;
	_trf_persona_store_set_attrib_set (_data_->self, _data_->_tmp27_, (GeeSet*) _data_->_tmp28_, TRF_ATTRIB_IM_ADDRESSES, _trf_persona_store_set_im_addresses_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_set_attrib_set_finish (_data_->self, _data_->_res_);
	_g_object_unref0 (_data_->ims);
	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 _trf_persona_store_set_postal_addresses_data_free (gpointer _data) {
	TrfPersonaStoreSetPostalAddressesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->postal_addresses);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetPostalAddressesData, _data_);
}


void _trf_persona_store_set_postal_addresses (TrfPersonaStore* self, FolksPersona* persona, GeeSet* postal_addresses, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetPostalAddressesData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetPostalAddressesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_postal_addresses);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_postal_addresses_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = postal_addresses;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->postal_addresses);
	_data_->postal_addresses = _tmp4_;
	_trf_persona_store_set_postal_addresses_co (_data_);
}


void _trf_persona_store_set_postal_addresses_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetPostalAddressesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_postal_addresses_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetPostalAddressesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_postal_addresses_co (_data_);
}


static gboolean _trf_persona_store_set_postal_addresses_co (TrfPersonaStoreSetPostalAddressesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->postal_addresses;
	_data_->_state_ = 1;
	_trf_persona_store_set_attrib_set (_data_->self, _data_->_tmp0_, _data_->_tmp1_, TRF_ATTRIB_POSTAL_ADDRESSES, _trf_persona_store_set_postal_addresses_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_set_attrib_set_finish (_data_->self, _data_->_res_);
	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 _trf_persona_store_set_roles_data_free (gpointer _data) {
	TrfPersonaStoreSetRolesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->roles);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetRolesData, _data_);
}


void _trf_persona_store_set_roles (TrfPersonaStore* self, FolksPersona* persona, GeeSet* roles, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetRolesData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetRolesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_roles);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_roles_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = roles;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->roles);
	_data_->roles = _tmp4_;
	_trf_persona_store_set_roles_co (_data_);
}


void _trf_persona_store_set_roles_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetRolesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_roles_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetRolesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_roles_co (_data_);
}


static gboolean _trf_persona_store_set_roles_co (TrfPersonaStoreSetRolesData* _data_) {
	static const char del_t[] = "DELETE { " " ?p " TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION " ?a " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON "; " " " TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION " ?a . " " OPTIONAL { ?a " TRF_ONTOLOGY_DEFS_NCO_ORG " ?o } . " " OPTIONAL { ?a " TRF_ONTOLOGY_DEFS_NCO_ROLE " ?r } . " " OPTIONAL { ?a " TRF_ONTOLOGY_DEFS_NCO_TITLE " ?t } . " " FILTER(tracker:id(?p) = %s) " "} ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRF_TYPE_PERSONA, TrfPersona));
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->p_id = _data_->_tmp3_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->p_id;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = g_strdup_printf (del_t, _data_->_tmp4_);
	_data_->del_q = _data_->_tmp5_;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = tracker_sparql_builder_new_update ();
	_data_->builder = _data_->_tmp6_;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = _data_->builder;
	tracker_sparql_builder_insert_open (_data_->_tmp7_, NULL);
	_data_->i = 0;
	{
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->roles;
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp8_);
		_data_->_role_fd_it = _data_->_tmp9_;
		while (TRUE) {
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_role_fd_it;
			_data_->_tmp11_ = FALSE;
			_data_->_tmp11_ = gee_iterator_next (_data_->_tmp10_);
			if (!_data_->_tmp11_) {
				break;
			}
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = _data_->_role_fd_it;
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = gee_iterator_get (_data_->_tmp12_);
			_data_->role_fd = (FolksRoleFieldDetails*) _data_->_tmp13_;
			_data_->_tmp14_ = 0;
			_data_->_tmp14_ = _data_->i;
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = g_strdup_printf ("_:a%d", _data_->_tmp14_);
			_data_->affl = _data_->_tmp15_;
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = _data_->builder;
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = _data_->affl;
			tracker_sparql_builder_subject (_data_->_tmp16_, _data_->_tmp17_);
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = _data_->builder;
			tracker_sparql_builder_predicate (_data_->_tmp18_, "a");
			_data_->_tmp19_ = NULL;
			_data_->_tmp19_ = _data_->builder;
			tracker_sparql_builder_object (_data_->_tmp19_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION);
			_data_->_tmp20_ = NULL;
			_data_->_tmp20_ = _data_->builder;
			tracker_sparql_builder_predicate (_data_->_tmp20_, TRF_ONTOLOGY_DEFS_NCO_ROLE);
			_data_->_tmp21_ = NULL;
			_data_->_tmp21_ = _data_->builder;
			_data_->_tmp22_ = NULL;
			_data_->_tmp22_ = _data_->role_fd;
			_data_->_tmp23_ = NULL;
			_data_->_tmp23_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp22_);
			_data_->_tmp24_ = NULL;
			_data_->_tmp24_ = _data_->_tmp23_;
			_data_->_tmp25_ = NULL;
			_data_->_tmp25_ = folks_role_get_role ((FolksRole*) _data_->_tmp24_);
			_data_->_tmp26_ = NULL;
			_data_->_tmp26_ = _data_->_tmp25_;
			tracker_sparql_builder_object_string (_data_->_tmp21_, _data_->_tmp26_);
			_data_->_tmp27_ = NULL;
			_data_->_tmp27_ = _data_->builder;
			tracker_sparql_builder_predicate (_data_->_tmp27_, TRF_ONTOLOGY_DEFS_NCO_TITLE);
			_data_->_tmp28_ = NULL;
			_data_->_tmp28_ = _data_->builder;
			_data_->_tmp29_ = NULL;
			_data_->_tmp29_ = _data_->role_fd;
			_data_->_tmp30_ = NULL;
			_data_->_tmp30_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp29_);
			_data_->_tmp31_ = NULL;
			_data_->_tmp31_ = _data_->_tmp30_;
			_data_->_tmp32_ = NULL;
			_data_->_tmp32_ = folks_role_get_title ((FolksRole*) _data_->_tmp31_);
			_data_->_tmp33_ = NULL;
			_data_->_tmp33_ = _data_->_tmp32_;
			tracker_sparql_builder_object_string (_data_->_tmp28_, _data_->_tmp33_);
			_data_->_tmp34_ = NULL;
			_data_->_tmp34_ = _data_->builder;
			tracker_sparql_builder_predicate (_data_->_tmp34_, TRF_ONTOLOGY_DEFS_NCO_ORG);
			_data_->_tmp35_ = NULL;
			_data_->_tmp35_ = _data_->builder;
			_data_->_tmp36_ = NULL;
			_data_->_tmp36_ = _data_->role_fd;
			_data_->_tmp37_ = NULL;
			_data_->_tmp37_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp36_);
			_data_->_tmp38_ = NULL;
			_data_->_tmp38_ = _data_->_tmp37_;
			_data_->_tmp39_ = NULL;
			_data_->_tmp39_ = folks_role_get_organisation_name ((FolksRole*) _data_->_tmp38_);
			_data_->_tmp40_ = NULL;
			_data_->_tmp40_ = _data_->_tmp39_;
			tracker_sparql_builder_object_string (_data_->_tmp35_, _data_->_tmp40_);
			_data_->_tmp41_ = NULL;
			_data_->_tmp41_ = _data_->builder;
			tracker_sparql_builder_subject (_data_->_tmp41_, "?contact");
			_data_->_tmp42_ = NULL;
			_data_->_tmp42_ = _data_->builder;
			tracker_sparql_builder_predicate (_data_->_tmp42_, TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION);
			_data_->_tmp43_ = NULL;
			_data_->_tmp43_ = _data_->builder;
			_data_->_tmp44_ = NULL;
			_data_->_tmp44_ = _data_->affl;
			tracker_sparql_builder_object (_data_->_tmp43_, _data_->_tmp44_);
			_g_free0 (_data_->affl);
			_g_object_unref0 (_data_->role_fd);
		}
		_g_object_unref0 (_data_->_role_fd_it);
	}
	_data_->_tmp45_ = NULL;
	_data_->_tmp45_ = _data_->builder;
	tracker_sparql_builder_insert_close (_data_->_tmp45_);
	_data_->_tmp46_ = NULL;
	_data_->_tmp46_ = _data_->builder;
	tracker_sparql_builder_where_open (_data_->_tmp46_);
	_data_->_tmp47_ = NULL;
	_data_->_tmp47_ = _data_->builder;
	tracker_sparql_builder_subject (_data_->_tmp47_, "?contact");
	_data_->_tmp48_ = NULL;
	_data_->_tmp48_ = _data_->builder;
	tracker_sparql_builder_predicate (_data_->_tmp48_, "a");
	_data_->_tmp49_ = NULL;
	_data_->_tmp49_ = _data_->builder;
	tracker_sparql_builder_object (_data_->_tmp49_, TRF_ONTOLOGY_DEFS_NCO_PERSON);
	_data_->_tmp50_ = NULL;
	_data_->_tmp50_ = _data_->p_id;
	_data_->_tmp51_ = NULL;
	_data_->_tmp51_ = g_strdup_printf (" FILTER(tracker:id(?contact) = %s) ", _data_->_tmp50_);
	_data_->filter = _data_->_tmp51_;
	_data_->_tmp52_ = NULL;
	_data_->_tmp52_ = _data_->builder;
	tracker_sparql_builder_append (_data_->_tmp52_, _data_->filter);
	_data_->_tmp53_ = NULL;
	_data_->_tmp53_ = _data_->builder;
	tracker_sparql_builder_where_close (_data_->_tmp53_);
	_data_->_tmp54_ = NULL;
	_data_->_tmp54_ = _data_->del_q;
	_data_->_tmp55_ = NULL;
	_data_->_tmp55_ = _data_->builder;
	_data_->_tmp56_ = NULL;
	_data_->_tmp56_ = tracker_sparql_builder_get_result (_data_->_tmp55_);
	_data_->_tmp57_ = NULL;
	_data_->_tmp57_ = _data_->_tmp56_;
	_data_->_tmp58_ = NULL;
	_data_->_tmp58_ = g_strconcat (_data_->_tmp54_, _data_->_tmp57_, NULL);
	_data_->_tmp59_ = NULL;
	_data_->_tmp59_ = _data_->_tmp58_;
	_data_->_state_ = 1;
	_trf_persona_store_tracker_update (_data_->self, _data_->_tmp59_, "_set_roles", _trf_persona_store_set_roles_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->_tmp59_);
	_g_free0 (_data_->filter);
	_g_object_unref0 (_data_->builder);
	_g_free0 (_data_->del_q);
	_g_free0 (_data_->p_id);
	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 _trf_persona_store_set_notes_data_free (gpointer _data) {
	TrfPersonaStoreSetNotesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->notes);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetNotesData, _data_);
}


void _trf_persona_store_set_notes (TrfPersonaStore* self, FolksPersona* persona, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetNotesData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetNotesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_notes);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_notes_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = notes;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->notes);
	_data_->notes = _tmp4_;
	_trf_persona_store_set_notes_co (_data_);
}


void _trf_persona_store_set_notes_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetNotesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_notes_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetNotesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_notes_co (_data_);
}


static gboolean _trf_persona_store_set_notes_co (TrfPersonaStoreSetNotesData* _data_) {
	static const char del_t[] = "DELETE { " "?p " TRF_ONTOLOGY_DEFS_NCO_NOTE " ?n " "} " "WHERE {" " ?p a nco:PersonContact ; " TRF_ONTOLOGY_DEFS_NCO_NOTE " ?n . " " FILTER(tracker:id(?p) = %s)" "}";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRF_TYPE_PERSONA, TrfPersona));
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->p_id = _data_->_tmp3_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->p_id;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = g_strdup_printf (del_t, _data_->_tmp4_);
	_data_->del_q = _data_->_tmp5_;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = tracker_sparql_builder_new_update ();
	_data_->builder = _data_->_tmp6_;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = _data_->builder;
	tracker_sparql_builder_insert_open (_data_->_tmp7_, NULL);
	{
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->notes;
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp8_);
		_data_->_n_it = _data_->_tmp9_;
		while (TRUE) {
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_n_it;
			_data_->_tmp11_ = FALSE;
			_data_->_tmp11_ = gee_iterator_next (_data_->_tmp10_);
			if (!_data_->_tmp11_) {
				break;
			}
			_data_->_tmp12_ = NULL;
			_data_->_tmp12_ = _data_->_n_it;
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = gee_iterator_get (_data_->_tmp12_);
			_data_->n = (FolksNoteFieldDetails*) _data_->_tmp13_;
			_data_->_tmp14_ = NULL;
			_data_->_tmp14_ = _data_->builder;
			tracker_sparql_builder_subject (_data_->_tmp14_, "?contact");
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = _data_->builder;
			tracker_sparql_builder_predicate (_data_->_tmp15_, TRF_ONTOLOGY_DEFS_NCO_NOTE);
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = _data_->builder;
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = _data_->n;
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp17_);
			_data_->_tmp19_ = NULL;
			_data_->_tmp19_ = _data_->_tmp18_;
			tracker_sparql_builder_object_string (_data_->_tmp16_, (const gchar*) _data_->_tmp19_);
			_g_object_unref0 (_data_->n);
		}
		_g_object_unref0 (_data_->_n_it);
	}
	_data_->_tmp20_ = NULL;
	_data_->_tmp20_ = _data_->builder;
	tracker_sparql_builder_insert_close (_data_->_tmp20_);
	_data_->_tmp21_ = NULL;
	_data_->_tmp21_ = _data_->builder;
	tracker_sparql_builder_where_open (_data_->_tmp21_);
	_data_->_tmp22_ = NULL;
	_data_->_tmp22_ = _data_->builder;
	tracker_sparql_builder_subject (_data_->_tmp22_, "?contact");
	_data_->_tmp23_ = NULL;
	_data_->_tmp23_ = _data_->builder;
	tracker_sparql_builder_predicate (_data_->_tmp23_, "a");
	_data_->_tmp24_ = NULL;
	_data_->_tmp24_ = _data_->builder;
	tracker_sparql_builder_object (_data_->_tmp24_, TRF_ONTOLOGY_DEFS_NCO_PERSON);
	_data_->_tmp25_ = NULL;
	_data_->_tmp25_ = _data_->p_id;
	_data_->_tmp26_ = NULL;
	_data_->_tmp26_ = g_strdup_printf (" FILTER(tracker:id(?contact) = %s) ", _data_->_tmp25_);
	_data_->filter = _data_->_tmp26_;
	_data_->_tmp27_ = NULL;
	_data_->_tmp27_ = _data_->builder;
	tracker_sparql_builder_append (_data_->_tmp27_, _data_->filter);
	_data_->_tmp28_ = NULL;
	_data_->_tmp28_ = _data_->builder;
	tracker_sparql_builder_where_close (_data_->_tmp28_);
	_data_->_tmp29_ = NULL;
	_data_->_tmp29_ = _data_->del_q;
	_data_->_tmp30_ = NULL;
	_data_->_tmp30_ = _data_->builder;
	_data_->_tmp31_ = NULL;
	_data_->_tmp31_ = tracker_sparql_builder_get_result (_data_->_tmp30_);
	_data_->_tmp32_ = NULL;
	_data_->_tmp32_ = _data_->_tmp31_;
	_data_->_tmp33_ = NULL;
	_data_->_tmp33_ = g_strconcat (_data_->_tmp29_, _data_->_tmp32_, NULL);
	_data_->_tmp34_ = NULL;
	_data_->_tmp34_ = _data_->_tmp33_;
	_data_->_state_ = 1;
	_trf_persona_store_tracker_update (_data_->self, _data_->_tmp34_, "_set_notes", _trf_persona_store_set_notes_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->_tmp34_);
	_g_free0 (_data_->filter);
	_g_object_unref0 (_data_->builder);
	_g_free0 (_data_->del_q);
	_g_free0 (_data_->p_id);
	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 _trf_persona_store_set_birthday_data_free (gpointer _data) {
	TrfPersonaStoreSetBirthdayData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_date_time_unref0 (_data_->bday);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetBirthdayData, _data_);
}


void _trf_persona_store_set_birthday (TrfPersonaStore* self, FolksPersona* persona, GDateTime* bday, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetBirthdayData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetBirthdayData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_birthday);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_birthday_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_g_date_time_unref0 (_data_->bday);
	_data_->bday = bday;
	_trf_persona_store_set_birthday_co (_data_);
}


void _trf_persona_store_set_birthday_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetBirthdayData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_birthday_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetBirthdayData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_birthday_co (_data_);
}


static gboolean _trf_persona_store_set_birthday_co (TrfPersonaStoreSetBirthdayData* _data_) {
	static const char q_t[] = "DELETE { " " ?p " TRF_ONTOLOGY_DEFS_NCO_BIRTHDAY " ?b " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON "; " TRF_ONTOLOGY_DEFS_NCO_BIRTHDAY " ?b . " " FILTER (tracker:id(?p) = %s ) " "} " "INSERT { " " ?p " TRF_ONTOLOGY_DEFS_NCO_BIRTHDAY " '%s' " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " . " " FILTER (tracker:id(?p) = %s) " "} ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRF_TYPE_PERSONA, TrfPersona));
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->p_id = _data_->_tmp3_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->bday;
	memset (&_data_->_tmp5_, 0, sizeof (GTimeVal));
	g_date_time_to_timeval (_data_->_tmp4_, &_data_->_tmp5_);
	_data_->tv = _data_->_tmp5_;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = g_time_val_to_iso8601 (&_data_->tv);
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = g_strdup_printf (q_t, _data_->p_id, _data_->_tmp7_, _data_->p_id);
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = _data_->_tmp8_;
	_g_free0 (_data_->_tmp7_);
	_data_->query = _data_->_tmp9_;
	_data_->_state_ = 1;
	_trf_persona_store_tracker_update (_data_->self, _data_->query, "_set_birthday", _trf_persona_store_set_birthday_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->query);
	_g_free0 (_data_->p_id);
	_g_date_time_unref0 (_data_->bday);
	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 _trf_persona_store_set_gender_data_free (gpointer _data) {
	TrfPersonaStoreSetGenderData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetGenderData, _data_);
}


void _trf_persona_store_set_gender (TrfPersonaStore* self, FolksPersona* persona, FolksGender gender, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetGenderData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetGenderData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_gender);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_gender_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_data_->gender = gender;
	_trf_persona_store_set_gender_co (_data_);
}


void _trf_persona_store_set_gender_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetGenderData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_gender_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetGenderData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_gender_co (_data_);
}


static gboolean _trf_persona_store_set_gender_co (TrfPersonaStoreSetGenderData* _data_) {
	static const char del_t[] = "DELETE { " " ?p " TRF_ONTOLOGY_DEFS_NCO_GENDER " ?g " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " ; " TRF_ONTOLOGY_DEFS_NCO_GENDER " ?g . " " FILTER (tracker:id(?p) = %s) " "} ";
	static const char ins_t[] = "INSERT { " " ?p " TRF_ONTOLOGY_DEFS_NCO_GENDER " %s " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " . " " FILTER (tracker:id(?p) = %s) " "} ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRF_TYPE_PERSONA, TrfPersona));
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->p_id = _data_->_tmp3_;
	_data_->_tmp4_ = 0;
	_data_->_tmp4_ = _data_->gender;
	if (_data_->_tmp4_ == FOLKS_GENDER_UNSPECIFIED) {
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->p_id;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = g_strdup_printf (del_t, _data_->_tmp5_);
		_g_free0 (_data_->query);
		_data_->query = _data_->_tmp6_;
	} else {
		_data_->_tmp7_ = 0;
		_data_->_tmp7_ = _data_->gender;
		if (_data_->_tmp7_ == FOLKS_GENDER_MALE) {
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = g_strdup (TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#gender-male>");
			_g_free0 (_data_->gender_urn);
			_data_->gender_urn = _data_->_tmp8_;
		} else {
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = g_strdup (TRF_ONTOLOGY_DEFS_NCO_URL_PREFIX "nco#gender-female>");
			_g_free0 (_data_->gender_urn);
			_data_->gender_urn = _data_->_tmp9_;
		}
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = _data_->p_id;
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = g_strdup_printf (del_t, _data_->_tmp10_);
		_data_->_tmp12_ = NULL;
		_data_->_tmp12_ = _data_->_tmp11_;
		_data_->_tmp13_ = NULL;
		_data_->_tmp13_ = _data_->gender_urn;
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = _data_->p_id;
		_data_->_tmp15_ = NULL;
		_data_->_tmp15_ = g_strdup_printf (ins_t, _data_->_tmp13_, _data_->_tmp14_);
		_data_->_tmp16_ = NULL;
		_data_->_tmp16_ = _data_->_tmp15_;
		_data_->_tmp17_ = NULL;
		_data_->_tmp17_ = g_strconcat (_data_->_tmp12_, _data_->_tmp16_, NULL);
		_g_free0 (_data_->query);
		_data_->query = _data_->_tmp17_;
		_g_free0 (_data_->_tmp16_);
		_g_free0 (_data_->_tmp12_);
		_g_free0 (_data_->gender_urn);
	}
	_data_->_tmp18_ = NULL;
	_data_->_tmp18_ = _data_->query;
	_data_->_state_ = 1;
	_trf_persona_store_tracker_update (_data_->self, _data_->_tmp18_, "_set_gender", _trf_persona_store_set_gender_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->query);
	_g_free0 (_data_->p_id);
	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 _trf_persona_store_set_avatar_data_free (gpointer _data) {
	TrfPersonaStoreSetAvatarData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->avatar);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetAvatarData, _data_);
}


void _trf_persona_store_set_avatar (TrfPersonaStore* self, FolksPersona* persona, GLoadableIcon* avatar, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetAvatarData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	GLoadableIcon* _tmp3_ = NULL;
	GLoadableIcon* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetAvatarData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_avatar);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_avatar_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = avatar;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->avatar);
	_data_->avatar = _tmp4_;
	_trf_persona_store_set_avatar_co (_data_);
}


void _trf_persona_store_set_avatar_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetAvatarData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_avatar_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetAvatarData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_avatar_co (_data_);
}


static gboolean _trf_persona_store_set_avatar_co (TrfPersonaStoreSetAvatarData* _data_) {
	static const char query_d[] = "DELETE {" " ?c " TRF_ONTOLOGY_DEFS_NCO_PHOTO " ?p " " } " "WHERE { " " ?c a " TRF_ONTOLOGY_DEFS_NCO_PERSON " ; " TRF_ONTOLOGY_DEFS_NCO_PHOTO " ?p . " " FILTER(tracker:id(?c) = %s) " "} ";
	static const char query_i[] = "INSERT { " " _:i a " TRF_ONTOLOGY_DEFS_NFO_IMAGE ", " TRF_ONTOLOGY_DEFS_NIE_DATAOBJECT " ; " TRF_ONTOLOGY_DEFS_NIE_URL " '%s' . " " ?c " TRF_ONTOLOGY_DEFS_NCO_PHOTO " _:i " "} " "WHERE { " " ?c a nco:PersonContact . " " FILTER(tracker:id(?c) = %s) " "}";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRF_TYPE_PERSONA, TrfPersona));
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->p_id = _data_->_tmp3_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->p_id;
	_data_->_tmp5_ = 0;
	_data_->_tmp5_ = atoi (_data_->_tmp4_);
	_data_->_state_ = 1;
	_trf_persona_store_get_property (_data_->self, _data_->_tmp5_, TRF_ONTOLOGY_DEFS_NCO_PHOTO, TRF_ONTOLOGY_DEFS_NCO_PERSON, _trf_persona_store_set_avatar_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = _trf_persona_store_get_property_finish (_data_->self, _data_->_res_);
	_data_->image_urn = _data_->_tmp6_;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = _data_->image_urn;
	if (g_strcmp0 (_data_->_tmp7_, "") != 0) {
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->image_urn;
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = g_strdup_printf ("<%s>", _data_->_tmp8_);
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = _data_->_tmp9_;
		_trf_persona_store_delete_resource (_data_->self, _data_->_tmp10_, TRUE, NULL, NULL);
		_g_free0 (_data_->_tmp10_);
	}
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = _data_->p_id;
	_data_->_tmp12_ = NULL;
	_data_->_tmp12_ = g_strdup_printf (query_d, _data_->_tmp11_);
	_data_->query = _data_->_tmp12_;
	_data_->_tmp13_ = NULL;
	_data_->_tmp13_ = folks_avatar_cache_dup ();
	_data_->cache = _data_->_tmp13_;
	_data_->_tmp14_ = NULL;
	_data_->_tmp14_ = _data_->avatar;
	if (_data_->_tmp14_ != NULL) {
		{
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = _data_->cache;
			_data_->_tmp16_ = NULL;
			_data_->_tmp16_ = _data_->persona;
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = folks_persona_get_uid (_data_->_tmp16_);
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = _data_->_tmp17_;
			_data_->_tmp19_ = NULL;
			_data_->_tmp19_ = _data_->avatar;
			_data_->_state_ = 2;
			folks_avatar_cache_store_avatar (_data_->_tmp15_, _data_->_tmp18_, _data_->_tmp19_, _trf_persona_store_set_avatar_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp20_ = NULL;
			_data_->_tmp20_ = folks_avatar_cache_store_avatar_finish (_data_->_tmp15_, _data_->_res_, &_data_->_inner_error_);
			_data_->uri = _data_->_tmp20_;
			if (_data_->_inner_error_ != NULL) {
				goto __catch8_g_error;
			}
			_data_->_tmp21_ = NULL;
			_data_->_tmp21_ = _data_->query;
			_data_->_tmp22_ = NULL;
			_data_->_tmp22_ = _data_->uri;
			_data_->_tmp23_ = NULL;
			_data_->_tmp23_ = _data_->p_id;
			_data_->_tmp24_ = NULL;
			_data_->_tmp24_ = g_strdup_printf (query_i, _data_->_tmp22_, _data_->_tmp23_);
			_data_->_tmp25_ = NULL;
			_data_->_tmp25_ = _data_->_tmp24_;
			_data_->_tmp26_ = NULL;
			_data_->_tmp26_ = g_strconcat (_data_->_tmp21_, _data_->_tmp25_, NULL);
			_g_free0 (_data_->query);
			_data_->query = _data_->_tmp26_;
			_g_free0 (_data_->_tmp25_);
			_g_free0 (_data_->uri);
		}
		goto __finally8;
		__catch8_g_error:
		{
			_data_->e1 = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_data_->_tmp27_ = NULL;
			_data_->_tmp27_ = _data_->persona;
			_data_->_tmp28_ = NULL;
			_data_->_tmp28_ = folks_persona_get_uid (_data_->_tmp27_);
			_data_->_tmp29_ = NULL;
			_data_->_tmp29_ = _data_->_tmp28_;
			_data_->_tmp30_ = NULL;
			_data_->_tmp30_ = _data_->e1;
			_data_->_tmp31_ = NULL;
			_data_->_tmp31_ = _data_->_tmp30_->message;
			g_warning ("trf-persona-store.vala:2373: Couldn't cache avatar for Trf.Persona '%s" \
"': %s", _data_->_tmp29_, _data_->_tmp31_);
			_g_error_free0 (_data_->e1);
		}
		__finally8:
		if (_data_->_inner_error_ != NULL) {
			_g_object_unref0 (_data_->cache);
			_g_free0 (_data_->query);
			_g_free0 (_data_->image_urn);
			_g_free0 (_data_->p_id);
			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;
		}
	} else {
		{
			_data_->_tmp32_ = NULL;
			_data_->_tmp32_ = _data_->cache;
			_data_->_tmp33_ = NULL;
			_data_->_tmp33_ = _data_->persona;
			_data_->_tmp34_ = NULL;
			_data_->_tmp34_ = folks_persona_get_uid (_data_->_tmp33_);
			_data_->_tmp35_ = NULL;
			_data_->_tmp35_ = _data_->_tmp34_;
			_data_->_state_ = 3;
			folks_avatar_cache_remove_avatar (_data_->_tmp32_, _data_->_tmp35_, _trf_persona_store_set_avatar_ready, _data_);
			return FALSE;
			_state_3:
			folks_avatar_cache_remove_avatar_finish (_data_->_tmp32_, _data_->_res_, &_data_->_inner_error_);
			if (_data_->_inner_error_ != NULL) {
				goto __catch9_g_error;
			}
		}
		goto __finally9;
		__catch9_g_error:
		{
			_data_->e2 = _data_->_inner_error_;
			_data_->_inner_error_ = NULL;
			_g_error_free0 (_data_->e2);
		}
		__finally9:
		if (_data_->_inner_error_ != NULL) {
			_g_object_unref0 (_data_->cache);
			_g_free0 (_data_->query);
			_g_free0 (_data_->image_urn);
			_g_free0 (_data_->p_id);
			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_->_tmp36_ = NULL;
	_data_->_tmp36_ = _data_->query;
	_data_->_state_ = 4;
	_trf_persona_store_tracker_update (_data_->self, _data_->_tmp36_, "_set_avatar", _trf_persona_store_set_avatar_ready, _data_);
	return FALSE;
	_state_4:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_object_unref0 (_data_->cache);
	_g_free0 (_data_->query);
	_g_free0 (_data_->image_urn);
	_g_free0 (_data_->p_id);
	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 _trf_persona_store_set_structured_name_data_free (gpointer _data) {
	TrfPersonaStoreSetStructuredNameData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->sname);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetStructuredNameData, _data_);
}


void _trf_persona_store_set_structured_name (TrfPersonaStore* self, FolksPersona* persona, FolksStructuredName* sname, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetStructuredNameData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	FolksStructuredName* _tmp3_ = NULL;
	FolksStructuredName* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetStructuredNameData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_structured_name);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_structured_name_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = sname;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->sname);
	_data_->sname = _tmp4_;
	_trf_persona_store_set_structured_name_co (_data_);
}


void _trf_persona_store_set_structured_name_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetStructuredNameData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_structured_name_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetStructuredNameData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_structured_name_co (_data_);
}


static gboolean _trf_persona_store_set_structured_name_co (TrfPersonaStoreSetStructuredNameData* _data_) {
	static const char query_d[] = "DELETE { " " ?p " TRF_ONTOLOGY_DEFS_NCO_FAMILY " ?family . " " ?p " TRF_ONTOLOGY_DEFS_NCO_GIVEN " ?given . " " ?p " TRF_ONTOLOGY_DEFS_NCO_ADDITIONAL " ?adi . " " ?p " TRF_ONTOLOGY_DEFS_NCO_PREFIX " ?prefix . " " ?p " TRF_ONTOLOGY_DEFS_NCO_SUFFIX " ?suffix " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " .  " " OPTIONAL { ?p " TRF_ONTOLOGY_DEFS_NCO_FAMILY " ?family } . " " OPTIONAL { ?p " TRF_ONTOLOGY_DEFS_NCO_GIVEN " ?given } . " " OPTIONAL { ?p " TRF_ONTOLOGY_DEFS_NCO_ADDITIONAL " ?adi } . " " OPTIONAL { ?p " TRF_ONTOLOGY_DEFS_NCO_PREFIX " ?prefix } . " " OPTIONAL { ?p " TRF_ONTOLOGY_DEFS_NCO_SUFFIX " ?suffix } . " " FILTER (tracker:id(?p) = %s) " "} ";
	static const char query_i[] = "INSERT { " " ?p " TRF_ONTOLOGY_DEFS_NCO_FAMILY " '%s'; " " " TRF_ONTOLOGY_DEFS_NCO_GIVEN " '%s'; " " " TRF_ONTOLOGY_DEFS_NCO_ADDITIONAL " '%s'; " " " TRF_ONTOLOGY_DEFS_NCO_PREFIX " '%s'; " " " TRF_ONTOLOGY_DEFS_NCO_SUFFIX " '%s' " " } " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " . " " FILTER (tracker:id(?p) = %s) " "} ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRF_TYPE_PERSONA, TrfPersona));
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->p_id = _data_->_tmp3_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->p_id;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = g_strdup_printf (query_d, _data_->_tmp4_);
	_data_->query = _data_->_tmp5_;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = _data_->sname;
	if (_data_->_tmp6_ != NULL) {
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = _data_->sname;
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = folks_structured_name_get_family_name (_data_->_tmp7_);
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = _data_->_tmp8_;
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = _data_->sname;
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = folks_structured_name_get_given_name (_data_->_tmp10_);
		_data_->_tmp12_ = NULL;
		_data_->_tmp12_ = _data_->_tmp11_;
		_data_->_tmp13_ = NULL;
		_data_->_tmp13_ = _data_->sname;
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = folks_structured_name_get_additional_names (_data_->_tmp13_);
		_data_->_tmp15_ = NULL;
		_data_->_tmp15_ = _data_->_tmp14_;
		_data_->_tmp16_ = NULL;
		_data_->_tmp16_ = _data_->sname;
		_data_->_tmp17_ = NULL;
		_data_->_tmp17_ = folks_structured_name_get_prefixes (_data_->_tmp16_);
		_data_->_tmp18_ = NULL;
		_data_->_tmp18_ = _data_->_tmp17_;
		_data_->_tmp19_ = NULL;
		_data_->_tmp19_ = _data_->sname;
		_data_->_tmp20_ = NULL;
		_data_->_tmp20_ = folks_structured_name_get_suffixes (_data_->_tmp19_);
		_data_->_tmp21_ = NULL;
		_data_->_tmp21_ = _data_->_tmp20_;
		_data_->_tmp22_ = NULL;
		_data_->_tmp22_ = _data_->p_id;
		_data_->_tmp23_ = NULL;
		_data_->_tmp23_ = g_strdup_printf (query_i, _data_->_tmp9_, _data_->_tmp12_, _data_->_tmp15_, _data_->_tmp18_, _data_->_tmp21_, _data_->_tmp22_);
		_g_free0 (_data_->query);
		_data_->query = _data_->_tmp23_;
	}
	_data_->_tmp24_ = NULL;
	_data_->_tmp24_ = _data_->query;
	_data_->_state_ = 1;
	_trf_persona_store_tracker_update (_data_->self, _data_->_tmp24_, "_set_structured_name", _trf_persona_store_set_structured_name_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->query);
	_g_free0 (_data_->p_id);
	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 _trf_persona_store_set_full_name_data_free (gpointer _data) {
	TrfPersonaStoreSetFullNameData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_free0 (_data_->full_name);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetFullNameData, _data_);
}


void _trf_persona_store_set_full_name (TrfPersonaStore* self, FolksPersona* persona, const gchar* full_name, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetFullNameData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreSetFullNameData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_full_name);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_full_name_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = full_name;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (_data_->full_name);
	_data_->full_name = _tmp4_;
	_trf_persona_store_set_full_name_co (_data_);
}


void _trf_persona_store_set_full_name_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetFullNameData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_full_name_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetFullNameData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_full_name_co (_data_);
}


static gboolean _trf_persona_store_set_full_name_co (TrfPersonaStoreSetFullNameData* _data_) {
	static const char query_t[] = "DELETE { " " ?p " TRF_ONTOLOGY_DEFS_NCO_FULLNAME " ?fn " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " .  " " OPTIONAL { ?p " TRF_ONTOLOGY_DEFS_NCO_FULLNAME " ?fn } . " " FILTER (tracker:id(?p) = %s) " "} " "INSERT { " " ?p " TRF_ONTOLOGY_DEFS_NCO_FULLNAME " '%s' " "} " "WHERE { " " ?p a " TRF_ONTOLOGY_DEFS_NCO_PERSON " . " " FILTER (tracker:id(?p) = %s) " "} ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRF_TYPE_PERSONA, TrfPersona));
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->p_id = _data_->_tmp3_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->full_name;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = g_strdup_printf (query_t, _data_->p_id, _data_->_tmp4_, _data_->p_id);
	_data_->query = _data_->_tmp5_;
	_data_->_state_ = 1;
	_trf_persona_store_tracker_update (_data_->self, _data_->query, "_set_full_name", _trf_persona_store_set_full_name_ready, _data_);
	return FALSE;
	_state_1:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->query);
	_g_free0 (_data_->p_id);
	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 _trf_persona_store_set_attrib_set_data_free (gpointer _data) {
	TrfPersonaStoreSetAttribSetData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_object_unref0 (_data_->attribs);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreSetAttribSetData, _data_);
}


static void _trf_persona_store_set_attrib_set (TrfPersonaStore* self, FolksPersona* persona, GeeSet* attribs, TrfAttrib what, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreSetAttribSetData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	GeeSet* _tmp3_ = NULL;
	GeeSet* _tmp4_ = NULL;
	TrfAttrib _tmp5_ = 0;
	_data_ = g_slice_new0 (TrfPersonaStoreSetAttribSetData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_set_attrib_set);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_set_attrib_set_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_tmp3_ = attribs;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->attribs);
	_data_->attribs = _tmp4_;
	_tmp5_ = what;
	_data_->what = _tmp5_;
	_trf_persona_store_set_attrib_set_co (_data_);
}


static void _trf_persona_store_set_attrib_set_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	TrfPersonaStoreSetAttribSetData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _trf_persona_store_set_attrib_set_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreSetAttribSetData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_set_attrib_set_co (_data_);
}


static gboolean _trf_persona_store_set_attrib_set_co (TrfPersonaStoreSetAttribSetData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRF_TYPE_PERSONA, TrfPersona));
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->p_id = _data_->_tmp3_;
	_data_->related_attrib = NULL;
	_data_->related_prop = NULL;
	_data_->related_prop_2 = NULL;
	_data_->related_connection = NULL;
	_data_->_tmp4_ = 0;
	_data_->_tmp4_ = _data_->what;
	switch (_data_->_tmp4_) {
		case TRF_ATTRIB_IM_ADDRESSES:
		{
			_data_->related_attrib = TRF_ONTOLOGY_DEFS_NCO_IMADDRESS;
			_data_->related_prop = TRF_ONTOLOGY_DEFS_NCO_IMID;
			_data_->related_prop_2 = TRF_ONTOLOGY_DEFS_NCO_IMPROTOCOL;
			_data_->related_connection = TRF_ONTOLOGY_DEFS_NCO_HAS_IMADDRESS;
			_data_->_tmp5_ = NULL;
			_data_->_tmp5_ = _data_->persona;
			_data_->_state_ = 1;
			_trf_persona_store_remove_attributes_from_persona (_data_->self, _data_->_tmp5_, _REMOVE_IM_ADDRS, _trf_persona_store_set_attrib_set_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp6_ = NULL;
			_data_->_tmp6_ = _trf_persona_store_remove_attributes_from_persona_finish (_data_->self, _data_->_res_);
			_data_->_tmp7_ = NULL;
			_data_->_tmp7_ = _data_->_tmp6_;
			_g_free0 (_data_->_tmp7_);
			break;
		}
		case TRF_ATTRIB_POSTAL_ADDRESSES:
		{
			_data_->related_attrib = TRF_ONTOLOGY_DEFS_NCO_POSTAL_ADDRESS;
			_data_->related_connection = TRF_ONTOLOGY_DEFS_NCO_HAS_POSTAL_ADDRESS;
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = _data_->persona;
			_data_->_state_ = 2;
			_trf_persona_store_remove_attributes_from_persona (_data_->self, _data_->_tmp8_, _REMOVE_POSTALS, _trf_persona_store_set_attrib_set_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = _trf_persona_store_remove_attributes_from_persona_finish (_data_->self, _data_->_res_);
			_data_->_tmp10_ = NULL;
			_data_->_tmp10_ = _data_->_tmp9_;
			_g_free0 (_data_->_tmp10_);
			break;
		}
		case TRF_ATTRIB_URLS:
		{
			_data_->related_attrib = TRF_ONTOLOGY_DEFS_NCO_URL;
			_data_->related_connection = TRF_ONTOLOGY_DEFS_NCO_URL;
			break;
		}
		default:
		break;
	}
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = tracker_sparql_builder_new_update ();
	_data_->builder = _data_->_tmp11_;
	_data_->_tmp12_ = NULL;
	_data_->_tmp12_ = _data_->builder;
	tracker_sparql_builder_insert_open (_data_->_tmp12_, NULL);
	_data_->i = 0;
	{
		_data_->_tmp13_ = NULL;
		_data_->_tmp13_ = _data_->attribs;
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp13_);
		_data_->_p_it = _data_->_tmp14_;
		while (TRUE) {
			_data_->_tmp15_ = NULL;
			_data_->_tmp15_ = _data_->_p_it;
			_data_->_tmp16_ = FALSE;
			_data_->_tmp16_ = gee_iterator_next (_data_->_tmp15_);
			if (!_data_->_tmp16_) {
				break;
			}
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = _data_->_p_it;
			_data_->_tmp18_ = NULL;
			_data_->_tmp18_ = gee_iterator_get (_data_->_tmp17_);
			_data_->p = (GObject*) _data_->_tmp18_;
			_data_->fd = NULL;
			_data_->pafd = NULL;
			_data_->pa = NULL;
			_data_->_tmp19_ = 0;
			_data_->_tmp19_ = _data_->i;
			_data_->_tmp20_ = NULL;
			_data_->_tmp20_ = g_strdup_printf ("_:a%d", _data_->_tmp19_);
			_data_->affl = _data_->_tmp20_;
			_data_->attr = NULL;
			_data_->_tmp21_ = 0;
			_data_->_tmp21_ = _data_->what;
			switch (_data_->_tmp21_) {
				case TRF_ATTRIB_POSTAL_ADDRESSES:
				{
					_data_->_tmp22_ = NULL;
					_data_->_tmp22_ = _data_->p;
					_data_->_tmp23_ = NULL;
					_data_->_tmp23_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp22_, FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS, FolksPostalAddressFieldDetails));
					_g_object_unref0 (_data_->pafd);
					_data_->pafd = _data_->_tmp23_;
					_data_->_tmp24_ = NULL;
					_data_->_tmp24_ = _data_->pafd;
					_data_->_tmp25_ = NULL;
					_data_->_tmp25_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _data_->_tmp24_);
					_data_->_tmp26_ = NULL;
					_data_->_tmp26_ = _data_->_tmp25_;
					_data_->_tmp27_ = NULL;
					_data_->_tmp27_ = _g_object_ref0 ((FolksPostalAddress*) _data_->_tmp26_);
					_g_object_unref0 (_data_->pa);
					_data_->pa = _data_->_tmp27_;
					_data_->_tmp28_ = 0;
					_data_->_tmp28_ = _data_->i;
					_data_->_tmp29_ = NULL;
					_data_->_tmp29_ = g_strdup_printf ("_:p%d", _data_->_tmp28_);
					_g_free0 (_data_->attr);
					_data_->attr = _data_->_tmp29_;
					_data_->_tmp30_ = NULL;
					_data_->_tmp30_ = _data_->builder;
					_data_->_tmp31_ = NULL;
					_data_->_tmp31_ = _data_->attr;
					tracker_sparql_builder_subject (_data_->_tmp30_, _data_->_tmp31_);
					_data_->_tmp32_ = NULL;
					_data_->_tmp32_ = _data_->builder;
					tracker_sparql_builder_predicate (_data_->_tmp32_, "a");
					_data_->_tmp33_ = NULL;
					_data_->_tmp33_ = _data_->builder;
					_data_->_tmp34_ = NULL;
					_data_->_tmp34_ = _data_->related_attrib;
					tracker_sparql_builder_object (_data_->_tmp33_, _data_->_tmp34_);
					_data_->_tmp35_ = NULL;
					_data_->_tmp35_ = _data_->builder;
					tracker_sparql_builder_predicate (_data_->_tmp35_, TRF_ONTOLOGY_DEFS_NCO_POBOX);
					_data_->_tmp36_ = NULL;
					_data_->_tmp36_ = _data_->builder;
					_data_->_tmp37_ = NULL;
					_data_->_tmp37_ = _data_->pa;
					_data_->_tmp38_ = NULL;
					_data_->_tmp38_ = folks_postal_address_get_po_box (_data_->_tmp37_);
					_data_->_tmp39_ = NULL;
					_data_->_tmp39_ = _data_->_tmp38_;
					tracker_sparql_builder_object_string (_data_->_tmp36_, _data_->_tmp39_);
					_data_->_tmp40_ = NULL;
					_data_->_tmp40_ = _data_->builder;
					tracker_sparql_builder_predicate (_data_->_tmp40_, TRF_ONTOLOGY_DEFS_NCO_LOCALITY);
					_data_->_tmp41_ = NULL;
					_data_->_tmp41_ = _data_->builder;
					_data_->_tmp42_ = NULL;
					_data_->_tmp42_ = _data_->pa;
					_data_->_tmp43_ = NULL;
					_data_->_tmp43_ = folks_postal_address_get_locality (_data_->_tmp42_);
					_data_->_tmp44_ = NULL;
					_data_->_tmp44_ = _data_->_tmp43_;
					tracker_sparql_builder_object_string (_data_->_tmp41_, _data_->_tmp44_);
					_data_->_tmp45_ = NULL;
					_data_->_tmp45_ = _data_->builder;
					tracker_sparql_builder_predicate (_data_->_tmp45_, TRF_ONTOLOGY_DEFS_NCO_POSTALCODE);
					_data_->_tmp46_ = NULL;
					_data_->_tmp46_ = _data_->builder;
					_data_->_tmp47_ = NULL;
					_data_->_tmp47_ = _data_->pa;
					_data_->_tmp48_ = NULL;
					_data_->_tmp48_ = folks_postal_address_get_postal_code (_data_->_tmp47_);
					_data_->_tmp49_ = NULL;
					_data_->_tmp49_ = _data_->_tmp48_;
					tracker_sparql_builder_object_string (_data_->_tmp46_, _data_->_tmp49_);
					_data_->_tmp50_ = NULL;
					_data_->_tmp50_ = _data_->builder;
					tracker_sparql_builder_predicate (_data_->_tmp50_, TRF_ONTOLOGY_DEFS_NCO_STREET_ADDRESS);
					_data_->_tmp51_ = NULL;
					_data_->_tmp51_ = _data_->builder;
					_data_->_tmp52_ = NULL;
					_data_->_tmp52_ = _data_->pa;
					_data_->_tmp53_ = NULL;
					_data_->_tmp53_ = folks_postal_address_get_street (_data_->_tmp52_);
					_data_->_tmp54_ = NULL;
					_data_->_tmp54_ = _data_->_tmp53_;
					tracker_sparql_builder_object_string (_data_->_tmp51_, _data_->_tmp54_);
					_data_->_tmp55_ = NULL;
					_data_->_tmp55_ = _data_->builder;
					tracker_sparql_builder_predicate (_data_->_tmp55_, TRF_ONTOLOGY_DEFS_NCO_EXTENDED_ADDRESS);
					_data_->_tmp56_ = NULL;
					_data_->_tmp56_ = _data_->builder;
					_data_->_tmp57_ = NULL;
					_data_->_tmp57_ = _data_->pa;
					_data_->_tmp58_ = NULL;
					_data_->_tmp58_ = folks_postal_address_get_extension (_data_->_tmp57_);
					_data_->_tmp59_ = NULL;
					_data_->_tmp59_ = _data_->_tmp58_;
					tracker_sparql_builder_object_string (_data_->_tmp56_, _data_->_tmp59_);
					_data_->_tmp60_ = NULL;
					_data_->_tmp60_ = _data_->builder;
					tracker_sparql_builder_predicate (_data_->_tmp60_, TRF_ONTOLOGY_DEFS_NCO_COUNTRY);
					_data_->_tmp61_ = NULL;
					_data_->_tmp61_ = _data_->builder;
					_data_->_tmp62_ = NULL;
					_data_->_tmp62_ = _data_->pa;
					_data_->_tmp63_ = NULL;
					_data_->_tmp63_ = folks_postal_address_get_country (_data_->_tmp62_);
					_data_->_tmp64_ = NULL;
					_data_->_tmp64_ = _data_->_tmp63_;
					tracker_sparql_builder_object_string (_data_->_tmp61_, _data_->_tmp64_);
					_data_->_tmp65_ = NULL;
					_data_->_tmp65_ = _data_->builder;
					tracker_sparql_builder_predicate (_data_->_tmp65_, TRF_ONTOLOGY_DEFS_NCO_REGION);
					_data_->_tmp66_ = NULL;
					_data_->_tmp66_ = _data_->builder;
					_data_->_tmp67_ = NULL;
					_data_->_tmp67_ = _data_->pa;
					_data_->_tmp68_ = NULL;
					_data_->_tmp68_ = folks_postal_address_get_region (_data_->_tmp67_);
					_data_->_tmp69_ = NULL;
					_data_->_tmp69_ = _data_->_tmp68_;
					tracker_sparql_builder_object_string (_data_->_tmp66_, _data_->_tmp69_);
					break;
				}
				case TRF_ATTRIB_URLS:
				{
					_data_->_tmp70_ = NULL;
					_data_->_tmp70_ = _data_->p;
					_data_->_tmp71_ = NULL;
					_data_->_tmp71_ = _g_object_ref0 ((FolksAbstractFieldDetails*) G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp70_, FOLKS_TYPE_URL_FIELD_DETAILS, FolksUrlFieldDetails));
					_g_object_unref0 (_data_->fd);
					_data_->fd = _data_->_tmp71_;
					_data_->_tmp72_ = NULL;
					_data_->_tmp72_ = _data_->fd;
					_data_->_tmp73_ = NULL;
					_data_->_tmp73_ = folks_abstract_field_details_get_parameter_values (_data_->_tmp72_, FOLKS_ABSTRACT_FIELD_DETAILS_PARAM_TYPE);
					_data_->type_p = _data_->_tmp73_;
					_data_->_tmp75_ = NULL;
					_data_->_tmp75_ = _data_->type_p;
					if (_data_->_tmp75_ != NULL) {
						_data_->_tmp76_ = NULL;
						_data_->_tmp76_ = _data_->type_p;
						_data_->_tmp77_ = FALSE;
						_data_->_tmp77_ = gee_collection_contains (_data_->_tmp76_, FOLKS_URL_FIELD_DETAILS_PARAM_TYPE_BLOG);
						_data_->_tmp74_ = _data_->_tmp77_;
					} else {
						_data_->_tmp74_ = FALSE;
					}
					if (_data_->_tmp74_) {
						_data_->related_connection = TRF_ONTOLOGY_DEFS_NCO_BLOG;
					} else {
						_data_->_tmp79_ = NULL;
						_data_->_tmp79_ = _data_->type_p;
						if (_data_->_tmp79_ != NULL) {
							_data_->_tmp80_ = NULL;
							_data_->_tmp80_ = _data_->type_p;
							_data_->_tmp81_ = FALSE;
							_data_->_tmp81_ = gee_collection_contains (_data_->_tmp80_, FOLKS_URL_FIELD_DETAILS_PARAM_TYPE_HOME_PAGE);
							_data_->_tmp78_ = _data_->_tmp81_;
						} else {
							_data_->_tmp78_ = FALSE;
						}
						if (_data_->_tmp78_) {
							_data_->related_connection = TRF_ONTOLOGY_DEFS_NCO_WEBSITE;
						} else {
							_data_->related_connection = TRF_ONTOLOGY_DEFS_NCO_URL;
						}
					}
					_data_->_tmp82_ = NULL;
					_data_->_tmp82_ = _data_->fd;
					_data_->_tmp83_ = NULL;
					_data_->_tmp83_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp82_, FOLKS_TYPE_URL_FIELD_DETAILS, FolksUrlFieldDetails));
					_data_->_tmp84_ = NULL;
					_data_->_tmp84_ = _data_->_tmp83_;
					_data_->_tmp85_ = NULL;
					_data_->_tmp85_ = g_strdup_printf ("'%s'", (const gchar*) _data_->_tmp84_);
					_g_free0 (_data_->attr);
					_data_->attr = _data_->_tmp85_;
					_g_object_unref0 (_data_->type_p);
					break;
				}
				default:
				case TRF_ATTRIB_IM_ADDRESSES:
				{
					_data_->_tmp86_ = NULL;
					_data_->_tmp86_ = _data_->p;
					_data_->_tmp87_ = NULL;
					_data_->_tmp87_ = _g_object_ref0 ((FolksAbstractFieldDetails*) G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp86_, FOLKS_TYPE_IM_FIELD_DETAILS, FolksImFieldDetails));
					_g_object_unref0 (_data_->fd);
					_data_->fd = _data_->_tmp87_;
					_data_->_tmp88_ = 0;
					_data_->_tmp88_ = _data_->i;
					_data_->_tmp89_ = NULL;
					_data_->_tmp89_ = g_strdup_printf ("_:p%d", _data_->_tmp88_);
					_g_free0 (_data_->attr);
					_data_->attr = _data_->_tmp89_;
					_data_->_tmp90_ = NULL;
					_data_->_tmp90_ = _data_->builder;
					_data_->_tmp91_ = NULL;
					_data_->_tmp91_ = _data_->attr;
					tracker_sparql_builder_subject (_data_->_tmp90_, _data_->_tmp91_);
					_data_->_tmp92_ = NULL;
					_data_->_tmp92_ = _data_->builder;
					tracker_sparql_builder_predicate (_data_->_tmp92_, "a");
					_data_->_tmp93_ = NULL;
					_data_->_tmp93_ = _data_->builder;
					_data_->_tmp94_ = NULL;
					_data_->_tmp94_ = _data_->related_attrib;
					tracker_sparql_builder_object (_data_->_tmp93_, _data_->_tmp94_);
					_data_->_tmp95_ = NULL;
					_data_->_tmp95_ = _data_->builder;
					_data_->_tmp96_ = NULL;
					_data_->_tmp96_ = _data_->related_prop;
					tracker_sparql_builder_predicate (_data_->_tmp95_, _data_->_tmp96_);
					_data_->_tmp97_ = NULL;
					_data_->_tmp97_ = _data_->builder;
					_data_->_tmp98_ = NULL;
					_data_->_tmp98_ = _data_->fd;
					_data_->_tmp99_ = NULL;
					_data_->_tmp99_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp98_, FOLKS_TYPE_IM_FIELD_DETAILS, FolksImFieldDetails));
					_data_->_tmp100_ = NULL;
					_data_->_tmp100_ = _data_->_tmp99_;
					tracker_sparql_builder_object_string (_data_->_tmp97_, (const gchar*) _data_->_tmp100_);
					_data_->_tmp101_ = 0;
					_data_->_tmp101_ = _data_->what;
					if (_data_->_tmp101_ == TRF_ATTRIB_IM_ADDRESSES) {
						_data_->_tmp102_ = NULL;
						_data_->_tmp102_ = _data_->builder;
						_data_->_tmp103_ = NULL;
						_data_->_tmp103_ = _data_->related_prop_2;
						tracker_sparql_builder_predicate (_data_->_tmp102_, _data_->_tmp103_);
						_data_->_tmp104_ = NULL;
						_data_->_tmp104_ = _data_->fd;
						_data_->_tmp105_ = NULL;
						_data_->_tmp105_ = folks_abstract_field_details_get_parameter_values (_data_->_tmp104_, "proto");
						_data_->_tmp106_ = NULL;
						_data_->_tmp106_ = _data_->_tmp105_;
						_data_->_tmp107_ = 0;
						_data_->_tmp108_ = NULL;
						_data_->_tmp108_ = gee_collection_to_array (_data_->_tmp106_, &_data_->_tmp107_);
						_data_->_tmp109_ = NULL;
						_data_->_tmp109__length1 = 0;
						_data_->_tmp109_ = _data_->_tmp108_;
						_data_->_tmp109__length1 = _data_->_tmp107_;
						_g_object_unref0 (_data_->_tmp106_);
						_data_->im_params_length1 = 0;
						_data_->_im_params_size_ = 0;
						_data_->im_params = _data_->_tmp109_;
						_data_->im_params_length1 = _data_->_tmp109__length1;
						_data_->_im_params_size_ = _data_->im_params_length1;
						_data_->_tmp110_ = NULL;
						_data_->_tmp110_ = _data_->builder;
						_data_->_tmp111_ = NULL;
						_data_->_tmp111__length1 = 0;
						_data_->_tmp111_ = _data_->im_params;
						_data_->_tmp111__length1 = _data_->im_params_length1;
						_data_->_tmp112_ = NULL;
						_data_->_tmp112_ = _data_->_tmp111_[0];
						tracker_sparql_builder_object_string (_data_->_tmp110_, _data_->_tmp112_);
						_data_->im_params = (_vala_array_free (_data_->im_params, _data_->im_params_length1, (GDestroyNotify) g_free), NULL);
					}
					break;
				}
			}
			_data_->_tmp113_ = NULL;
			_data_->_tmp113_ = _data_->builder;
			_data_->_tmp114_ = NULL;
			_data_->_tmp114_ = _data_->affl;
			tracker_sparql_builder_subject (_data_->_tmp113_, _data_->_tmp114_);
			_data_->_tmp115_ = NULL;
			_data_->_tmp115_ = _data_->builder;
			tracker_sparql_builder_predicate (_data_->_tmp115_, "a");
			_data_->_tmp116_ = NULL;
			_data_->_tmp116_ = _data_->builder;
			tracker_sparql_builder_object (_data_->_tmp116_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION);
			_data_->_tmp117_ = NULL;
			_data_->_tmp117_ = _data_->builder;
			_data_->_tmp118_ = NULL;
			_data_->_tmp118_ = _data_->related_connection;
			tracker_sparql_builder_predicate (_data_->_tmp117_, _data_->_tmp118_);
			_data_->_tmp119_ = NULL;
			_data_->_tmp119_ = _data_->builder;
			_data_->_tmp120_ = NULL;
			_data_->_tmp120_ = _data_->attr;
			tracker_sparql_builder_object (_data_->_tmp119_, _data_->_tmp120_);
			_data_->_tmp121_ = NULL;
			_data_->_tmp121_ = _data_->builder;
			tracker_sparql_builder_subject (_data_->_tmp121_, "?contact");
			_data_->_tmp122_ = NULL;
			_data_->_tmp122_ = _data_->builder;
			tracker_sparql_builder_predicate (_data_->_tmp122_, TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION);
			_data_->_tmp123_ = NULL;
			_data_->_tmp123_ = _data_->builder;
			_data_->_tmp124_ = NULL;
			_data_->_tmp124_ = _data_->affl;
			tracker_sparql_builder_object (_data_->_tmp123_, _data_->_tmp124_);
			_data_->_tmp125_ = 0;
			_data_->_tmp125_ = _data_->i;
			_data_->i = _data_->_tmp125_ + 1;
			_g_free0 (_data_->attr);
			_g_free0 (_data_->affl);
			_g_object_unref0 (_data_->pa);
			_g_object_unref0 (_data_->pafd);
			_g_object_unref0 (_data_->fd);
			_g_object_unref0 (_data_->p);
		}
		_g_object_unref0 (_data_->_p_it);
	}
	_data_->_tmp126_ = NULL;
	_data_->_tmp126_ = _data_->builder;
	tracker_sparql_builder_insert_close (_data_->_tmp126_);
	_data_->_tmp127_ = NULL;
	_data_->_tmp127_ = _data_->builder;
	tracker_sparql_builder_where_open (_data_->_tmp127_);
	_data_->_tmp128_ = NULL;
	_data_->_tmp128_ = _data_->builder;
	tracker_sparql_builder_subject (_data_->_tmp128_, "?contact");
	_data_->_tmp129_ = NULL;
	_data_->_tmp129_ = _data_->builder;
	tracker_sparql_builder_predicate (_data_->_tmp129_, "a");
	_data_->_tmp130_ = NULL;
	_data_->_tmp130_ = _data_->builder;
	tracker_sparql_builder_object (_data_->_tmp130_, TRF_ONTOLOGY_DEFS_NCO_PERSON);
	_data_->_tmp131_ = NULL;
	_data_->_tmp131_ = _data_->p_id;
	_data_->_tmp132_ = NULL;
	_data_->_tmp132_ = g_strdup_printf (" FILTER(tracker:id(?contact) = %s) ", _data_->_tmp131_);
	_data_->filter = _data_->_tmp132_;
	_data_->_tmp133_ = NULL;
	_data_->_tmp133_ = _data_->builder;
	tracker_sparql_builder_append (_data_->_tmp133_, _data_->filter);
	_data_->_tmp134_ = NULL;
	_data_->_tmp134_ = _data_->builder;
	tracker_sparql_builder_where_close (_data_->_tmp134_);
	_data_->_tmp135_ = NULL;
	_data_->_tmp135_ = _data_->builder;
	_data_->_tmp136_ = NULL;
	_data_->_tmp136_ = tracker_sparql_builder_get_result (_data_->_tmp135_);
	_data_->_tmp137_ = NULL;
	_data_->_tmp137_ = _data_->_tmp136_;
	_data_->_state_ = 3;
	_trf_persona_store_tracker_update (_data_->self, _data_->_tmp137_, "set_attrib", _trf_persona_store_set_attrib_set_ready, _data_);
	return FALSE;
	_state_3:
	_trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
	_g_free0 (_data_->filter);
	_g_object_unref0 (_data_->builder);
	_g_free0 (_data_->p_id);
	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 _trf_persona_store_tracker_update_data_free (gpointer _data) {
	TrfPersonaStoreTrackerUpdateData* _data_;
	_data_ = _data;
	_g_free0 (_data_->query);
	_g_free0 (_data_->caller);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreTrackerUpdateData, _data_);
}


static void _trf_persona_store_tracker_update (TrfPersonaStore* self, const gchar* query, const gchar* caller, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreTrackerUpdateData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreTrackerUpdateData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_tracker_update);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_tracker_update_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = query;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->query);
	_data_->query = _tmp2_;
	_tmp3_ = caller;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (_data_->caller);
	_data_->caller = _tmp4_;
	_trf_persona_store_tracker_update_co (_data_);
}


static gboolean _trf_persona_store_tracker_update_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	gboolean result;
	TrfPersonaStoreTrackerUpdateData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void _trf_persona_store_tracker_update_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreTrackerUpdateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_tracker_update_co (_data_);
}


static gboolean _trf_persona_store_tracker_update_co (TrfPersonaStoreTrackerUpdateData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->ret = FALSE;
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->caller;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->query;
	g_debug ("trf-persona-store.vala:2603: %s: %s", _data_->_tmp0_, _data_->_tmp1_);
	{
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = _data_->self->priv->_connection;
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _data_->query;
		_data_->_state_ = 1;
		tracker_sparql_connection_update_async (_data_->_tmp2_, _data_->_tmp3_, G_PRIORITY_DEFAULT, NULL, _trf_persona_store_tracker_update_ready, _data_);
		return FALSE;
		_state_1:
		tracker_sparql_connection_update_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			if (_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) {
				goto __catch10_tracker_sparql_error;
			}
			if (_data_->_inner_error_->domain == G_IO_ERROR) {
				goto __catch10_g_io_error;
			}
			if (_data_->_inner_error_->domain == G_DBUS_ERROR) {
				goto __catch10_g_dbus_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_->ret = TRUE;
	}
	goto __finally10;
	__catch10_tracker_sparql_error:
	{
		_data_->e1 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _data_->caller;
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = _data_->e1;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = _data_->_tmp5_->message;
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = _data_->query;
		g_warning ("trf-persona-store.vala:2612: [%s] SPARQL syntax error: %s. Query: %s", _data_->_tmp4_, _data_->_tmp6_, _data_->_tmp7_);
		_g_error_free0 (_data_->e1);
	}
	goto __finally10;
	__catch10_g_io_error:
	{
		_data_->e2 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->caller;
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = _data_->e2;
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = _data_->_tmp9_->message;
		g_warning ("trf-persona-store.vala:2617: [%s] IO error: %s", _data_->_tmp8_, _data_->_tmp10_);
		_g_error_free0 (_data_->e2);
	}
	goto __finally10;
	__catch10_g_dbus_error:
	{
		_data_->e3 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = _data_->caller;
		_data_->_tmp12_ = NULL;
		_data_->_tmp12_ = _data_->e3;
		_data_->_tmp13_ = NULL;
		_data_->_tmp13_ = _data_->_tmp12_->message;
		g_warning ("trf-persona-store.vala:2622: [%s] DBus error: %s", _data_->_tmp11_, _data_->_tmp13_);
		_g_error_free0 (_data_->e3);
	}
	__finally10:
	if (_data_->_inner_error_ != NULL) {
		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_->result = _data_->ret;
	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;
	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 _trf_persona_store_affiliations_from_persona_data_free (gpointer _data) {
	TrfPersonaStoreAffiliationsFromPersonaData* _data_;
	_data_ = _data;
	_g_free0 (_data_->urn);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreAffiliationsFromPersonaData, _data_);
}


static void _trf_persona_store_affiliations_from_persona (TrfPersonaStore* self, const gchar* urn, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreAffiliationsFromPersonaData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreAffiliationsFromPersonaData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_affiliations_from_persona);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_affiliations_from_persona_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = urn;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->urn);
	_data_->urn = _tmp2_;
	_trf_persona_store_affiliations_from_persona_co (_data_);
}


static FolksSmallSet* _trf_persona_store_affiliations_from_persona_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	FolksSmallSet* result;
	TrfPersonaStoreAffiliationsFromPersonaData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_affiliations_from_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreAffiliationsFromPersonaData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_affiliations_from_persona_co (_data_);
}


static gboolean _trf_persona_store_affiliations_from_persona_co (TrfPersonaStoreAffiliationsFromPersonaData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->urn;
	_data_->_state_ = 1;
	_trf_persona_store_linked_resources (_data_->self, _data_->_tmp0_, TRF_ONTOLOGY_DEFS_NCO_PERSON, TRF_ONTOLOGY_DEFS_NCO_HAS_AFFILIATION, _trf_persona_store_affiliations_from_persona_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _trf_persona_store_linked_resources_finish (_data_->self, _data_->_res_);
	_data_->result = _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;
	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 _trf_persona_store_phones_from_affiliation_data_free (gpointer _data) {
	TrfPersonaStorePhonesFromAffiliationData* _data_;
	_data_ = _data;
	_g_free0 (_data_->affl);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStorePhonesFromAffiliationData, _data_);
}


static void _trf_persona_store_phones_from_affiliation (TrfPersonaStore* self, const gchar* affl, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStorePhonesFromAffiliationData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStorePhonesFromAffiliationData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_phones_from_affiliation);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_phones_from_affiliation_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = affl;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->affl);
	_data_->affl = _tmp2_;
	_trf_persona_store_phones_from_affiliation_co (_data_);
}


static FolksSmallSet* _trf_persona_store_phones_from_affiliation_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	FolksSmallSet* result;
	TrfPersonaStorePhonesFromAffiliationData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_phones_from_affiliation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStorePhonesFromAffiliationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_phones_from_affiliation_co (_data_);
}


static gboolean _trf_persona_store_phones_from_affiliation_co (TrfPersonaStorePhonesFromAffiliationData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->affl;
	_data_->_state_ = 1;
	_trf_persona_store_linked_resources (_data_->self, _data_->_tmp0_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION, TRF_ONTOLOGY_DEFS_NCO_HAS_PHONE, _trf_persona_store_phones_from_affiliation_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _trf_persona_store_linked_resources_finish (_data_->self, _data_->_res_);
	_data_->result = _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;
	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 _trf_persona_store_postals_from_affiliation_data_free (gpointer _data) {
	TrfPersonaStorePostalsFromAffiliationData* _data_;
	_data_ = _data;
	_g_free0 (_data_->affl);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStorePostalsFromAffiliationData, _data_);
}


static void _trf_persona_store_postals_from_affiliation (TrfPersonaStore* self, const gchar* affl, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStorePostalsFromAffiliationData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStorePostalsFromAffiliationData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_postals_from_affiliation);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_postals_from_affiliation_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = affl;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->affl);
	_data_->affl = _tmp2_;
	_trf_persona_store_postals_from_affiliation_co (_data_);
}


static FolksSmallSet* _trf_persona_store_postals_from_affiliation_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	FolksSmallSet* result;
	TrfPersonaStorePostalsFromAffiliationData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_postals_from_affiliation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStorePostalsFromAffiliationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_postals_from_affiliation_co (_data_);
}


static gboolean _trf_persona_store_postals_from_affiliation_co (TrfPersonaStorePostalsFromAffiliationData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->affl;
	_data_->_state_ = 1;
	_trf_persona_store_linked_resources (_data_->self, _data_->_tmp0_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION, TRF_ONTOLOGY_DEFS_NCO_HAS_POSTAL_ADDRESS, _trf_persona_store_postals_from_affiliation_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _trf_persona_store_linked_resources_finish (_data_->self, _data_->_res_);
	_data_->result = _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;
	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 _trf_persona_store_imaddrs_from_affiliation_data_free (gpointer _data) {
	TrfPersonaStoreImaddrsFromAffiliationData* _data_;
	_data_ = _data;
	_g_free0 (_data_->affl);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreImaddrsFromAffiliationData, _data_);
}


static void _trf_persona_store_imaddrs_from_affiliation (TrfPersonaStore* self, const gchar* affl, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreImaddrsFromAffiliationData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreImaddrsFromAffiliationData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_imaddrs_from_affiliation);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_imaddrs_from_affiliation_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = affl;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->affl);
	_data_->affl = _tmp2_;
	_trf_persona_store_imaddrs_from_affiliation_co (_data_);
}


static FolksSmallSet* _trf_persona_store_imaddrs_from_affiliation_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	FolksSmallSet* result;
	TrfPersonaStoreImaddrsFromAffiliationData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_imaddrs_from_affiliation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreImaddrsFromAffiliationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_imaddrs_from_affiliation_co (_data_);
}


static gboolean _trf_persona_store_imaddrs_from_affiliation_co (TrfPersonaStoreImaddrsFromAffiliationData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->affl;
	_data_->_state_ = 1;
	_trf_persona_store_linked_resources (_data_->self, _data_->_tmp0_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION, TRF_ONTOLOGY_DEFS_NCO_HAS_IMADDRESS, _trf_persona_store_imaddrs_from_affiliation_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _trf_persona_store_linked_resources_finish (_data_->self, _data_->_res_);
	_data_->result = _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;
	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 _trf_persona_store_emails_from_affiliation_data_free (gpointer _data) {
	TrfPersonaStoreEmailsFromAffiliationData* _data_;
	_data_ = _data;
	_g_free0 (_data_->affl);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreEmailsFromAffiliationData, _data_);
}


static void _trf_persona_store_emails_from_affiliation (TrfPersonaStore* self, const gchar* affl, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreEmailsFromAffiliationData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreEmailsFromAffiliationData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_emails_from_affiliation);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_emails_from_affiliation_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = affl;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->affl);
	_data_->affl = _tmp2_;
	_trf_persona_store_emails_from_affiliation_co (_data_);
}


static FolksSmallSet* _trf_persona_store_emails_from_affiliation_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	FolksSmallSet* result;
	TrfPersonaStoreEmailsFromAffiliationData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_emails_from_affiliation_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreEmailsFromAffiliationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_emails_from_affiliation_co (_data_);
}


static gboolean _trf_persona_store_emails_from_affiliation_co (TrfPersonaStoreEmailsFromAffiliationData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->affl;
	_data_->_state_ = 1;
	_trf_persona_store_linked_resources (_data_->self, _data_->_tmp0_, TRF_ONTOLOGY_DEFS_NCO_AFFILIATION, TRF_ONTOLOGY_DEFS_NCO_HAS_EMAIL, _trf_persona_store_emails_from_affiliation_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _trf_persona_store_linked_resources_finish (_data_->self, _data_->_res_);
	_data_->result = _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;
	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 _trf_persona_store_resource_usage_count_data_free (gpointer _data) {
	TrfPersonaStoreResourceUsageCountData* _data_;
	_data_ = _data;
	_g_free0 (_data_->resource);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreResourceUsageCountData, _data_);
}


static void _trf_persona_store_resource_usage_count (TrfPersonaStore* self, const gchar* resource, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreResourceUsageCountData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreResourceUsageCountData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_resource_usage_count);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_resource_usage_count_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = resource;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->resource);
	_data_->resource = _tmp2_;
	_trf_persona_store_resource_usage_count_co (_data_);
}


static gint _trf_persona_store_resource_usage_count_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	gint result;
	TrfPersonaStoreResourceUsageCountData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


/**
   * Retrieve the list of linked resources of a given subject
   *
   * This method is safe to call multiple times concurrently.
   *
   * @param resource          the urn of the resource in <urn> format
   * @return number of resources linking to this resource
   */
static void _trf_persona_store_resource_usage_count_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreResourceUsageCountData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_resource_usage_count_co (_data_);
}


static gboolean _trf_persona_store_resource_usage_count_co (TrfPersonaStoreResourceUsageCountData* _data_) {
	static const char query_t[] = "SELECT " " count(?s) " "WHERE { " " %s a rdfs:Resource . " " ?s ?p %s } ";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->resource;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->resource;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = g_strdup_printf (query_t, _data_->_tmp0_, _data_->_tmp1_);
	_data_->query = _data_->_tmp2_;
	_data_->_state_ = 1;
	_trf_persona_store_single_value_query (_data_->self, _data_->query, _trf_persona_store_resource_usage_count_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _trf_persona_store_single_value_query_finish (_data_->self, _data_->_res_);
	_data_->_result_ = _data_->_tmp3_;
	_data_->_tmp4_ = 0;
	_data_->_tmp4_ = atoi (_data_->_result_);
	_data_->result = _data_->_tmp4_;
	_g_free0 (_data_->_result_);
	_g_free0 (_data_->query);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->_result_);
	_g_free0 (_data_->query);
	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 _trf_persona_store_delete_resource_data_free (gpointer _data) {
	TrfPersonaStoreDeleteResourceData* _data_;
	_data_ = _data;
	_g_free0 (_data_->resource_urn);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreDeleteResourceData, _data_);
}


static void _trf_persona_store_delete_resource (TrfPersonaStore* self, const gchar* resource_urn, gboolean check_count, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreDeleteResourceData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	_data_ = g_slice_new0 (TrfPersonaStoreDeleteResourceData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_delete_resource);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_delete_resource_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = resource_urn;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->resource_urn);
	_data_->resource_urn = _tmp2_;
	_tmp3_ = check_count;
	_data_->check_count = _tmp3_;
	_trf_persona_store_delete_resource_co (_data_);
}


static gboolean _trf_persona_store_delete_resource_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	gboolean result;
	TrfPersonaStoreDeleteResourceData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void _trf_persona_store_delete_resource_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreDeleteResourceData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_delete_resource_co (_data_);
}


static gboolean _trf_persona_store_delete_resource_co (TrfPersonaStoreDeleteResourceData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->deleted = FALSE;
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = g_strdup (" DELETE { " " %s a rdfs:Resource " "} " "WHERE { " " %s a rdfs:Resource " "} ");
	_data_->query_t = _data_->_tmp0_;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->query_t;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->resource_urn;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->resource_urn;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = g_strdup_printf (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_);
	_data_->query = _data_->_tmp4_;
	_data_->_tmp5_ = FALSE;
	_data_->_tmp5_ = _data_->check_count;
	if (_data_->_tmp5_) {
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = _data_->resource_urn;
		_data_->_state_ = 1;
		_trf_persona_store_resource_usage_count (_data_->self, _data_->_tmp6_, _trf_persona_store_delete_resource_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp7_ = 0;
		_data_->_tmp7_ = _trf_persona_store_resource_usage_count_finish (_data_->self, _data_->_res_);
		_data_->count = _data_->_tmp7_;
		_data_->_tmp8_ = 0;
		_data_->_tmp8_ = _data_->count;
		if (_data_->_tmp8_ == 1) {
			_data_->_tmp9_ = NULL;
			_data_->_tmp9_ = _data_->query;
			_data_->_state_ = 2;
			_trf_persona_store_tracker_update (_data_->self, _data_->_tmp9_, "_delete_resource", _trf_persona_store_delete_resource_ready, _data_);
			return FALSE;
			_state_2:
			_data_->_tmp10_ = FALSE;
			_data_->_tmp10_ = _trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
			_data_->deleted = _data_->_tmp10_;
		}
	} else {
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = _data_->query;
		_data_->_state_ = 3;
		_trf_persona_store_tracker_update (_data_->self, _data_->_tmp11_, "_delete_resource", _trf_persona_store_delete_resource_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp12_ = FALSE;
		_data_->_tmp12_ = _trf_persona_store_tracker_update_finish (_data_->self, _data_->_res_);
		_data_->deleted = _data_->_tmp12_;
	}
	_data_->result = _data_->deleted;
	_g_free0 (_data_->query);
	_g_free0 (_data_->query_t);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->query);
	_g_free0 (_data_->query_t);
	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 _trf_persona_store_linked_resources_data_free (gpointer _data) {
	TrfPersonaStoreLinkedResourcesData* _data_;
	_data_ = _data;
	_g_free0 (_data_->urn);
	_g_free0 (_data_->subject_type);
	_g_free0 (_data_->linking_predicate);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreLinkedResourcesData, _data_);
}


static void _trf_persona_store_linked_resources (TrfPersonaStore* self, const gchar* urn, const gchar* subject_type, const gchar* linking_predicate, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreLinkedResourcesData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreLinkedResourcesData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_linked_resources);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_linked_resources_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = urn;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->urn);
	_data_->urn = _tmp2_;
	_tmp3_ = subject_type;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (_data_->subject_type);
	_data_->subject_type = _tmp4_;
	_tmp5_ = linking_predicate;
	_tmp6_ = g_strdup (_tmp5_);
	_g_free0 (_data_->linking_predicate);
	_data_->linking_predicate = _tmp6_;
	_trf_persona_store_linked_resources_co (_data_);
}


static FolksSmallSet* _trf_persona_store_linked_resources_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	FolksSmallSet* result;
	TrfPersonaStoreLinkedResourcesData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


/**
   * Retrieve the list of linked resources of a given subject
   *
   * This method is safe to call multiple times concurrently.
   *
   * @param urn               the urn of the subject in <urn> format
   * @param subject_type      i.e: nco:Person, nco:Affiliation, etc
   * @param linking_predicate i.e.: nco:hasAffiliation
   * @return a list of linked resources (in <urn> format)
   */
static void _trf_persona_store_linked_resources_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreLinkedResourcesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_linked_resources_co (_data_);
}


static gboolean _trf_persona_store_linked_resources_co (TrfPersonaStoreLinkedResourcesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = g_strdup ("SELECT " " fn:concat('<',?linkedr,'>')  " "WHERE { " " %s a %s; " " %s ?linkedr " "} ");
	_data_->query_t = _data_->_tmp0_;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->urn;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->subject_type;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->linking_predicate;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = g_strdup_printf (_data_->query_t, _data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_);
	_data_->query = _data_->_tmp4_;
	_data_->_state_ = 1;
	_trf_persona_store_multi_value_query (_data_->self, _data_->query, _trf_persona_store_linked_resources_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _trf_persona_store_multi_value_query_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->_tmp5_;
	_g_free0 (_data_->query);
	_g_free0 (_data_->query_t);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->query);
	_g_free0 (_data_->query_t);
	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 _trf_persona_store_urn_from_persona_data_free (gpointer _data) {
	TrfPersonaStoreUrnFromPersonaData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->persona);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreUrnFromPersonaData, _data_);
}


static void _trf_persona_store_urn_from_persona (TrfPersonaStore* self, FolksPersona* persona, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreUrnFromPersonaData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	FolksPersona* _tmp1_ = NULL;
	FolksPersona* _tmp2_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreUrnFromPersonaData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_urn_from_persona);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_urn_from_persona_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = persona;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->persona);
	_data_->persona = _tmp2_;
	_trf_persona_store_urn_from_persona_co (_data_);
}


static gchar* _trf_persona_store_urn_from_persona_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	gchar* result;
	TrfPersonaStoreUrnFromPersonaData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _trf_persona_store_urn_from_persona_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreUrnFromPersonaData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_urn_from_persona_co (_data_);
}


static gboolean _trf_persona_store_urn_from_persona_co (TrfPersonaStoreUrnFromPersonaData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->persona;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = trf_persona_get_tracker_id (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, TRF_TYPE_PERSONA, TrfPersona));
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
	_data_->id = _data_->_tmp3_;
	_data_->_state_ = 1;
	_trf_persona_store_urn_from_tracker_id (_data_->self, _data_->id, _trf_persona_store_urn_from_persona_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _trf_persona_store_urn_from_tracker_id_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->_tmp4_;
	_g_free0 (_data_->id);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->id);
	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 _trf_persona_store_urn_from_property_data_free (gpointer _data) {
	TrfPersonaStoreUrnFromPropertyData* _data_;
	_data_ = _data;
	_g_free0 (_data_->class_name);
	_g_free0 (_data_->property_name);
	_g_free0 (_data_->property_value);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (TrfPersonaStoreUrnFromPropertyData, _data_);
}


static void _trf_persona_store_urn_from_property (TrfPersonaStore* self, const gchar* class_name, const gchar* property_name, const gchar* property_value, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrfPersonaStoreUrnFromPropertyData* _data_;
	TrfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	_data_ = g_slice_new0 (TrfPersonaStoreUrnFromPropertyData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _trf_persona_store_urn_from_property);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _trf_persona_store_urn_from_property_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = class_name;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->class_name);
	_data_->class_name = _tmp2_;
	_tmp3_ = property_name;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (_data_->property_name);
	_data_->property_name = _tmp4_;
	_tmp5_ = property_value;
	_tmp6_ = g_strdup (_tmp5_);
	_g_free0 (_data_->property_value);
	_data_->property_value = _tmp6_;
	_trf_persona_store_urn_from_property_co (_data_);
}


static gchar* _trf_persona_store_urn_from_property_finish (TrfPersonaStore* self, GAsyncResult* _res_) {
	gchar* result;
	TrfPersonaStoreUrnFromPropertyData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


/**
   * Helper method to figure out if a constrained property
   * already exists.
   *
   * This method is safe to call multiple times concurrently.
   */
static void _trf_persona_store_urn_from_property_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrfPersonaStoreUrnFromPropertyData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_trf_persona_store_urn_from_property_co (_data_);
}


static gboolean _trf_persona_store_urn_from_property_co (TrfPersonaStoreUrnFromPropertyData* _data_) {
	static const char query_template[] = "SELECT " " fn:concat('<', ?o, '>') " "WHERE { " " ?o a %s ; " " %s ?prop_val . " "FILTER (?prop_val = '%s') " "}";
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->class_name;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->property_name;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->property_value;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = g_strdup_printf (query_template, _data_->_tmp0_, _data_->_tmp1_, _data_->_tmp2_);
	_data_->query = _data_->_tmp3_;
	_data_->_state_ = 1;
	_trf_persona_store_single_value_query (_data_->self, _data_->query, _trf_persona_store_urn_from_property_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _trf_persona_store_single_value_query_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->_tmp4_;
	_g_free0 (_data_->query);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_free0 (_data_->query);
	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 const gchar* trf_persona_store_real_get_type_id (FolksPersonaStore* base) {
	const gchar* result;
	TrfPersonaStore* self;
	self = (TrfPersonaStore*) base;
	result = BACKEND_NAME;
	return result;
}


static FolksMaybeBool trf_persona_store_real_get_can_add_personas (FolksPersonaStore* base) {
	FolksMaybeBool result;
	TrfPersonaStore* self;
	self = (TrfPersonaStore*) base;
	result = FOLKS_MAYBE_BOOL_TRUE;
	return result;
}


static FolksMaybeBool trf_persona_store_real_get_can_alias_personas (FolksPersonaStore* base) {
	FolksMaybeBool result;
	TrfPersonaStore* self;
	self = (TrfPersonaStore*) base;
	result = FOLKS_MAYBE_BOOL_FALSE;
	return result;
}


static FolksMaybeBool trf_persona_store_real_get_can_group_personas (FolksPersonaStore* base) {
	FolksMaybeBool result;
	TrfPersonaStore* self;
	self = (TrfPersonaStore*) base;
	result = FOLKS_MAYBE_BOOL_FALSE;
	return result;
}


static FolksMaybeBool trf_persona_store_real_get_can_remove_personas (FolksPersonaStore* base) {
	FolksMaybeBool result;
	TrfPersonaStore* self;
	self = (TrfPersonaStore*) base;
	result = FOLKS_MAYBE_BOOL_TRUE;
	return result;
}


static gboolean trf_persona_store_real_get_is_prepared (FolksPersonaStore* base) {
	gboolean result;
	TrfPersonaStore* self;
	gboolean _tmp0_ = FALSE;
	self = (TrfPersonaStore*) base;
	_tmp0_ = self->priv->_is_prepared;
	result = _tmp0_;
	return result;
}


static gchar** trf_persona_store_real_get_always_writeable_properties (FolksPersonaStore* base, int* result_length1) {
	gchar** result;
	TrfPersonaStore* self;
	gchar** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	self = (TrfPersonaStore*) base;
	_tmp0_ = TRF_PERSONA_STORE__always_writeable_properties;
	_tmp0__length1 = G_N_ELEMENTS (TRF_PERSONA_STORE__always_writeable_properties);
	if (result_length1) {
		*result_length1 = _tmp0__length1;
	}
	result = _tmp0_;
	return result;
}


static gboolean trf_persona_store_real_get_is_quiescent (FolksPersonaStore* base) {
	gboolean result;
	TrfPersonaStore* self;
	gboolean _tmp0_ = FALSE;
	self = (TrfPersonaStore*) base;
	_tmp0_ = self->priv->_is_quiescent;
	result = _tmp0_;
	return result;
}


static GeeMap* trf_persona_store_real_get_personas (FolksPersonaStore* base) {
	GeeMap* result;
	TrfPersonaStore* self;
	GeeMap* _tmp0_ = NULL;
	self = (TrfPersonaStore*) base;
	_tmp0_ = self->priv->_personas_ro;
	result = _tmp0_;
	return result;
}


static GObject * trf_persona_store_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	TrfPersonaStore * self;
	GeeHashMap* _tmp0_ = NULL;
	GeeHashMap* _tmp1_ = NULL;
	GeeMap* _tmp2_ = NULL;
	GeeMap* _tmp3_ = NULL;
	parent_class = G_OBJECT_CLASS (trf_persona_store_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRF_TYPE_PERSONA_STORE, TrfPersonaStore);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, TRF_TYPE_PERSONA, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->_personas);
	self->priv->_personas = _tmp0_;
	_tmp1_ = self->priv->_personas;
	_tmp2_ = gee_abstract_map_get_read_only_view ((GeeAbstractMap*) _tmp1_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (self->priv->_personas_ro);
	self->priv->_personas_ro = _tmp3_;
	g_debug ("trf-persona-store.vala:426: Initial query : \n%s\n", TRF_PERSONA_STORE__INITIAL_QUERY);
	folks_persona_store_set_trust_level ((FolksPersonaStore*) self, FOLKS_PERSONA_STORE_TRUST_FULL);
	return obj;
}


static void trf_persona_store_class_init (TrfPersonaStoreClass * klass) {
	trf_persona_store_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (TrfPersonaStorePrivate));
	FOLKS_PERSONA_STORE_CLASS (klass)->add_persona_from_details = trf_persona_store_real_add_persona_from_details;
	FOLKS_PERSONA_STORE_CLASS (klass)->add_persona_from_details_finish = trf_persona_store_real_add_persona_from_details_finish;
	FOLKS_PERSONA_STORE_CLASS (klass)->remove_persona = trf_persona_store_real_remove_persona;
	FOLKS_PERSONA_STORE_CLASS (klass)->remove_persona_finish = trf_persona_store_real_remove_persona_finish;
	FOLKS_PERSONA_STORE_CLASS (klass)->prepare = trf_persona_store_real_prepare;
	FOLKS_PERSONA_STORE_CLASS (klass)->prepare_finish = trf_persona_store_real_prepare_finish;
	FOLKS_PERSONA_STORE_CLASS (klass)->get_type_id = trf_persona_store_real_get_type_id;
	FOLKS_PERSONA_STORE_CLASS (klass)->get_can_add_personas = trf_persona_store_real_get_can_add_personas;
	FOLKS_PERSONA_STORE_CLASS (klass)->get_can_alias_personas = trf_persona_store_real_get_can_alias_personas;
	FOLKS_PERSONA_STORE_CLASS (klass)->get_can_group_personas = trf_persona_store_real_get_can_group_personas;
	FOLKS_PERSONA_STORE_CLASS (klass)->get_can_remove_personas = trf_persona_store_real_get_can_remove_personas;
	FOLKS_PERSONA_STORE_CLASS (klass)->get_is_prepared = trf_persona_store_real_get_is_prepared;
	FOLKS_PERSONA_STORE_CLASS (klass)->get_always_writeable_properties = trf_persona_store_real_get_always_writeable_properties;
	FOLKS_PERSONA_STORE_CLASS (klass)->get_is_quiescent = trf_persona_store_real_get_is_quiescent;
	FOLKS_PERSONA_STORE_CLASS (klass)->get_personas = trf_persona_store_real_get_personas;
	G_OBJECT_CLASS (klass)->get_property = _vala_trf_persona_store_get_property;
	G_OBJECT_CLASS (klass)->constructor = trf_persona_store_constructor;
	G_OBJECT_CLASS (klass)->finalize = trf_persona_store_finalize;
	/**
	   * The type of persona store this is.
	   *
	   * See {@link Folks.PersonaStore.type_id}.
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRF_PERSONA_STORE_TYPE_ID, g_param_spec_string ("type-id", "type-id", "type-id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * Whether this PersonaStore can add {@link Folks.Persona}s.
	   *
	   * See {@link Folks.PersonaStore.can_add_personas}.
	   *
	   * @since 0.5.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRF_PERSONA_STORE_CAN_ADD_PERSONAS, g_param_spec_enum ("can-add-personas", "can-add-personas", "can-add-personas", FOLKS_TYPE_MAYBE_BOOL, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * Whether this PersonaStore can set the alias of {@link Folks.Persona}s.
	   *
	   * See {@link Folks.PersonaStore.can_alias_personas}.
	   *
	   * @since 0.5.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRF_PERSONA_STORE_CAN_ALIAS_PERSONAS, g_param_spec_enum ("can-alias-personas", "can-alias-personas", "can-alias-personas", FOLKS_TYPE_MAYBE_BOOL, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * Whether this PersonaStore can set the groups of {@link Folks.Persona}s.
	   *
	   * See {@link Folks.PersonaStore.can_group_personas}.
	   *
	   * @since 0.5.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRF_PERSONA_STORE_CAN_GROUP_PERSONAS, g_param_spec_enum ("can-group-personas", "can-group-personas", "can-group-personas", FOLKS_TYPE_MAYBE_BOOL, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * Whether this PersonaStore can remove {@link Folks.Persona}s.
	   *
	   * See {@link Folks.PersonaStore.can_remove_personas}.
	   *
	   * @since 0.5.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRF_PERSONA_STORE_CAN_REMOVE_PERSONAS, g_param_spec_enum ("can-remove-personas", "can-remove-personas", "can-remove-personas", FOLKS_TYPE_MAYBE_BOOL, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * Whether this PersonaStore has been prepared.
	   *
	   * See {@link Folks.PersonaStore.is_prepared}.
	   *
	   * @since 0.5.0
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRF_PERSONA_STORE_IS_PREPARED, g_param_spec_boolean ("is-prepared", "is-prepared", "is-prepared", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * {@inheritDoc}
	   *
	   * @since 0.6.2
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRF_PERSONA_STORE_ALWAYS_WRITEABLE_PROPERTIES, g_param_spec_boxed ("always-writeable-properties", "always-writeable-properties", "always-writeable-properties", G_TYPE_STRV, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRF_PERSONA_STORE_IS_QUIESCENT, g_param_spec_boolean ("is-quiescent", "is-quiescent", "is-quiescent", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	/**
	   * The {@link Persona}s exposed by this PersonaStore.
	   *
	   * See {@link Folks.PersonaStore.personas}.
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRF_PERSONA_STORE_PERSONAS, g_param_spec_object ("personas", "personas", "personas", GEE_TYPE_MAP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void trf_persona_store_instance_init (TrfPersonaStore * self) {
	self->priv = TRF_PERSONA_STORE_GET_PRIVATE (self);
	self->priv->_is_prepared = FALSE;
	self->priv->_prepare_pending = FALSE;
	self->priv->_is_quiescent = FALSE;
}


static void trf_persona_store_finalize (GObject* obj) {
	TrfPersonaStore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRF_TYPE_PERSONA_STORE, TrfPersonaStore);
	_g_object_unref0 (self->priv->_personas);
	_g_object_unref0 (self->priv->_personas_ro);
	_g_object_unref0 (self->priv->_resources_object);
	_g_object_unref0 (self->priv->_connection);
	G_OBJECT_CLASS (trf_persona_store_parent_class)->finalize (obj);
}


/**
 * A persona store.
 * It will create {@link Persona}s for each contacts on the main addressbook.
 */
GType trf_persona_store_get_type (void) {
	static volatile gsize trf_persona_store_type_id__volatile = 0;
	if (g_once_init_enter (&trf_persona_store_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TrfPersonaStoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) trf_persona_store_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrfPersonaStore), 0, (GInstanceInitFunc) trf_persona_store_instance_init, NULL };
		GType trf_persona_store_type_id;
		trf_persona_store_type_id = g_type_register_static (FOLKS_TYPE_PERSONA_STORE, "TrfPersonaStore", &g_define_type_info, 0);
		g_once_init_leave (&trf_persona_store_type_id__volatile, trf_persona_store_type_id);
	}
	return trf_persona_store_type_id__volatile;
}


static void _vala_trf_persona_store_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	TrfPersonaStore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TRF_TYPE_PERSONA_STORE, TrfPersonaStore);
	switch (property_id) {
		case TRF_PERSONA_STORE_TYPE_ID:
		g_value_set_string (value, folks_persona_store_get_type_id ((FolksPersonaStore*) self));
		break;
		case TRF_PERSONA_STORE_CAN_ADD_PERSONAS:
		g_value_set_enum (value, folks_persona_store_get_can_add_personas ((FolksPersonaStore*) self));
		break;
		case TRF_PERSONA_STORE_CAN_ALIAS_PERSONAS:
		g_value_set_enum (value, folks_persona_store_get_can_alias_personas ((FolksPersonaStore*) self));
		break;
		case TRF_PERSONA_STORE_CAN_GROUP_PERSONAS:
		g_value_set_enum (value, folks_persona_store_get_can_group_personas ((FolksPersonaStore*) self));
		break;
		case TRF_PERSONA_STORE_CAN_REMOVE_PERSONAS:
		g_value_set_enum (value, folks_persona_store_get_can_remove_personas ((FolksPersonaStore*) self));
		break;
		case TRF_PERSONA_STORE_IS_PREPARED:
		g_value_set_boolean (value, folks_persona_store_get_is_prepared ((FolksPersonaStore*) self));
		break;
		case TRF_PERSONA_STORE_ALWAYS_WRITEABLE_PROPERTIES:
		{
			int length;
			g_value_set_boxed (value, folks_persona_store_get_always_writeable_properties ((FolksPersonaStore*) self, &length));
		}
		break;
		case TRF_PERSONA_STORE_IS_QUIESCENT:
		g_value_set_boolean (value, folks_persona_store_get_is_quiescent ((FolksPersonaStore*) self));
		break;
		case TRF_PERSONA_STORE_PERSONAS:
		g_value_set_object (value, folks_persona_store_get_personas ((FolksPersonaStore*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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


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


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



