/* utils.c generated by valac 0.17.6.5-65f99, the Vala compiler
 * generated from utils.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <gee.h>
#include <folks/folks.h>
#include <stdarg.h>
#include <gio/gio.h>
#include <gobject/gvaluecollector.h>


#define FOLKS_INSPECT_TYPE_UTILS (folks_inspect_utils_get_type ())
#define FOLKS_INSPECT_UTILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_TYPE_UTILS, FolksInspectUtils))
#define FOLKS_INSPECT_UTILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_TYPE_UTILS, FolksInspectUtilsClass))
#define FOLKS_INSPECT_IS_UTILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_TYPE_UTILS))
#define FOLKS_INSPECT_IS_UTILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_TYPE_UTILS))
#define FOLKS_INSPECT_UTILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_TYPE_UTILS, FolksInspectUtilsClass))

typedef struct _FolksInspectUtils FolksInspectUtils;
typedef struct _FolksInspectUtilsClass FolksInspectUtilsClass;
typedef struct _FolksInspectUtilsPrivate FolksInspectUtilsPrivate;

#define FOLKS_INSPECT_TYPE_COMMAND (folks_inspect_command_get_type ())
#define FOLKS_INSPECT_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_TYPE_COMMAND, FolksInspectCommand))
#define FOLKS_INSPECT_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_TYPE_COMMAND, FolksInspectCommandClass))
#define FOLKS_INSPECT_IS_COMMAND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_TYPE_COMMAND))
#define FOLKS_INSPECT_IS_COMMAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_TYPE_COMMAND))
#define FOLKS_INSPECT_COMMAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_TYPE_COMMAND, FolksInspectCommandClass))

typedef struct _FolksInspectCommand FolksInspectCommand;
typedef struct _FolksInspectCommandClass FolksInspectCommandClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define FOLKS_INSPECT_TYPE_CLIENT (folks_inspect_client_get_type ())
#define FOLKS_INSPECT_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_TYPE_CLIENT, FolksInspectClient))
#define FOLKS_INSPECT_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_TYPE_CLIENT, FolksInspectClientClass))
#define FOLKS_INSPECT_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_TYPE_CLIENT))
#define FOLKS_INSPECT_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_TYPE_CLIENT))
#define FOLKS_INSPECT_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_TYPE_CLIENT, FolksInspectClientClass))

typedef struct _FolksInspectClient FolksInspectClient;
typedef struct _FolksInspectClientClass FolksInspectClientClass;
typedef struct _FolksInspectClientPrivate FolksInspectClientPrivate;
typedef struct _FolksInspectParamSpecUtils FolksInspectParamSpecUtils;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _FolksInspectUtils {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FolksInspectUtilsPrivate * priv;
};

struct _FolksInspectUtilsClass {
	GTypeClass parent_class;
	void (*finalize) (FolksInspectUtils *self);
};

struct _FolksInspectClient {
	GObject parent_instance;
	FolksInspectClientPrivate * priv;
	GeeHashMap* commands;
};

struct _FolksInspectClientClass {
	GObjectClass parent_class;
};

struct _FolksInspectParamSpecUtils {
	GParamSpec parent_instance;
};


static gpointer folks_inspect_utils_parent_class = NULL;
static guint folks_inspect_utils_indentation;
static guint folks_inspect_utils_indentation = (guint) 0;
static gchar* folks_inspect_utils_indentation_string;
static gchar* folks_inspect_utils_indentation_string = NULL;
extern FILE* folks_inspect_utils_output_filestream;
FILE* folks_inspect_utils_output_filestream = NULL;
static GeeMapIterator* folks_inspect_utils_command_name_iter;
static GeeMapIterator* folks_inspect_utils_command_name_iter = NULL;
static GeeMapIterator* folks_inspect_utils_individual_id_iter;
static GeeMapIterator* folks_inspect_utils_individual_id_iter = NULL;
static GeeIterator* folks_inspect_utils_persona_uid_iter;
static GeeIterator* folks_inspect_utils_persona_uid_iter = NULL;
static GeeIterator* folks_inspect_utils_backend_name_iter;
static GeeIterator* folks_inspect_utils_backend_name_iter = NULL;
static GeeMapIterator* folks_inspect_utils_persona_store_id_iter;
static GeeMapIterator* folks_inspect_utils_persona_store_id_iter = NULL;
extern FolksInspectClient* main_client;

gpointer folks_inspect_utils_ref (gpointer instance);
void folks_inspect_utils_unref (gpointer instance);
GParamSpec* folks_inspect_param_spec_utils (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void folks_inspect_value_set_utils (GValue* value, gpointer v_object);
void folks_inspect_value_take_utils (GValue* value, gpointer v_object);
gpointer folks_inspect_value_get_utils (const GValue* value);
GType folks_inspect_utils_get_type (void) G_GNUC_CONST;
enum  {
	FOLKS_INSPECT_UTILS_DUMMY_PROPERTY
};
gpointer folks_inspect_command_ref (gpointer instance);
void folks_inspect_command_unref (gpointer instance);
GParamSpec* folks_inspect_param_spec_command (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void folks_inspect_value_set_command (GValue* value, gpointer v_object);
void folks_inspect_value_take_command (GValue* value, gpointer v_object);
gpointer folks_inspect_value_get_command (const GValue* value);
GType folks_inspect_command_get_type (void) G_GNUC_CONST;
void folks_inspect_utils_init (void);
static void folks_inspect_utils_transform_object_to_string (GValue* src, GValue* dest);
static void _folks_inspect_utils_transform_object_to_string_gvalue_transform (GValue* src_value, GValue* dest_value);
static void folks_inspect_utils_transform_persona_store_to_string (GValue* src, GValue* dest);
static void _folks_inspect_utils_transform_persona_store_to_string_gvalue_transform (GValue* src_value, GValue* dest_value);
static void folks_inspect_utils_transform_string_array_to_string (GValue* src, GValue* dest);
static void _folks_inspect_utils_transform_string_array_to_string_gvalue_transform (GValue* src_value, GValue* dest_value);
static void folks_inspect_utils_transform_date_time_to_string (GValue* src, GValue* dest);
static void _folks_inspect_utils_transform_date_time_to_string_gvalue_transform (GValue* src_value, GValue* dest_value);
void folks_inspect_utils_indent (void);
void folks_inspect_utils_unindent (void);
void folks_inspect_utils_print_line (const gchar* format, ...);
void folks_inspect_utils_print_individual (FolksIndividual* individual, gboolean show_personas);
static gchar* folks_inspect_utils_property_to_string (GType object_type, const gchar* prop_name, GValue* prop_value);
void folks_inspect_utils_print_persona (FolksPersona* persona);
void folks_inspect_utils_print_persona_store (FolksPersonaStore* store, gboolean show_personas);
gchar* folks_inspect_utils_transform_value_to_string (GValue* prop_value);
gchar* folks_inspect_utils_command_name_completion_cb (const gchar* word, gint state);
GType folks_inspect_client_get_type (void) G_GNUC_CONST;
gchar* folks_inspect_utils_individual_id_completion_cb (const gchar* word, gint state);
FolksIndividualAggregator* folks_inspect_client_get_aggregator (FolksInspectClient* self);
gchar* folks_inspect_utils_persona_uid_completion_cb (const gchar* word, gint state);
gchar* folks_inspect_utils_backend_name_completion_cb (const gchar* word, gint state);
FolksBackendStore* folks_inspect_client_get_backend_store (FolksInspectClient* self);
gchar* folks_inspect_utils_persona_store_id_completion_cb (const gchar* word, gint state);
FolksInspectUtils* folks_inspect_utils_new (void);
FolksInspectUtils* folks_inspect_utils_construct (GType object_type);
static void folks_inspect_utils_finalize (FolksInspectUtils* obj);


static void _folks_inspect_utils_transform_object_to_string_gvalue_transform (GValue* src_value, GValue* dest_value) {
	folks_inspect_utils_transform_object_to_string (src_value, dest_value);
}


static void _folks_inspect_utils_transform_persona_store_to_string_gvalue_transform (GValue* src_value, GValue* dest_value) {
	folks_inspect_utils_transform_persona_store_to_string (src_value, dest_value);
}


static void _folks_inspect_utils_transform_string_array_to_string_gvalue_transform (GValue* src_value, GValue* dest_value) {
	folks_inspect_utils_transform_string_array_to_string (src_value, dest_value);
}


static void _folks_inspect_utils_transform_date_time_to_string_gvalue_transform (GValue* src_value, GValue* dest_value) {
	folks_inspect_utils_transform_date_time_to_string (src_value, dest_value);
}


void folks_inspect_utils_init (void) {
	gchar* _tmp0_;
	FILE* _tmp1_;
	_tmp0_ = g_strdup ("");
	_g_free0 (folks_inspect_utils_indentation_string);
	folks_inspect_utils_indentation_string = _tmp0_;
	folks_inspect_utils_indentation = (guint) 0;
	_tmp1_ = stdout;
	folks_inspect_utils_output_filestream = _tmp1_;
	g_value_register_transform_func (G_TYPE_OBJECT, G_TYPE_STRING, _folks_inspect_utils_transform_object_to_string_gvalue_transform);
	g_value_register_transform_func (FOLKS_TYPE_PERSONA_STORE, G_TYPE_STRING, _folks_inspect_utils_transform_persona_store_to_string_gvalue_transform);
	g_value_register_transform_func (G_TYPE_STRV, G_TYPE_STRING, _folks_inspect_utils_transform_string_array_to_string_gvalue_transform);
	g_value_register_transform_func (G_TYPE_DATE_TIME, G_TYPE_STRING, _folks_inspect_utils_transform_date_time_to_string_gvalue_transform);
}


static void folks_inspect_utils_transform_object_to_string (GValue* src, GValue* dest) {
	GValue _vala_dest = {0};
	GObject* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* output;
	gchar* _tmp2_;
	GValue _tmp3_ = {0};
	g_return_if_fail (src != NULL);
	_tmp0_ = g_value_get_object (src);
	_tmp1_ = g_strdup_printf ("%p", _tmp0_);
	output = _tmp1_;
	_tmp2_ = output;
	output = NULL;
	g_value_init (&_tmp3_, G_TYPE_STRING);
	g_value_take_string (&_tmp3_, _tmp2_);
	G_IS_VALUE (&_vala_dest) ? (g_value_unset (&_vala_dest), NULL) : NULL;
	_vala_dest = _tmp3_;
	_g_free0 (output);
	if (dest) {
		*dest = _vala_dest;
	} else {
		G_IS_VALUE (&_vala_dest) ? (g_value_unset (&_vala_dest), NULL) : NULL;
	}
}


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


static void folks_inspect_utils_transform_persona_store_to_string (GValue* src, GValue* dest) {
	GValue _vala_dest = {0};
	GValue _tmp0_;
	FolksPersonaStore* _tmp1_;
	FolksPersonaStore* store;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_ = NULL;
	gchar* output;
	gchar* _tmp9_;
	GValue _tmp10_ = {0};
	g_return_if_fail (src != NULL);
	_tmp0_ = *src;
	_tmp1_ = _g_object_ref0 (g_value_get_object (&_tmp0_));
	store = _tmp1_;
	_tmp2_ = folks_persona_store_get_type_id (store);
	_tmp3_ = _tmp2_;
	_tmp4_ = folks_persona_store_get_id (store);
	_tmp5_ = _tmp4_;
	_tmp6_ = folks_persona_store_get_display_name (store);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf ("%p: %s, %s (%s)", store, _tmp3_, _tmp5_, _tmp7_);
	output = _tmp8_;
	_tmp9_ = output;
	output = NULL;
	g_value_init (&_tmp10_, G_TYPE_STRING);
	g_value_take_string (&_tmp10_, _tmp9_);
	G_IS_VALUE (&_vala_dest) ? (g_value_unset (&_vala_dest), NULL) : NULL;
	_vala_dest = _tmp10_;
	_g_free0 (output);
	_g_object_unref0 (store);
	if (dest) {
		*dest = _vala_dest;
	} else {
		G_IS_VALUE (&_vala_dest) ? (g_value_unset (&_vala_dest), NULL) : NULL;
	}
}


static void folks_inspect_utils_transform_string_array_to_string (GValue* src, GValue* dest) {
	GValue _vala_dest = {0};
	GValue _tmp0_;
	gchar** array;
	gint array_length1;
	gint _array_size_;
	gchar* _tmp1_;
	gchar* output;
	gboolean first;
	gchar** _tmp2_;
	gint _tmp2__length1;
	const gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	GValue _tmp15_ = {0};
	g_return_if_fail (src != NULL);
	_tmp0_ = *src;
	array = g_value_get_boxed (&_tmp0_);
	array_length1 = g_strv_length (g_value_get_boxed (&_tmp0_));
	_array_size_ = array_length1;
	_tmp1_ = g_strdup ("{ ");
	output = _tmp1_;
	first = TRUE;
	_tmp2_ = array;
	_tmp2__length1 = array_length1;
	{
		gchar** element_collection = NULL;
		gint element_collection_length1 = 0;
		gint _element_collection_size_ = 0;
		gint element_it = 0;
		element_collection = _tmp2_;
		element_collection_length1 = _tmp2__length1;
		for (element_it = 0; element_it < _tmp2__length1; element_it = element_it + 1) {
			gchar* _tmp3_;
			gchar* element = NULL;
			_tmp3_ = g_strdup (element_collection[element_it]);
			element = _tmp3_;
			{
				gboolean _tmp4_;
				const gchar* _tmp7_;
				const gchar* _tmp8_;
				gchar* _tmp9_ = NULL;
				gchar* _tmp10_;
				gchar* _tmp11_;
				_tmp4_ = first;
				if (_tmp4_ == FALSE) {
					const gchar* _tmp5_;
					gchar* _tmp6_;
					_tmp5_ = output;
					_tmp6_ = g_strconcat (_tmp5_, ", ", NULL);
					_g_free0 (output);
					output = _tmp6_;
				}
				_tmp7_ = output;
				_tmp8_ = element;
				_tmp9_ = g_strdup_printf ("'%s'", _tmp8_);
				_tmp10_ = _tmp9_;
				_tmp11_ = g_strconcat (_tmp7_, _tmp10_, NULL);
				_g_free0 (output);
				output = _tmp11_;
				_g_free0 (_tmp10_);
				first = FALSE;
				_g_free0 (element);
			}
		}
	}
	_tmp12_ = output;
	_tmp13_ = g_strconcat (_tmp12_, " }", NULL);
	_g_free0 (output);
	output = _tmp13_;
	_tmp14_ = output;
	output = NULL;
	g_value_init (&_tmp15_, G_TYPE_STRING);
	g_value_take_string (&_tmp15_, _tmp14_);
	G_IS_VALUE (&_vala_dest) ? (g_value_unset (&_vala_dest), NULL) : NULL;
	_vala_dest = _tmp15_;
	_g_free0 (output);
	if (dest) {
		*dest = _vala_dest;
	} else {
		G_IS_VALUE (&_vala_dest) ? (g_value_unset (&_vala_dest), NULL) : NULL;
	}
}


static void folks_inspect_utils_transform_date_time_to_string (GValue* src, GValue* dest) {
	GValue _vala_dest = {0};
	GValue _tmp0_;
	GDateTime* date_time;
	gchar* _tmp1_;
	gchar* output;
	GDateTime* _tmp2_;
	gchar* _tmp5_;
	GValue _tmp6_ = {0};
	g_return_if_fail (src != NULL);
	_tmp0_ = *src;
	date_time = g_value_get_boxed (&_tmp0_);
	_tmp1_ = g_strdup ("(null)");
	output = _tmp1_;
	_tmp2_ = date_time;
	if (_tmp2_ != NULL) {
		GDateTime* _tmp3_;
		gchar* _tmp4_ = NULL;
		_tmp3_ = date_time;
		_tmp4_ = g_date_time_format ((GDateTime*) _tmp3_, "%FT%T%z");
		_g_free0 (output);
		output = _tmp4_;
	}
	_tmp5_ = output;
	output = NULL;
	g_value_init (&_tmp6_, G_TYPE_STRING);
	g_value_take_string (&_tmp6_, _tmp5_);
	G_IS_VALUE (&_vala_dest) ? (g_value_unset (&_vala_dest), NULL) : NULL;
	_vala_dest = _tmp6_;
	_g_free0 (output);
	if (dest) {
		*dest = _vala_dest;
	} else {
		G_IS_VALUE (&_vala_dest) ? (g_value_unset (&_vala_dest), NULL) : NULL;
	}
}


void folks_inspect_utils_indent (void) {
	guint _tmp0_;
	guint _tmp1_;
	gchar* _tmp2_ = NULL;
	_tmp0_ = folks_inspect_utils_indentation;
	folks_inspect_utils_indentation = _tmp0_ + 2;
	_tmp1_ = folks_inspect_utils_indentation;
	_tmp2_ = g_strnfill ((gsize) _tmp1_, ' ');
	_g_free0 (folks_inspect_utils_indentation_string);
	folks_inspect_utils_indentation_string = _tmp2_;
}


void folks_inspect_utils_unindent (void) {
	guint _tmp0_;
	guint _tmp1_;
	gchar* _tmp2_ = NULL;
	_tmp0_ = folks_inspect_utils_indentation;
	folks_inspect_utils_indentation = _tmp0_ - 2;
	_tmp1_ = folks_inspect_utils_indentation;
	_tmp2_ = g_strnfill ((gsize) _tmp1_, ' ');
	_g_free0 (folks_inspect_utils_indentation_string);
	folks_inspect_utils_indentation_string = _tmp2_;
}


void folks_inspect_utils_print_line (const gchar* format, ...) {
	va_list valist = {0};
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* output;
	const gchar* _tmp2_;
	gchar* _tmp3_ = NULL;
	gchar* str;
	FILE* _tmp4_;
	g_return_if_fail (format != NULL);
	va_start (valist, format);
	_tmp0_ = format;
	_tmp1_ = g_strdup_vprintf (_tmp0_, valist);
	output = _tmp1_;
	_tmp2_ = folks_inspect_utils_indentation_string;
	_tmp3_ = g_strdup_printf ("%s%s\n", _tmp2_, output);
	str = _tmp3_;
	_tmp4_ = folks_inspect_utils_output_filestream;
	fprintf (_tmp4_, "%s", str);
	_g_free0 (str);
	_g_free0 (output);
	va_end (valist);
}


void folks_inspect_utils_print_individual (FolksIndividual* individual, gboolean show_personas) {
	FolksIndividual* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	FolksIndividual* _tmp3_;
	GeeSet* _tmp4_;
	GeeSet* _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	FolksIndividual* _tmp8_;
	GObjectClass* _tmp9_ = NULL;
	guint _tmp10_;
	GParamSpec** _tmp11_ = NULL;
	GParamSpec** properties;
	gint properties_length1;
	gint _properties_size_;
	GParamSpec** _tmp12_;
	gint _tmp12__length1;
	gboolean _tmp34_;
	g_return_if_fail (individual != NULL);
	_tmp0_ = individual;
	_tmp1_ = folks_individual_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = individual;
	_tmp4_ = folks_individual_get_personas (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = gee_collection_get_size ((GeeCollection*) _tmp5_);
	_tmp7_ = _tmp6_;
	folks_inspect_utils_print_line ("Individual '%s' with %u personas:", _tmp2_, (guint) _tmp7_);
	_tmp8_ = individual;
	_tmp9_ = G_OBJECT_GET_CLASS ((GObject*) _tmp8_);
	_tmp11_ = g_object_class_list_properties (_tmp9_, &_tmp10_);
	properties = _tmp11_;
	properties_length1 = _tmp10_;
	_properties_size_ = properties_length1;
	folks_inspect_utils_indent ();
	_tmp12_ = properties;
	_tmp12__length1 = properties_length1;
	{
		GParamSpec** pspec_collection = NULL;
		gint pspec_collection_length1 = 0;
		gint _pspec_collection_size_ = 0;
		gint pspec_it = 0;
		pspec_collection = _tmp12_;
		pspec_collection_length1 = _tmp12__length1;
		for (pspec_it = 0; pspec_it < _tmp12__length1; pspec_it = pspec_it + 1) {
			GParamSpec* pspec = NULL;
			pspec = pspec_collection[pspec_it];
			{
				GValue prop_value = {0};
				gchar* output_string = NULL;
				gboolean _tmp13_ = FALSE;
				gboolean _tmp14_;
				gboolean _tmp17_;
				GParamSpec* _tmp18_;
				GType _tmp19_;
				GValue _tmp20_ = {0};
				GValue _tmp21_;
				FolksIndividual* _tmp22_;
				GParamSpec* _tmp23_;
				const gchar* _tmp24_ = NULL;
				FolksIndividual* _tmp25_;
				GType _tmp26_ = 0UL;
				GParamSpec* _tmp27_;
				const gchar* _tmp28_ = NULL;
				GValue _tmp29_;
				gchar* _tmp30_ = NULL;
				GParamSpec* _tmp31_;
				const gchar* _tmp32_ = NULL;
				const gchar* _tmp33_;
				_tmp14_ = show_personas;
				if (_tmp14_ == TRUE) {
					GParamSpec* _tmp15_;
					const gchar* _tmp16_ = NULL;
					_tmp15_ = pspec;
					_tmp16_ = g_param_spec_get_name (_tmp15_);
					_tmp13_ = g_strcmp0 (_tmp16_, "personas") == 0;
				} else {
					_tmp13_ = FALSE;
				}
				_tmp17_ = _tmp13_;
				if (_tmp17_) {
					_g_free0 (output_string);
					G_IS_VALUE (&prop_value) ? (g_value_unset (&prop_value), NULL) : NULL;
					continue;
				}
				_tmp18_ = pspec;
				_tmp19_ = _tmp18_->value_type;
				g_value_init (&_tmp20_, _tmp19_);
				G_IS_VALUE (&prop_value) ? (g_value_unset (&prop_value), NULL) : NULL;
				prop_value = _tmp20_;
				_tmp21_ = prop_value;
				_tmp22_ = individual;
				_tmp23_ = pspec;
				_tmp24_ = g_param_spec_get_name (_tmp23_);
				g_object_get_property ((GObject*) _tmp22_, _tmp24_, &prop_value);
				_tmp25_ = individual;
				_tmp26_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp25_);
				_tmp27_ = pspec;
				_tmp28_ = g_param_spec_get_name (_tmp27_);
				_tmp29_ = prop_value;
				_tmp30_ = folks_inspect_utils_property_to_string (_tmp26_, _tmp28_, &_tmp29_);
				_g_free0 (output_string);
				output_string = _tmp30_;
				_tmp31_ = pspec;
				_tmp32_ = g_param_spec_get_nick (_tmp31_);
				_tmp33_ = output_string;
				folks_inspect_utils_print_line ("%-20s  %s", _tmp32_, _tmp33_);
				_g_free0 (output_string);
				G_IS_VALUE (&prop_value) ? (g_value_unset (&prop_value), NULL) : NULL;
			}
		}
	}
	_tmp34_ = show_personas;
	if (_tmp34_ == TRUE) {
		folks_inspect_utils_print_line ("");
		folks_inspect_utils_print_line ("Personas:");
		folks_inspect_utils_indent ();
		{
			FolksIndividual* _tmp35_;
			GeeSet* _tmp36_;
			GeeSet* _tmp37_;
			GeeIterator* _tmp38_ = NULL;
			GeeIterator* _persona_it;
			_tmp35_ = individual;
			_tmp36_ = folks_individual_get_personas (_tmp35_);
			_tmp37_ = _tmp36_;
			_tmp38_ = gee_iterable_iterator ((GeeIterable*) _tmp37_);
			_persona_it = _tmp38_;
			while (TRUE) {
				GeeIterator* _tmp39_;
				gboolean _tmp40_ = FALSE;
				GeeIterator* _tmp41_;
				gpointer _tmp42_ = NULL;
				FolksPersona* persona;
				FolksPersona* _tmp43_;
				_tmp39_ = _persona_it;
				_tmp40_ = gee_iterator_next (_tmp39_);
				if (!_tmp40_) {
					break;
				}
				_tmp41_ = _persona_it;
				_tmp42_ = gee_iterator_get (_tmp41_);
				persona = (FolksPersona*) _tmp42_;
				_tmp43_ = persona;
				folks_inspect_utils_print_persona (_tmp43_);
				_g_object_unref0 (persona);
			}
			_g_object_unref0 (_persona_it);
		}
		folks_inspect_utils_unindent ();
	}
	folks_inspect_utils_unindent ();
}


void folks_inspect_utils_print_persona (FolksPersona* persona) {
	FolksPersona* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	FolksPersona* _tmp3_;
	GObjectClass* _tmp4_ = NULL;
	guint _tmp5_;
	GParamSpec** _tmp6_ = NULL;
	GParamSpec** properties;
	gint properties_length1;
	gint _properties_size_;
	GParamSpec** _tmp7_;
	gint _tmp7__length1;
	g_return_if_fail (persona != NULL);
	_tmp0_ = persona;
	_tmp1_ = folks_persona_get_uid (_tmp0_);
	_tmp2_ = _tmp1_;
	folks_inspect_utils_print_line ("Persona '%s':", _tmp2_);
	_tmp3_ = persona;
	_tmp4_ = G_OBJECT_GET_CLASS ((GObject*) _tmp3_);
	_tmp6_ = g_object_class_list_properties (_tmp4_, &_tmp5_);
	properties = _tmp6_;
	properties_length1 = _tmp5_;
	_properties_size_ = properties_length1;
	folks_inspect_utils_indent ();
	_tmp7_ = properties;
	_tmp7__length1 = properties_length1;
	{
		GParamSpec** pspec_collection = NULL;
		gint pspec_collection_length1 = 0;
		gint _pspec_collection_size_ = 0;
		gint pspec_it = 0;
		pspec_collection = _tmp7_;
		pspec_collection_length1 = _tmp7__length1;
		for (pspec_it = 0; pspec_it < _tmp7__length1; pspec_it = pspec_it + 1) {
			GParamSpec* pspec = NULL;
			pspec = pspec_collection[pspec_it];
			{
				GValue prop_value = {0};
				gchar* output_string = NULL;
				GParamSpec* _tmp8_;
				GType _tmp9_;
				GValue _tmp10_ = {0};
				GValue _tmp11_;
				FolksPersona* _tmp12_;
				GParamSpec* _tmp13_;
				const gchar* _tmp14_ = NULL;
				FolksPersona* _tmp15_;
				GType _tmp16_ = 0UL;
				GParamSpec* _tmp17_;
				const gchar* _tmp18_ = NULL;
				GValue _tmp19_;
				gchar* _tmp20_ = NULL;
				GParamSpec* _tmp21_;
				const gchar* _tmp22_ = NULL;
				const gchar* _tmp23_;
				_tmp8_ = pspec;
				_tmp9_ = _tmp8_->value_type;
				g_value_init (&_tmp10_, _tmp9_);
				G_IS_VALUE (&prop_value) ? (g_value_unset (&prop_value), NULL) : NULL;
				prop_value = _tmp10_;
				_tmp11_ = prop_value;
				_tmp12_ = persona;
				_tmp13_ = pspec;
				_tmp14_ = g_param_spec_get_name (_tmp13_);
				g_object_get_property ((GObject*) _tmp12_, _tmp14_, &prop_value);
				_tmp15_ = persona;
				_tmp16_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp15_);
				_tmp17_ = pspec;
				_tmp18_ = g_param_spec_get_name (_tmp17_);
				_tmp19_ = prop_value;
				_tmp20_ = folks_inspect_utils_property_to_string (_tmp16_, _tmp18_, &_tmp19_);
				_g_free0 (output_string);
				output_string = _tmp20_;
				_tmp21_ = pspec;
				_tmp22_ = g_param_spec_get_nick (_tmp21_);
				_tmp23_ = output_string;
				folks_inspect_utils_print_line ("%-20s  %s", _tmp22_, _tmp23_);
				_g_free0 (output_string);
				G_IS_VALUE (&prop_value) ? (g_value_unset (&prop_value), NULL) : NULL;
			}
		}
	}
	folks_inspect_utils_unindent ();
}


void folks_inspect_utils_print_persona_store (FolksPersonaStore* store, gboolean show_personas) {
	FolksPersonaStore* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	FolksPersonaStore* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	FolksPersonaStore* _tmp9_;
	GeeMap* _tmp10_;
	GeeMap* _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	FolksPersonaStore* _tmp14_;
	GObjectClass* _tmp15_ = NULL;
	guint _tmp16_;
	GParamSpec** _tmp17_ = NULL;
	GParamSpec** properties;
	gint properties_length1;
	gint _properties_size_;
	GParamSpec** _tmp18_;
	gint _tmp18__length1;
	gboolean _tmp40_;
	g_return_if_fail (store != NULL);
	_tmp0_ = store;
	_tmp1_ = folks_persona_store_get_is_prepared (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == FALSE) {
		FolksPersonaStore* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp3_ = store;
		_tmp4_ = folks_persona_store_get_id (_tmp3_);
		_tmp5_ = _tmp4_;
		folks_inspect_utils_print_line ("Persona store '%s':", _tmp5_);
		folks_inspect_utils_indent ();
		folks_inspect_utils_print_line ("Not prepared.");
		folks_inspect_utils_unindent ();
		return;
	}
	_tmp6_ = store;
	_tmp7_ = folks_persona_store_get_id (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = store;
	_tmp10_ = folks_persona_store_get_personas (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = gee_map_get_size (_tmp11_);
	_tmp13_ = _tmp12_;
	folks_inspect_utils_print_line ("Persona store '%s' with %u personas:", _tmp8_, (guint) _tmp13_);
	_tmp14_ = store;
	_tmp15_ = G_OBJECT_GET_CLASS ((GObject*) _tmp14_);
	_tmp17_ = g_object_class_list_properties (_tmp15_, &_tmp16_);
	properties = _tmp17_;
	properties_length1 = _tmp16_;
	_properties_size_ = properties_length1;
	folks_inspect_utils_indent ();
	_tmp18_ = properties;
	_tmp18__length1 = properties_length1;
	{
		GParamSpec** pspec_collection = NULL;
		gint pspec_collection_length1 = 0;
		gint _pspec_collection_size_ = 0;
		gint pspec_it = 0;
		pspec_collection = _tmp18_;
		pspec_collection_length1 = _tmp18__length1;
		for (pspec_it = 0; pspec_it < _tmp18__length1; pspec_it = pspec_it + 1) {
			GParamSpec* pspec = NULL;
			pspec = pspec_collection[pspec_it];
			{
				GValue prop_value = {0};
				gchar* output_string = NULL;
				gboolean _tmp19_ = FALSE;
				gboolean _tmp20_;
				gboolean _tmp23_;
				GParamSpec* _tmp24_;
				GType _tmp25_;
				GValue _tmp26_ = {0};
				GValue _tmp27_;
				FolksPersonaStore* _tmp28_;
				GParamSpec* _tmp29_;
				const gchar* _tmp30_ = NULL;
				FolksPersonaStore* _tmp31_;
				GType _tmp32_ = 0UL;
				GParamSpec* _tmp33_;
				const gchar* _tmp34_ = NULL;
				GValue _tmp35_;
				gchar* _tmp36_ = NULL;
				GParamSpec* _tmp37_;
				const gchar* _tmp38_ = NULL;
				const gchar* _tmp39_;
				_tmp20_ = show_personas;
				if (_tmp20_ == TRUE) {
					GParamSpec* _tmp21_;
					const gchar* _tmp22_ = NULL;
					_tmp21_ = pspec;
					_tmp22_ = g_param_spec_get_name (_tmp21_);
					_tmp19_ = g_strcmp0 (_tmp22_, "personas") == 0;
				} else {
					_tmp19_ = FALSE;
				}
				_tmp23_ = _tmp19_;
				if (_tmp23_) {
					_g_free0 (output_string);
					G_IS_VALUE (&prop_value) ? (g_value_unset (&prop_value), NULL) : NULL;
					continue;
				}
				_tmp24_ = pspec;
				_tmp25_ = _tmp24_->value_type;
				g_value_init (&_tmp26_, _tmp25_);
				G_IS_VALUE (&prop_value) ? (g_value_unset (&prop_value), NULL) : NULL;
				prop_value = _tmp26_;
				_tmp27_ = prop_value;
				_tmp28_ = store;
				_tmp29_ = pspec;
				_tmp30_ = g_param_spec_get_name (_tmp29_);
				g_object_get_property ((GObject*) _tmp28_, _tmp30_, &prop_value);
				_tmp31_ = store;
				_tmp32_ = G_TYPE_FROM_INSTANCE ((GObject*) _tmp31_);
				_tmp33_ = pspec;
				_tmp34_ = g_param_spec_get_name (_tmp33_);
				_tmp35_ = prop_value;
				_tmp36_ = folks_inspect_utils_property_to_string (_tmp32_, _tmp34_, &_tmp35_);
				_g_free0 (output_string);
				output_string = _tmp36_;
				_tmp37_ = pspec;
				_tmp38_ = g_param_spec_get_nick (_tmp37_);
				_tmp39_ = output_string;
				folks_inspect_utils_print_line ("%-20s  %s", _tmp38_, _tmp39_);
				_g_free0 (output_string);
				G_IS_VALUE (&prop_value) ? (g_value_unset (&prop_value), NULL) : NULL;
			}
		}
	}
	_tmp40_ = show_personas;
	if (_tmp40_ == TRUE) {
		folks_inspect_utils_print_line ("");
		folks_inspect_utils_print_line ("Personas:");
		folks_inspect_utils_indent ();
		{
			FolksPersonaStore* _tmp41_;
			GeeMap* _tmp42_;
			GeeMap* _tmp43_;
			GeeCollection* _tmp44_;
			GeeCollection* _tmp45_;
			GeeCollection* _tmp46_;
			GeeIterator* _tmp47_ = NULL;
			GeeIterator* _tmp48_;
			GeeIterator* _persona_it;
			_tmp41_ = store;
			_tmp42_ = folks_persona_store_get_personas (_tmp41_);
			_tmp43_ = _tmp42_;
			_tmp44_ = gee_map_get_values (_tmp43_);
			_tmp45_ = _tmp44_;
			_tmp46_ = _tmp45_;
			_tmp47_ = gee_iterable_iterator ((GeeIterable*) _tmp46_);
			_tmp48_ = _tmp47_;
			_g_object_unref0 (_tmp46_);
			_persona_it = _tmp48_;
			while (TRUE) {
				GeeIterator* _tmp49_;
				gboolean _tmp50_ = FALSE;
				GeeIterator* _tmp51_;
				gpointer _tmp52_ = NULL;
				FolksPersona* persona;
				FolksPersona* _tmp53_;
				_tmp49_ = _persona_it;
				_tmp50_ = gee_iterator_next (_tmp49_);
				if (!_tmp50_) {
					break;
				}
				_tmp51_ = _persona_it;
				_tmp52_ = gee_iterator_get (_tmp51_);
				persona = (FolksPersona*) _tmp52_;
				_tmp53_ = persona;
				folks_inspect_utils_print_persona (_tmp53_);
				_g_object_unref0 (persona);
			}
			_g_object_unref0 (_persona_it);
		}
		folks_inspect_utils_unindent ();
	}
	folks_inspect_utils_unindent ();
}


static gchar* g_date_time_to_string (GDateTime* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_date_time_format (self, "%FT%H:%M:%S%z");
	result = _tmp0_;
	return result;
}


static gchar* folks_inspect_utils_property_to_string (GType object_type, const gchar* prop_name, GValue* prop_value) {
	gchar* result = NULL;
	gchar* output_string = NULL;
	gboolean _tmp0_ = FALSE;
	GType _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp4_;
	GValue _tmp228_;
	gchar* _tmp229_ = NULL;
	g_return_val_if_fail (prop_name != NULL, NULL);
	g_return_val_if_fail (prop_value != NULL, NULL);
	_tmp1_ = object_type;
	_tmp2_ = g_type_is_a (_tmp1_, FOLKS_TYPE_INDIVIDUAL);
	if (_tmp2_) {
		const gchar* _tmp3_;
		_tmp3_ = prop_name;
		_tmp0_ = g_strcmp0 (_tmp3_, "personas") == 0;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp4_ = _tmp0_;
	if (_tmp4_) {
		GObject* _tmp5_ = NULL;
		GeeSet* _tmp6_;
		GeeSet* personas;
		GeeSet* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gchar* _tmp10_ = NULL;
		_tmp5_ = g_value_get_object (prop_value);
		_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_SET, GeeSet));
		personas = _tmp6_;
		_tmp7_ = personas;
		_tmp8_ = gee_collection_get_size ((GeeCollection*) _tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = g_strdup_printf ("List of %u personas", (guint) _tmp9_);
		result = _tmp10_;
		_g_object_unref0 (personas);
		_g_free0 (output_string);
		return result;
	} else {
		gboolean _tmp11_ = FALSE;
		GType _tmp12_;
		gboolean _tmp13_ = FALSE;
		gboolean _tmp15_;
		_tmp12_ = object_type;
		_tmp13_ = g_type_is_a (_tmp12_, FOLKS_TYPE_PERSONA_STORE);
		if (_tmp13_) {
			const gchar* _tmp14_;
			_tmp14_ = prop_name;
			_tmp11_ = g_strcmp0 (_tmp14_, "personas") == 0;
		} else {
			_tmp11_ = FALSE;
		}
		_tmp15_ = _tmp11_;
		if (_tmp15_) {
			GObject* _tmp16_ = NULL;
			GeeMap* _tmp17_;
			GeeMap* personas;
			GeeMap* _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			gchar* _tmp21_ = NULL;
			_tmp16_ = g_value_get_object (prop_value);
			_tmp17_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_MAP, GeeMap));
			personas = _tmp17_;
			_tmp18_ = personas;
			_tmp19_ = gee_map_get_size (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = g_strdup_printf ("Set of %u personas", (guint) _tmp20_);
			result = _tmp21_;
			_g_object_unref0 (personas);
			_g_free0 (output_string);
			return result;
		} else {
			gboolean _tmp22_ = FALSE;
			gboolean _tmp23_ = FALSE;
			gboolean _tmp24_ = FALSE;
			const gchar* _tmp25_;
			gboolean _tmp27_;
			gboolean _tmp29_;
			gboolean _tmp31_;
			_tmp25_ = prop_name;
			if (g_strcmp0 (_tmp25_, "groups") == 0) {
				_tmp24_ = TRUE;
			} else {
				const gchar* _tmp26_;
				_tmp26_ = prop_name;
				_tmp24_ = g_strcmp0 (_tmp26_, "local-ids") == 0;
			}
			_tmp27_ = _tmp24_;
			if (_tmp27_) {
				_tmp23_ = TRUE;
			} else {
				const gchar* _tmp28_;
				_tmp28_ = prop_name;
				_tmp23_ = g_strcmp0 (_tmp28_, "supported-fields") == 0;
			}
			_tmp29_ = _tmp23_;
			if (_tmp29_) {
				_tmp22_ = TRUE;
			} else {
				const gchar* _tmp30_;
				_tmp30_ = prop_name;
				_tmp22_ = g_strcmp0 (_tmp30_, "anti-links") == 0;
			}
			_tmp31_ = _tmp22_;
			if (_tmp31_) {
				GObject* _tmp32_ = NULL;
				GeeSet* _tmp33_;
				GeeSet* groups;
				gchar* _tmp34_;
				gboolean first;
				const gchar* _tmp49_;
				gchar* _tmp50_;
				_tmp32_ = g_value_get_object (prop_value);
				_tmp33_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp32_, GEE_TYPE_SET, GeeSet));
				groups = _tmp33_;
				_tmp34_ = g_strdup ("{ ");
				_g_free0 (output_string);
				output_string = _tmp34_;
				first = TRUE;
				{
					GeeSet* _tmp35_;
					GeeIterator* _tmp36_ = NULL;
					GeeIterator* _group_it;
					_tmp35_ = groups;
					_tmp36_ = gee_iterable_iterator ((GeeIterable*) _tmp35_);
					_group_it = _tmp36_;
					while (TRUE) {
						GeeIterator* _tmp37_;
						gboolean _tmp38_ = FALSE;
						GeeIterator* _tmp39_;
						gpointer _tmp40_ = NULL;
						gchar* group;
						gboolean _tmp41_;
						const gchar* _tmp44_;
						const gchar* _tmp45_;
						gchar* _tmp46_ = NULL;
						gchar* _tmp47_;
						gchar* _tmp48_;
						_tmp37_ = _group_it;
						_tmp38_ = gee_iterator_next (_tmp37_);
						if (!_tmp38_) {
							break;
						}
						_tmp39_ = _group_it;
						_tmp40_ = gee_iterator_get (_tmp39_);
						group = (gchar*) _tmp40_;
						_tmp41_ = first;
						if (_tmp41_ == FALSE) {
							const gchar* _tmp42_;
							gchar* _tmp43_;
							_tmp42_ = output_string;
							_tmp43_ = g_strconcat (_tmp42_, ", ", NULL);
							_g_free0 (output_string);
							output_string = _tmp43_;
						}
						_tmp44_ = output_string;
						_tmp45_ = group;
						_tmp46_ = g_strdup_printf ("'%s'", _tmp45_);
						_tmp47_ = _tmp46_;
						_tmp48_ = g_strconcat (_tmp44_, _tmp47_, NULL);
						_g_free0 (output_string);
						output_string = _tmp48_;
						_g_free0 (_tmp47_);
						first = FALSE;
						_g_free0 (group);
					}
					_g_object_unref0 (_group_it);
				}
				_tmp49_ = output_string;
				_tmp50_ = g_strconcat (_tmp49_, " }", NULL);
				_g_free0 (output_string);
				output_string = _tmp50_;
				result = output_string;
				_g_object_unref0 (groups);
				return result;
			} else {
				const gchar* _tmp51_;
				_tmp51_ = prop_name;
				if (g_strcmp0 (_tmp51_, "avatar") == 0) {
					gchar* ret;
					GObject* _tmp52_ = NULL;
					GLoadableIcon* _tmp53_;
					GLoadableIcon* avatar;
					gboolean _tmp54_ = FALSE;
					gboolean _tmp55_ = FALSE;
					GLoadableIcon* _tmp56_;
					gboolean _tmp58_;
					gboolean _tmp61_;
					ret = NULL;
					_tmp52_ = g_value_get_object (prop_value);
					_tmp53_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, g_loadable_icon_get_type (), GLoadableIcon));
					avatar = _tmp53_;
					_tmp56_ = avatar;
					if (_tmp56_ != NULL) {
						GLoadableIcon* _tmp57_;
						_tmp57_ = avatar;
						_tmp55_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp57_, g_file_icon_get_type ());
					} else {
						_tmp55_ = FALSE;
					}
					_tmp58_ = _tmp55_;
					if (_tmp58_) {
						GLoadableIcon* _tmp59_;
						GFile* _tmp60_ = NULL;
						_tmp59_ = avatar;
						_tmp60_ = g_file_icon_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp59_, g_file_icon_get_type (), GFileIcon));
						_tmp54_ = _tmp60_ != NULL;
					} else {
						_tmp54_ = FALSE;
					}
					_tmp61_ = _tmp54_;
					if (_tmp61_) {
						GLoadableIcon* _tmp62_;
						GLoadableIcon* _tmp63_;
						GFile* _tmp64_ = NULL;
						gchar* _tmp65_ = NULL;
						gchar* _tmp66_;
						gchar* _tmp67_ = NULL;
						_tmp62_ = avatar;
						_tmp63_ = avatar;
						_tmp64_ = g_file_icon_get_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp63_, g_file_icon_get_type (), GFileIcon));
						_tmp65_ = g_file_get_uri (_tmp64_);
						_tmp66_ = _tmp65_;
						_tmp67_ = g_strdup_printf ("%p (file: %s)", _tmp62_, _tmp66_);
						_g_free0 (ret);
						ret = _tmp67_;
						_g_free0 (_tmp66_);
					} else {
						GLoadableIcon* _tmp68_;
						_tmp68_ = avatar;
						if (_tmp68_ != NULL) {
							GLoadableIcon* _tmp69_;
							gchar* _tmp70_ = NULL;
							_tmp69_ = avatar;
							_tmp70_ = g_strdup_printf ("%p", _tmp69_);
							_g_free0 (ret);
							ret = _tmp70_;
						}
					}
					result = ret;
					_g_object_unref0 (avatar);
					_g_free0 (output_string);
					return result;
				} else {
					const gchar* _tmp71_;
					_tmp71_ = prop_name;
					if (g_strcmp0 (_tmp71_, "file") == 0) {
						gchar* ret;
						GObject* _tmp72_ = NULL;
						GFile* _tmp73_;
						GFile* file;
						GFile* _tmp74_;
						ret = NULL;
						_tmp72_ = g_value_get_object (prop_value);
						_tmp73_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp72_, G_TYPE_FILE, GFile));
						file = _tmp73_;
						_tmp74_ = file;
						if (_tmp74_ != NULL) {
							GFile* _tmp75_;
							GFile* _tmp76_;
							gchar* _tmp77_ = NULL;
							gchar* _tmp78_;
							gchar* _tmp79_ = NULL;
							_tmp75_ = file;
							_tmp76_ = file;
							_tmp77_ = g_file_get_uri (_tmp76_);
							_tmp78_ = _tmp77_;
							_tmp79_ = g_strdup_printf ("%p (file: %s)", _tmp75_, _tmp78_);
							_g_free0 (ret);
							ret = _tmp79_;
							_g_free0 (_tmp78_);
						}
						result = ret;
						_g_object_unref0 (file);
						_g_free0 (output_string);
						return result;
					} else {
						gboolean _tmp80_ = FALSE;
						const gchar* _tmp81_;
						gboolean _tmp83_;
						_tmp81_ = prop_name;
						if (g_strcmp0 (_tmp81_, "im-addresses") == 0) {
							_tmp80_ = TRUE;
						} else {
							const gchar* _tmp82_;
							_tmp82_ = prop_name;
							_tmp80_ = g_strcmp0 (_tmp82_, "web-service-addresses") == 0;
						}
						_tmp83_ = _tmp80_;
						if (_tmp83_) {
							GObject* _tmp84_ = NULL;
							GeeMultiMap* _tmp85_;
							GeeMultiMap* prop_list;
							gchar* _tmp86_;
							gboolean first;
							const gchar* _tmp125_;
							gchar* _tmp126_;
							_tmp84_ = g_value_get_object (prop_value);
							_tmp85_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp84_, GEE_TYPE_MULTI_MAP, GeeMultiMap));
							prop_list = _tmp85_;
							_tmp86_ = g_strdup ("{ ");
							_g_free0 (output_string);
							output_string = _tmp86_;
							first = TRUE;
							{
								GeeMultiMap* _tmp87_;
								GeeSet* _tmp88_ = NULL;
								GeeSet* _tmp89_;
								GeeIterator* _tmp90_ = NULL;
								GeeIterator* _tmp91_;
								GeeIterator* _k_it;
								_tmp87_ = prop_list;
								_tmp88_ = gee_multi_map_get_keys (_tmp87_);
								_tmp89_ = _tmp88_;
								_tmp90_ = gee_iterable_iterator ((GeeIterable*) _tmp89_);
								_tmp91_ = _tmp90_;
								_g_object_unref0 (_tmp89_);
								_k_it = _tmp91_;
								while (TRUE) {
									GeeIterator* _tmp92_;
									gboolean _tmp93_ = FALSE;
									GeeIterator* _tmp94_;
									gpointer _tmp95_ = NULL;
									gchar* k;
									gboolean _tmp96_;
									const gchar* _tmp99_;
									const gchar* _tmp100_;
									gchar* _tmp101_ = NULL;
									gchar* _tmp102_;
									gchar* _tmp103_;
									GeeMultiMap* _tmp104_;
									const gchar* _tmp105_;
									GeeCollection* _tmp106_ = NULL;
									GeeCollection* v;
									gboolean _first;
									const gchar* _tmp123_;
									gchar* _tmp124_;
									_tmp92_ = _k_it;
									_tmp93_ = gee_iterator_next (_tmp92_);
									if (!_tmp93_) {
										break;
									}
									_tmp94_ = _k_it;
									_tmp95_ = gee_iterator_get (_tmp94_);
									k = (gchar*) _tmp95_;
									_tmp96_ = first;
									if (_tmp96_ == FALSE) {
										const gchar* _tmp97_;
										gchar* _tmp98_;
										_tmp97_ = output_string;
										_tmp98_ = g_strconcat (_tmp97_, ", ", NULL);
										_g_free0 (output_string);
										output_string = _tmp98_;
									}
									_tmp99_ = output_string;
									_tmp100_ = k;
									_tmp101_ = g_strdup_printf ("'%s' : { ", _tmp100_);
									_tmp102_ = _tmp101_;
									_tmp103_ = g_strconcat (_tmp99_, _tmp102_, NULL);
									_g_free0 (output_string);
									output_string = _tmp103_;
									_g_free0 (_tmp102_);
									first = FALSE;
									_tmp104_ = prop_list;
									_tmp105_ = k;
									_tmp106_ = gee_multi_map_get (_tmp104_, _tmp105_);
									v = _tmp106_;
									_first = TRUE;
									{
										GeeCollection* _tmp107_;
										GeeIterator* _tmp108_ = NULL;
										GeeIterator* _a_it;
										_tmp107_ = v;
										_tmp108_ = gee_iterable_iterator ((GeeIterable*) _tmp107_);
										_a_it = _tmp108_;
										while (TRUE) {
											GeeIterator* _tmp109_;
											gboolean _tmp110_ = FALSE;
											GeeIterator* _tmp111_;
											gpointer _tmp112_ = NULL;
											FolksAbstractFieldDetails* a;
											gboolean _tmp113_;
											const gchar* _tmp116_;
											FolksAbstractFieldDetails* _tmp117_;
											gconstpointer _tmp118_;
											const gchar* _tmp119_;
											gchar* _tmp120_ = NULL;
											gchar* _tmp121_;
											gchar* _tmp122_;
											_tmp109_ = _a_it;
											_tmp110_ = gee_iterator_next (_tmp109_);
											if (!_tmp110_) {
												break;
											}
											_tmp111_ = _a_it;
											_tmp112_ = gee_iterator_get (_tmp111_);
											a = (FolksAbstractFieldDetails*) _tmp112_;
											_tmp113_ = _first;
											if (_tmp113_ == FALSE) {
												const gchar* _tmp114_;
												gchar* _tmp115_;
												_tmp114_ = output_string;
												_tmp115_ = g_strconcat (_tmp114_, ", ", NULL);
												_g_free0 (output_string);
												output_string = _tmp115_;
											}
											_tmp116_ = output_string;
											_tmp117_ = a;
											_tmp118_ = folks_abstract_field_details_get_value (_tmp117_);
											_tmp119_ = _tmp118_;
											_tmp120_ = g_strdup_printf ("'%s'", (const gchar*) _tmp119_);
											_tmp121_ = _tmp120_;
											_tmp122_ = g_strconcat (_tmp116_, _tmp121_, NULL);
											_g_free0 (output_string);
											output_string = _tmp122_;
											_g_free0 (_tmp121_);
											_first = FALSE;
											_g_object_unref0 (a);
										}
										_g_object_unref0 (_a_it);
									}
									_tmp123_ = output_string;
									_tmp124_ = g_strconcat (_tmp123_, " }", NULL);
									_g_free0 (output_string);
									output_string = _tmp124_;
									_g_object_unref0 (v);
									_g_free0 (k);
								}
								_g_object_unref0 (_k_it);
							}
							_tmp125_ = output_string;
							_tmp126_ = g_strconcat (_tmp125_, " }", NULL);
							_g_free0 (output_string);
							output_string = _tmp126_;
							result = output_string;
							_g_object_unref0 (prop_list);
							return result;
						} else {
							gboolean _tmp127_ = FALSE;
							gboolean _tmp128_ = FALSE;
							const gchar* _tmp129_;
							gboolean _tmp131_;
							gboolean _tmp133_;
							_tmp129_ = prop_name;
							if (g_strcmp0 (_tmp129_, "email-addresses") == 0) {
								_tmp128_ = TRUE;
							} else {
								const gchar* _tmp130_;
								_tmp130_ = prop_name;
								_tmp128_ = g_strcmp0 (_tmp130_, "phone-numbers") == 0;
							}
							_tmp131_ = _tmp128_;
							if (_tmp131_) {
								_tmp127_ = TRUE;
							} else {
								const gchar* _tmp132_;
								_tmp132_ = prop_name;
								_tmp127_ = g_strcmp0 (_tmp132_, "urls") == 0;
							}
							_tmp133_ = _tmp127_;
							if (_tmp133_) {
								gchar* _tmp134_;
								gboolean first;
								GObject* _tmp135_ = NULL;
								GeeSet* _tmp136_;
								GeeSet* prop_list;
								const gchar* _tmp151_;
								gchar* _tmp152_;
								_tmp134_ = g_strdup ("{ ");
								_g_free0 (output_string);
								output_string = _tmp134_;
								first = TRUE;
								_tmp135_ = g_value_get_object (prop_value);
								_tmp136_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp135_, GEE_TYPE_SET, GeeSet));
								prop_list = _tmp136_;
								{
									GeeSet* _tmp137_;
									GeeIterator* _tmp138_ = NULL;
									GeeIterator* _p_it;
									_tmp137_ = prop_list;
									_tmp138_ = gee_iterable_iterator ((GeeIterable*) _tmp137_);
									_p_it = _tmp138_;
									while (TRUE) {
										GeeIterator* _tmp139_;
										gboolean _tmp140_ = FALSE;
										GeeIterator* _tmp141_;
										gpointer _tmp142_ = NULL;
										FolksAbstractFieldDetails* p;
										gboolean _tmp143_;
										const gchar* _tmp146_;
										FolksAbstractFieldDetails* _tmp147_;
										gconstpointer _tmp148_;
										const gchar* _tmp149_;
										gchar* _tmp150_;
										_tmp139_ = _p_it;
										_tmp140_ = gee_iterator_next (_tmp139_);
										if (!_tmp140_) {
											break;
										}
										_tmp141_ = _p_it;
										_tmp142_ = gee_iterator_get (_tmp141_);
										p = (FolksAbstractFieldDetails*) _tmp142_;
										_tmp143_ = first;
										if (!_tmp143_) {
											const gchar* _tmp144_;
											gchar* _tmp145_;
											_tmp144_ = output_string;
											_tmp145_ = g_strconcat (_tmp144_, ", ", NULL);
											_g_free0 (output_string);
											output_string = _tmp145_;
										}
										_tmp146_ = output_string;
										_tmp147_ = p;
										_tmp148_ = folks_abstract_field_details_get_value (_tmp147_);
										_tmp149_ = _tmp148_;
										_tmp150_ = g_strconcat (_tmp146_, (const gchar*) _tmp149_, NULL);
										_g_free0 (output_string);
										output_string = _tmp150_;
										first = FALSE;
										_g_object_unref0 (p);
									}
									_g_object_unref0 (_p_it);
								}
								_tmp151_ = output_string;
								_tmp152_ = g_strconcat (_tmp151_, " }", NULL);
								_g_free0 (output_string);
								output_string = _tmp152_;
								result = output_string;
								_g_object_unref0 (prop_list);
								return result;
							} else {
								const gchar* _tmp153_;
								_tmp153_ = prop_name;
								if (g_strcmp0 (_tmp153_, "birthday") == 0) {
									void* _tmp154_ = NULL;
									GDateTime* dobj;
									GDateTime* _tmp155_;
									_tmp154_ = g_value_get_boxed (prop_value);
									dobj = (GDateTime*) _tmp154_;
									_tmp155_ = dobj;
									if (_tmp155_ != NULL) {
										GDateTime* _tmp156_;
										gchar* _tmp157_ = NULL;
										_tmp156_ = dobj;
										_tmp157_ = g_date_time_to_string (_tmp156_);
										result = _tmp157_;
										_g_free0 (output_string);
										return result;
									} else {
										gchar* _tmp158_;
										_tmp158_ = g_strdup ("");
										result = _tmp158_;
										_g_free0 (output_string);
										return result;
									}
								} else {
									const gchar* _tmp159_;
									_tmp159_ = prop_name;
									if (g_strcmp0 (_tmp159_, "postal-addresses") == 0) {
										gchar* _tmp160_;
										gboolean first;
										GObject* _tmp161_ = NULL;
										GeeSet* _tmp162_;
										GeeSet* prop_list;
										const gchar* _tmp179_;
										gchar* _tmp180_;
										_tmp160_ = g_strdup ("{ ");
										_g_free0 (output_string);
										output_string = _tmp160_;
										first = TRUE;
										_tmp161_ = g_value_get_object (prop_value);
										_tmp162_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp161_, GEE_TYPE_SET, GeeSet));
										prop_list = _tmp162_;
										{
											GeeSet* _tmp163_;
											GeeIterator* _tmp164_ = NULL;
											GeeIterator* _p_it;
											_tmp163_ = prop_list;
											_tmp164_ = gee_iterable_iterator ((GeeIterable*) _tmp163_);
											_p_it = _tmp164_;
											while (TRUE) {
												GeeIterator* _tmp165_;
												gboolean _tmp166_ = FALSE;
												GeeIterator* _tmp167_;
												gpointer _tmp168_ = NULL;
												FolksPostalAddressFieldDetails* p;
												gboolean _tmp169_;
												const gchar* _tmp172_;
												FolksPostalAddressFieldDetails* _tmp173_;
												gconstpointer _tmp174_;
												FolksPostalAddress* _tmp175_;
												gchar* _tmp176_ = NULL;
												gchar* _tmp177_;
												gchar* _tmp178_;
												_tmp165_ = _p_it;
												_tmp166_ = gee_iterator_next (_tmp165_);
												if (!_tmp166_) {
													break;
												}
												_tmp167_ = _p_it;
												_tmp168_ = gee_iterator_get (_tmp167_);
												p = (FolksPostalAddressFieldDetails*) _tmp168_;
												_tmp169_ = first;
												if (!_tmp169_) {
													const gchar* _tmp170_;
													gchar* _tmp171_;
													_tmp170_ = output_string;
													_tmp171_ = g_strconcat (_tmp170_, ". ", NULL);
													_g_free0 (output_string);
													output_string = _tmp171_;
												}
												_tmp172_ = output_string;
												_tmp173_ = p;
												_tmp174_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp173_);
												_tmp175_ = _tmp174_;
												_tmp176_ = folks_postal_address_to_string ((FolksPostalAddress*) _tmp175_);
												_tmp177_ = _tmp176_;
												_tmp178_ = g_strconcat (_tmp172_, _tmp177_, NULL);
												_g_free0 (output_string);
												output_string = _tmp178_;
												_g_free0 (_tmp177_);
												first = FALSE;
												_g_object_unref0 (p);
											}
											_g_object_unref0 (_p_it);
										}
										_tmp179_ = output_string;
										_tmp180_ = g_strconcat (_tmp179_, " }", NULL);
										_g_free0 (output_string);
										output_string = _tmp180_;
										result = output_string;
										_g_object_unref0 (prop_list);
										return result;
									} else {
										const gchar* _tmp181_;
										_tmp181_ = prop_name;
										if (g_strcmp0 (_tmp181_, "notes") == 0) {
											GObject* _tmp182_ = NULL;
											GeeSet* _tmp183_;
											GeeSet* notes;
											gchar* _tmp184_;
											gboolean first;
											const gchar* _tmp199_;
											gchar* _tmp200_;
											_tmp182_ = g_value_get_object (prop_value);
											_tmp183_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp182_, GEE_TYPE_SET) ? ((GeeSet*) _tmp182_) : NULL);
											notes = _tmp183_;
											_tmp184_ = g_strdup ("{ ");
											_g_free0 (output_string);
											output_string = _tmp184_;
											first = TRUE;
											{
												GeeSet* _tmp185_;
												GeeIterator* _tmp186_ = NULL;
												GeeIterator* _note_it;
												_tmp185_ = notes;
												_tmp186_ = gee_iterable_iterator ((GeeIterable*) _tmp185_);
												_note_it = _tmp186_;
												while (TRUE) {
													GeeIterator* _tmp187_;
													gboolean _tmp188_ = FALSE;
													GeeIterator* _tmp189_;
													gpointer _tmp190_ = NULL;
													FolksNoteFieldDetails* note;
													gboolean _tmp191_;
													const gchar* _tmp194_;
													FolksNoteFieldDetails* _tmp195_;
													const gchar* _tmp196_;
													const gchar* _tmp197_;
													gchar* _tmp198_;
													_tmp187_ = _note_it;
													_tmp188_ = gee_iterator_next (_tmp187_);
													if (!_tmp188_) {
														break;
													}
													_tmp189_ = _note_it;
													_tmp190_ = gee_iterator_get (_tmp189_);
													note = (FolksNoteFieldDetails*) _tmp190_;
													_tmp191_ = first;
													if (!_tmp191_) {
														const gchar* _tmp192_;
														gchar* _tmp193_;
														_tmp192_ = output_string;
														_tmp193_ = g_strconcat (_tmp192_, ", ", NULL);
														_g_free0 (output_string);
														output_string = _tmp193_;
													}
													_tmp194_ = output_string;
													_tmp195_ = note;
													_tmp196_ = folks_abstract_field_details_get_id ((FolksAbstractFieldDetails*) _tmp195_);
													_tmp197_ = _tmp196_;
													_tmp198_ = g_strconcat (_tmp194_, _tmp197_, NULL);
													_g_free0 (output_string);
													output_string = _tmp198_;
													first = FALSE;
													_g_object_unref0 (note);
												}
												_g_object_unref0 (_note_it);
											}
											_tmp199_ = output_string;
											_tmp200_ = g_strconcat (_tmp199_, " }", NULL);
											_g_free0 (output_string);
											output_string = _tmp200_;
											result = output_string;
											_g_object_unref0 (notes);
											return result;
										} else {
											const gchar* _tmp201_;
											_tmp201_ = prop_name;
											if (g_strcmp0 (_tmp201_, "roles") == 0) {
												GObject* _tmp202_ = NULL;
												GeeSet* _tmp203_;
												GeeSet* roles;
												gchar* _tmp204_;
												gboolean first;
												const gchar* _tmp221_;
												gchar* _tmp222_;
												_tmp202_ = g_value_get_object (prop_value);
												_tmp203_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp202_, GEE_TYPE_SET, GeeSet));
												roles = _tmp203_;
												_tmp204_ = g_strdup ("{ ");
												_g_free0 (output_string);
												output_string = _tmp204_;
												first = TRUE;
												{
													GeeSet* _tmp205_;
													GeeIterator* _tmp206_ = NULL;
													GeeIterator* _role_it;
													_tmp205_ = roles;
													_tmp206_ = gee_iterable_iterator ((GeeIterable*) _tmp205_);
													_role_it = _tmp206_;
													while (TRUE) {
														GeeIterator* _tmp207_;
														gboolean _tmp208_ = FALSE;
														GeeIterator* _tmp209_;
														gpointer _tmp210_ = NULL;
														FolksRoleFieldDetails* role;
														gboolean _tmp211_;
														const gchar* _tmp214_;
														FolksRoleFieldDetails* _tmp215_;
														gconstpointer _tmp216_;
														FolksRole* _tmp217_;
														gchar* _tmp218_ = NULL;
														gchar* _tmp219_;
														gchar* _tmp220_;
														_tmp207_ = _role_it;
														_tmp208_ = gee_iterator_next (_tmp207_);
														if (!_tmp208_) {
															break;
														}
														_tmp209_ = _role_it;
														_tmp210_ = gee_iterator_get (_tmp209_);
														role = (FolksRoleFieldDetails*) _tmp210_;
														_tmp211_ = first;
														if (!_tmp211_) {
															const gchar* _tmp212_;
															gchar* _tmp213_;
															_tmp212_ = output_string;
															_tmp213_ = g_strconcat (_tmp212_, ", ", NULL);
															_g_free0 (output_string);
															output_string = _tmp213_;
														}
														_tmp214_ = output_string;
														_tmp215_ = role;
														_tmp216_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp215_);
														_tmp217_ = _tmp216_;
														_tmp218_ = folks_role_to_string ((FolksRole*) _tmp217_);
														_tmp219_ = _tmp218_;
														_tmp220_ = g_strconcat (_tmp214_, _tmp219_, NULL);
														_g_free0 (output_string);
														output_string = _tmp220_;
														_g_free0 (_tmp219_);
														first = FALSE;
														_g_object_unref0 (role);
													}
													_g_object_unref0 (_role_it);
												}
												_tmp221_ = output_string;
												_tmp222_ = g_strconcat (_tmp221_, " }", NULL);
												_g_free0 (output_string);
												output_string = _tmp222_;
												result = output_string;
												_g_object_unref0 (roles);
												return result;
											} else {
												const gchar* _tmp223_;
												_tmp223_ = prop_name;
												if (g_strcmp0 (_tmp223_, "structured-name") == 0) {
													GObject* _tmp224_ = NULL;
													FolksStructuredName* sn;
													gchar* ret;
													FolksStructuredName* _tmp225_;
													_tmp224_ = g_value_get_object (prop_value);
													sn = G_TYPE_CHECK_INSTANCE_CAST (_tmp224_, FOLKS_TYPE_STRUCTURED_NAME, FolksStructuredName);
													ret = NULL;
													_tmp225_ = sn;
													if (_tmp225_ != NULL) {
														FolksStructuredName* _tmp226_;
														gchar* _tmp227_ = NULL;
														_tmp226_ = sn;
														_tmp227_ = folks_structured_name_to_string (_tmp226_);
														_g_free0 (ret);
														ret = _tmp227_;
													}
													result = ret;
													_g_free0 (output_string);
													return result;
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp228_ = *prop_value;
	_tmp229_ = folks_inspect_utils_transform_value_to_string (&_tmp228_);
	result = _tmp229_;
	_g_free0 (output_string);
	return result;
}


gchar* folks_inspect_utils_transform_value_to_string (GValue* prop_value) {
	gchar* result = NULL;
	GType _tmp0_ = 0UL;
	gboolean _tmp1_ = FALSE;
	g_return_val_if_fail (prop_value != NULL, NULL);
	_tmp0_ = G_VALUE_TYPE (prop_value);
	_tmp1_ = g_value_type_transformable (_tmp0_, G_TYPE_STRING);
	if (_tmp1_) {
		GValue _tmp2_ = {0};
		GValue string_value;
		const gchar* _tmp3_ = NULL;
		gchar* _tmp4_;
		g_value_init (&_tmp2_, G_TYPE_STRING);
		string_value = _tmp2_;
		g_value_transform (prop_value, &string_value);
		_tmp3_ = g_value_get_string (&string_value);
		_tmp4_ = g_strdup (_tmp3_);
		result = _tmp4_;
		G_IS_VALUE (&string_value) ? (g_value_unset (&string_value), NULL) : NULL;
		return result;
	} else {
		GType _tmp5_ = 0UL;
		const gchar* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		gchar* _tmp8_ = NULL;
		_tmp5_ = G_VALUE_TYPE (prop_value);
		_tmp6_ = g_type_name (_tmp5_);
		_tmp7_ = g_type_name (G_TYPE_STRING);
		_tmp8_ = g_strdup_printf ("Can't convert from type '%s' to '%s'", _tmp6_, _tmp7_);
		result = _tmp8_;
		return result;
	}
}


gchar* folks_inspect_utils_command_name_completion_cb (const gchar* word, gint state) {
	gchar* result = NULL;
	gint _tmp0_;
	g_return_val_if_fail (word != NULL, NULL);
	_tmp0_ = state;
	if (_tmp0_ == 0) {
		FolksInspectClient* _tmp1_;
		GeeHashMap* _tmp2_;
		GeeMapIterator* _tmp3_ = NULL;
		_tmp1_ = main_client;
		_tmp2_ = _tmp1_->commands;
		_tmp3_ = gee_abstract_map_map_iterator ((GeeAbstractMap*) _tmp2_);
		_g_object_unref0 (folks_inspect_utils_command_name_iter);
		folks_inspect_utils_command_name_iter = _tmp3_;
	}
	while (TRUE) {
		GeeMapIterator* _tmp4_;
		gboolean _tmp5_ = FALSE;
		GeeMapIterator* _tmp6_;
		gpointer _tmp7_ = NULL;
		gchar* command_name;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		gboolean _tmp10_ = FALSE;
		_tmp4_ = folks_inspect_utils_command_name_iter;
		_tmp5_ = gee_map_iterator_next (_tmp4_);
		if (!(_tmp5_ == TRUE)) {
			break;
		}
		_tmp6_ = folks_inspect_utils_command_name_iter;
		_tmp7_ = gee_map_iterator_get_key (_tmp6_);
		command_name = (gchar*) _tmp7_;
		_tmp8_ = command_name;
		_tmp9_ = word;
		_tmp10_ = g_str_has_prefix (_tmp8_, _tmp9_);
		if (_tmp10_) {
			result = command_name;
			return result;
		}
		_g_free0 (command_name);
	}
	_g_object_unref0 (folks_inspect_utils_command_name_iter);
	folks_inspect_utils_command_name_iter = NULL;
	result = NULL;
	return result;
}


gchar* folks_inspect_utils_individual_id_completion_cb (const gchar* word, gint state) {
	gchar* result = NULL;
	gint _tmp0_;
	g_return_val_if_fail (word != NULL, NULL);
	_tmp0_ = state;
	if (_tmp0_ == 0) {
		FolksInspectClient* _tmp1_;
		FolksIndividualAggregator* _tmp2_;
		FolksIndividualAggregator* _tmp3_;
		GeeMap* _tmp4_;
		GeeMap* _tmp5_;
		GeeMapIterator* _tmp6_ = NULL;
		_tmp1_ = main_client;
		_tmp2_ = folks_inspect_client_get_aggregator (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = folks_individual_aggregator_get_individuals (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_map_map_iterator (_tmp5_);
		_g_object_unref0 (folks_inspect_utils_individual_id_iter);
		folks_inspect_utils_individual_id_iter = _tmp6_;
	}
	while (TRUE) {
		GeeMapIterator* _tmp7_;
		gboolean _tmp8_ = FALSE;
		GeeMapIterator* _tmp9_;
		gpointer _tmp10_ = NULL;
		gchar* id;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		gboolean _tmp13_ = FALSE;
		_tmp7_ = folks_inspect_utils_individual_id_iter;
		_tmp8_ = gee_map_iterator_next (_tmp7_);
		if (!(_tmp8_ == TRUE)) {
			break;
		}
		_tmp9_ = folks_inspect_utils_individual_id_iter;
		_tmp10_ = gee_map_iterator_get_key (_tmp9_);
		id = (gchar*) _tmp10_;
		_tmp11_ = id;
		_tmp12_ = word;
		_tmp13_ = g_str_has_prefix (_tmp11_, _tmp12_);
		if (_tmp13_) {
			result = id;
			return result;
		}
		_g_free0 (id);
	}
	_g_object_unref0 (folks_inspect_utils_individual_id_iter);
	folks_inspect_utils_individual_id_iter = NULL;
	result = NULL;
	return result;
}


gchar* folks_inspect_utils_persona_uid_completion_cb (const gchar* word, gint state) {
	gchar* result = NULL;
	gint _tmp0_;
	g_return_val_if_fail (word != NULL, NULL);
	_tmp0_ = state;
	if (_tmp0_ == 0) {
		FolksInspectClient* _tmp1_;
		FolksIndividualAggregator* _tmp2_;
		FolksIndividualAggregator* _tmp3_;
		GeeMap* _tmp4_;
		GeeMap* _tmp5_;
		GeeMapIterator* _tmp6_ = NULL;
		_tmp1_ = main_client;
		_tmp2_ = folks_inspect_client_get_aggregator (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = folks_individual_aggregator_get_individuals (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_map_map_iterator (_tmp5_);
		_g_object_unref0 (folks_inspect_utils_individual_id_iter);
		folks_inspect_utils_individual_id_iter = _tmp6_;
		_g_object_unref0 (folks_inspect_utils_persona_uid_iter);
		folks_inspect_utils_persona_uid_iter = NULL;
	}
	while (TRUE) {
		gboolean _tmp7_ = FALSE;
		GeeIterator* _tmp8_;
		gboolean _tmp11_;
		GeeMapIterator* _tmp12_;
		gpointer _tmp13_ = NULL;
		FolksIndividual* individual;
		GeeIterator* _tmp14_;
		_tmp8_ = folks_inspect_utils_persona_uid_iter;
		if (_tmp8_ != NULL) {
			_tmp7_ = TRUE;
		} else {
			GeeMapIterator* _tmp9_;
			gboolean _tmp10_ = FALSE;
			_tmp9_ = folks_inspect_utils_individual_id_iter;
			_tmp10_ = gee_map_iterator_next (_tmp9_);
			_tmp7_ = _tmp10_ == TRUE;
		}
		_tmp11_ = _tmp7_;
		if (!_tmp11_) {
			break;
		}
		_tmp12_ = folks_inspect_utils_individual_id_iter;
		_tmp13_ = gee_map_iterator_get_value (_tmp12_);
		individual = (FolksIndividual*) _tmp13_;
		_tmp14_ = folks_inspect_utils_persona_uid_iter;
		if (_tmp14_ == NULL) {
			FolksIndividual* _tmp15_;
			FolksIndividual* _tmp16_;
			GeeSet* _tmp17_;
			GeeSet* _tmp18_;
			GeeIterator* _tmp19_ = NULL;
			_tmp15_ = individual;
			_vala_assert (_tmp15_ != NULL, "individual != null");
			_tmp16_ = individual;
			_tmp17_ = folks_individual_get_personas (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = gee_iterable_iterator ((GeeIterable*) _tmp18_);
			_g_object_unref0 (folks_inspect_utils_persona_uid_iter);
			folks_inspect_utils_persona_uid_iter = _tmp19_;
		}
		while (TRUE) {
			GeeIterator* _tmp20_;
			gboolean _tmp21_ = FALSE;
			GeeIterator* _tmp22_;
			gpointer _tmp23_ = NULL;
			FolksPersona* persona;
			FolksPersona* _tmp24_;
			const gchar* _tmp25_;
			const gchar* _tmp26_;
			const gchar* _tmp27_;
			gboolean _tmp28_ = FALSE;
			_tmp20_ = folks_inspect_utils_persona_uid_iter;
			_tmp21_ = gee_iterator_next (_tmp20_);
			if (!_tmp21_) {
				break;
			}
			_tmp22_ = folks_inspect_utils_persona_uid_iter;
			_tmp23_ = gee_iterator_get (_tmp22_);
			persona = (FolksPersona*) _tmp23_;
			_tmp24_ = persona;
			_tmp25_ = folks_persona_get_uid (_tmp24_);
			_tmp26_ = _tmp25_;
			_tmp27_ = word;
			_tmp28_ = g_str_has_prefix (_tmp26_, _tmp27_);
			if (_tmp28_) {
				FolksPersona* _tmp29_;
				const gchar* _tmp30_;
				const gchar* _tmp31_;
				gchar* _tmp32_;
				_tmp29_ = persona;
				_tmp30_ = folks_persona_get_uid (_tmp29_);
				_tmp31_ = _tmp30_;
				_tmp32_ = g_strdup (_tmp31_);
				result = _tmp32_;
				_g_object_unref0 (persona);
				_g_object_unref0 (individual);
				return result;
			}
			_g_object_unref0 (persona);
		}
		_g_object_unref0 (folks_inspect_utils_persona_uid_iter);
		folks_inspect_utils_persona_uid_iter = NULL;
		_g_object_unref0 (individual);
	}
	_g_object_unref0 (folks_inspect_utils_individual_id_iter);
	folks_inspect_utils_individual_id_iter = NULL;
	result = NULL;
	return result;
}


gchar* folks_inspect_utils_backend_name_completion_cb (const gchar* word, gint state) {
	gchar* result = NULL;
	gint _tmp0_;
	g_return_val_if_fail (word != NULL, NULL);
	_tmp0_ = state;
	if (_tmp0_ == 0) {
		FolksInspectClient* _tmp1_;
		FolksBackendStore* _tmp2_;
		FolksBackendStore* _tmp3_;
		GeeCollection* _tmp4_ = NULL;
		GeeCollection* _tmp5_;
		GeeIterator* _tmp6_ = NULL;
		_tmp1_ = main_client;
		_tmp2_ = folks_inspect_client_get_backend_store (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = folks_backend_store_list_backends (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_);
		_g_object_unref0 (folks_inspect_utils_backend_name_iter);
		folks_inspect_utils_backend_name_iter = _tmp6_;
		_g_object_unref0 (_tmp5_);
	}
	while (TRUE) {
		GeeIterator* _tmp7_;
		gboolean _tmp8_ = FALSE;
		GeeIterator* _tmp9_;
		gpointer _tmp10_ = NULL;
		FolksBackend* backend;
		FolksBackend* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		gboolean _tmp15_ = FALSE;
		_tmp7_ = folks_inspect_utils_backend_name_iter;
		_tmp8_ = gee_iterator_next (_tmp7_);
		if (!(_tmp8_ == TRUE)) {
			break;
		}
		_tmp9_ = folks_inspect_utils_backend_name_iter;
		_tmp10_ = gee_iterator_get (_tmp9_);
		backend = (FolksBackend*) _tmp10_;
		_tmp11_ = backend;
		_tmp12_ = folks_backend_get_name (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = word;
		_tmp15_ = g_str_has_prefix (_tmp13_, _tmp14_);
		if (_tmp15_) {
			FolksBackend* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			gchar* _tmp19_;
			_tmp16_ = backend;
			_tmp17_ = folks_backend_get_name (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = g_strdup (_tmp18_);
			result = _tmp19_;
			_g_object_unref0 (backend);
			return result;
		}
		_g_object_unref0 (backend);
	}
	_g_object_unref0 (folks_inspect_utils_backend_name_iter);
	folks_inspect_utils_backend_name_iter = NULL;
	result = NULL;
	return result;
}


gchar* folks_inspect_utils_persona_store_id_completion_cb (const gchar* word, gint state) {
	gchar* result = NULL;
	gint _tmp0_;
	g_return_val_if_fail (word != NULL, NULL);
	_tmp0_ = state;
	if (_tmp0_ == 0) {
		FolksInspectClient* _tmp1_;
		FolksBackendStore* _tmp2_;
		FolksBackendStore* _tmp3_;
		GeeCollection* _tmp4_ = NULL;
		GeeCollection* _tmp5_;
		GeeIterator* _tmp6_ = NULL;
		_tmp1_ = main_client;
		_tmp2_ = folks_inspect_client_get_backend_store (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = folks_backend_store_list_backends (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_);
		_g_object_unref0 (folks_inspect_utils_backend_name_iter);
		folks_inspect_utils_backend_name_iter = _tmp6_;
		_g_object_unref0 (_tmp5_);
		_g_object_unref0 (folks_inspect_utils_persona_store_id_iter);
		folks_inspect_utils_persona_store_id_iter = NULL;
	}
	while (TRUE) {
		gboolean _tmp7_ = FALSE;
		GeeMapIterator* _tmp8_;
		gboolean _tmp11_;
		GeeMapIterator* _tmp12_;
		_tmp8_ = folks_inspect_utils_persona_store_id_iter;
		if (_tmp8_ != NULL) {
			_tmp7_ = TRUE;
		} else {
			GeeIterator* _tmp9_;
			gboolean _tmp10_ = FALSE;
			_tmp9_ = folks_inspect_utils_backend_name_iter;
			_tmp10_ = gee_iterator_next (_tmp9_);
			_tmp7_ = _tmp10_ == TRUE;
		}
		_tmp11_ = _tmp7_;
		if (!_tmp11_) {
			break;
		}
		_tmp12_ = folks_inspect_utils_persona_store_id_iter;
		if (_tmp12_ == NULL) {
			GeeIterator* _tmp13_;
			gpointer _tmp14_ = NULL;
			FolksBackend* backend;
			FolksBackend* _tmp15_;
			GeeMap* _tmp16_;
			GeeMap* _tmp17_;
			GeeMapIterator* _tmp18_ = NULL;
			_tmp13_ = folks_inspect_utils_backend_name_iter;
			_tmp14_ = gee_iterator_get (_tmp13_);
			backend = (FolksBackend*) _tmp14_;
			_tmp15_ = backend;
			_tmp16_ = folks_backend_get_persona_stores (_tmp15_);
			_tmp17_ = _tmp16_;
			_tmp18_ = gee_map_map_iterator (_tmp17_);
			_g_object_unref0 (folks_inspect_utils_persona_store_id_iter);
			folks_inspect_utils_persona_store_id_iter = _tmp18_;
			_g_object_unref0 (backend);
		}
		while (TRUE) {
			GeeMapIterator* _tmp19_;
			gboolean _tmp20_ = FALSE;
			GeeMapIterator* _tmp21_;
			gpointer _tmp22_ = NULL;
			gchar* id;
			const gchar* _tmp23_;
			const gchar* _tmp24_;
			gboolean _tmp25_ = FALSE;
			_tmp19_ = folks_inspect_utils_persona_store_id_iter;
			_tmp20_ = gee_map_iterator_next (_tmp19_);
			if (!(_tmp20_ == TRUE)) {
				break;
			}
			_tmp21_ = folks_inspect_utils_persona_store_id_iter;
			_tmp22_ = gee_map_iterator_get_key (_tmp21_);
			id = (gchar*) _tmp22_;
			_tmp23_ = id;
			_tmp24_ = word;
			_tmp25_ = g_str_has_prefix (_tmp23_, _tmp24_);
			if (_tmp25_) {
				result = id;
				return result;
			}
			_g_free0 (id);
		}
		_g_object_unref0 (folks_inspect_utils_persona_store_id_iter);
		folks_inspect_utils_persona_store_id_iter = NULL;
	}
	_g_object_unref0 (folks_inspect_utils_backend_name_iter);
	folks_inspect_utils_backend_name_iter = NULL;
	result = NULL;
	return result;
}


FolksInspectUtils* folks_inspect_utils_construct (GType object_type) {
	FolksInspectUtils* self = NULL;
	self = (FolksInspectUtils*) g_type_create_instance (object_type);
	return self;
}


FolksInspectUtils* folks_inspect_utils_new (void) {
	return folks_inspect_utils_construct (FOLKS_INSPECT_TYPE_UTILS);
}


static void folks_inspect_value_utils_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void folks_inspect_value_utils_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		folks_inspect_utils_unref (value->data[0].v_pointer);
	}
}


static void folks_inspect_value_utils_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = folks_inspect_utils_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer folks_inspect_value_utils_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* folks_inspect_value_utils_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		FolksInspectUtils* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = folks_inspect_utils_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* folks_inspect_value_utils_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	FolksInspectUtils** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = folks_inspect_utils_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* folks_inspect_param_spec_utils (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	FolksInspectParamSpecUtils* spec;
	g_return_val_if_fail (g_type_is_a (object_type, FOLKS_INSPECT_TYPE_UTILS), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer folks_inspect_value_get_utils (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_INSPECT_TYPE_UTILS), NULL);
	return value->data[0].v_pointer;
}


void folks_inspect_value_set_utils (GValue* value, gpointer v_object) {
	FolksInspectUtils* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_INSPECT_TYPE_UTILS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_INSPECT_TYPE_UTILS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		folks_inspect_utils_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		folks_inspect_utils_unref (old);
	}
}


void folks_inspect_value_take_utils (GValue* value, gpointer v_object) {
	FolksInspectUtils* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_INSPECT_TYPE_UTILS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_INSPECT_TYPE_UTILS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		folks_inspect_utils_unref (old);
	}
}


static void folks_inspect_utils_class_init (FolksInspectUtilsClass * klass) {
	gchar* _tmp0_;
	FILE* _tmp1_;
	folks_inspect_utils_parent_class = g_type_class_peek_parent (klass);
	FOLKS_INSPECT_UTILS_CLASS (klass)->finalize = folks_inspect_utils_finalize;
	_tmp0_ = g_strdup ("");
	folks_inspect_utils_indentation_string = _tmp0_;
	_tmp1_ = stdout;
	folks_inspect_utils_output_filestream = _tmp1_;
}


static void folks_inspect_utils_instance_init (FolksInspectUtils * self) {
	self->ref_count = 1;
}


static void folks_inspect_utils_finalize (FolksInspectUtils* obj) {
	FolksInspectUtils * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_INSPECT_TYPE_UTILS, FolksInspectUtils);
}


GType folks_inspect_utils_get_type (void) {
	static volatile gsize folks_inspect_utils_type_id__volatile = 0;
	if (g_once_init_enter (&folks_inspect_utils_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { folks_inspect_value_utils_init, folks_inspect_value_utils_free_value, folks_inspect_value_utils_copy_value, folks_inspect_value_utils_peek_pointer, "p", folks_inspect_value_utils_collect_value, "p", folks_inspect_value_utils_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (FolksInspectUtilsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_inspect_utils_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksInspectUtils), 0, (GInstanceInitFunc) folks_inspect_utils_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType folks_inspect_utils_type_id;
		folks_inspect_utils_type_id = g_type_register_fundamental (g_type_fundamental_next (), "FolksInspectUtils", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&folks_inspect_utils_type_id__volatile, folks_inspect_utils_type_id);
	}
	return folks_inspect_utils_type_id__volatile;
}


gpointer folks_inspect_utils_ref (gpointer instance) {
	FolksInspectUtils* self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void folks_inspect_utils_unref (gpointer instance) {
	FolksInspectUtils* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		FOLKS_INSPECT_UTILS_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}



