/* tpf-persona-store-cache.c generated by valac 0.21.1.1-0d6f, the Vala compiler
 * generated from tpf-persona-store-cache.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:
 *       Philip Withnall <philip.withnall@collabora.co.uk>
 */

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


#define TPF_TYPE_PERSONA_STORE_CACHE (tpf_persona_store_cache_get_type ())
#define TPF_PERSONA_STORE_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TPF_TYPE_PERSONA_STORE_CACHE, TpfPersonaStoreCache))
#define TPF_PERSONA_STORE_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TPF_TYPE_PERSONA_STORE_CACHE, TpfPersonaStoreCacheClass))
#define TPF_IS_PERSONA_STORE_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TPF_TYPE_PERSONA_STORE_CACHE))
#define TPF_IS_PERSONA_STORE_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TPF_TYPE_PERSONA_STORE_CACHE))
#define TPF_PERSONA_STORE_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TPF_TYPE_PERSONA_STORE_CACHE, TpfPersonaStoreCacheClass))

typedef struct _TpfPersonaStoreCache TpfPersonaStoreCache;
typedef struct _TpfPersonaStoreCacheClass TpfPersonaStoreCacheClass;
typedef struct _TpfPersonaStoreCachePrivate TpfPersonaStoreCachePrivate;

#define TPF_TYPE_PERSONA_STORE (tpf_persona_store_get_type ())
#define TPF_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TPF_TYPE_PERSONA_STORE, TpfPersonaStore))
#define TPF_PERSONA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TPF_TYPE_PERSONA_STORE, TpfPersonaStoreClass))
#define TPF_IS_PERSONA_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TPF_TYPE_PERSONA_STORE))
#define TPF_IS_PERSONA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TPF_TYPE_PERSONA_STORE))
#define TPF_PERSONA_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TPF_TYPE_PERSONA_STORE, TpfPersonaStoreClass))

typedef struct _TpfPersonaStore TpfPersonaStore;
typedef struct _TpfPersonaStoreClass TpfPersonaStoreClass;

#define TPF_TYPE_PERSONA (tpf_persona_get_type ())
#define TPF_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TPF_TYPE_PERSONA, TpfPersona))
#define TPF_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TPF_TYPE_PERSONA, TpfPersonaClass))
#define TPF_IS_PERSONA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TPF_TYPE_PERSONA))
#define TPF_IS_PERSONA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TPF_TYPE_PERSONA))
#define TPF_PERSONA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TPF_TYPE_PERSONA, TpfPersonaClass))

typedef struct _TpfPersona TpfPersona;
typedef struct _TpfPersonaClass TpfPersonaClass;
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block2Data Block2Data;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

struct _TpfPersonaStoreCache {
	FolksObjectCache parent_instance;
	TpfPersonaStoreCachePrivate * priv;
};

struct _TpfPersonaStoreCacheClass {
	FolksObjectCacheClass parent_class;
};

struct _TpfPersonaStoreCachePrivate {
	TpfPersonaStore* _store;
};

typedef void (*TpfPersonaStoreCacheAfdDeserialisationCallback) (const gchar* val, GeeHashMultiMap* parameters, void* user_data);
struct _Block2Data {
	int _ref_count_;
	TpfPersonaStoreCache * self;
	FolksSmallSet* email_address_set;
	FolksSmallSet* phone_number_set;
	FolksSmallSet* url_set;
};


static gpointer tpf_persona_store_cache_parent_class = NULL;

GType tpf_persona_store_cache_get_type (void) G_GNUC_CONST;
GType tpf_persona_store_get_type (void) G_GNUC_CONST;
#define TPF_PERSONA_STORE_CACHE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TPF_TYPE_PERSONA_STORE_CACHE, TpfPersonaStoreCachePrivate))
enum  {
	TPF_PERSONA_STORE_CACHE_DUMMY_PROPERTY,
	TPF_PERSONA_STORE_CACHE_STORE
};
#define TPF_PERSONA_STORE_CACHE__FILE_FORMAT_VERSION ((guint8) 2)
TpfPersonaStoreCache* tpf_persona_store_cache_new (TpfPersonaStore* store);
TpfPersonaStoreCache* tpf_persona_store_cache_construct (GType object_type, TpfPersonaStore* store);
GType tpf_persona_get_type (void) G_GNUC_CONST;
static GVariantType* tpf_persona_store_cache_real_get_serialised_object_type (FolksObjectCache* base, guint8 object_version);
static guint8 tpf_persona_store_cache_real_get_serialised_object_version (FolksObjectCache* base);
static GVariant** tpf_persona_store_cache_serialise_abstract_field_details (TpfPersonaStoreCache* self, GeeSet* field_details_set, int* result_length1);
static GVariant* _variant_new1 (const gchar* value);
static GVariant* tpf_persona_store_cache_real_serialise_object (FolksObjectCache* base, TpfPersona* persona);
gboolean tpf_persona_get_is_in_contact_list (TpfPersona* self);
static void tpf_persona_store_cache_deserialise_abstract_field_details (TpfPersonaStoreCache* self, GVariant* input_variants, TpfPersonaStoreCacheAfdDeserialisationCallback cb, void* cb_target);
static TpfPersona* tpf_persona_store_cache_real_deserialise_object (FolksObjectCache* base, GVariant* variant, guint8 object_version);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static guint _folks_abstract_field_details_hash_static_gee_hash_data_func (gconstpointer v, gpointer self);
static gboolean _folks_abstract_field_details_equal_static_gee_equal_data_func (gconstpointer a, gconstpointer b, gpointer self);
static void ___lambda3_ (Block2Data* _data2_, const gchar* v, GeeHashMultiMap* p);
static void ____lambda3__tpf_persona_store_cache_afd_deserialisation_callback (const gchar* val, GeeHashMultiMap* parameters, gpointer self);
static void ___lambda4_ (Block2Data* _data2_, const gchar* v, GeeHashMultiMap* p);
static void ____lambda4__tpf_persona_store_cache_afd_deserialisation_callback (const gchar* val, GeeHashMultiMap* parameters, gpointer self);
static void ___lambda5_ (Block2Data* _data2_, const gchar* v, GeeHashMultiMap* p);
static void ____lambda5__tpf_persona_store_cache_afd_deserialisation_callback (const gchar* val, GeeHashMultiMap* parameters, gpointer self);
TpfPersona* tpf_persona_new_from_cache (TpfPersonaStore* store, const gchar* uid, const gchar* iid, const gchar* im_address, const gchar* protocol, FolksSmallSet* groups, gboolean is_favourite, const gchar* alias, gboolean is_in_contact_list, gboolean is_user, GLoadableIcon* avatar, GDateTime* birthday, const gchar* full_name, FolksSmallSet* email_addresses, FolksSmallSet* phone_numbers, FolksSmallSet* urls);
TpfPersona* tpf_persona_construct_from_cache (GType object_type, TpfPersonaStore* store, const gchar* uid, const gchar* iid, const gchar* im_address, const gchar* protocol, FolksSmallSet* groups, gboolean is_favourite, const gchar* alias, gboolean is_in_contact_list, gboolean is_user, GLoadableIcon* avatar, GDateTime* birthday, const gchar* full_name, FolksSmallSet* email_addresses, FolksSmallSet* phone_numbers, FolksSmallSet* urls);
TpfPersonaStore* tpf_persona_store_cache_get_store (TpfPersonaStoreCache* self);
static void tpf_persona_store_cache_set_store (TpfPersonaStoreCache* self, TpfPersonaStore* value);
static void tpf_persona_store_cache_finalize (GObject* obj);
static void _vala_tpf_persona_store_cache_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_tpf_persona_store_cache_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


TpfPersonaStoreCache* tpf_persona_store_cache_construct (GType object_type, TpfPersonaStore* store) {
	TpfPersonaStoreCache * self = NULL;
	TpfPersonaStore* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	TpfPersonaStore* _tmp3_ = NULL;
	g_return_val_if_fail (store != NULL, NULL);
	_tmp0_ = store;
	_tmp1_ = folks_persona_store_get_id ((FolksPersonaStore*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = store;
	self = (TpfPersonaStoreCache*) g_object_new (object_type, "t_type", TPF_TYPE_PERSONA, "t_dup_func", (GBoxedCopyFunc) g_object_ref, "t_destroy_func", g_object_unref, "type-id", "tpf-persona-stores", "id", _tmp2_, "store", _tmp3_, NULL);
	return self;
}


TpfPersonaStoreCache* tpf_persona_store_cache_new (TpfPersonaStore* store) {
	return tpf_persona_store_cache_construct (TPF_TYPE_PERSONA_STORE_CACHE, store);
}


static gpointer _g_variant_type_copy0 (gpointer self) {
	return self ? g_variant_type_copy (self) : NULL;
}


static GVariantType* tpf_persona_store_cache_real_get_serialised_object_type (FolksObjectCache* base, guint8 object_version) {
	TpfPersonaStoreCache * self;
	GVariantType* result = NULL;
	guint8 _tmp0_ = 0U;
	guint8 _tmp1_ = 0U;
	guint8 _tmp2_ = 0U;
	self = (TpfPersonaStoreCache*) base;
	_tmp0_ = object_version;
	_tmp1_ = G_MAXUINT8;
	if (_tmp0_ == _tmp1_) {
		object_version = TPF_PERSONA_STORE_CACHE__FILE_FORMAT_VERSION;
	}
	_tmp2_ = object_version;
	if (((gint) _tmp2_) == 1) {
		const GVariantType* _tmp3_ = NULL;
		GVariantType* _tmp4_ = NULL;
		const GVariantType* _tmp5_ = NULL;
		GVariantType* _tmp6_ = NULL;
		const GVariantType* _tmp7_ = NULL;
		GVariantType* _tmp8_ = NULL;
		const GVariantType* _tmp9_ = NULL;
		GVariantType* _tmp10_ = NULL;
		const GVariantType* _tmp11_ = NULL;
		GVariantType* _tmp12_ = NULL;
		const GVariantType* _tmp13_ = NULL;
		GVariantType* _tmp14_ = NULL;
		const GVariantType* _tmp15_ = NULL;
		GVariantType* _tmp16_ = NULL;
		const GVariantType* _tmp17_ = NULL;
		GVariantType* _tmp18_ = NULL;
		const GVariantType* _tmp19_ = NULL;
		GVariantType* _tmp20_ = NULL;
		const GVariantType* _tmp21_ = NULL;
		GVariantType* _tmp22_ = NULL;
		GVariantType** _tmp23_ = NULL;
		GVariantType** _tmp24_ = NULL;
		gint _tmp24__length1 = 0;
		GVariantType* _tmp25_ = NULL;
		GVariantType* _tmp26_ = NULL;
		_tmp3_ = G_VARIANT_TYPE_STRING;
		_tmp4_ = _g_variant_type_copy0 (_tmp3_);
		_tmp5_ = G_VARIANT_TYPE_STRING;
		_tmp6_ = _g_variant_type_copy0 (_tmp5_);
		_tmp7_ = G_VARIANT_TYPE_STRING;
		_tmp8_ = _g_variant_type_copy0 (_tmp7_);
		_tmp9_ = G_VARIANT_TYPE_STRING;
		_tmp10_ = _g_variant_type_copy0 (_tmp9_);
		_tmp11_ = G_VARIANT_TYPE_STRING;
		_tmp12_ = g_variant_type_new_array (_tmp11_);
		_tmp13_ = G_VARIANT_TYPE_BOOLEAN;
		_tmp14_ = _g_variant_type_copy0 (_tmp13_);
		_tmp15_ = G_VARIANT_TYPE_STRING;
		_tmp16_ = _g_variant_type_copy0 (_tmp15_);
		_tmp17_ = G_VARIANT_TYPE_BOOLEAN;
		_tmp18_ = _g_variant_type_copy0 (_tmp17_);
		_tmp19_ = G_VARIANT_TYPE_BOOLEAN;
		_tmp20_ = _g_variant_type_copy0 (_tmp19_);
		_tmp21_ = G_VARIANT_TYPE_STRING;
		_tmp22_ = g_variant_type_new_maybe (_tmp21_);
		_tmp23_ = g_new0 (GVariantType*, 10 + 1);
		_tmp23_[0] = _tmp4_;
		_tmp23_[1] = _tmp6_;
		_tmp23_[2] = _tmp8_;
		_tmp23_[3] = _tmp10_;
		_tmp23_[4] = _tmp12_;
		_tmp23_[5] = _tmp14_;
		_tmp23_[6] = _tmp16_;
		_tmp23_[7] = _tmp18_;
		_tmp23_[8] = _tmp20_;
		_tmp23_[9] = _tmp22_;
		_tmp24_ = _tmp23_;
		_tmp24__length1 = 10;
		_tmp25_ = g_variant_type_new_tuple (_tmp24_, 10);
		_tmp26_ = _tmp25_;
		_tmp24_ = (_vala_array_free (_tmp24_, _tmp24__length1, (GDestroyNotify) g_variant_type_free), NULL);
		result = _tmp26_;
		return result;
	} else {
		gboolean _tmp27_ = FALSE;
		guint8 _tmp28_ = 0U;
		gboolean _tmp31_ = FALSE;
		_tmp28_ = object_version;
		if (((gint) _tmp28_) == 2) {
			_tmp27_ = TRUE;
		} else {
			guint8 _tmp29_ = 0U;
			guint8 _tmp30_ = 0U;
			_tmp29_ = object_version;
			_tmp30_ = G_MAXUINT8;
			_tmp27_ = _tmp29_ == _tmp30_;
		}
		_tmp31_ = _tmp27_;
		if (_tmp31_) {
			const GVariantType* _tmp32_ = NULL;
			GVariantType* _tmp33_ = NULL;
			const GVariantType* _tmp34_ = NULL;
			GVariantType* _tmp35_ = NULL;
			const GVariantType* _tmp36_ = NULL;
			GVariantType* _tmp37_ = NULL;
			const GVariantType* _tmp38_ = NULL;
			GVariantType* _tmp39_ = NULL;
			const GVariantType* _tmp40_ = NULL;
			GVariantType* _tmp41_ = NULL;
			const GVariantType* _tmp42_ = NULL;
			GVariantType* _tmp43_ = NULL;
			const GVariantType* _tmp44_ = NULL;
			GVariantType* _tmp45_ = NULL;
			const GVariantType* _tmp46_ = NULL;
			GVariantType* _tmp47_ = NULL;
			const GVariantType* _tmp48_ = NULL;
			GVariantType* _tmp49_ = NULL;
			const GVariantType* _tmp50_ = NULL;
			GVariantType* _tmp51_ = NULL;
			const GVariantType* _tmp52_ = NULL;
			GVariantType* _tmp53_ = NULL;
			const GVariantType* _tmp54_ = NULL;
			GVariantType* _tmp55_ = NULL;
			const GVariantType* _tmp56_ = NULL;
			GVariantType* _tmp57_ = NULL;
			const GVariantType* _tmp58_ = NULL;
			GVariantType* _tmp59_ = NULL;
			const GVariantType* _tmp60_ = NULL;
			GVariantType* _tmp61_ = NULL;
			GVariantType** _tmp62_ = NULL;
			GVariantType** _tmp63_ = NULL;
			gint _tmp63__length1 = 0;
			GVariantType* _tmp64_ = NULL;
			GVariantType* _tmp65_ = NULL;
			GVariantType* _tmp66_ = NULL;
			GVariantType** _tmp67_ = NULL;
			GVariantType** _tmp68_ = NULL;
			gint _tmp68__length1 = 0;
			GVariantType* _tmp69_ = NULL;
			GVariantType* _tmp70_ = NULL;
			GVariantType* _tmp71_ = NULL;
			const GVariantType* _tmp72_ = NULL;
			GVariantType* _tmp73_ = NULL;
			const GVariantType* _tmp74_ = NULL;
			GVariantType* _tmp75_ = NULL;
			const GVariantType* _tmp76_ = NULL;
			GVariantType* _tmp77_ = NULL;
			GVariantType** _tmp78_ = NULL;
			GVariantType** _tmp79_ = NULL;
			gint _tmp79__length1 = 0;
			GVariantType* _tmp80_ = NULL;
			GVariantType* _tmp81_ = NULL;
			GVariantType* _tmp82_ = NULL;
			GVariantType** _tmp83_ = NULL;
			GVariantType** _tmp84_ = NULL;
			gint _tmp84__length1 = 0;
			GVariantType* _tmp85_ = NULL;
			GVariantType* _tmp86_ = NULL;
			GVariantType* _tmp87_ = NULL;
			const GVariantType* _tmp88_ = NULL;
			GVariantType* _tmp89_ = NULL;
			const GVariantType* _tmp90_ = NULL;
			GVariantType* _tmp91_ = NULL;
			const GVariantType* _tmp92_ = NULL;
			GVariantType* _tmp93_ = NULL;
			GVariantType** _tmp94_ = NULL;
			GVariantType** _tmp95_ = NULL;
			gint _tmp95__length1 = 0;
			GVariantType* _tmp96_ = NULL;
			GVariantType* _tmp97_ = NULL;
			GVariantType* _tmp98_ = NULL;
			GVariantType** _tmp99_ = NULL;
			GVariantType** _tmp100_ = NULL;
			gint _tmp100__length1 = 0;
			GVariantType* _tmp101_ = NULL;
			GVariantType* _tmp102_ = NULL;
			GVariantType* _tmp103_ = NULL;
			GVariantType** _tmp104_ = NULL;
			GVariantType** _tmp105_ = NULL;
			gint _tmp105__length1 = 0;
			GVariantType* _tmp106_ = NULL;
			GVariantType* _tmp107_ = NULL;
			_tmp32_ = G_VARIANT_TYPE_STRING;
			_tmp33_ = _g_variant_type_copy0 (_tmp32_);
			_tmp34_ = G_VARIANT_TYPE_STRING;
			_tmp35_ = _g_variant_type_copy0 (_tmp34_);
			_tmp36_ = G_VARIANT_TYPE_STRING;
			_tmp37_ = _g_variant_type_copy0 (_tmp36_);
			_tmp38_ = G_VARIANT_TYPE_STRING;
			_tmp39_ = _g_variant_type_copy0 (_tmp38_);
			_tmp40_ = G_VARIANT_TYPE_STRING;
			_tmp41_ = g_variant_type_new_array (_tmp40_);
			_tmp42_ = G_VARIANT_TYPE_BOOLEAN;
			_tmp43_ = _g_variant_type_copy0 (_tmp42_);
			_tmp44_ = G_VARIANT_TYPE_STRING;
			_tmp45_ = _g_variant_type_copy0 (_tmp44_);
			_tmp46_ = G_VARIANT_TYPE_BOOLEAN;
			_tmp47_ = _g_variant_type_copy0 (_tmp46_);
			_tmp48_ = G_VARIANT_TYPE_BOOLEAN;
			_tmp49_ = _g_variant_type_copy0 (_tmp48_);
			_tmp50_ = G_VARIANT_TYPE_STRING;
			_tmp51_ = g_variant_type_new_maybe (_tmp50_);
			_tmp52_ = G_VARIANT_TYPE_INT64;
			_tmp53_ = g_variant_type_new_maybe (_tmp52_);
			_tmp54_ = G_VARIANT_TYPE_STRING;
			_tmp55_ = _g_variant_type_copy0 (_tmp54_);
			_tmp56_ = G_VARIANT_TYPE_STRING;
			_tmp57_ = _g_variant_type_copy0 (_tmp56_);
			_tmp58_ = G_VARIANT_TYPE_STRING;
			_tmp59_ = _g_variant_type_copy0 (_tmp58_);
			_tmp60_ = G_VARIANT_TYPE_STRING;
			_tmp61_ = _g_variant_type_copy0 (_tmp60_);
			_tmp62_ = g_new0 (GVariantType*, 2 + 1);
			_tmp62_[0] = _tmp59_;
			_tmp62_[1] = _tmp61_;
			_tmp63_ = _tmp62_;
			_tmp63__length1 = 2;
			_tmp64_ = g_variant_type_new_tuple (_tmp63_, 2);
			_tmp65_ = _tmp64_;
			_tmp66_ = g_variant_type_new_array (_tmp65_);
			_tmp67_ = g_new0 (GVariantType*, 2 + 1);
			_tmp67_[0] = _tmp57_;
			_tmp67_[1] = _tmp66_;
			_tmp68_ = _tmp67_;
			_tmp68__length1 = 2;
			_tmp69_ = g_variant_type_new_tuple (_tmp68_, 2);
			_tmp70_ = _tmp69_;
			_tmp71_ = g_variant_type_new_array (_tmp70_);
			_tmp72_ = G_VARIANT_TYPE_STRING;
			_tmp73_ = _g_variant_type_copy0 (_tmp72_);
			_tmp74_ = G_VARIANT_TYPE_STRING;
			_tmp75_ = _g_variant_type_copy0 (_tmp74_);
			_tmp76_ = G_VARIANT_TYPE_STRING;
			_tmp77_ = _g_variant_type_copy0 (_tmp76_);
			_tmp78_ = g_new0 (GVariantType*, 2 + 1);
			_tmp78_[0] = _tmp75_;
			_tmp78_[1] = _tmp77_;
			_tmp79_ = _tmp78_;
			_tmp79__length1 = 2;
			_tmp80_ = g_variant_type_new_tuple (_tmp79_, 2);
			_tmp81_ = _tmp80_;
			_tmp82_ = g_variant_type_new_array (_tmp81_);
			_tmp83_ = g_new0 (GVariantType*, 2 + 1);
			_tmp83_[0] = _tmp73_;
			_tmp83_[1] = _tmp82_;
			_tmp84_ = _tmp83_;
			_tmp84__length1 = 2;
			_tmp85_ = g_variant_type_new_tuple (_tmp84_, 2);
			_tmp86_ = _tmp85_;
			_tmp87_ = g_variant_type_new_array (_tmp86_);
			_tmp88_ = G_VARIANT_TYPE_STRING;
			_tmp89_ = _g_variant_type_copy0 (_tmp88_);
			_tmp90_ = G_VARIANT_TYPE_STRING;
			_tmp91_ = _g_variant_type_copy0 (_tmp90_);
			_tmp92_ = G_VARIANT_TYPE_STRING;
			_tmp93_ = _g_variant_type_copy0 (_tmp92_);
			_tmp94_ = g_new0 (GVariantType*, 2 + 1);
			_tmp94_[0] = _tmp91_;
			_tmp94_[1] = _tmp93_;
			_tmp95_ = _tmp94_;
			_tmp95__length1 = 2;
			_tmp96_ = g_variant_type_new_tuple (_tmp95_, 2);
			_tmp97_ = _tmp96_;
			_tmp98_ = g_variant_type_new_array (_tmp97_);
			_tmp99_ = g_new0 (GVariantType*, 2 + 1);
			_tmp99_[0] = _tmp89_;
			_tmp99_[1] = _tmp98_;
			_tmp100_ = _tmp99_;
			_tmp100__length1 = 2;
			_tmp101_ = g_variant_type_new_tuple (_tmp100_, 2);
			_tmp102_ = _tmp101_;
			_tmp103_ = g_variant_type_new_array (_tmp102_);
			_tmp104_ = g_new0 (GVariantType*, 15 + 1);
			_tmp104_[0] = _tmp33_;
			_tmp104_[1] = _tmp35_;
			_tmp104_[2] = _tmp37_;
			_tmp104_[3] = _tmp39_;
			_tmp104_[4] = _tmp41_;
			_tmp104_[5] = _tmp43_;
			_tmp104_[6] = _tmp45_;
			_tmp104_[7] = _tmp47_;
			_tmp104_[8] = _tmp49_;
			_tmp104_[9] = _tmp51_;
			_tmp104_[10] = _tmp53_;
			_tmp104_[11] = _tmp55_;
			_tmp104_[12] = _tmp71_;
			_tmp104_[13] = _tmp87_;
			_tmp104_[14] = _tmp103_;
			_tmp105_ = _tmp104_;
			_tmp105__length1 = 15;
			_tmp106_ = g_variant_type_new_tuple (_tmp105_, 15);
			_tmp107_ = _tmp106_;
			_tmp105_ = (_vala_array_free (_tmp105_, _tmp105__length1, (GDestroyNotify) g_variant_type_free), NULL);
			_g_variant_type_free0 (_tmp102_);
			_tmp100_ = (_vala_array_free (_tmp100_, _tmp100__length1, (GDestroyNotify) g_variant_type_free), NULL);
			_g_variant_type_free0 (_tmp97_);
			_tmp95_ = (_vala_array_free (_tmp95_, _tmp95__length1, (GDestroyNotify) g_variant_type_free), NULL);
			_g_variant_type_free0 (_tmp86_);
			_tmp84_ = (_vala_array_free (_tmp84_, _tmp84__length1, (GDestroyNotify) g_variant_type_free), NULL);
			_g_variant_type_free0 (_tmp81_);
			_tmp79_ = (_vala_array_free (_tmp79_, _tmp79__length1, (GDestroyNotify) g_variant_type_free), NULL);
			_g_variant_type_free0 (_tmp70_);
			_tmp68_ = (_vala_array_free (_tmp68_, _tmp68__length1, (GDestroyNotify) g_variant_type_free), NULL);
			_g_variant_type_free0 (_tmp65_);
			_tmp63_ = (_vala_array_free (_tmp63_, _tmp63__length1, (GDestroyNotify) g_variant_type_free), NULL);
			result = _tmp107_;
			return result;
		}
	}
	result = NULL;
	return result;
}


static guint8 tpf_persona_store_cache_real_get_serialised_object_version (FolksObjectCache* base) {
	TpfPersonaStoreCache * self;
	guint8 result = 0U;
	self = (TpfPersonaStoreCache*) base;
	result = TPF_PERSONA_STORE_CACHE__FILE_FORMAT_VERSION;
	return result;
}


static GVariant* _variant_new1 (const gchar* value) {
	return g_variant_ref_sink (g_variant_new_string (value));
}


static GVariant** tpf_persona_store_cache_serialise_abstract_field_details (TpfPersonaStoreCache* self, GeeSet* field_details_set, int* result_length1) {
	GVariant** result = NULL;
	GVariant** output_variants = NULL;
	GeeSet* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	GVariant** _tmp3_ = NULL;
	gint output_variants_length1 = 0;
	gint _output_variants_size_ = 0;
	guint i = 0U;
	GVariant** _tmp56_ = NULL;
	gint _tmp56__length1 = 0;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (field_details_set != NULL, NULL);
	_tmp0_ = field_details_set;
	_tmp1_ = gee_collection_get_size ((GeeCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_new0 (GVariant*, _tmp2_ + 1);
	output_variants = _tmp3_;
	output_variants_length1 = _tmp2_;
	_output_variants_size_ = output_variants_length1;
	i = (guint) 0;
	{
		GeeIterator* _afd_it = NULL;
		GeeSet* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		_tmp4_ = field_details_set;
		_tmp5_ = gee_iterable_iterator ((GeeIterable*) _tmp4_);
		_afd_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			FolksAbstractFieldDetails* afd = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			GVariant** parameters = NULL;
			FolksAbstractFieldDetails* _tmp10_ = NULL;
			GeeMultiMap* _tmp11_ = NULL;
			GeeMultiMap* _tmp12_ = NULL;
			gint _tmp13_ = 0;
			gint _tmp14_ = 0;
			GVariant** _tmp15_ = NULL;
			gint parameters_length1 = 0;
			gint _parameters_size_ = 0;
			guint f = 0U;
			GeeMapIterator* iter = NULL;
			FolksAbstractFieldDetails* _tmp16_ = NULL;
			GeeMultiMap* _tmp17_ = NULL;
			GeeMultiMap* _tmp18_ = NULL;
			GeeMapIterator* _tmp19_ = NULL;
			GVariant** _tmp36_ = NULL;
			gint _tmp36__length1 = 0;
			guint _tmp37_ = 0U;
			FolksAbstractFieldDetails* _tmp38_ = NULL;
			gconstpointer _tmp39_ = NULL;
			const gchar* _tmp40_ = NULL;
			GVariant* _tmp41_ = NULL;
			const GVariantType* _tmp42_ = NULL;
			GVariantType* _tmp43_ = NULL;
			const GVariantType* _tmp44_ = NULL;
			GVariantType* _tmp45_ = NULL;
			GVariantType** _tmp46_ = NULL;
			GVariantType** _tmp47_ = NULL;
			gint _tmp47__length1 = 0;
			GVariantType* _tmp48_ = NULL;
			GVariantType* _tmp49_ = NULL;
			GVariant** _tmp50_ = NULL;
			gint _tmp50__length1 = 0;
			GVariant* _tmp51_ = NULL;
			GVariant** _tmp52_ = NULL;
			GVariant** _tmp53_ = NULL;
			gint _tmp53__length1 = 0;
			GVariant* _tmp54_ = NULL;
			GVariant* _tmp55_ = NULL;
			_tmp6_ = _afd_it;
			_tmp7_ = gee_iterator_next (_tmp6_);
			if (!_tmp7_) {
				break;
			}
			_tmp8_ = _afd_it;
			_tmp9_ = gee_iterator_get (_tmp8_);
			afd = (FolksAbstractFieldDetails*) _tmp9_;
			_tmp10_ = afd;
			_tmp11_ = folks_abstract_field_details_get_parameters (_tmp10_);
			_tmp12_ = _tmp11_;
			_tmp13_ = gee_multi_map_get_size (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = g_new0 (GVariant*, _tmp14_ + 1);
			parameters = _tmp15_;
			parameters_length1 = _tmp14_;
			_parameters_size_ = parameters_length1;
			f = (guint) 0;
			_tmp16_ = afd;
			_tmp17_ = folks_abstract_field_details_get_parameters (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = gee_multi_map_map_iterator (_tmp18_);
			iter = _tmp19_;
			while (TRUE) {
				GeeMapIterator* _tmp20_ = NULL;
				gboolean _tmp21_ = FALSE;
				GVariant** _tmp22_ = NULL;
				gint _tmp22__length1 = 0;
				guint _tmp23_ = 0U;
				GeeMapIterator* _tmp24_ = NULL;
				gpointer _tmp25_ = NULL;
				gchar* _tmp26_ = NULL;
				GVariant* _tmp27_ = NULL;
				GeeMapIterator* _tmp28_ = NULL;
				gpointer _tmp29_ = NULL;
				gchar* _tmp30_ = NULL;
				GVariant* _tmp31_ = NULL;
				GVariant** _tmp32_ = NULL;
				GVariant** _tmp33_ = NULL;
				gint _tmp33__length1 = 0;
				GVariant* _tmp34_ = NULL;
				GVariant* _tmp35_ = NULL;
				_tmp20_ = iter;
				_tmp21_ = gee_map_iterator_next (_tmp20_);
				if (!_tmp21_) {
					break;
				}
				_tmp22_ = parameters;
				_tmp22__length1 = parameters_length1;
				_tmp23_ = f;
				f = _tmp23_ + 1;
				_tmp24_ = iter;
				_tmp25_ = gee_map_iterator_get_key (_tmp24_);
				_tmp26_ = (gchar*) _tmp25_;
				_tmp27_ = g_variant_new_string (_tmp26_);
				g_variant_ref_sink (_tmp27_);
				_tmp28_ = iter;
				_tmp29_ = gee_map_iterator_get_value (_tmp28_);
				_tmp30_ = (gchar*) _tmp29_;
				_tmp31_ = g_variant_new_string (_tmp30_);
				g_variant_ref_sink (_tmp31_);
				_tmp32_ = g_new0 (GVariant*, 2 + 1);
				_tmp32_[0] = _tmp27_;
				_tmp32_[1] = _tmp31_;
				_tmp33_ = _tmp32_;
				_tmp33__length1 = 2;
				_tmp34_ = g_variant_new_tuple (_tmp33_, 2);
				g_variant_ref_sink (_tmp34_);
				_g_variant_unref0 (_tmp22_[_tmp23_]);
				_tmp22_[_tmp23_] = _tmp34_;
				_tmp35_ = _tmp22_[_tmp23_];
				_tmp33_ = (_vala_array_free (_tmp33_, _tmp33__length1, (GDestroyNotify) g_variant_unref), NULL);
				_g_free0 (_tmp30_);
				_g_free0 (_tmp26_);
			}
			_tmp36_ = output_variants;
			_tmp36__length1 = output_variants_length1;
			_tmp37_ = i;
			i = _tmp37_ + 1;
			_tmp38_ = afd;
			_tmp39_ = folks_abstract_field_details_get_value (_tmp38_);
			_tmp40_ = _tmp39_;
			_tmp41_ = _variant_new1 ((const gchar*) _tmp40_);
			_tmp42_ = G_VARIANT_TYPE_STRING;
			_tmp43_ = _g_variant_type_copy0 (_tmp42_);
			_tmp44_ = G_VARIANT_TYPE_STRING;
			_tmp45_ = _g_variant_type_copy0 (_tmp44_);
			_tmp46_ = g_new0 (GVariantType*, 2 + 1);
			_tmp46_[0] = _tmp43_;
			_tmp46_[1] = _tmp45_;
			_tmp47_ = _tmp46_;
			_tmp47__length1 = 2;
			_tmp48_ = g_variant_type_new_tuple (_tmp47_, 2);
			_tmp49_ = _tmp48_;
			_tmp50_ = parameters;
			_tmp50__length1 = parameters_length1;
			_tmp51_ = g_variant_new_array (_tmp49_, _tmp50_, _tmp50__length1);
			g_variant_ref_sink (_tmp51_);
			_tmp52_ = g_new0 (GVariant*, 2 + 1);
			_tmp52_[0] = _tmp41_;
			_tmp52_[1] = _tmp51_;
			_tmp53_ = _tmp52_;
			_tmp53__length1 = 2;
			_tmp54_ = g_variant_new_tuple (_tmp53_, 2);
			g_variant_ref_sink (_tmp54_);
			_g_variant_unref0 (_tmp36_[_tmp37_]);
			_tmp36_[_tmp37_] = _tmp54_;
			_tmp55_ = _tmp36_[_tmp37_];
			_tmp53_ = (_vala_array_free (_tmp53_, _tmp53__length1, (GDestroyNotify) g_variant_unref), NULL);
			_g_variant_type_free0 (_tmp49_);
			_tmp47_ = (_vala_array_free (_tmp47_, _tmp47__length1, (GDestroyNotify) g_variant_type_free), NULL);
			_g_object_unref0 (iter);
			parameters = (_vala_array_free (parameters, parameters_length1, (GDestroyNotify) g_variant_unref), NULL);
			_g_object_unref0 (afd);
		}
		_g_object_unref0 (_afd_it);
	}
	_tmp56_ = output_variants;
	_tmp56__length1 = output_variants_length1;
	if (result_length1) {
		*result_length1 = _tmp56__length1;
	}
	result = _tmp56_;
	return result;
}


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


static gpointer _g_variant_ref0 (gpointer self) {
	return self ? g_variant_ref (self) : NULL;
}


static GVariant* tpf_persona_store_cache_real_serialise_object (FolksObjectCache* base, TpfPersona* persona) {
	TpfPersonaStoreCache * self;
	GVariant* result = NULL;
	GVariant** groups = NULL;
	TpfPersona* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	GVariant** _tmp5_ = NULL;
	gint groups_length1 = 0;
	gint _groups_size_ = 0;
	guint i = 0U;
	gchar* im_protocol = NULL;
	GeeMapIterator* iter = NULL;
	TpfPersona* _tmp19_ = NULL;
	GeeMultiMap* _tmp20_ = NULL;
	GeeMultiMap* _tmp21_ = NULL;
	GeeMapIterator* _tmp22_ = NULL;
	GeeMapIterator* _tmp23_ = NULL;
	gboolean _tmp24_ = FALSE;
	GFile* _tmp27_ = NULL;
	gboolean _tmp28_ = FALSE;
	TpfPersona* _tmp29_ = NULL;
	GLoadableIcon* _tmp30_ = NULL;
	GLoadableIcon* _tmp31_ = NULL;
	gboolean _tmp35_ = FALSE;
	GFile* avatar_file = NULL;
	GFile* _tmp40_ = NULL;
	GFile* _tmp41_ = NULL;
	GVariant* _tmp42_ = NULL;
	GFile* _tmp43_ = NULL;
	GVariant* avatar_variant = NULL;
	GVariant* _tmp48_ = NULL;
	GVariant* _tmp49_ = NULL;
	GVariant* _tmp50_ = NULL;
	TpfPersona* _tmp51_ = NULL;
	GDateTime* _tmp52_ = NULL;
	GDateTime* _tmp53_ = NULL;
	GVariant* birthday_variant = NULL;
	GVariant* _tmp59_ = NULL;
	GVariant* _tmp60_ = NULL;
	GVariant** email_addresses = NULL;
	TpfPersona* _tmp61_ = NULL;
	GeeSet* _tmp62_ = NULL;
	GeeSet* _tmp63_ = NULL;
	gint _tmp64_ = 0;
	GVariant** _tmp65_ = NULL;
	gint email_addresses_length1 = 0;
	gint _email_addresses_size_ = 0;
	GVariant** phone_numbers = NULL;
	TpfPersona* _tmp66_ = NULL;
	GeeSet* _tmp67_ = NULL;
	GeeSet* _tmp68_ = NULL;
	gint _tmp69_ = 0;
	GVariant** _tmp70_ = NULL;
	gint phone_numbers_length1 = 0;
	gint _phone_numbers_size_ = 0;
	GVariant** urls = NULL;
	TpfPersona* _tmp71_ = NULL;
	GeeSet* _tmp72_ = NULL;
	GeeSet* _tmp73_ = NULL;
	gint _tmp74_ = 0;
	GVariant** _tmp75_ = NULL;
	gint urls_length1 = 0;
	gint _urls_size_ = 0;
	TpfPersona* _tmp76_ = NULL;
	const gchar* _tmp77_ = NULL;
	const gchar* _tmp78_ = NULL;
	GVariant* _tmp79_ = NULL;
	TpfPersona* _tmp80_ = NULL;
	const gchar* _tmp81_ = NULL;
	const gchar* _tmp82_ = NULL;
	GVariant* _tmp83_ = NULL;
	TpfPersona* _tmp84_ = NULL;
	const gchar* _tmp85_ = NULL;
	const gchar* _tmp86_ = NULL;
	GVariant* _tmp87_ = NULL;
	const gchar* _tmp88_ = NULL;
	GVariant* _tmp89_ = NULL;
	const GVariantType* _tmp90_ = NULL;
	GVariant** _tmp91_ = NULL;
	gint _tmp91__length1 = 0;
	GVariant* _tmp92_ = NULL;
	TpfPersona* _tmp93_ = NULL;
	gboolean _tmp94_ = FALSE;
	gboolean _tmp95_ = FALSE;
	GVariant* _tmp96_ = NULL;
	TpfPersona* _tmp97_ = NULL;
	const gchar* _tmp98_ = NULL;
	const gchar* _tmp99_ = NULL;
	GVariant* _tmp100_ = NULL;
	TpfPersona* _tmp101_ = NULL;
	gboolean _tmp102_ = FALSE;
	gboolean _tmp103_ = FALSE;
	GVariant* _tmp104_ = NULL;
	TpfPersona* _tmp105_ = NULL;
	gboolean _tmp106_ = FALSE;
	gboolean _tmp107_ = FALSE;
	GVariant* _tmp108_ = NULL;
	const GVariantType* _tmp109_ = NULL;
	GVariant* _tmp110_ = NULL;
	GVariant* _tmp111_ = NULL;
	const GVariantType* _tmp112_ = NULL;
	GVariant* _tmp113_ = NULL;
	TpfPersona* _tmp114_ = NULL;
	const gchar* _tmp115_ = NULL;
	const gchar* _tmp116_ = NULL;
	GVariant* _tmp117_ = NULL;
	const GVariantType* _tmp118_ = NULL;
	GVariantType* _tmp119_ = NULL;
	const GVariantType* _tmp120_ = NULL;
	GVariantType* _tmp121_ = NULL;
	const GVariantType* _tmp122_ = NULL;
	GVariantType* _tmp123_ = NULL;
	GVariantType** _tmp124_ = NULL;
	GVariantType** _tmp125_ = NULL;
	gint _tmp125__length1 = 0;
	GVariantType* _tmp126_ = NULL;
	GVariantType* _tmp127_ = NULL;
	GVariantType* _tmp128_ = NULL;
	GVariantType** _tmp129_ = NULL;
	GVariantType** _tmp130_ = NULL;
	gint _tmp130__length1 = 0;
	GVariantType* _tmp131_ = NULL;
	GVariantType* _tmp132_ = NULL;
	GVariant* _tmp133_ = NULL;
	const GVariantType* _tmp134_ = NULL;
	GVariantType* _tmp135_ = NULL;
	const GVariantType* _tmp136_ = NULL;
	GVariantType* _tmp137_ = NULL;
	const GVariantType* _tmp138_ = NULL;
	GVariantType* _tmp139_ = NULL;
	GVariantType** _tmp140_ = NULL;
	GVariantType** _tmp141_ = NULL;
	gint _tmp141__length1 = 0;
	GVariantType* _tmp142_ = NULL;
	GVariantType* _tmp143_ = NULL;
	GVariantType* _tmp144_ = NULL;
	GVariantType** _tmp145_ = NULL;
	GVariantType** _tmp146_ = NULL;
	gint _tmp146__length1 = 0;
	GVariantType* _tmp147_ = NULL;
	GVariantType* _tmp148_ = NULL;
	GVariant* _tmp149_ = NULL;
	const GVariantType* _tmp150_ = NULL;
	GVariantType* _tmp151_ = NULL;
	const GVariantType* _tmp152_ = NULL;
	GVariantType* _tmp153_ = NULL;
	const GVariantType* _tmp154_ = NULL;
	GVariantType* _tmp155_ = NULL;
	GVariantType** _tmp156_ = NULL;
	GVariantType** _tmp157_ = NULL;
	gint _tmp157__length1 = 0;
	GVariantType* _tmp158_ = NULL;
	GVariantType* _tmp159_ = NULL;
	GVariantType* _tmp160_ = NULL;
	GVariantType** _tmp161_ = NULL;
	GVariantType** _tmp162_ = NULL;
	gint _tmp162__length1 = 0;
	GVariantType* _tmp163_ = NULL;
	GVariantType* _tmp164_ = NULL;
	GVariant* _tmp165_ = NULL;
	GVariant** _tmp166_ = NULL;
	GVariant** _tmp167_ = NULL;
	gint _tmp167__length1 = 0;
	GVariant* _tmp168_ = NULL;
	GVariant* _tmp169_ = NULL;
	self = (TpfPersonaStoreCache*) base;
	g_return_val_if_fail (persona != NULL, NULL);
	_tmp0_ = persona;
	_tmp1_ = folks_group_details_get_groups ((FolksGroupDetails*) _tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_new0 (GVariant*, _tmp4_ + 1);
	groups = _tmp5_;
	groups_length1 = _tmp4_;
	_groups_size_ = groups_length1;
	i = (guint) 0;
	{
		GeeIterator* _group_it = NULL;
		TpfPersona* _tmp6_ = NULL;
		GeeSet* _tmp7_ = NULL;
		GeeSet* _tmp8_ = NULL;
		GeeIterator* _tmp9_ = NULL;
		_tmp6_ = persona;
		_tmp7_ = folks_group_details_get_groups ((FolksGroupDetails*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = gee_iterable_iterator ((GeeIterable*) _tmp8_);
		_group_it = _tmp9_;
		while (TRUE) {
			GeeIterator* _tmp10_ = NULL;
			gboolean _tmp11_ = FALSE;
			gchar* group = NULL;
			GeeIterator* _tmp12_ = NULL;
			gpointer _tmp13_ = NULL;
			GVariant** _tmp14_ = NULL;
			gint _tmp14__length1 = 0;
			guint _tmp15_ = 0U;
			const gchar* _tmp16_ = NULL;
			GVariant* _tmp17_ = NULL;
			GVariant* _tmp18_ = NULL;
			_tmp10_ = _group_it;
			_tmp11_ = gee_iterator_next (_tmp10_);
			if (!_tmp11_) {
				break;
			}
			_tmp12_ = _group_it;
			_tmp13_ = gee_iterator_get (_tmp12_);
			group = (gchar*) _tmp13_;
			_tmp14_ = groups;
			_tmp14__length1 = groups_length1;
			_tmp15_ = i;
			i = _tmp15_ + 1;
			_tmp16_ = group;
			_tmp17_ = g_variant_new_string (_tmp16_);
			g_variant_ref_sink (_tmp17_);
			_g_variant_unref0 (_tmp14_[_tmp15_]);
			_tmp14_[_tmp15_] = _tmp17_;
			_tmp18_ = _tmp14_[_tmp15_];
			_g_free0 (group);
		}
		_g_object_unref0 (_group_it);
	}
	im_protocol = NULL;
	_tmp19_ = persona;
	_tmp20_ = folks_im_details_get_im_addresses ((FolksImDetails*) _tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = gee_multi_map_map_iterator (_tmp21_);
	iter = _tmp22_;
	_tmp23_ = iter;
	_tmp24_ = gee_map_iterator_next (_tmp23_);
	if (_tmp24_) {
		GeeMapIterator* _tmp25_ = NULL;
		gpointer _tmp26_ = NULL;
		_tmp25_ = iter;
		_tmp26_ = gee_map_iterator_get_key (_tmp25_);
		_g_free0 (im_protocol);
		im_protocol = (gchar*) _tmp26_;
	}
	_tmp29_ = persona;
	_tmp30_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp29_);
	_tmp31_ = _tmp30_;
	if (_tmp31_ != NULL) {
		TpfPersona* _tmp32_ = NULL;
		GLoadableIcon* _tmp33_ = NULL;
		GLoadableIcon* _tmp34_ = NULL;
		_tmp32_ = persona;
		_tmp33_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp32_);
		_tmp34_ = _tmp33_;
		_tmp28_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp34_, g_file_icon_get_type ());
	} else {
		_tmp28_ = FALSE;
	}
	_tmp35_ = _tmp28_;
	if (_tmp35_) {
		TpfPersona* _tmp36_ = NULL;
		GLoadableIcon* _tmp37_ = NULL;
		GLoadableIcon* _tmp38_ = NULL;
		GFile* _tmp39_ = NULL;
		_tmp36_ = persona;
		_tmp37_ = folks_avatar_details_get_avatar ((FolksAvatarDetails*) _tmp36_);
		_tmp38_ = _tmp37_;
		_tmp39_ = g_file_icon_get_file (G_TYPE_CHECK_INSTANCE_TYPE (_tmp38_, g_file_icon_get_type ()) ? ((GFileIcon*) _tmp38_) : NULL);
		_tmp27_ = _tmp39_;
	} else {
		_tmp27_ = NULL;
	}
	_tmp40_ = _tmp27_;
	_tmp41_ = _g_object_ref0 (_tmp40_);
	avatar_file = _tmp41_;
	_tmp43_ = avatar_file;
	if (_tmp43_ != NULL) {
		GFile* _tmp44_ = NULL;
		gchar* _tmp45_ = NULL;
		gchar* _tmp46_ = NULL;
		GVariant* _tmp47_ = NULL;
		_tmp44_ = avatar_file;
		_tmp45_ = g_file_get_uri (_tmp44_);
		_tmp46_ = _tmp45_;
		_tmp47_ = g_variant_new_string (_tmp46_);
		g_variant_ref_sink (_tmp47_);
		_g_variant_unref0 (_tmp42_);
		_tmp42_ = _tmp47_;
		_g_free0 (_tmp46_);
	} else {
		_g_variant_unref0 (_tmp42_);
		_tmp42_ = NULL;
	}
	_tmp48_ = _tmp42_;
	_tmp49_ = _g_variant_ref0 (_tmp48_);
	avatar_variant = _tmp49_;
	_tmp51_ = persona;
	_tmp52_ = folks_birthday_details_get_birthday ((FolksBirthdayDetails*) _tmp51_);
	_tmp53_ = _tmp52_;
	if (_tmp53_ != NULL) {
		TpfPersona* _tmp54_ = NULL;
		GDateTime* _tmp55_ = NULL;
		GDateTime* _tmp56_ = NULL;
		gint64 _tmp57_ = 0LL;
		GVariant* _tmp58_ = NULL;
		_tmp54_ = persona;
		_tmp55_ = folks_birthday_details_get_birthday ((FolksBirthdayDetails*) _tmp54_);
		_tmp56_ = _tmp55_;
		_tmp57_ = g_date_time_to_unix (_tmp56_);
		_tmp58_ = g_variant_new_int64 (_tmp57_);
		g_variant_ref_sink (_tmp58_);
		_g_variant_unref0 (_tmp50_);
		_tmp50_ = _tmp58_;
	} else {
		_g_variant_unref0 (_tmp50_);
		_tmp50_ = NULL;
	}
	_tmp59_ = _tmp50_;
	_tmp60_ = _g_variant_ref0 (_tmp59_);
	birthday_variant = _tmp60_;
	_tmp61_ = persona;
	_tmp62_ = folks_email_details_get_email_addresses ((FolksEmailDetails*) _tmp61_);
	_tmp63_ = _tmp62_;
	_tmp65_ = tpf_persona_store_cache_serialise_abstract_field_details (self, _tmp63_, &_tmp64_);
	email_addresses = _tmp65_;
	email_addresses_length1 = _tmp64_;
	_email_addresses_size_ = email_addresses_length1;
	_tmp66_ = persona;
	_tmp67_ = folks_phone_details_get_phone_numbers ((FolksPhoneDetails*) _tmp66_);
	_tmp68_ = _tmp67_;
	_tmp70_ = tpf_persona_store_cache_serialise_abstract_field_details (self, _tmp68_, &_tmp69_);
	phone_numbers = _tmp70_;
	phone_numbers_length1 = _tmp69_;
	_phone_numbers_size_ = phone_numbers_length1;
	_tmp71_ = persona;
	_tmp72_ = folks_url_details_get_urls ((FolksUrlDetails*) _tmp71_);
	_tmp73_ = _tmp72_;
	_tmp75_ = tpf_persona_store_cache_serialise_abstract_field_details (self, _tmp73_, &_tmp74_);
	urls = _tmp75_;
	urls_length1 = _tmp74_;
	_urls_size_ = urls_length1;
	_tmp76_ = persona;
	_tmp77_ = folks_persona_get_uid ((FolksPersona*) _tmp76_);
	_tmp78_ = _tmp77_;
	_tmp79_ = g_variant_new_string (_tmp78_);
	g_variant_ref_sink (_tmp79_);
	_tmp80_ = persona;
	_tmp81_ = folks_persona_get_iid ((FolksPersona*) _tmp80_);
	_tmp82_ = _tmp81_;
	_tmp83_ = g_variant_new_string (_tmp82_);
	g_variant_ref_sink (_tmp83_);
	_tmp84_ = persona;
	_tmp85_ = folks_persona_get_display_id ((FolksPersona*) _tmp84_);
	_tmp86_ = _tmp85_;
	_tmp87_ = g_variant_new_string (_tmp86_);
	g_variant_ref_sink (_tmp87_);
	_tmp88_ = im_protocol;
	_tmp89_ = g_variant_new_string (_tmp88_);
	g_variant_ref_sink (_tmp89_);
	_tmp90_ = G_VARIANT_TYPE_STRING;
	_tmp91_ = groups;
	_tmp91__length1 = groups_length1;
	_tmp92_ = g_variant_new_array (_tmp90_, _tmp91_, _tmp91__length1);
	g_variant_ref_sink (_tmp92_);
	_tmp93_ = persona;
	_tmp94_ = folks_favourite_details_get_is_favourite ((FolksFavouriteDetails*) _tmp93_);
	_tmp95_ = _tmp94_;
	_tmp96_ = g_variant_new_boolean (_tmp95_);
	g_variant_ref_sink (_tmp96_);
	_tmp97_ = persona;
	_tmp98_ = folks_alias_details_get_alias ((FolksAliasDetails*) _tmp97_);
	_tmp99_ = _tmp98_;
	_tmp100_ = g_variant_new_string (_tmp99_);
	g_variant_ref_sink (_tmp100_);
	_tmp101_ = persona;
	_tmp102_ = tpf_persona_get_is_in_contact_list (_tmp101_);
	_tmp103_ = _tmp102_;
	_tmp104_ = g_variant_new_boolean (_tmp103_);
	g_variant_ref_sink (_tmp104_);
	_tmp105_ = persona;
	_tmp106_ = folks_persona_get_is_user ((FolksPersona*) _tmp105_);
	_tmp107_ = _tmp106_;
	_tmp108_ = g_variant_new_boolean (_tmp107_);
	g_variant_ref_sink (_tmp108_);
	_tmp109_ = G_VARIANT_TYPE_STRING;
	_tmp110_ = avatar_variant;
	_tmp111_ = g_variant_new_maybe (_tmp109_, _tmp110_);
	g_variant_ref_sink (_tmp111_);
	_tmp112_ = G_VARIANT_TYPE_INT64;
	_tmp113_ = g_variant_new_maybe (_tmp112_, birthday_variant);
	g_variant_ref_sink (_tmp113_);
	_tmp114_ = persona;
	_tmp115_ = folks_name_details_get_full_name ((FolksNameDetails*) _tmp114_);
	_tmp116_ = _tmp115_;
	_tmp117_ = g_variant_new_string (_tmp116_);
	g_variant_ref_sink (_tmp117_);
	_tmp118_ = G_VARIANT_TYPE_STRING;
	_tmp119_ = _g_variant_type_copy0 (_tmp118_);
	_tmp120_ = G_VARIANT_TYPE_STRING;
	_tmp121_ = _g_variant_type_copy0 (_tmp120_);
	_tmp122_ = G_VARIANT_TYPE_STRING;
	_tmp123_ = _g_variant_type_copy0 (_tmp122_);
	_tmp124_ = g_new0 (GVariantType*, 2 + 1);
	_tmp124_[0] = _tmp121_;
	_tmp124_[1] = _tmp123_;
	_tmp125_ = _tmp124_;
	_tmp125__length1 = 2;
	_tmp126_ = g_variant_type_new_tuple (_tmp125_, 2);
	_tmp127_ = _tmp126_;
	_tmp128_ = g_variant_type_new_array (_tmp127_);
	_tmp129_ = g_new0 (GVariantType*, 2 + 1);
	_tmp129_[0] = _tmp119_;
	_tmp129_[1] = _tmp128_;
	_tmp130_ = _tmp129_;
	_tmp130__length1 = 2;
	_tmp131_ = g_variant_type_new_tuple (_tmp130_, 2);
	_tmp132_ = _tmp131_;
	_tmp133_ = g_variant_new_array (_tmp132_, email_addresses, email_addresses_length1);
	g_variant_ref_sink (_tmp133_);
	_tmp134_ = G_VARIANT_TYPE_STRING;
	_tmp135_ = _g_variant_type_copy0 (_tmp134_);
	_tmp136_ = G_VARIANT_TYPE_STRING;
	_tmp137_ = _g_variant_type_copy0 (_tmp136_);
	_tmp138_ = G_VARIANT_TYPE_STRING;
	_tmp139_ = _g_variant_type_copy0 (_tmp138_);
	_tmp140_ = g_new0 (GVariantType*, 2 + 1);
	_tmp140_[0] = _tmp137_;
	_tmp140_[1] = _tmp139_;
	_tmp141_ = _tmp140_;
	_tmp141__length1 = 2;
	_tmp142_ = g_variant_type_new_tuple (_tmp141_, 2);
	_tmp143_ = _tmp142_;
	_tmp144_ = g_variant_type_new_array (_tmp143_);
	_tmp145_ = g_new0 (GVariantType*, 2 + 1);
	_tmp145_[0] = _tmp135_;
	_tmp145_[1] = _tmp144_;
	_tmp146_ = _tmp145_;
	_tmp146__length1 = 2;
	_tmp147_ = g_variant_type_new_tuple (_tmp146_, 2);
	_tmp148_ = _tmp147_;
	_tmp149_ = g_variant_new_array (_tmp148_, phone_numbers, phone_numbers_length1);
	g_variant_ref_sink (_tmp149_);
	_tmp150_ = G_VARIANT_TYPE_STRING;
	_tmp151_ = _g_variant_type_copy0 (_tmp150_);
	_tmp152_ = G_VARIANT_TYPE_STRING;
	_tmp153_ = _g_variant_type_copy0 (_tmp152_);
	_tmp154_ = G_VARIANT_TYPE_STRING;
	_tmp155_ = _g_variant_type_copy0 (_tmp154_);
	_tmp156_ = g_new0 (GVariantType*, 2 + 1);
	_tmp156_[0] = _tmp153_;
	_tmp156_[1] = _tmp155_;
	_tmp157_ = _tmp156_;
	_tmp157__length1 = 2;
	_tmp158_ = g_variant_type_new_tuple (_tmp157_, 2);
	_tmp159_ = _tmp158_;
	_tmp160_ = g_variant_type_new_array (_tmp159_);
	_tmp161_ = g_new0 (GVariantType*, 2 + 1);
	_tmp161_[0] = _tmp151_;
	_tmp161_[1] = _tmp160_;
	_tmp162_ = _tmp161_;
	_tmp162__length1 = 2;
	_tmp163_ = g_variant_type_new_tuple (_tmp162_, 2);
	_tmp164_ = _tmp163_;
	_tmp165_ = g_variant_new_array (_tmp164_, urls, urls_length1);
	g_variant_ref_sink (_tmp165_);
	_tmp166_ = g_new0 (GVariant*, 15 + 1);
	_tmp166_[0] = _tmp79_;
	_tmp166_[1] = _tmp83_;
	_tmp166_[2] = _tmp87_;
	_tmp166_[3] = _tmp89_;
	_tmp166_[4] = _tmp92_;
	_tmp166_[5] = _tmp96_;
	_tmp166_[6] = _tmp100_;
	_tmp166_[7] = _tmp104_;
	_tmp166_[8] = _tmp108_;
	_tmp166_[9] = _tmp111_;
	_tmp166_[10] = _tmp113_;
	_tmp166_[11] = _tmp117_;
	_tmp166_[12] = _tmp133_;
	_tmp166_[13] = _tmp149_;
	_tmp166_[14] = _tmp165_;
	_tmp167_ = _tmp166_;
	_tmp167__length1 = 15;
	_tmp168_ = g_variant_new_tuple (_tmp167_, 15);
	g_variant_ref_sink (_tmp168_);
	_tmp169_ = _tmp168_;
	_tmp167_ = (_vala_array_free (_tmp167_, _tmp167__length1, (GDestroyNotify) g_variant_unref), NULL);
	_g_variant_type_free0 (_tmp164_);
	_tmp162_ = (_vala_array_free (_tmp162_, _tmp162__length1, (GDestroyNotify) g_variant_type_free), NULL);
	_g_variant_type_free0 (_tmp159_);
	_tmp157_ = (_vala_array_free (_tmp157_, _tmp157__length1, (GDestroyNotify) g_variant_type_free), NULL);
	_g_variant_type_free0 (_tmp148_);
	_tmp146_ = (_vala_array_free (_tmp146_, _tmp146__length1, (GDestroyNotify) g_variant_type_free), NULL);
	_g_variant_type_free0 (_tmp143_);
	_tmp141_ = (_vala_array_free (_tmp141_, _tmp141__length1, (GDestroyNotify) g_variant_type_free), NULL);
	_g_variant_type_free0 (_tmp132_);
	_tmp130_ = (_vala_array_free (_tmp130_, _tmp130__length1, (GDestroyNotify) g_variant_type_free), NULL);
	_g_variant_type_free0 (_tmp127_);
	_tmp125_ = (_vala_array_free (_tmp125_, _tmp125__length1, (GDestroyNotify) g_variant_type_free), NULL);
	result = _tmp169_;
	urls = (_vala_array_free (urls, urls_length1, (GDestroyNotify) g_variant_unref), NULL);
	phone_numbers = (_vala_array_free (phone_numbers, phone_numbers_length1, (GDestroyNotify) g_variant_unref), NULL);
	email_addresses = (_vala_array_free (email_addresses, email_addresses_length1, (GDestroyNotify) g_variant_unref), NULL);
	_g_variant_unref0 (birthday_variant);
	_g_variant_unref0 (_tmp50_);
	_g_variant_unref0 (avatar_variant);
	_g_variant_unref0 (_tmp42_);
	_g_object_unref0 (avatar_file);
	_g_object_unref0 (iter);
	_g_free0 (im_protocol);
	groups = (_vala_array_free (groups, groups_length1, (GDestroyNotify) g_variant_unref), NULL);
	return result;
}


static void tpf_persona_store_cache_deserialise_abstract_field_details (TpfPersonaStoreCache* self, GVariant* input_variants, TpfPersonaStoreCacheAfdDeserialisationCallback cb, void* cb_target) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (input_variants != NULL);
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gboolean _tmp1_ = FALSE;
				guint _tmp3_ = 0U;
				GVariant* _tmp4_ = NULL;
				gsize _tmp5_ = 0UL;
				GVariant* input_variant = NULL;
				GVariant* _tmp6_ = NULL;
				guint _tmp7_ = 0U;
				GVariant* _tmp8_ = NULL;
				gchar* val = NULL;
				GVariant* _tmp9_ = NULL;
				GVariant* _tmp10_ = NULL;
				GVariant* _tmp11_ = NULL;
				const gchar* _tmp12_ = NULL;
				gchar* _tmp13_ = NULL;
				gchar* _tmp14_ = NULL;
				GeeHashMultiMap* parameters = NULL;
				GeeHashMultiMap* _tmp15_ = NULL;
				GVariant* params_variants = NULL;
				GVariant* _tmp16_ = NULL;
				GVariant* _tmp17_ = NULL;
				TpfPersonaStoreCacheAfdDeserialisationCallback _tmp36_ = NULL;
				void* _tmp36__target = NULL;
				const gchar* _tmp37_ = NULL;
				GeeHashMultiMap* _tmp38_ = NULL;
				_tmp1_ = _tmp0_;
				if (!_tmp1_) {
					guint _tmp2_ = 0U;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp3_ = i;
				_tmp4_ = input_variants;
				_tmp5_ = g_variant_n_children (_tmp4_);
				if (!(((gsize) _tmp3_) < _tmp5_)) {
					break;
				}
				_tmp6_ = input_variants;
				_tmp7_ = i;
				_tmp8_ = g_variant_get_child_value (_tmp6_, (gsize) _tmp7_);
				input_variant = _tmp8_;
				_tmp9_ = input_variant;
				_tmp10_ = g_variant_get_child_value (_tmp9_, (gsize) 0);
				_tmp11_ = _tmp10_;
				_tmp12_ = g_variant_get_string (_tmp11_, NULL);
				_tmp13_ = g_strdup (_tmp12_);
				_tmp14_ = _tmp13_;
				_g_variant_unref0 (_tmp11_);
				val = _tmp14_;
				_tmp15_ = gee_hash_multi_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
				parameters = _tmp15_;
				_tmp16_ = input_variant;
				_tmp17_ = g_variant_get_child_value (_tmp16_, (gsize) 1);
				params_variants = _tmp17_;
				{
					guint f = 0U;
					f = (guint) 0;
					{
						gboolean _tmp18_ = FALSE;
						_tmp18_ = TRUE;
						while (TRUE) {
							gboolean _tmp19_ = FALSE;
							guint _tmp21_ = 0U;
							GVariant* _tmp22_ = NULL;
							gsize _tmp23_ = 0UL;
							GVariant* params_variant = NULL;
							GVariant* _tmp24_ = NULL;
							guint _tmp25_ = 0U;
							GVariant* _tmp26_ = NULL;
							GeeHashMultiMap* _tmp27_ = NULL;
							GVariant* _tmp28_ = NULL;
							GVariant* _tmp29_ = NULL;
							GVariant* _tmp30_ = NULL;
							const gchar* _tmp31_ = NULL;
							GVariant* _tmp32_ = NULL;
							GVariant* _tmp33_ = NULL;
							GVariant* _tmp34_ = NULL;
							const gchar* _tmp35_ = NULL;
							_tmp19_ = _tmp18_;
							if (!_tmp19_) {
								guint _tmp20_ = 0U;
								_tmp20_ = f;
								f = _tmp20_ + 1;
							}
							_tmp18_ = FALSE;
							_tmp21_ = f;
							_tmp22_ = params_variants;
							_tmp23_ = g_variant_n_children (_tmp22_);
							if (!(((gsize) _tmp21_) < _tmp23_)) {
								break;
							}
							_tmp24_ = params_variants;
							_tmp25_ = f;
							_tmp26_ = g_variant_get_child_value (_tmp24_, (gsize) _tmp25_);
							params_variant = _tmp26_;
							_tmp27_ = parameters;
							_tmp28_ = params_variant;
							_tmp29_ = g_variant_get_child_value (_tmp28_, (gsize) 0);
							_tmp30_ = _tmp29_;
							_tmp31_ = g_variant_get_string (_tmp30_, NULL);
							_tmp32_ = params_variant;
							_tmp33_ = g_variant_get_child_value (_tmp32_, (gsize) 1);
							_tmp34_ = _tmp33_;
							_tmp35_ = g_variant_get_string (_tmp34_, NULL);
							gee_multi_map_set ((GeeMultiMap*) _tmp27_, _tmp31_, _tmp35_);
							_g_variant_unref0 (_tmp34_);
							_g_variant_unref0 (_tmp30_);
							_g_variant_unref0 (params_variant);
						}
					}
				}
				_tmp36_ = cb;
				_tmp36__target = cb_target;
				_tmp37_ = val;
				_tmp38_ = parameters;
				_tmp36_ (_tmp37_, _tmp38_, _tmp36__target);
				_g_variant_unref0 (params_variants);
				_g_object_unref0 (parameters);
				_g_free0 (val);
				_g_variant_unref0 (input_variant);
			}
		}
	}
}


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


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		TpfPersonaStoreCache * self;
		self = _data2_->self;
		_g_object_unref0 (_data2_->url_set);
		_g_object_unref0 (_data2_->phone_number_set);
		_g_object_unref0 (_data2_->email_address_set);
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}


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 (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 (a, b);
	return result;
}


static void ___lambda3_ (Block2Data* _data2_, const gchar* v, GeeHashMultiMap* p) {
	TpfPersonaStoreCache * self;
	const gchar* _tmp0_ = NULL;
	self = _data2_->self;
	g_return_if_fail (v != NULL);
	g_return_if_fail (p != NULL);
	_tmp0_ = v;
	if (g_strcmp0 (_tmp0_, "") != 0) {
		FolksSmallSet* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		GeeHashMultiMap* _tmp3_ = NULL;
		FolksEmailFieldDetails* _tmp4_ = NULL;
		FolksEmailFieldDetails* _tmp5_ = NULL;
		_tmp1_ = _data2_->email_address_set;
		_tmp2_ = v;
		_tmp3_ = p;
		_tmp4_ = folks_email_field_details_new (_tmp2_, (GeeMultiMap*) _tmp3_);
		_tmp5_ = _tmp4_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _tmp5_);
		_g_object_unref0 (_tmp5_);
	}
}


static void ____lambda3__tpf_persona_store_cache_afd_deserialisation_callback (const gchar* val, GeeHashMultiMap* parameters, gpointer self) {
	___lambda3_ (self, val, parameters);
}


static void ___lambda4_ (Block2Data* _data2_, const gchar* v, GeeHashMultiMap* p) {
	TpfPersonaStoreCache * self;
	const gchar* _tmp0_ = NULL;
	self = _data2_->self;
	g_return_if_fail (v != NULL);
	g_return_if_fail (p != NULL);
	_tmp0_ = v;
	if (g_strcmp0 (_tmp0_, "") != 0) {
		FolksSmallSet* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		GeeHashMultiMap* _tmp3_ = NULL;
		FolksPhoneFieldDetails* _tmp4_ = NULL;
		FolksPhoneFieldDetails* _tmp5_ = NULL;
		_tmp1_ = _data2_->phone_number_set;
		_tmp2_ = v;
		_tmp3_ = p;
		_tmp4_ = folks_phone_field_details_new (_tmp2_, (GeeMultiMap*) _tmp3_);
		_tmp5_ = _tmp4_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _tmp5_);
		_g_object_unref0 (_tmp5_);
	}
}


static void ____lambda4__tpf_persona_store_cache_afd_deserialisation_callback (const gchar* val, GeeHashMultiMap* parameters, gpointer self) {
	___lambda4_ (self, val, parameters);
}


static void ___lambda5_ (Block2Data* _data2_, const gchar* v, GeeHashMultiMap* p) {
	TpfPersonaStoreCache * self;
	const gchar* _tmp0_ = NULL;
	self = _data2_->self;
	g_return_if_fail (v != NULL);
	g_return_if_fail (p != NULL);
	_tmp0_ = v;
	if (g_strcmp0 (_tmp0_, "") != 0) {
		FolksSmallSet* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		GeeHashMultiMap* _tmp3_ = NULL;
		FolksUrlFieldDetails* _tmp4_ = NULL;
		FolksUrlFieldDetails* _tmp5_ = NULL;
		_tmp1_ = _data2_->url_set;
		_tmp2_ = v;
		_tmp3_ = p;
		_tmp4_ = folks_url_field_details_new (_tmp2_, (GeeMultiMap*) _tmp3_);
		_tmp5_ = _tmp4_;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp1_, _tmp5_);
		_g_object_unref0 (_tmp5_);
	}
}


static void ____lambda5__tpf_persona_store_cache_afd_deserialisation_callback (const gchar* val, GeeHashMultiMap* parameters, gpointer self) {
	___lambda5_ (self, val, parameters);
}


static TpfPersona* tpf_persona_store_cache_real_deserialise_object (FolksObjectCache* base, GVariant* variant, guint8 object_version) {
	TpfPersonaStoreCache * self;
	TpfPersona* result = NULL;
	Block2Data* _data2_;
	gchar* uid = NULL;
	GVariant* _tmp0_ = NULL;
	GVariant* _tmp1_ = NULL;
	GVariant* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* iid = NULL;
	GVariant* _tmp6_ = NULL;
	GVariant* _tmp7_ = NULL;
	GVariant* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	gchar* display_id = NULL;
	GVariant* _tmp12_ = NULL;
	GVariant* _tmp13_ = NULL;
	GVariant* _tmp14_ = NULL;
	const gchar* _tmp15_ = NULL;
	gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	gchar* im_protocol = NULL;
	GVariant* _tmp18_ = NULL;
	GVariant* _tmp19_ = NULL;
	GVariant* _tmp20_ = NULL;
	const gchar* _tmp21_ = NULL;
	gchar* _tmp22_ = NULL;
	gchar* _tmp23_ = NULL;
	GVariant* groups = NULL;
	GVariant* _tmp24_ = NULL;
	GVariant* _tmp25_ = NULL;
	gboolean is_favourite = FALSE;
	GVariant* _tmp26_ = NULL;
	GVariant* _tmp27_ = NULL;
	GVariant* _tmp28_ = NULL;
	gboolean _tmp29_ = FALSE;
	gboolean _tmp30_ = FALSE;
	gchar* alias = NULL;
	GVariant* _tmp31_ = NULL;
	GVariant* _tmp32_ = NULL;
	GVariant* _tmp33_ = NULL;
	const gchar* _tmp34_ = NULL;
	gchar* _tmp35_ = NULL;
	gchar* _tmp36_ = NULL;
	gboolean is_in_contact_list = FALSE;
	GVariant* _tmp37_ = NULL;
	GVariant* _tmp38_ = NULL;
	GVariant* _tmp39_ = NULL;
	gboolean _tmp40_ = FALSE;
	gboolean _tmp41_ = FALSE;
	gboolean is_user = FALSE;
	GVariant* _tmp42_ = NULL;
	GVariant* _tmp43_ = NULL;
	GVariant* _tmp44_ = NULL;
	gboolean _tmp45_ = FALSE;
	gboolean _tmp46_ = FALSE;
	GVariant* avatar_variant = NULL;
	GVariant* _tmp47_ = NULL;
	GVariant* _tmp48_ = NULL;
	GVariant* _tmp49_ = NULL;
	GVariant* _tmp50_ = NULL;
	GVariant* _tmp51_ = NULL;
	FolksSmallSet* group_set = NULL;
	FolksSmallSet* _tmp52_ = NULL;
	GFileIcon* _tmp65_ = NULL;
	GVariant* _tmp66_ = NULL;
	GFileIcon* avatar = NULL;
	GFileIcon* _tmp72_ = NULL;
	GFileIcon* _tmp73_ = NULL;
	GDateTime* birthday = NULL;
	guint8 _tmp74_ = 0U;
	gchar* full_name = NULL;
	gchar* _tmp84_ = NULL;
	guint8 _tmp85_ = 0U;
	FolksSmallSet* _tmp91_ = NULL;
	FolksSmallSet* _tmp92_ = NULL;
	FolksSmallSet* _tmp93_ = NULL;
	guint8 _tmp94_ = 0U;
	TpfPersonaStore* _tmp104_ = NULL;
	const gchar* _tmp105_ = NULL;
	const gchar* _tmp106_ = NULL;
	const gchar* _tmp107_ = NULL;
	const gchar* _tmp108_ = NULL;
	FolksSmallSet* _tmp109_ = NULL;
	gboolean _tmp110_ = FALSE;
	const gchar* _tmp111_ = NULL;
	gboolean _tmp112_ = FALSE;
	gboolean _tmp113_ = FALSE;
	GFileIcon* _tmp114_ = NULL;
	GDateTime* _tmp115_ = NULL;
	const gchar* _tmp116_ = NULL;
	FolksSmallSet* _tmp117_ = NULL;
	FolksSmallSet* _tmp118_ = NULL;
	FolksSmallSet* _tmp119_ = NULL;
	TpfPersona* _tmp120_ = NULL;
	self = (TpfPersonaStoreCache*) base;
	g_return_val_if_fail (variant != NULL, NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = g_object_ref (self);
	_tmp0_ = variant;
	_tmp1_ = g_variant_get_child_value (_tmp0_, (gsize) 0);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_variant_get_string (_tmp2_, NULL);
	_tmp4_ = g_strdup (_tmp3_);
	_tmp5_ = _tmp4_;
	_g_variant_unref0 (_tmp2_);
	uid = _tmp5_;
	_tmp6_ = variant;
	_tmp7_ = g_variant_get_child_value (_tmp6_, (gsize) 1);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_variant_get_string (_tmp8_, NULL);
	_tmp10_ = g_strdup (_tmp9_);
	_tmp11_ = _tmp10_;
	_g_variant_unref0 (_tmp8_);
	iid = _tmp11_;
	_tmp12_ = variant;
	_tmp13_ = g_variant_get_child_value (_tmp12_, (gsize) 2);
	_tmp14_ = _tmp13_;
	_tmp15_ = g_variant_get_string (_tmp14_, NULL);
	_tmp16_ = g_strdup (_tmp15_);
	_tmp17_ = _tmp16_;
	_g_variant_unref0 (_tmp14_);
	display_id = _tmp17_;
	_tmp18_ = variant;
	_tmp19_ = g_variant_get_child_value (_tmp18_, (gsize) 3);
	_tmp20_ = _tmp19_;
	_tmp21_ = g_variant_get_string (_tmp20_, NULL);
	_tmp22_ = g_strdup (_tmp21_);
	_tmp23_ = _tmp22_;
	_g_variant_unref0 (_tmp20_);
	im_protocol = _tmp23_;
	_tmp24_ = variant;
	_tmp25_ = g_variant_get_child_value (_tmp24_, (gsize) 4);
	groups = _tmp25_;
	_tmp26_ = variant;
	_tmp27_ = g_variant_get_child_value (_tmp26_, (gsize) 5);
	_tmp28_ = _tmp27_;
	_tmp29_ = g_variant_get_boolean (_tmp28_);
	_tmp30_ = _tmp29_;
	_g_variant_unref0 (_tmp28_);
	is_favourite = _tmp30_;
	_tmp31_ = variant;
	_tmp32_ = g_variant_get_child_value (_tmp31_, (gsize) 6);
	_tmp33_ = _tmp32_;
	_tmp34_ = g_variant_get_string (_tmp33_, NULL);
	_tmp35_ = g_strdup (_tmp34_);
	_tmp36_ = _tmp35_;
	_g_variant_unref0 (_tmp33_);
	alias = _tmp36_;
	_tmp37_ = variant;
	_tmp38_ = g_variant_get_child_value (_tmp37_, (gsize) 7);
	_tmp39_ = _tmp38_;
	_tmp40_ = g_variant_get_boolean (_tmp39_);
	_tmp41_ = _tmp40_;
	_g_variant_unref0 (_tmp39_);
	is_in_contact_list = _tmp41_;
	_tmp42_ = variant;
	_tmp43_ = g_variant_get_child_value (_tmp42_, (gsize) 8);
	_tmp44_ = _tmp43_;
	_tmp45_ = g_variant_get_boolean (_tmp44_);
	_tmp46_ = _tmp45_;
	_g_variant_unref0 (_tmp44_);
	is_user = _tmp46_;
	_tmp47_ = variant;
	_tmp48_ = g_variant_get_child_value (_tmp47_, (gsize) 9);
	_tmp49_ = _tmp48_;
	_tmp50_ = g_variant_get_maybe (_tmp49_);
	_tmp51_ = _tmp50_;
	_g_variant_unref0 (_tmp49_);
	avatar_variant = _tmp51_;
	_tmp52_ = folks_small_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL);
	group_set = _tmp52_;
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp53_ = FALSE;
			_tmp53_ = TRUE;
			while (TRUE) {
				gboolean _tmp54_ = FALSE;
				guint _tmp56_ = 0U;
				GVariant* _tmp57_ = NULL;
				gsize _tmp58_ = 0UL;
				FolksSmallSet* _tmp59_ = NULL;
				GVariant* _tmp60_ = NULL;
				guint _tmp61_ = 0U;
				GVariant* _tmp62_ = NULL;
				GVariant* _tmp63_ = NULL;
				const gchar* _tmp64_ = NULL;
				_tmp54_ = _tmp53_;
				if (!_tmp54_) {
					guint _tmp55_ = 0U;
					_tmp55_ = i;
					i = _tmp55_ + 1;
				}
				_tmp53_ = FALSE;
				_tmp56_ = i;
				_tmp57_ = groups;
				_tmp58_ = g_variant_n_children (_tmp57_);
				if (!(((gsize) _tmp56_) < _tmp58_)) {
					break;
				}
				_tmp59_ = group_set;
				_tmp60_ = groups;
				_tmp61_ = i;
				_tmp62_ = g_variant_get_child_value (_tmp60_, (gsize) _tmp61_);
				_tmp63_ = _tmp62_;
				_tmp64_ = g_variant_get_string (_tmp63_, NULL);
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp59_, _tmp64_);
				_g_variant_unref0 (_tmp63_);
			}
		}
	}
	_tmp66_ = avatar_variant;
	if (_tmp66_ != NULL) {
		GVariant* _tmp67_ = NULL;
		const gchar* _tmp68_ = NULL;
		GFile* _tmp69_ = NULL;
		GFile* _tmp70_ = NULL;
		GFileIcon* _tmp71_ = NULL;
		_tmp67_ = avatar_variant;
		_tmp68_ = g_variant_get_string (_tmp67_, NULL);
		_tmp69_ = g_file_new_for_uri (_tmp68_);
		_tmp70_ = _tmp69_;
		_tmp71_ = (GFileIcon*) g_file_icon_new (_tmp70_);
		_g_object_unref0 (_tmp65_);
		_tmp65_ = _tmp71_;
		_g_object_unref0 (_tmp70_);
	} else {
		_g_object_unref0 (_tmp65_);
		_tmp65_ = NULL;
	}
	_tmp72_ = _tmp65_;
	_tmp73_ = _g_object_ref0 (_tmp72_);
	avatar = _tmp73_;
	birthday = NULL;
	_tmp74_ = object_version;
	if (((gint) _tmp74_) == 2) {
		GVariant* birthday_variant = NULL;
		GVariant* _tmp75_ = NULL;
		GVariant* _tmp76_ = NULL;
		GVariant* _tmp77_ = NULL;
		GVariant* _tmp78_ = NULL;
		GVariant* _tmp79_ = NULL;
		GVariant* _tmp80_ = NULL;
		_tmp75_ = variant;
		_tmp76_ = g_variant_get_child_value (_tmp75_, (gsize) 10);
		_tmp77_ = _tmp76_;
		_tmp78_ = g_variant_get_maybe (_tmp77_);
		_tmp79_ = _tmp78_;
		_g_variant_unref0 (_tmp77_);
		birthday_variant = _tmp79_;
		_tmp80_ = birthday_variant;
		if (_tmp80_ != NULL) {
			GVariant* _tmp81_ = NULL;
			gint64 _tmp82_ = 0LL;
			GDateTime* _tmp83_ = NULL;
			_tmp81_ = birthday_variant;
			_tmp82_ = g_variant_get_int64 (_tmp81_);
			_tmp83_ = g_date_time_new_from_unix_utc (_tmp82_);
			_g_date_time_unref0 (birthday);
			birthday = _tmp83_;
		}
		_g_variant_unref0 (birthday_variant);
	}
	_tmp84_ = g_strdup ("");
	full_name = _tmp84_;
	_tmp85_ = object_version;
	if (((gint) _tmp85_) == 2) {
		GVariant* _tmp86_ = NULL;
		GVariant* _tmp87_ = NULL;
		GVariant* _tmp88_ = NULL;
		const gchar* _tmp89_ = NULL;
		gchar* _tmp90_ = NULL;
		_tmp86_ = variant;
		_tmp87_ = g_variant_get_child_value (_tmp86_, (gsize) 11);
		_tmp88_ = _tmp87_;
		_tmp89_ = g_variant_get_string (_tmp88_, NULL);
		_tmp90_ = g_strdup (_tmp89_);
		_g_free0 (full_name);
		full_name = _tmp90_;
		_g_variant_unref0 (_tmp88_);
	}
	_tmp91_ = folks_small_set_new (FOLKS_TYPE_EMAIL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_data2_->email_address_set = _tmp91_;
	_tmp92_ = folks_small_set_new (FOLKS_TYPE_PHONE_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_data2_->phone_number_set = _tmp92_;
	_tmp93_ = folks_small_set_new (FOLKS_TYPE_URL_FIELD_DETAILS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _folks_abstract_field_details_hash_static_gee_hash_data_func, NULL, NULL, _folks_abstract_field_details_equal_static_gee_equal_data_func, NULL, NULL);
	_data2_->url_set = _tmp93_;
	_tmp94_ = object_version;
	if (((gint) _tmp94_) == 2) {
		GVariant* _tmp95_ = NULL;
		GVariant* _tmp96_ = NULL;
		GVariant* _tmp97_ = NULL;
		GVariant* _tmp98_ = NULL;
		GVariant* _tmp99_ = NULL;
		GVariant* _tmp100_ = NULL;
		GVariant* _tmp101_ = NULL;
		GVariant* _tmp102_ = NULL;
		GVariant* _tmp103_ = NULL;
		_tmp95_ = variant;
		_tmp96_ = g_variant_get_child_value (_tmp95_, (gsize) 12);
		_tmp97_ = _tmp96_;
		tpf_persona_store_cache_deserialise_abstract_field_details (self, _tmp97_, ____lambda3__tpf_persona_store_cache_afd_deserialisation_callback, _data2_);
		_g_variant_unref0 (_tmp97_);
		_tmp98_ = variant;
		_tmp99_ = g_variant_get_child_value (_tmp98_, (gsize) 13);
		_tmp100_ = _tmp99_;
		tpf_persona_store_cache_deserialise_abstract_field_details (self, _tmp100_, ____lambda4__tpf_persona_store_cache_afd_deserialisation_callback, _data2_);
		_g_variant_unref0 (_tmp100_);
		_tmp101_ = variant;
		_tmp102_ = g_variant_get_child_value (_tmp101_, (gsize) 14);
		_tmp103_ = _tmp102_;
		tpf_persona_store_cache_deserialise_abstract_field_details (self, _tmp103_, ____lambda5__tpf_persona_store_cache_afd_deserialisation_callback, _data2_);
		_g_variant_unref0 (_tmp103_);
	}
	_tmp104_ = self->priv->_store;
	_tmp105_ = uid;
	_tmp106_ = iid;
	_tmp107_ = display_id;
	_tmp108_ = im_protocol;
	_tmp109_ = group_set;
	_tmp110_ = is_favourite;
	_tmp111_ = alias;
	_tmp112_ = is_in_contact_list;
	_tmp113_ = is_user;
	_tmp114_ = avatar;
	_tmp115_ = birthday;
	_tmp116_ = full_name;
	_tmp117_ = _data2_->email_address_set;
	_tmp118_ = _data2_->phone_number_set;
	_tmp119_ = _data2_->url_set;
	_tmp120_ = tpf_persona_new_from_cache (_tmp104_, _tmp105_, _tmp106_, _tmp107_, _tmp108_, _tmp109_, _tmp110_, _tmp111_, _tmp112_, _tmp113_, (GLoadableIcon*) _tmp114_, _tmp115_, _tmp116_, _tmp117_, _tmp118_, _tmp119_);
	result = _tmp120_;
	_g_free0 (full_name);
	_g_date_time_unref0 (birthday);
	_g_object_unref0 (avatar);
	_g_object_unref0 (_tmp65_);
	_g_object_unref0 (group_set);
	_g_variant_unref0 (avatar_variant);
	_g_free0 (alias);
	_g_variant_unref0 (groups);
	_g_free0 (im_protocol);
	_g_free0 (display_id);
	_g_free0 (iid);
	_g_free0 (uid);
	block2_data_unref (_data2_);
	_data2_ = NULL;
	return result;
}


TpfPersonaStore* tpf_persona_store_cache_get_store (TpfPersonaStoreCache* self) {
	TpfPersonaStore* result;
	TpfPersonaStore* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_store;
	result = _tmp0_;
	return result;
}


static void tpf_persona_store_cache_set_store (TpfPersonaStoreCache* self, TpfPersonaStore* value) {
	TpfPersonaStore* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_store = _tmp0_;
	g_object_notify ((GObject *) self, "store");
}


static void tpf_persona_store_cache_class_init (TpfPersonaStoreCacheClass * klass) {
	tpf_persona_store_cache_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (TpfPersonaStoreCachePrivate));
	FOLKS_OBJECT_CACHE_CLASS (klass)->get_serialised_object_type = tpf_persona_store_cache_real_get_serialised_object_type;
	FOLKS_OBJECT_CACHE_CLASS (klass)->get_serialised_object_version = tpf_persona_store_cache_real_get_serialised_object_version;
	FOLKS_OBJECT_CACHE_CLASS (klass)->serialise_object = tpf_persona_store_cache_real_serialise_object;
	FOLKS_OBJECT_CACHE_CLASS (klass)->deserialise_object = tpf_persona_store_cache_real_deserialise_object;
	G_OBJECT_CLASS (klass)->get_property = _vala_tpf_persona_store_cache_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tpf_persona_store_cache_set_property;
	G_OBJECT_CLASS (klass)->finalize = tpf_persona_store_cache_finalize;
	/**
	   * The {@link Tpf.PersonaStore} associated with this cache.
	   *
	   * @since 0.6.6
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), TPF_PERSONA_STORE_CACHE_STORE, g_param_spec_object ("store", "store", "store", TPF_TYPE_PERSONA_STORE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}


static void tpf_persona_store_cache_instance_init (TpfPersonaStoreCache * self) {
	self->priv = TPF_PERSONA_STORE_CACHE_GET_PRIVATE (self);
}


static void tpf_persona_store_cache_finalize (GObject* obj) {
	TpfPersonaStoreCache * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TPF_TYPE_PERSONA_STORE_CACHE, TpfPersonaStoreCache);
	G_OBJECT_CLASS (tpf_persona_store_cache_parent_class)->finalize (obj);
}


/**
 * An object cache class which implements caching of sets of
 * {@link Tpf.Persona}s from a given {@link Tpf.PersonaStore}.
 *
 * Each {@link Tpf.Persona} is stored as a serialised {@link Variant} which is
 * a tuple containing the following fields:
 *  # UID (``s``)
 *  # IID (``s``)
 *  # IM address (``s``)
 *  # Protocol (``s``)
 *  # Set of group names (``as``)
 *  # Favourite? (``b``)
 *  # Alias (``s``)
 *  # In contact list? (``b``)
 *  # Avatar file URI (``s``)
 *  # Birthday date as a Unix timestamp (``s``)
 *  # Set of e-mail addresses and parameters (``a(sa(ss))``)
 *  # Full name (``s``)
 *
 * @since 0.6.0
 */
GType tpf_persona_store_cache_get_type (void) {
	static volatile gsize tpf_persona_store_cache_type_id__volatile = 0;
	if (g_once_init_enter (&tpf_persona_store_cache_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TpfPersonaStoreCacheClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tpf_persona_store_cache_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TpfPersonaStoreCache), 0, (GInstanceInitFunc) tpf_persona_store_cache_instance_init, NULL };
		GType tpf_persona_store_cache_type_id;
		tpf_persona_store_cache_type_id = g_type_register_static (FOLKS_TYPE_OBJECT_CACHE, "TpfPersonaStoreCache", &g_define_type_info, 0);
		g_once_init_leave (&tpf_persona_store_cache_type_id__volatile, tpf_persona_store_cache_type_id);
	}
	return tpf_persona_store_cache_type_id__volatile;
}


static void _vala_tpf_persona_store_cache_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	TpfPersonaStoreCache * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TPF_TYPE_PERSONA_STORE_CACHE, TpfPersonaStoreCache);
	switch (property_id) {
		case TPF_PERSONA_STORE_CACHE_STORE:
		g_value_set_object (value, tpf_persona_store_cache_get_store (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_tpf_persona_store_cache_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	TpfPersonaStoreCache * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TPF_TYPE_PERSONA_STORE_CACHE, TpfPersonaStoreCache);
	switch (property_id) {
		case TPF_PERSONA_STORE_CACHE_STORE:
		tpf_persona_store_cache_set_store (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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


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



