/* inspect.c generated by valac 0.28.0.16-b1323, the Vala compiler
 * generated from inspect.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <folks/folks.h>
#include <termios.h>
#include <stdio.h>
#include <locale.h>
#include <glib/gi18n-lib.h>
#include <config.h>
#include <glib-unix.h>
#include <signal.h>
#include <sys/types.h>
#include <gio/gio.h>
#include <unistd.h>
#include <readline/readline.h>
#include <readline/history.h>
#include <sys/wait.h>
#include <gobject/gvaluecollector.h>


#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;

#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 FOLKS_INSPECT_TYPE_SIGNAL_MANAGER (folks_inspect_signal_manager_get_type ())
#define FOLKS_INSPECT_SIGNAL_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_TYPE_SIGNAL_MANAGER, FolksInspectSignalManager))
#define FOLKS_INSPECT_SIGNAL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_TYPE_SIGNAL_MANAGER, FolksInspectSignalManagerClass))
#define FOLKS_INSPECT_IS_SIGNAL_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_TYPE_SIGNAL_MANAGER))
#define FOLKS_INSPECT_IS_SIGNAL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_TYPE_SIGNAL_MANAGER))
#define FOLKS_INSPECT_SIGNAL_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_TYPE_SIGNAL_MANAGER, FolksInspectSignalManagerClass))

typedef struct _FolksInspectSignalManager FolksInspectSignalManager;
typedef struct _FolksInspectSignalManagerClass FolksInspectSignalManagerClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_io_channel_unref0(var) ((var == NULL) ? NULL : (var = (g_io_channel_unref (var), NULL)))
#define _fclose0(var) ((var == NULL) ? NULL : (var = (fclose (var), NULL)))
typedef struct _Block1Data Block1Data;
#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define FOLKS_INSPECT_COMMANDS_TYPE_QUIT (folks_inspect_commands_quit_get_type ())
#define FOLKS_INSPECT_COMMANDS_QUIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_QUIT, FolksInspectCommandsQuit))
#define FOLKS_INSPECT_COMMANDS_QUIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_QUIT, FolksInspectCommandsQuitClass))
#define FOLKS_INSPECT_COMMANDS_IS_QUIT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_QUIT))
#define FOLKS_INSPECT_COMMANDS_IS_QUIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_QUIT))
#define FOLKS_INSPECT_COMMANDS_QUIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_QUIT, FolksInspectCommandsQuitClass))

typedef struct _FolksInspectCommandsQuit FolksInspectCommandsQuit;
typedef struct _FolksInspectCommandsQuitClass FolksInspectCommandsQuitClass;
#define _folks_inspect_command_unref0(var) ((var == NULL) ? NULL : (var = (folks_inspect_command_unref (var), NULL)))

#define FOLKS_INSPECT_COMMANDS_TYPE_HELP (folks_inspect_commands_help_get_type ())
#define FOLKS_INSPECT_COMMANDS_HELP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_HELP, FolksInspectCommandsHelp))
#define FOLKS_INSPECT_COMMANDS_HELP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_HELP, FolksInspectCommandsHelpClass))
#define FOLKS_INSPECT_COMMANDS_IS_HELP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_HELP))
#define FOLKS_INSPECT_COMMANDS_IS_HELP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_HELP))
#define FOLKS_INSPECT_COMMANDS_HELP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_HELP, FolksInspectCommandsHelpClass))

typedef struct _FolksInspectCommandsHelp FolksInspectCommandsHelp;
typedef struct _FolksInspectCommandsHelpClass FolksInspectCommandsHelpClass;

#define FOLKS_INSPECT_COMMANDS_TYPE_INDIVIDUALS (folks_inspect_commands_individuals_get_type ())
#define FOLKS_INSPECT_COMMANDS_INDIVIDUALS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_INDIVIDUALS, FolksInspectCommandsIndividuals))
#define FOLKS_INSPECT_COMMANDS_INDIVIDUALS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_INDIVIDUALS, FolksInspectCommandsIndividualsClass))
#define FOLKS_INSPECT_COMMANDS_IS_INDIVIDUALS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_INDIVIDUALS))
#define FOLKS_INSPECT_COMMANDS_IS_INDIVIDUALS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_INDIVIDUALS))
#define FOLKS_INSPECT_COMMANDS_INDIVIDUALS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_INDIVIDUALS, FolksInspectCommandsIndividualsClass))

typedef struct _FolksInspectCommandsIndividuals FolksInspectCommandsIndividuals;
typedef struct _FolksInspectCommandsIndividualsClass FolksInspectCommandsIndividualsClass;

#define FOLKS_INSPECT_COMMANDS_TYPE_LINKING (folks_inspect_commands_linking_get_type ())
#define FOLKS_INSPECT_COMMANDS_LINKING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_LINKING, FolksInspectCommandsLinking))
#define FOLKS_INSPECT_COMMANDS_LINKING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_LINKING, FolksInspectCommandsLinkingClass))
#define FOLKS_INSPECT_COMMANDS_IS_LINKING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_LINKING))
#define FOLKS_INSPECT_COMMANDS_IS_LINKING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_LINKING))
#define FOLKS_INSPECT_COMMANDS_LINKING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_LINKING, FolksInspectCommandsLinkingClass))

typedef struct _FolksInspectCommandsLinking FolksInspectCommandsLinking;
typedef struct _FolksInspectCommandsLinkingClass FolksInspectCommandsLinkingClass;

#define FOLKS_INSPECT_COMMANDS_TYPE_PERSONAS (folks_inspect_commands_personas_get_type ())
#define FOLKS_INSPECT_COMMANDS_PERSONAS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_PERSONAS, FolksInspectCommandsPersonas))
#define FOLKS_INSPECT_COMMANDS_PERSONAS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_PERSONAS, FolksInspectCommandsPersonasClass))
#define FOLKS_INSPECT_COMMANDS_IS_PERSONAS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_PERSONAS))
#define FOLKS_INSPECT_COMMANDS_IS_PERSONAS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_PERSONAS))
#define FOLKS_INSPECT_COMMANDS_PERSONAS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_PERSONAS, FolksInspectCommandsPersonasClass))

typedef struct _FolksInspectCommandsPersonas FolksInspectCommandsPersonas;
typedef struct _FolksInspectCommandsPersonasClass FolksInspectCommandsPersonasClass;

#define FOLKS_INSPECT_COMMANDS_TYPE_BACKENDS (folks_inspect_commands_backends_get_type ())
#define FOLKS_INSPECT_COMMANDS_BACKENDS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_BACKENDS, FolksInspectCommandsBackends))
#define FOLKS_INSPECT_COMMANDS_BACKENDS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_BACKENDS, FolksInspectCommandsBackendsClass))
#define FOLKS_INSPECT_COMMANDS_IS_BACKENDS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_BACKENDS))
#define FOLKS_INSPECT_COMMANDS_IS_BACKENDS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_BACKENDS))
#define FOLKS_INSPECT_COMMANDS_BACKENDS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_BACKENDS, FolksInspectCommandsBackendsClass))

typedef struct _FolksInspectCommandsBackends FolksInspectCommandsBackends;
typedef struct _FolksInspectCommandsBackendsClass FolksInspectCommandsBackendsClass;

#define FOLKS_INSPECT_COMMANDS_TYPE_PERSONA_STORES (folks_inspect_commands_persona_stores_get_type ())
#define FOLKS_INSPECT_COMMANDS_PERSONA_STORES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_PERSONA_STORES, FolksInspectCommandsPersonaStores))
#define FOLKS_INSPECT_COMMANDS_PERSONA_STORES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_PERSONA_STORES, FolksInspectCommandsPersonaStoresClass))
#define FOLKS_INSPECT_COMMANDS_IS_PERSONA_STORES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_PERSONA_STORES))
#define FOLKS_INSPECT_COMMANDS_IS_PERSONA_STORES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_PERSONA_STORES))
#define FOLKS_INSPECT_COMMANDS_PERSONA_STORES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_PERSONA_STORES, FolksInspectCommandsPersonaStoresClass))

typedef struct _FolksInspectCommandsPersonaStores FolksInspectCommandsPersonaStores;
typedef struct _FolksInspectCommandsPersonaStoresClass FolksInspectCommandsPersonaStoresClass;

#define FOLKS_INSPECT_COMMANDS_TYPE_SET (folks_inspect_commands_set_get_type ())
#define FOLKS_INSPECT_COMMANDS_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_SET, FolksInspectCommandsSet))
#define FOLKS_INSPECT_COMMANDS_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_SET, FolksInspectCommandsSetClass))
#define FOLKS_INSPECT_COMMANDS_IS_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_SET))
#define FOLKS_INSPECT_COMMANDS_IS_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_SET))
#define FOLKS_INSPECT_COMMANDS_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_SET, FolksInspectCommandsSetClass))

typedef struct _FolksInspectCommandsSet FolksInspectCommandsSet;
typedef struct _FolksInspectCommandsSetClass FolksInspectCommandsSetClass;

#define FOLKS_INSPECT_COMMANDS_TYPE_SIGNALS (folks_inspect_commands_signals_get_type ())
#define FOLKS_INSPECT_COMMANDS_SIGNALS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_SIGNALS, FolksInspectCommandsSignals))
#define FOLKS_INSPECT_COMMANDS_SIGNALS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_SIGNALS, FolksInspectCommandsSignalsClass))
#define FOLKS_INSPECT_COMMANDS_IS_SIGNALS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_SIGNALS))
#define FOLKS_INSPECT_COMMANDS_IS_SIGNALS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_SIGNALS))
#define FOLKS_INSPECT_COMMANDS_SIGNALS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_SIGNALS, FolksInspectCommandsSignalsClass))

typedef struct _FolksInspectCommandsSignals FolksInspectCommandsSignals;
typedef struct _FolksInspectCommandsSignalsClass FolksInspectCommandsSignalsClass;

#define FOLKS_INSPECT_COMMANDS_TYPE_DEBUG (folks_inspect_commands_debug_get_type ())
#define FOLKS_INSPECT_COMMANDS_DEBUG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_DEBUG, FolksInspectCommandsDebug))
#define FOLKS_INSPECT_COMMANDS_DEBUG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_DEBUG, FolksInspectCommandsDebugClass))
#define FOLKS_INSPECT_COMMANDS_IS_DEBUG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_DEBUG))
#define FOLKS_INSPECT_COMMANDS_IS_DEBUG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_DEBUG))
#define FOLKS_INSPECT_COMMANDS_DEBUG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_DEBUG, FolksInspectCommandsDebugClass))

typedef struct _FolksInspectCommandsDebug FolksInspectCommandsDebug;
typedef struct _FolksInspectCommandsDebugClass FolksInspectCommandsDebugClass;

#define FOLKS_INSPECT_COMMANDS_TYPE_SEARCH (folks_inspect_commands_search_get_type ())
#define FOLKS_INSPECT_COMMANDS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_INSPECT_COMMANDS_TYPE_SEARCH, FolksInspectCommandsSearch))
#define FOLKS_INSPECT_COMMANDS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_INSPECT_COMMANDS_TYPE_SEARCH, FolksInspectCommandsSearchClass))
#define FOLKS_INSPECT_COMMANDS_IS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_INSPECT_COMMANDS_TYPE_SEARCH))
#define FOLKS_INSPECT_COMMANDS_IS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_INSPECT_COMMANDS_TYPE_SEARCH))
#define FOLKS_INSPECT_COMMANDS_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_INSPECT_COMMANDS_TYPE_SEARCH, FolksInspectCommandsSearchClass))

typedef struct _FolksInspectCommandsSearch FolksInspectCommandsSearch;
typedef struct _FolksInspectCommandsSearchClass FolksInspectCommandsSearchClass;
typedef struct _Block2Data Block2Data;
typedef struct _FolksInspectClientWaitForQuiescenceData FolksInspectClientWaitForQuiescenceData;
typedef struct _FolksInspectClientRunNonInteractiveData FolksInspectClientRunNonInteractiveData;
typedef struct _FolksInspectClientRunInteractiveData FolksInspectClientRunInteractiveData;
typedef struct _Block3Data Block3Data;
typedef struct _FolksInspectCommandPrivate FolksInspectCommandPrivate;
typedef struct _FolksInspectParamSpecCommand FolksInspectParamSpecCommand;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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

struct _FolksInspectClientClass {
	GObjectClass parent_class;
};

struct _FolksInspectClientPrivate {
	GMainLoop* main_loop;
	FolksIndividualAggregator* _aggregator;
	FolksBackendStore* _backend_store;
	FolksInspectSignalManager* _signal_manager;
	struct termios _original_termios_p;
	gboolean _original_termios_p_valid;
	gboolean _quit_after_pager_dies;
	GIOChannel* _stdin_channel;
	FILE* _pager_channel;
	guint _pager_child_watch_id;
};

struct _Block1Data {
	int _ref_count_;
	gint retval;
};

struct _Block2Data {
	int _ref_count_;
	FolksInspectClient* self;
	gboolean has_yielded;
	gpointer _async_data_;
};

struct _FolksInspectClientWaitForQuiescenceData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksInspectClient* self;
	Block2Data* _data2_;
	gulong signal_id;
	FolksIndividualAggregator* _tmp0_;
	gulong _tmp1_;
	FolksIndividualAggregator* _tmp2_;
	FolksIndividualAggregator* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	FolksIndividualAggregator* _tmp6_;
	gulong _tmp7_;
	FolksIndividualAggregator* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	GError * _inner_error_;
};

struct _FolksInspectClientRunNonInteractiveData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksInspectClient* self;
	gchar* command_line;
	gint result;
	gchar* subcommand;
	gchar* command_name;
	FolksInspectCommand* command;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	FolksInspectCommand* _tmp3_;
	FolksInspectCommand* _tmp4_;
	FILE* _tmp5_;
	const gchar* _tmp6_;
	GError* e1;
	FILE* _tmp7_;
	GError* _tmp8_;
	const gchar* _tmp9_;
	gint retval;
	FolksInspectCommand* _tmp10_;
	const gchar* _tmp11_;
	gint _tmp12_;
	GError * _inner_error_;
};

struct _FolksInspectClientRunInteractiveData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksInspectClient* self;
	gint result;
	struct termios _tmp0_;
	gint _tmp1_;
	FILE* _tmp2_;
	gint _tmp3_;
	GIOChannel* _tmp4_;
	FolksIndividualAggregator* _tmp5_;
};

struct _Block3Data {
	int _ref_count_;
	FolksInspectCommand* command;
};

struct _FolksInspectCommand {
	GTypeInstance parent_instance;
	volatile int ref_count;
	FolksInspectCommandPrivate * priv;
	FolksInspectClient* client;
};

struct _FolksInspectCommandClass {
	GTypeClass parent_class;
	void (*finalize) (FolksInspectCommand *self);
	void (*run) (FolksInspectCommand* self, const gchar* command_string, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gint (*run_finish) (FolksInspectCommand* self, GAsyncResult* _res_);
	gchar** (*complete_subcommand) (FolksInspectCommand* self, const gchar* subcommand, int* result_length1);
	const gchar* (*get_name) (FolksInspectCommand* self);
	const gchar* (*get_description) (FolksInspectCommand* self);
	const gchar* (*get_help) (FolksInspectCommand* self);
};

struct _FolksInspectParamSpecCommand {
	GParamSpec parent_instance;
};


extern FolksInspectClient* main_client;
FolksInspectClient* main_client = NULL;
static gpointer folks_inspect_client_parent_class = NULL;
static gboolean folks_inspect_client__is_readline_installed;
static gboolean folks_inspect_client__is_readline_installed = FALSE;
static GPid folks_inspect_client__pager_pid;
static GPid folks_inspect_client__pager_pid = (GPid) 0;
static guint folks_inspect_client__stdin_watch_id;
static guint folks_inspect_client__stdin_watch_id = (guint) 0;
extern FILE* folks_inspect_utils_output_filestream;
static gpointer folks_inspect_command_parent_class = NULL;

GType folks_inspect_client_get_type (void) G_GNUC_CONST;
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;
GType folks_inspect_signal_manager_get_type (void) G_GNUC_CONST;
#define FOLKS_INSPECT_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLKS_INSPECT_TYPE_CLIENT, FolksInspectClientPrivate))
enum  {
	FOLKS_INSPECT_CLIENT_DUMMY_PROPERTY,
	FOLKS_INSPECT_CLIENT_AGGREGATOR,
	FOLKS_INSPECT_CLIENT_BACKEND_STORE,
	FOLKS_INSPECT_CLIENT_SIGNAL_MANAGER
};
gint folks_inspect_client_main (gchar** args, int args_length1);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
FolksInspectClient* folks_inspect_client_new (void);
FolksInspectClient* folks_inspect_client_construct (GType object_type);
static gboolean __lambda4_ (void);
void folks_inspect_client_quit (FolksInspectClient* self);
static gboolean ___lambda4__gsource_func (gpointer self);
void folks_inspect_client_run_interactive (FolksInspectClient* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gint folks_inspect_client_run_interactive_finish (FolksInspectClient* self, GAsyncResult* _res_);
void folks_inspect_client_run_non_interactive (FolksInspectClient* self, const gchar* command_line, GAsyncReadyCallback _callback_, gpointer _user_data_);
gint folks_inspect_client_run_non_interactive_finish (FolksInspectClient* self, GAsyncResult* _res_);
static void ___lambda9_ (Block1Data* _data1_, GObject* obj, GAsyncResult* res);
static void ____lambda9__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
void folks_inspect_utils_init (void);
FolksInspectCommandsQuit* folks_inspect_commands_quit_new (FolksInspectClient* client);
FolksInspectCommandsQuit* folks_inspect_commands_quit_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_quit_get_type (void) G_GNUC_CONST;
FolksInspectCommandsHelp* folks_inspect_commands_help_new (FolksInspectClient* client);
FolksInspectCommandsHelp* folks_inspect_commands_help_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_help_get_type (void) G_GNUC_CONST;
FolksInspectCommandsIndividuals* folks_inspect_commands_individuals_new (FolksInspectClient* client);
FolksInspectCommandsIndividuals* folks_inspect_commands_individuals_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_individuals_get_type (void) G_GNUC_CONST;
FolksInspectCommandsLinking* folks_inspect_commands_linking_new (FolksInspectClient* client);
FolksInspectCommandsLinking* folks_inspect_commands_linking_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_linking_get_type (void) G_GNUC_CONST;
FolksInspectCommandsPersonas* folks_inspect_commands_personas_new (FolksInspectClient* client);
FolksInspectCommandsPersonas* folks_inspect_commands_personas_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_personas_get_type (void) G_GNUC_CONST;
FolksInspectCommandsBackends* folks_inspect_commands_backends_new (FolksInspectClient* client);
FolksInspectCommandsBackends* folks_inspect_commands_backends_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_backends_get_type (void) G_GNUC_CONST;
FolksInspectCommandsPersonaStores* folks_inspect_commands_persona_stores_new (FolksInspectClient* client);
FolksInspectCommandsPersonaStores* folks_inspect_commands_persona_stores_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_persona_stores_get_type (void) G_GNUC_CONST;
FolksInspectCommandsSet* folks_inspect_commands_set_new (FolksInspectClient* client);
FolksInspectCommandsSet* folks_inspect_commands_set_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_set_get_type (void) G_GNUC_CONST;
FolksInspectCommandsSignals* folks_inspect_commands_signals_new (FolksInspectClient* client);
FolksInspectCommandsSignals* folks_inspect_commands_signals_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_signals_get_type (void) G_GNUC_CONST;
FolksInspectCommandsDebug* folks_inspect_commands_debug_new (FolksInspectClient* client);
FolksInspectCommandsDebug* folks_inspect_commands_debug_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_debug_get_type (void) G_GNUC_CONST;
FolksInspectCommandsSearch* folks_inspect_commands_search_new (FolksInspectClient* client);
FolksInspectCommandsSearch* folks_inspect_commands_search_construct (GType object_type, FolksInspectClient* client);
GType folks_inspect_commands_search_get_type (void) G_GNUC_CONST;
FolksInspectSignalManager* folks_inspect_signal_manager_new (void);
FolksInspectSignalManager* folks_inspect_signal_manager_construct (GType object_type);
static void folks_inspect_client_set_signal_manager (FolksInspectClient* self, FolksInspectSignalManager* value);
static void folks_inspect_client_set_backend_store (FolksInspectClient* self, FolksBackendStore* value);
static void folks_inspect_client_set_aggregator (FolksInspectClient* self, FolksIndividualAggregator* value);
static void _folks_inspect_client_stop_paged_output (FolksInspectClient* self);
static void _folks_inspect_client_uninstall_readline_and_stdin (FolksInspectClient* self);
static void _folks_inspect_client_wait_for_quiescence_data_free (gpointer _data);
static void _folks_inspect_client_wait_for_quiescence (FolksInspectClient* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void _folks_inspect_client_wait_for_quiescence_finish (FolksInspectClient* self, GAsyncResult* _res_, GError** error);
static gboolean _folks_inspect_client_wait_for_quiescence_co (FolksInspectClientWaitForQuiescenceData* _data_);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
FolksIndividualAggregator* folks_inspect_client_get_aggregator (FolksInspectClient* self);
static void __lambda8_ (Block2Data* _data2_, GObject* obj, GParamSpec* pspec);
static void ___lambda8__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
static void _folks_inspect_client_wait_for_quiescence_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void folks_inspect_client_run_non_interactive_data_free (gpointer _data);
static gboolean folks_inspect_client_run_non_interactive_co (FolksInspectClientRunNonInteractiveData* _data_);
static FolksInspectCommand* folks_inspect_client_parse_command_line (const gchar* command_line, gchar** command_name, gchar** subcommand);
static void folks_inspect_client_run_non_interactive_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void folks_inspect_command_run (FolksInspectCommand* self, const gchar* command_string, GAsyncReadyCallback _callback_, gpointer _user_data_);
gint folks_inspect_command_run_finish (FolksInspectCommand* self, GAsyncResult* _res_);
static void folks_inspect_client_run_interactive_data_free (gpointer _data);
static gboolean folks_inspect_client_run_interactive_co (FolksInspectClientRunInteractiveData* _data_);
static gboolean __lambda5_ (FolksInspectClient* self);
static gboolean ___lambda5__gsource_func (gpointer self);
static gchar** folks_inspect_client_completion_cb (const gchar* word, gint start, gint end);
static gchar** _folks_inspect_client_completion_cb_rl_completion_func_t (const gchar* str, gint a, gint b);
static void _folks_inspect_client_install_readline_and_stdin (FolksInspectClient* self);
static gboolean _folks_inspect_client_stdin_handler_cb (FolksInspectClient* self, GIOChannel* source, GIOCondition cond);
static gboolean __folks_inspect_client_stdin_handler_cb_gio_func (GIOChannel* source, GIOCondition condition, gpointer self);
static void _folks_inspect_client_readline_handler_cb (const gchar* _command_line);
static void __folks_inspect_client_readline_handler_cb_rl_vcpfunc_t (const gchar* s);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void _folks_inspect_client_start_paged_output (FolksInspectClient* self);
static void ___lambda7_ (Block3Data* _data3_, GObject* obj, GAsyncResult* res);
static void ____lambda7__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static void __lambda6_ (FolksInspectClient* self, GPid pid, gint status);
static void ___lambda6__gchild_watch_func (GPid pid, gint status, gpointer self);
gchar* folks_inspect_utils_command_name_completion_cb (const gchar* word, gint state);
static gchar* _folks_inspect_utils_command_name_completion_cb_rl_compentry_func_t (const gchar* str, gint a);
static gchar** _vala_array_dup15 (gchar** self, int length);
gchar** folks_inspect_command_complete_subcommand (FolksInspectCommand* self, const gchar* subcommand, int* result_length1);
FolksBackendStore* folks_inspect_client_get_backend_store (FolksInspectClient* self);
FolksInspectSignalManager* folks_inspect_client_get_signal_manager (FolksInspectClient* self);
static void folks_inspect_client_finalize (GObject* obj);
static void _vala_folks_inspect_client_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_folks_inspect_client_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
enum  {
	FOLKS_INSPECT_COMMAND_DUMMY_PROPERTY
};
FolksInspectCommand* folks_inspect_command_construct (GType object_type, FolksInspectClient* client);
static gchar** folks_inspect_command_real_complete_subcommand (FolksInspectCommand* self, const gchar* subcommand, int* result_length1);
const gchar* folks_inspect_command_get_name (FolksInspectCommand* self);
const gchar* folks_inspect_command_get_description (FolksInspectCommand* self);
const gchar* folks_inspect_command_get_help (FolksInspectCommand* self);
static void folks_inspect_command_finalize (FolksInspectCommand* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


static Block1Data* block1_data_ref (Block1Data* _data1_) {
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		g_slice_free (Block1Data, _data1_);
	}
}


static gboolean __lambda4_ (void) {
	gboolean result = FALSE;
	GPid _tmp0_ = 0;
	_tmp0_ = folks_inspect_client__pager_pid;
	if (_tmp0_ != ((GPid) 0)) {
		FolksInspectClient* _tmp1_ = NULL;
		GPid _tmp2_ = 0;
		_tmp1_ = main_client;
		_tmp1_->priv->_quit_after_pager_dies = TRUE;
		_tmp2_ = folks_inspect_client__pager_pid;
		kill ((pid_t) _tmp2_, SIGTERM);
	} else {
		FolksInspectClient* _tmp3_ = NULL;
		_tmp3_ = main_client;
		folks_inspect_client_quit (_tmp3_);
	}
	result = FALSE;
	return result;
}


static gboolean ___lambda4__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda4_ ();
	return result;
}


static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gchar** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	_tmp0_ = separator;
	if (_tmp0_ == NULL) {
		separator = "";
	}
	_tmp3_ = str_array;
	_tmp3__length1 = str_array_length1;
	if (_tmp3_ != NULL) {
		_tmp2_ = TRUE;
	} else {
		gchar** _tmp4_ = NULL;
		gint _tmp4__length1 = 0;
		_tmp4_ = str_array;
		_tmp4__length1 = str_array_length1;
		_tmp2_ = _tmp4__length1 > 0;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		gboolean _tmp5_ = FALSE;
		gchar** _tmp6_ = NULL;
		gint _tmp6__length1 = 0;
		_tmp6_ = str_array;
		_tmp6__length1 = str_array_length1;
		if (_tmp6__length1 == (-1)) {
			gchar** _tmp7_ = NULL;
			gint _tmp7__length1 = 0;
			const gchar* _tmp8_ = NULL;
			_tmp7_ = str_array;
			_tmp7__length1 = str_array_length1;
			_tmp8_ = _tmp7_[0];
			_tmp5_ = _tmp8_ != NULL;
		} else {
			_tmp5_ = FALSE;
		}
		_tmp1_ = _tmp5_;
	}
	if (_tmp1_) {
		gint i = 0;
		gsize len = 0UL;
		gint _tmp31_ = 0;
		gint _tmp33_ = 0;
		gint _tmp34_ = 0;
		gsize _tmp35_ = 0UL;
		const gchar* _tmp36_ = NULL;
		gint _tmp37_ = 0;
		gint _tmp38_ = 0;
		gint _tmp39_ = 0;
		const gchar* res = NULL;
		gsize _tmp40_ = 0UL;
		void* _tmp41_ = NULL;
		void* ptr = NULL;
		const gchar* _tmp42_ = NULL;
		gchar** _tmp43_ = NULL;
		gint _tmp43__length1 = 0;
		const gchar* _tmp44_ = NULL;
		void* _tmp45_ = NULL;
		const gchar* _tmp62_ = NULL;
		len = (gsize) 1;
		{
			gboolean _tmp9_ = FALSE;
			i = 0;
			_tmp9_ = TRUE;
			while (TRUE) {
				gboolean _tmp11_ = FALSE;
				gboolean _tmp12_ = FALSE;
				gchar** _tmp13_ = NULL;
				gint _tmp13__length1 = 0;
				gint _tmp21_ = 0;
				gchar** _tmp22_ = NULL;
				gint _tmp22__length1 = 0;
				gint _tmp23_ = 0;
				const gchar* _tmp24_ = NULL;
				gsize _tmp30_ = 0UL;
				if (!_tmp9_) {
					gint _tmp10_ = 0;
					_tmp10_ = i;
					i = _tmp10_ + 1;
				}
				_tmp9_ = FALSE;
				_tmp13_ = str_array;
				_tmp13__length1 = str_array_length1;
				if (_tmp13__length1 != (-1)) {
					gint _tmp14_ = 0;
					gchar** _tmp15_ = NULL;
					gint _tmp15__length1 = 0;
					_tmp14_ = i;
					_tmp15_ = str_array;
					_tmp15__length1 = str_array_length1;
					_tmp12_ = _tmp14_ < _tmp15__length1;
				} else {
					_tmp12_ = FALSE;
				}
				if (_tmp12_) {
					_tmp11_ = TRUE;
				} else {
					gboolean _tmp16_ = FALSE;
					gchar** _tmp17_ = NULL;
					gint _tmp17__length1 = 0;
					_tmp17_ = str_array;
					_tmp17__length1 = str_array_length1;
					if (_tmp17__length1 == (-1)) {
						gchar** _tmp18_ = NULL;
						gint _tmp18__length1 = 0;
						gint _tmp19_ = 0;
						const gchar* _tmp20_ = NULL;
						_tmp18_ = str_array;
						_tmp18__length1 = str_array_length1;
						_tmp19_ = i;
						_tmp20_ = _tmp18_[_tmp19_];
						_tmp16_ = _tmp20_ != NULL;
					} else {
						_tmp16_ = FALSE;
					}
					_tmp11_ = _tmp16_;
				}
				if (!_tmp11_) {
					break;
				}
				_tmp22_ = str_array;
				_tmp22__length1 = str_array_length1;
				_tmp23_ = i;
				_tmp24_ = _tmp22_[_tmp23_];
				if (_tmp24_ != NULL) {
					gchar** _tmp25_ = NULL;
					gint _tmp25__length1 = 0;
					gint _tmp26_ = 0;
					const gchar* _tmp27_ = NULL;
					gint _tmp28_ = 0;
					gint _tmp29_ = 0;
					_tmp25_ = str_array;
					_tmp25__length1 = str_array_length1;
					_tmp26_ = i;
					_tmp27_ = _tmp25_[_tmp26_];
					_tmp28_ = strlen ((const gchar*) _tmp27_);
					_tmp29_ = _tmp28_;
					_tmp21_ = _tmp29_;
				} else {
					_tmp21_ = 0;
				}
				_tmp30_ = len;
				len = _tmp30_ + _tmp21_;
			}
		}
		_tmp31_ = i;
		if (_tmp31_ == 0) {
			gchar* _tmp32_ = NULL;
			_tmp32_ = g_strdup ("");
			result = _tmp32_;
			return result;
		}
		_tmp33_ = i;
		str_array_length1 = _tmp33_;
		_tmp34_ = str_array_length1;
		_tmp35_ = len;
		_tmp36_ = separator;
		_tmp37_ = strlen ((const gchar*) _tmp36_);
		_tmp38_ = _tmp37_;
		_tmp39_ = i;
		len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1));
		_tmp40_ = len;
		_tmp41_ = g_malloc (_tmp40_);
		res = _tmp41_;
		_tmp42_ = res;
		_tmp43_ = str_array;
		_tmp43__length1 = str_array_length1;
		_tmp44_ = _tmp43_[0];
		_tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_);
		ptr = _tmp45_;
		{
			gboolean _tmp46_ = FALSE;
			i = 1;
			_tmp46_ = TRUE;
			while (TRUE) {
				gint _tmp48_ = 0;
				gchar** _tmp49_ = NULL;
				gint _tmp49__length1 = 0;
				void* _tmp50_ = NULL;
				const gchar* _tmp51_ = NULL;
				void* _tmp52_ = NULL;
				const gchar* _tmp53_ = NULL;
				gchar** _tmp54_ = NULL;
				gint _tmp54__length1 = 0;
				gint _tmp55_ = 0;
				const gchar* _tmp56_ = NULL;
				void* _tmp60_ = NULL;
				void* _tmp61_ = NULL;
				if (!_tmp46_) {
					gint _tmp47_ = 0;
					_tmp47_ = i;
					i = _tmp47_ + 1;
				}
				_tmp46_ = FALSE;
				_tmp48_ = i;
				_tmp49_ = str_array;
				_tmp49__length1 = str_array_length1;
				if (!(_tmp48_ < _tmp49__length1)) {
					break;
				}
				_tmp50_ = ptr;
				_tmp51_ = separator;
				_tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_);
				ptr = _tmp52_;
				_tmp54_ = str_array;
				_tmp54__length1 = str_array_length1;
				_tmp55_ = i;
				_tmp56_ = _tmp54_[_tmp55_];
				if (_tmp56_ != NULL) {
					gchar** _tmp57_ = NULL;
					gint _tmp57__length1 = 0;
					gint _tmp58_ = 0;
					const gchar* _tmp59_ = NULL;
					_tmp57_ = str_array;
					_tmp57__length1 = str_array_length1;
					_tmp58_ = i;
					_tmp59_ = _tmp57_[_tmp58_];
					_tmp53_ = (const gchar*) _tmp59_;
				} else {
					_tmp53_ = "";
				}
				_tmp60_ = ptr;
				_tmp61_ = g_stpcpy (_tmp60_, _tmp53_);
				ptr = _tmp61_;
			}
		}
		_tmp62_ = res;
		res = NULL;
		result = (gchar*) _tmp62_;
		return result;
	} else {
		gchar* _tmp63_ = NULL;
		_tmp63_ = g_strdup ("");
		result = _tmp63_;
		return result;
	}
}


static void ___lambda9_ (Block1Data* _data1_, GObject* obj, GAsyncResult* res) {
	FolksInspectClient* _tmp0_ = NULL;
	GAsyncResult* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	FolksInspectClient* _tmp3_ = NULL;
	g_return_if_fail (res != NULL);
	_tmp0_ = main_client;
	_tmp1_ = res;
	_tmp2_ = folks_inspect_client_run_non_interactive_finish (_tmp0_, _tmp1_);
	_data1_->retval = _tmp2_;
	_tmp3_ = main_client;
	folks_inspect_client_quit (_tmp3_);
}


static void ____lambda9__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	___lambda9_ (self, source_object, res);
	block1_data_unref (self);
}


gint folks_inspect_client_main (gchar** args, int args_length1) {
	gint result = 0;
	Block1Data* _data1_;
	GOptionContext* context = NULL;
	GOptionContext* _tmp0_ = NULL;
	GOptionContext* _tmp1_ = NULL;
	FolksInspectClient* _tmp6_ = NULL;
	gchar** _tmp7_ = NULL;
	gint _tmp7__length1 = 0;
	FolksInspectClient* _tmp18_ = NULL;
	GMainLoop* _tmp19_ = NULL;
	gint _tmp20_ = 0;
	GError * _inner_error_ = NULL;
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->retval = 0;
	setlocale (LC_ALL, "");
	bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
	textdomain (GETTEXT_PACKAGE);
	_tmp0_ = g_option_context_new ("[COMMAND]");
	context = _tmp0_;
	_tmp1_ = context;
	g_option_context_set_summary (_tmp1_, "Inspect meta-contact information in libfolks.");
	{
		GOptionContext* _tmp2_ = NULL;
		_tmp2_ = context;
		g_option_context_parse (_tmp2_, &args_length1, &args, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_OPTION_ERROR) {
				goto __catch4_g_option_error;
			}
			_g_option_context_free0 (context);
			block1_data_unref (_data1_);
			_data1_ = NULL;
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return 0;
		}
	}
	goto __finally4;
	__catch4_g_option_error:
	{
		GError* e1 = NULL;
		FILE* _tmp3_ = NULL;
		GError* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		e1 = _inner_error_;
		_inner_error_ = NULL;
		_tmp3_ = stderr;
		_tmp4_ = e1;
		_tmp5_ = _tmp4_->message;
		fprintf (_tmp3_, "Couldn’t parse command line options: %s\n", _tmp5_);
		result = 1;
		_g_error_free0 (e1);
		_g_option_context_free0 (context);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		return result;
	}
	__finally4:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_option_context_free0 (context);
		block1_data_unref (_data1_);
		_data1_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	_tmp6_ = folks_inspect_client_new ();
	_g_object_unref0 (main_client);
	main_client = _tmp6_;
	g_unix_signal_add_full (G_PRIORITY_DEFAULT, SIGTERM, ___lambda4__gsource_func, NULL, NULL);
	_tmp7_ = args;
	_tmp7__length1 = args_length1;
	if (_tmp7__length1 == 1) {
		FolksInspectClient* _tmp8_ = NULL;
		_tmp8_ = main_client;
		folks_inspect_client_run_interactive (_tmp8_, NULL, NULL);
		_data1_->retval = 0;
	} else {
		gchar** _tmp9_ = NULL;
		gint _tmp9__length1 = 0;
		gchar* command_line = NULL;
		gchar** _tmp10_ = NULL;
		gint _tmp10__length1 = 0;
		const gchar* _tmp11_ = NULL;
		FolksInspectClient* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
		_tmp9_ = args;
		_tmp9__length1 = args_length1;
		_vala_assert (_tmp9__length1 > 1, "args.length > 1");
		_tmp10_ = args;
		_tmp10__length1 = args_length1;
		_tmp11_ = _tmp10_[1];
		if (g_strcmp0 (_tmp11_, "--") == 0) {
			gchar** _tmp12_ = NULL;
			gint _tmp12__length1 = 0;
			gchar* _tmp13_ = NULL;
			_tmp12_ = args;
			_tmp12__length1 = args_length1;
			_tmp13_ = _vala_g_strjoinv (" ", _tmp12_ + 2, 0 - 2);
			_g_free0 (command_line);
			command_line = _tmp13_;
		} else {
			gchar** _tmp14_ = NULL;
			gint _tmp14__length1 = 0;
			gchar* _tmp15_ = NULL;
			_tmp14_ = args;
			_tmp14__length1 = args_length1;
			_tmp15_ = _vala_g_strjoinv (" ", _tmp14_ + 1, 0 - 1);
			_g_free0 (command_line);
			command_line = _tmp15_;
		}
		_tmp16_ = main_client;
		_tmp17_ = command_line;
		folks_inspect_client_run_non_interactive (_tmp16_, _tmp17_, ____lambda9__gasync_ready_callback, block1_data_ref (_data1_));
		_g_free0 (command_line);
	}
	_tmp18_ = main_client;
	_tmp19_ = _tmp18_->priv->main_loop;
	g_main_loop_run (_tmp19_);
	_tmp20_ = _data1_->retval;
	result = _tmp20_;
	_g_option_context_free0 (context);
	block1_data_unref (_data1_);
	_data1_ = NULL;
	return result;
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
	return folks_inspect_client_main (argv, argc);
}


FolksInspectClient* folks_inspect_client_construct (GType object_type) {
	FolksInspectClient * self = NULL;
	GeeHashMap* _tmp0_ = NULL;
	GeeHashMap* _tmp1_ = NULL;
	FolksInspectCommandsQuit* _tmp2_ = NULL;
	FolksInspectCommandsQuit* _tmp3_ = NULL;
	GeeHashMap* _tmp4_ = NULL;
	FolksInspectCommandsHelp* _tmp5_ = NULL;
	FolksInspectCommandsHelp* _tmp6_ = NULL;
	GeeHashMap* _tmp7_ = NULL;
	FolksInspectCommandsIndividuals* _tmp8_ = NULL;
	FolksInspectCommandsIndividuals* _tmp9_ = NULL;
	GeeHashMap* _tmp10_ = NULL;
	FolksInspectCommandsLinking* _tmp11_ = NULL;
	FolksInspectCommandsLinking* _tmp12_ = NULL;
	GeeHashMap* _tmp13_ = NULL;
	FolksInspectCommandsPersonas* _tmp14_ = NULL;
	FolksInspectCommandsPersonas* _tmp15_ = NULL;
	GeeHashMap* _tmp16_ = NULL;
	FolksInspectCommandsBackends* _tmp17_ = NULL;
	FolksInspectCommandsBackends* _tmp18_ = NULL;
	GeeHashMap* _tmp19_ = NULL;
	FolksInspectCommandsPersonaStores* _tmp20_ = NULL;
	FolksInspectCommandsPersonaStores* _tmp21_ = NULL;
	GeeHashMap* _tmp22_ = NULL;
	FolksInspectCommandsSet* _tmp23_ = NULL;
	FolksInspectCommandsSet* _tmp24_ = NULL;
	GeeHashMap* _tmp25_ = NULL;
	FolksInspectCommandsSignals* _tmp26_ = NULL;
	FolksInspectCommandsSignals* _tmp27_ = NULL;
	GeeHashMap* _tmp28_ = NULL;
	FolksInspectCommandsDebug* _tmp29_ = NULL;
	FolksInspectCommandsDebug* _tmp30_ = NULL;
	GeeHashMap* _tmp31_ = NULL;
	FolksInspectCommandsSearch* _tmp32_ = NULL;
	FolksInspectCommandsSearch* _tmp33_ = NULL;
	GMainLoop* _tmp34_ = NULL;
	FolksInspectSignalManager* _tmp35_ = NULL;
	FolksInspectSignalManager* _tmp36_ = NULL;
	FolksBackendStore* _tmp37_ = NULL;
	FolksBackendStore* _tmp38_ = NULL;
	FolksIndividualAggregator* _tmp39_ = NULL;
	FolksIndividualAggregator* _tmp40_ = NULL;
	self = (FolksInspectClient*) g_object_new (object_type, NULL);
	folks_inspect_utils_init ();
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, FOLKS_INSPECT_TYPE_COMMAND, (GBoxedCopyFunc) folks_inspect_command_ref, folks_inspect_command_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (self->commands);
	self->commands = _tmp0_;
	_tmp1_ = self->commands;
	_tmp2_ = folks_inspect_commands_quit_new (self);
	_tmp3_ = _tmp2_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp1_, "quit", (FolksInspectCommand*) _tmp3_);
	_folks_inspect_command_unref0 (_tmp3_);
	_tmp4_ = self->commands;
	_tmp5_ = folks_inspect_commands_help_new (self);
	_tmp6_ = _tmp5_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp4_, "help", (FolksInspectCommand*) _tmp6_);
	_folks_inspect_command_unref0 (_tmp6_);
	_tmp7_ = self->commands;
	_tmp8_ = folks_inspect_commands_individuals_new (self);
	_tmp9_ = _tmp8_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, "individuals", (FolksInspectCommand*) _tmp9_);
	_folks_inspect_command_unref0 (_tmp9_);
	_tmp10_ = self->commands;
	_tmp11_ = folks_inspect_commands_linking_new (self);
	_tmp12_ = _tmp11_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp10_, "linking", (FolksInspectCommand*) _tmp12_);
	_folks_inspect_command_unref0 (_tmp12_);
	_tmp13_ = self->commands;
	_tmp14_ = folks_inspect_commands_personas_new (self);
	_tmp15_ = _tmp14_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp13_, "personas", (FolksInspectCommand*) _tmp15_);
	_folks_inspect_command_unref0 (_tmp15_);
	_tmp16_ = self->commands;
	_tmp17_ = folks_inspect_commands_backends_new (self);
	_tmp18_ = _tmp17_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp16_, "backends", (FolksInspectCommand*) _tmp18_);
	_folks_inspect_command_unref0 (_tmp18_);
	_tmp19_ = self->commands;
	_tmp20_ = folks_inspect_commands_persona_stores_new (self);
	_tmp21_ = _tmp20_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp19_, "persona-stores", (FolksInspectCommand*) _tmp21_);
	_folks_inspect_command_unref0 (_tmp21_);
	_tmp22_ = self->commands;
	_tmp23_ = folks_inspect_commands_set_new (self);
	_tmp24_ = _tmp23_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp22_, "set", (FolksInspectCommand*) _tmp24_);
	_folks_inspect_command_unref0 (_tmp24_);
	_tmp25_ = self->commands;
	_tmp26_ = folks_inspect_commands_signals_new (self);
	_tmp27_ = _tmp26_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, "signals", (FolksInspectCommand*) _tmp27_);
	_folks_inspect_command_unref0 (_tmp27_);
	_tmp28_ = self->commands;
	_tmp29_ = folks_inspect_commands_debug_new (self);
	_tmp30_ = _tmp29_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp28_, "debug", (FolksInspectCommand*) _tmp30_);
	_folks_inspect_command_unref0 (_tmp30_);
	_tmp31_ = self->commands;
	_tmp32_ = folks_inspect_commands_search_new (self);
	_tmp33_ = _tmp32_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp31_, "search", (FolksInspectCommand*) _tmp33_);
	_folks_inspect_command_unref0 (_tmp33_);
	_tmp34_ = g_main_loop_new (NULL, FALSE);
	_g_main_loop_unref0 (self->priv->main_loop);
	self->priv->main_loop = _tmp34_;
	_tmp35_ = folks_inspect_signal_manager_new ();
	_tmp36_ = _tmp35_;
	folks_inspect_client_set_signal_manager (self, _tmp36_);
	_g_object_unref0 (_tmp36_);
	_tmp37_ = folks_backend_store_dup ();
	_tmp38_ = _tmp37_;
	folks_inspect_client_set_backend_store (self, _tmp38_);
	_g_object_unref0 (_tmp38_);
	_tmp39_ = folks_individual_aggregator_dup ();
	_tmp40_ = _tmp39_;
	folks_inspect_client_set_aggregator (self, _tmp40_);
	_g_object_unref0 (_tmp40_);
	return self;
}


FolksInspectClient* folks_inspect_client_new (void) {
	return folks_inspect_client_construct (FOLKS_INSPECT_TYPE_CLIENT);
}


void folks_inspect_client_quit (FolksInspectClient* self) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GMainLoop* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	_folks_inspect_client_stop_paged_output (self);
	_tmp0_ = folks_inspect_client__is_readline_installed;
	if (_tmp0_) {
		_folks_inspect_client_uninstall_readline_and_stdin (self);
	}
	_tmp1_ = self->priv->_original_termios_p_valid;
	if (_tmp1_) {
		struct termios _tmp2_ = {0};
		_tmp2_ = self->priv->_original_termios_p;
		tcsetattr (STDIN_FILENO, TCSADRAIN, &_tmp2_);
	}
	_tmp3_ = self->priv->main_loop;
	g_main_loop_quit (_tmp3_);
}


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


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


static void _folks_inspect_client_wait_for_quiescence (FolksInspectClient* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksInspectClientWaitForQuiescenceData* _data_;
	FolksInspectClient* _tmp0_ = NULL;
	_data_ = g_slice_new0 (FolksInspectClientWaitForQuiescenceData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, _folks_inspect_client_wait_for_quiescence);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, _folks_inspect_client_wait_for_quiescence_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_folks_inspect_client_wait_for_quiescence_co (_data_);
}


static void _folks_inspect_client_wait_for_quiescence_finish (FolksInspectClient* self, GAsyncResult* _res_, GError** error) {
	FolksInspectClientWaitForQuiescenceData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static 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_)) {
		FolksInspectClient* self;
		self = _data2_->self;
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}


static void __lambda8_ (Block2Data* _data2_, GObject* obj, GParamSpec* pspec) {
	FolksInspectClient* self;
	gboolean _tmp0_ = FALSE;
	self = _data2_->self;
	g_return_if_fail (obj != NULL);
	g_return_if_fail (pspec != NULL);
	_tmp0_ = _data2_->has_yielded;
	if (_tmp0_ == TRUE) {
		_folks_inspect_client_wait_for_quiescence_co (_data2_->_async_data_);
	}
}


static void ___lambda8__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	__lambda8_ (self, _sender, pspec);
}


static void _folks_inspect_client_wait_for_quiescence_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksInspectClientWaitForQuiescenceData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	_folks_inspect_client_wait_for_quiescence_co (_data_);
}


static gboolean _folks_inspect_client_wait_for_quiescence_co (FolksInspectClientWaitForQuiescenceData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data2_ = g_slice_new0 (Block2Data);
	_data_->_data2_->_ref_count_ = 1;
	_data_->_data2_->self = g_object_ref (_data_->self);
	_data_->_data2_->_async_data_ = _data_;
	_data_->_data2_->has_yielded = FALSE;
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->self->priv->_aggregator;
	_data_->_tmp1_ = 0UL;
	_data_->_tmp1_ = g_signal_connect_data ((GObject*) _data_->_tmp0_, "notify::is-quiescent", (GCallback) ___lambda8__g_object_notify, block2_data_ref (_data_->_data2_), (GClosureNotify) block2_data_unref, 0);
	_data_->signal_id = _data_->_tmp1_;
	{
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = _data_->self->priv->_aggregator;
		_data_->_state_ = 1;
		folks_individual_aggregator_prepare (_data_->_tmp2_, _folks_inspect_client_wait_for_quiescence_ready, _data_);
		return FALSE;
		_state_1:
		folks_individual_aggregator_prepare_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_);
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			goto __finally5;
		}
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _data_->self->priv->_aggregator;
		_data_->_tmp4_ = FALSE;
		_data_->_tmp4_ = folks_individual_aggregator_get_is_quiescent (_data_->_tmp3_);
		_data_->_tmp5_ = FALSE;
		_data_->_tmp5_ = _data_->_tmp4_;
		if (_data_->_tmp5_ == FALSE) {
			_data_->_data2_->has_yielded = TRUE;
			_data_->_state_ = 2;
			return FALSE;
			_state_2:
			;
		}
	}
	__finally5:
	{
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = _data_->self->priv->_aggregator;
		_data_->_tmp7_ = 0UL;
		_data_->_tmp7_ = _data_->signal_id;
		g_signal_handler_disconnect ((GObject*) _data_->_tmp6_, _data_->_tmp7_);
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->self->priv->_aggregator;
		_data_->_tmp9_ = FALSE;
		_data_->_tmp9_ = folks_individual_aggregator_get_is_quiescent (_data_->_tmp8_);
		_data_->_tmp10_ = FALSE;
		_data_->_tmp10_ = _data_->_tmp9_;
		_vala_assert (_data_->_tmp10_ == TRUE, "this.aggregator.is_quiescent == true");
	}
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		block2_data_unref (_data_->_data2_);
		_data_->_data2_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	block2_data_unref (_data_->_data2_);
	_data_->_data2_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void folks_inspect_client_run_non_interactive_data_free (gpointer _data) {
	FolksInspectClientRunNonInteractiveData* _data_;
	_data_ = _data;
	_g_free0 (_data_->command_line);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksInspectClientRunNonInteractiveData, _data_);
}


void folks_inspect_client_run_non_interactive (FolksInspectClient* self, const gchar* command_line, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksInspectClientRunNonInteractiveData* _data_;
	FolksInspectClient* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	_data_ = g_slice_new0 (FolksInspectClientRunNonInteractiveData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_inspect_client_run_non_interactive);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_inspect_client_run_non_interactive_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = command_line;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->command_line);
	_data_->command_line = _tmp2_;
	folks_inspect_client_run_non_interactive_co (_data_);
}


gint folks_inspect_client_run_non_interactive_finish (FolksInspectClient* self, GAsyncResult* _res_) {
	gint result;
	FolksInspectClientRunNonInteractiveData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static void folks_inspect_client_run_non_interactive_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	FolksInspectClientRunNonInteractiveData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	folks_inspect_client_run_non_interactive_co (_data_);
}


static gboolean folks_inspect_client_run_non_interactive_co (FolksInspectClientRunNonInteractiveData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->command_line;
	_data_->_tmp1_ = NULL;
	_data_->_tmp2_ = NULL;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = folks_inspect_client_parse_command_line (_data_->_tmp0_, &_data_->_tmp1_, &_data_->_tmp2_);
	_g_free0 (_data_->command_name);
	_data_->command_name = _data_->_tmp1_;
	_g_free0 (_data_->subcommand);
	_data_->subcommand = _data_->_tmp2_;
	_data_->command = _data_->_tmp3_;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = _data_->command;
	if (_data_->_tmp4_ == NULL) {
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = stdout;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = _data_->command_name;
		fprintf (_data_->_tmp5_, "Unrecognised command ‘%s’.\n", _data_->_tmp6_);
		_data_->result = 1;
		_folks_inspect_command_unref0 (_data_->command);
		_g_free0 (_data_->command_name);
		_g_free0 (_data_->subcommand);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_state_ = 1;
		_folks_inspect_client_wait_for_quiescence (_data_->self, folks_inspect_client_run_non_interactive_ready, _data_);
		return FALSE;
		_state_1:
		_folks_inspect_client_wait_for_quiescence_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			goto __catch6_g_error;
		}
	}
	goto __finally6;
	__catch6_g_error:
	{
		_data_->e1 = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = stderr;
		_data_->_tmp8_ = NULL;
		_data_->_tmp8_ = _data_->e1;
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = _data_->_tmp8_->message;
		fprintf (_data_->_tmp7_, "Error preparing aggregator: %s\n", _data_->_tmp9_);
		_data_->result = 1;
		_g_error_free0 (_data_->e1);
		_folks_inspect_command_unref0 (_data_->command);
		_g_free0 (_data_->command_name);
		_g_free0 (_data_->subcommand);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally6:
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		_folks_inspect_command_unref0 (_data_->command);
		_g_free0 (_data_->command_name);
		_g_free0 (_data_->subcommand);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = _data_->command;
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = _data_->subcommand;
	_data_->_state_ = 2;
	folks_inspect_command_run (_data_->_tmp10_, _data_->_tmp11_, folks_inspect_client_run_non_interactive_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp12_ = 0;
	_data_->_tmp12_ = folks_inspect_command_run_finish (_data_->_tmp10_, _data_->_res_);
	_data_->retval = _data_->_tmp12_;
	folks_inspect_client_quit (_data_->self);
	_data_->result = _data_->retval;
	_folks_inspect_command_unref0 (_data_->command);
	_g_free0 (_data_->command_name);
	_g_free0 (_data_->subcommand);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_folks_inspect_command_unref0 (_data_->command);
	_g_free0 (_data_->command_name);
	_g_free0 (_data_->subcommand);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


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


void folks_inspect_client_run_interactive (FolksInspectClient* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksInspectClientRunInteractiveData* _data_;
	FolksInspectClient* _tmp0_ = NULL;
	_data_ = g_slice_new0 (FolksInspectClientRunInteractiveData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, folks_inspect_client_run_interactive);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_inspect_client_run_interactive_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	folks_inspect_client_run_interactive_co (_data_);
}


gint folks_inspect_client_run_interactive_finish (FolksInspectClient* self, GAsyncResult* _res_) {
	gint result;
	FolksInspectClientRunInteractiveData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	return result;
}


static gboolean __lambda5_ (FolksInspectClient* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	FILE* _tmp1_ = NULL;
	_tmp0_ = folks_inspect_client__is_readline_installed;
	if (_tmp0_ == FALSE) {
		result = TRUE;
		return result;
	}
	rl_free_line_state ();
	rl_cleanup_after_signal ();
	rl_reset_after_signal ();
	_tmp1_ = stdout;
	fprintf (_tmp1_, "^C");
	rl_crlf ();
	rl_reset_line_state ();
	rl_replace_line ("", 0);
	rl_redisplay ();
	result = TRUE;
	return result;
}


static gboolean ___lambda5__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda5_ ((FolksInspectClient*) self);
	return result;
}


static gchar** _folks_inspect_client_completion_cb_rl_completion_func_t (const gchar* str, gint a, gint b) {
	gchar** result;
	result = folks_inspect_client_completion_cb (str, a, b);
	return result;
}


static gboolean folks_inspect_client_run_interactive_co (FolksInspectClientRunInteractiveData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	memset (&_data_->_tmp0_, 0, sizeof (struct termios));
	_data_->_tmp1_ = 0;
	_data_->_tmp1_ = tcgetattr (STDIN_FILENO, &_data_->_tmp0_);
	_data_->self->priv->_original_termios_p = _data_->_tmp0_;
	if (_data_->_tmp1_ == 0) {
		_data_->self->priv->_original_termios_p_valid = TRUE;
	}
	g_unix_signal_add_full (G_PRIORITY_DEFAULT, SIGINT, ___lambda5__gsource_func, g_object_ref (_data_->self), g_object_unref);
	rl_readline_name = "folks-inspect";
	rl_attempted_completion_function = _folks_inspect_client_completion_cb_rl_completion_func_t;
	rl_catch_signals = 0;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = stdin;
	_data_->_tmp3_ = 0;
	_data_->_tmp3_ = fileno (_data_->_tmp2_);
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = g_io_channel_unix_new (_data_->_tmp3_);
	_g_io_channel_unref0 (_data_->self->priv->_stdin_channel);
	_data_->self->priv->_stdin_channel = _data_->_tmp4_;
	_folks_inspect_client_install_readline_and_stdin (_data_->self);
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->self->priv->_aggregator;
	folks_individual_aggregator_prepare (_data_->_tmp5_, NULL, NULL);
	_data_->result = 0;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static gboolean __folks_inspect_client_stdin_handler_cb_gio_func (GIOChannel* source, GIOCondition condition, gpointer self) {
	gboolean result;
	result = _folks_inspect_client_stdin_handler_cb ((FolksInspectClient*) self, source, condition);
	return result;
}


static void __folks_inspect_client_readline_handler_cb_rl_vcpfunc_t (const gchar* s) {
	_folks_inspect_client_readline_handler_cb (s);
}


static void _folks_inspect_client_install_readline_and_stdin (FolksInspectClient* self) {
	GIOChannel* _tmp0_ = NULL;
	guint _tmp1_ = 0U;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_stdin_channel;
	_tmp1_ = g_io_add_watch (_tmp0_, G_IO_IN, __folks_inspect_client_stdin_handler_cb_gio_func, self);
	folks_inspect_client__stdin_watch_id = _tmp1_;
	rl_callback_handler_install ("> ", __folks_inspect_client_readline_handler_cb_rl_vcpfunc_t);
	folks_inspect_client__is_readline_installed = TRUE;
}


static void _folks_inspect_client_uninstall_readline_and_stdin (FolksInspectClient* self) {
	guint _tmp0_ = 0U;
	g_return_if_fail (self != NULL);
	rl_callback_handler_remove ();
	folks_inspect_client__is_readline_installed = FALSE;
	_tmp0_ = folks_inspect_client__stdin_watch_id;
	g_source_remove (_tmp0_);
	folks_inspect_client__stdin_watch_id = (guint) 0;
}


static gboolean _folks_inspect_client_stdin_handler_cb (FolksInspectClient* self, GIOChannel* source, GIOCondition cond) {
	gboolean result = FALSE;
	GIOCondition _tmp0_ = 0;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (source != NULL, FALSE);
	_tmp0_ = cond;
	if ((_tmp0_ & G_IO_IN) != 0) {
		rl_callback_read_char ();
		result = TRUE;
		return result;
	}
	g_assert_not_reached ();
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		_folks_inspect_command_unref0 (_data3_->command);
		g_slice_free (Block3Data, _data3_);
	}
}


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


static void ___lambda7_ (Block3Data* _data3_, GObject* obj, GAsyncResult* res) {
	FolksInspectCommand* _tmp0_ = NULL;
	GAsyncResult* _tmp1_ = NULL;
	FolksInspectClient* _tmp2_ = NULL;
	FILE* _tmp3_ = NULL;
	g_return_if_fail (res != NULL);
	_tmp0_ = _data3_->command;
	_tmp1_ = res;
	folks_inspect_command_run_finish (_tmp0_, _tmp1_);
	_tmp2_ = main_client;
	_tmp3_ = _tmp2_->priv->_pager_channel;
	if (_tmp3_ != NULL) {
		FolksInspectClient* _tmp4_ = NULL;
		FILE* _tmp5_ = NULL;
		_tmp4_ = main_client;
		_fclose0 (_tmp4_->priv->_pager_channel);
		_tmp4_->priv->_pager_channel = NULL;
		_tmp5_ = stdout;
		folks_inspect_utils_output_filestream = _tmp5_;
	} else {
		rl_reset_line_state ();
		rl_replace_line ("", 0);
		rl_redisplay ();
	}
}


static void ____lambda7__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
	___lambda7_ (self, source_object, res);
	block3_data_unref (self);
}


static void _folks_inspect_client_readline_handler_cb (const gchar* _command_line) {
	Block3Data* _data3_;
	const gchar* _tmp0_ = NULL;
	gchar* command_line = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	const gchar* _tmp7_ = NULL;
	gchar* subcommand = NULL;
	gchar* command_name = NULL;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	FolksInspectCommand* _tmp11_ = NULL;
	FolksInspectCommand* _tmp12_ = NULL;
	const gchar* _tmp19_ = NULL;
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_tmp0_ = _command_line;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_ = NULL;
		FolksInspectClient* _tmp2_ = NULL;
		_tmp1_ = rl_line_buffer;
		if (g_strcmp0 (_tmp1_, "") != 0) {
			rl_ding ();
			block3_data_unref (_data3_);
			_data3_ = NULL;
			return;
		}
		_tmp2_ = main_client;
		folks_inspect_client_quit (_tmp2_);
		block3_data_unref (_data3_);
		_data3_ = NULL;
		return;
	}
	_tmp3_ = _command_line;
	_tmp4_ = g_strdup ((const gchar*) _tmp3_);
	command_line = _tmp4_;
	_tmp5_ = command_line;
	_tmp6_ = string_strip (_tmp5_);
	_g_free0 (command_line);
	command_line = _tmp6_;
	_tmp7_ = command_line;
	if (g_strcmp0 (_tmp7_, "") == 0) {
		_g_free0 (command_line);
		block3_data_unref (_data3_);
		_data3_ = NULL;
		return;
	}
	_tmp8_ = command_line;
	_tmp11_ = folks_inspect_client_parse_command_line (_tmp8_, &_tmp9_, &_tmp10_);
	_g_free0 (command_name);
	command_name = _tmp9_;
	_g_free0 (subcommand);
	subcommand = _tmp10_;
	_data3_->command = _tmp11_;
	_tmp12_ = _data3_->command;
	if (_tmp12_ != NULL) {
		const gchar* _tmp13_ = NULL;
		FolksInspectCommand* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
		_tmp13_ = command_name;
		if (g_strcmp0 (_tmp13_, "quit") != 0) {
			FolksInspectClient* _tmp14_ = NULL;
			_tmp14_ = main_client;
			_folks_inspect_client_start_paged_output (_tmp14_);
		}
		_tmp15_ = _data3_->command;
		_tmp16_ = subcommand;
		folks_inspect_command_run (_tmp15_, _tmp16_, ____lambda7__gasync_ready_callback, block3_data_ref (_data3_));
	} else {
		FILE* _tmp17_ = NULL;
		const gchar* _tmp18_ = NULL;
		_tmp17_ = stdout;
		_tmp18_ = command_name;
		fprintf (_tmp17_, "Unrecognised command ‘%s’.\n", _tmp18_);
	}
	_tmp19_ = command_line;
	add_history (_tmp19_);
	_g_free0 (command_name);
	_g_free0 (subcommand);
	_g_free0 (command_line);
	block3_data_unref (_data3_);
	_data3_ = NULL;
}


static void __lambda6_ (FolksInspectClient* self, GPid pid, gint status) {
	gint _tmp0_ = 0;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	_folks_inspect_client_stop_paged_output (self);
	_tmp0_ = status;
	_tmp1_ = WIFSIGNALED (_tmp0_);
	if (_tmp1_) {
		rl_crlf ();
	}
	rl_reset_line_state ();
	rl_replace_line ("", 0);
	_tmp2_ = self->priv->_quit_after_pager_dies;
	if (_tmp2_) {
		FolksInspectClient* _tmp3_ = NULL;
		_tmp3_ = main_client;
		folks_inspect_client_quit (_tmp3_);
		return;
	}
	_folks_inspect_client_install_readline_and_stdin (self);
}


static void ___lambda6__gchild_watch_func (GPid pid, gint status, gpointer self) {
	__lambda6_ ((FolksInspectClient*) self, pid, status);
}


static void _folks_inspect_client_start_paged_output (FolksInspectClient* self) {
	gboolean _tmp0_ = FALSE;
	gchar* pager = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar** args = NULL;
	gint args_length1 = 0;
	gint _args_size_ = 0;
	gint pager_fd = 0;
	gint _tmp18_ = 0;
	FILE* _tmp19_ = NULL;
	FILE* _tmp20_ = NULL;
	GPid _tmp21_ = 0;
	guint _tmp22_ = 0U;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = isatty (1);
	if (!_tmp0_) {
		return;
	}
	_tmp1_ = g_getenv ("PAGER");
	_tmp2_ = g_strdup (_tmp1_);
	pager = _tmp2_;
	_tmp4_ = pager;
	if (_tmp4_ != NULL) {
		const gchar* _tmp5_ = NULL;
		_tmp5_ = pager;
		_tmp3_ = g_strcmp0 (_tmp5_, "") == 0;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		_g_free0 (pager);
		return;
	}
	_tmp6_ = pager;
	if (_tmp6_ == NULL) {
		gchar* _tmp7_ = NULL;
		_tmp7_ = g_strdup ("less -FRSX");
		_g_free0 (pager);
		pager = _tmp7_;
	}
	{
		const gchar* _tmp8_ = NULL;
		gchar** _tmp9_ = NULL;
		gint _tmp10_ = 0;
		_tmp8_ = pager;
		g_shell_parse_argv (_tmp8_, &_tmp10_, &_tmp9_, &_inner_error_);
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		args = _tmp9_;
		args_length1 = _tmp10_;
		_args_size_ = args_length1;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_SHELL_ERROR) {
				goto __catch7_g_shell_error;
			}
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (pager);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	goto __finally7;
	__catch7_g_shell_error:
	{
		GError* e = NULL;
		GError* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp11_ = e;
		_tmp12_ = _tmp11_->message;
		g_warning ("inspect.vala:434: Error parsing pager arguments: %s", _tmp12_);
		_g_error_free0 (e);
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (pager);
		return;
	}
	__finally7:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (pager);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_folks_inspect_client_uninstall_readline_and_stdin (self);
	rl_prep_terminal (1);
	pager_fd = 0;
	{
		gchar** _tmp13_ = NULL;
		gint _tmp13__length1 = 0;
		GPid _tmp14_ = 0;
		gint _tmp15_ = 0;
		_tmp13_ = args;
		_tmp13__length1 = args_length1;
		g_spawn_async_with_pipes (NULL, _tmp13_, NULL, (G_SPAWN_LEAVE_DESCRIPTORS_OPEN | G_SPAWN_SEARCH_PATH) | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &_tmp14_, &_tmp15_, NULL, NULL, &_inner_error_);
		folks_inspect_client__pager_pid = _tmp14_;
		pager_fd = _tmp15_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_SPAWN_ERROR) {
				goto __catch8_g_spawn_error;
			}
			args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
			_g_free0 (pager);
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	goto __finally8;
	__catch8_g_spawn_error:
	{
		GError* e2 = NULL;
		GError* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
		e2 = _inner_error_;
		_inner_error_ = NULL;
		_tmp16_ = e2;
		_tmp17_ = _tmp16_->message;
		g_warning ("inspect.vala:464: Error spawning pager: %s", _tmp17_);
		_folks_inspect_client_install_readline_and_stdin (self);
		_g_error_free0 (e2);
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (pager);
		return;
	}
	__finally8:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
		_g_free0 (pager);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp18_ = pager_fd;
	_tmp19_ = fdopen (_tmp18_, "w");
	_fclose0 (self->priv->_pager_channel);
	self->priv->_pager_channel = _tmp19_;
	_tmp20_ = self->priv->_pager_channel;
	folks_inspect_utils_output_filestream = _tmp20_;
	_tmp21_ = folks_inspect_client__pager_pid;
	_tmp22_ = g_child_watch_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp21_, ___lambda6__gchild_watch_func, g_object_ref (self), g_object_unref);
	self->priv->_pager_child_watch_id = _tmp22_;
	args = (_vala_array_free (args, args_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (pager);
}


static void _folks_inspect_client_stop_paged_output (FolksInspectClient* self) {
	GPid _tmp0_ = 0;
	GPid _tmp1_ = 0;
	guint _tmp2_ = 0U;
	FILE* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = folks_inspect_client__pager_pid;
	if (_tmp0_ == ((GPid) 0)) {
		return;
	}
	_tmp1_ = folks_inspect_client__pager_pid;
	g_spawn_close_pid (_tmp1_);
	_tmp2_ = self->priv->_pager_child_watch_id;
	g_source_remove (_tmp2_);
	_fclose0 (self->priv->_pager_channel);
	self->priv->_pager_channel = NULL;
	_tmp3_ = stdout;
	folks_inspect_utils_output_filestream = _tmp3_;
	folks_inspect_client__pager_pid = (GPid) 0;
	self->priv->_pager_child_watch_id = (guint) 0;
	rl_deprep_terminal ();
	rl_free_line_state ();
	rl_cleanup_after_signal ();
	rl_reset_after_signal ();
}


static FolksInspectCommand* folks_inspect_client_parse_command_line (const gchar* command_line, gchar** command_name, gchar** subcommand) {
	gchar* _vala_command_name = NULL;
	gchar* _vala_subcommand = NULL;
	FolksInspectCommand* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar** parts = NULL;
	const gchar* _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
	gchar** _tmp3_ = NULL;
	gint parts_length1 = 0;
	gint _parts_size_ = 0;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	gchar** _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
	gchar** _tmp9_ = NULL;
	gint _tmp9__length1 = 0;
	FolksInspectClient* _tmp15_ = NULL;
	GeeHashMap* _tmp16_ = NULL;
	gchar** _tmp17_ = NULL;
	gint _tmp17__length1 = 0;
	const gchar* _tmp18_ = NULL;
	gpointer _tmp19_ = NULL;
	g_return_val_if_fail (command_line != NULL, NULL);
	_tmp0_ = g_strdup ("");
	_g_free0 (_vala_command_name);
	_vala_command_name = _tmp0_;
	_g_free0 (_vala_subcommand);
	_vala_subcommand = NULL;
	_tmp1_ = command_line;
	_tmp3_ = _tmp2_ = g_strsplit (_tmp1_, " ", 2);
	parts = _tmp3_;
	parts_length1 = _vala_array_length (_tmp2_);
	_parts_size_ = parts_length1;
	_tmp4_ = parts;
	_tmp4__length1 = parts_length1;
	if (_tmp4__length1 < 1) {
		result = NULL;
		parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
		if (command_name) {
			*command_name = _vala_command_name;
		} else {
			_g_free0 (_vala_command_name);
		}
		if (subcommand) {
			*subcommand = _vala_subcommand;
		} else {
			_g_free0 (_vala_subcommand);
		}
		return result;
	}
	_tmp5_ = parts;
	_tmp5__length1 = parts_length1;
	_tmp6_ = _tmp5_[0];
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 (_vala_command_name);
	_vala_command_name = _tmp7_;
	_tmp9_ = parts;
	_tmp9__length1 = parts_length1;
	if (_tmp9__length1 == 2) {
		gchar** _tmp10_ = NULL;
		gint _tmp10__length1 = 0;
		const gchar* _tmp11_ = NULL;
		_tmp10_ = parts;
		_tmp10__length1 = parts_length1;
		_tmp11_ = _tmp10_[1];
		_tmp8_ = g_strcmp0 (_tmp11_, "") != 0;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		gchar** _tmp12_ = NULL;
		gint _tmp12__length1 = 0;
		const gchar* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		_tmp12_ = parts;
		_tmp12__length1 = parts_length1;
		_tmp13_ = _tmp12_[1];
		_tmp14_ = g_strdup (_tmp13_);
		_g_free0 (_vala_subcommand);
		_vala_subcommand = _tmp14_;
	} else {
		_g_free0 (_vala_subcommand);
		_vala_subcommand = NULL;
	}
	_tmp15_ = main_client;
	_tmp16_ = _tmp15_->commands;
	_tmp17_ = parts;
	_tmp17__length1 = parts_length1;
	_tmp18_ = _tmp17_[0];
	_tmp19_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp16_, _tmp18_);
	result = (FolksInspectCommand*) _tmp19_;
	parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
	if (command_name) {
		*command_name = _vala_command_name;
	} else {
		_g_free0 (_vala_command_name);
	}
	if (subcommand) {
		*subcommand = _vala_subcommand;
	} else {
		_g_free0 (_vala_subcommand);
	}
	return result;
}


static gchar* _folks_inspect_utils_command_name_completion_cb_rl_compentry_func_t (const gchar* str, gint a) {
	gchar* result;
	result = folks_inspect_utils_command_name_completion_cb (str, a);
	return result;
}


static gchar** _vala_array_dup15 (gchar** self, int length) {
	gchar** result;
	int i;
	result = g_new0 (gchar*, length + 1);
	for (i = 0; i < length; i++) {
		gchar* _tmp0_ = NULL;
		_tmp0_ = g_strdup (self[i]);
		result[i] = _tmp0_;
	}
	return result;
}


static gchar** folks_inspect_client_completion_cb (const gchar* word, gint start, gint end) {
	gchar** result = NULL;
	gint _tmp0_ = 0;
	gchar* command_name = NULL;
	gchar* subcommand = NULL;
	FolksInspectCommand* command = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	FolksInspectCommand* _tmp8_ = NULL;
	FolksInspectCommand* _tmp9_ = NULL;
	g_return_val_if_fail (word != NULL, NULL);
	_tmp0_ = start;
	if (_tmp0_ == 0) {
		const gchar* _tmp1_ = NULL;
		gchar** _tmp2_ = NULL;
		gchar** _tmp3_ = NULL;
		gchar** _tmp4_ = NULL;
		gint _tmp4__length1 = 0;
		_tmp1_ = word;
		_tmp3_ = _tmp2_ = rl_completion_matches (_tmp1_, _folks_inspect_utils_command_name_completion_cb_rl_compentry_func_t);
		_tmp4_ = (_tmp3_ != NULL) ? _vala_array_dup15 (_tmp3_, _vala_array_length (_tmp2_)) : ((gpointer) _tmp3_);
		_tmp4__length1 = _vala_array_length (_tmp2_);
		result = _tmp4_;
		return result;
	}
	_tmp5_ = rl_line_buffer;
	_tmp8_ = folks_inspect_client_parse_command_line (_tmp5_, &_tmp6_, &_tmp7_);
	_g_free0 (command_name);
	command_name = _tmp6_;
	_g_free0 (subcommand);
	subcommand = _tmp7_;
	command = _tmp8_;
	_tmp9_ = command;
	if (_tmp9_ != NULL) {
		const gchar* _tmp10_ = NULL;
		FolksInspectCommand* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
		gint _tmp14_ = 0;
		gchar** _tmp15_ = NULL;
		_tmp10_ = subcommand;
		if (_tmp10_ == NULL) {
			gchar* _tmp11_ = NULL;
			_tmp11_ = g_strdup ("");
			_g_free0 (subcommand);
			subcommand = _tmp11_;
		}
		_tmp12_ = command;
		_tmp13_ = subcommand;
		_tmp15_ = folks_inspect_command_complete_subcommand (_tmp12_, _tmp13_, &_tmp14_);
		result = _tmp15_;
		_folks_inspect_command_unref0 (command);
		_g_free0 (subcommand);
		_g_free0 (command_name);
		return result;
	}
	result = NULL;
	_folks_inspect_command_unref0 (command);
	_g_free0 (subcommand);
	_g_free0 (command_name);
	return result;
}


FolksIndividualAggregator* folks_inspect_client_get_aggregator (FolksInspectClient* self) {
	FolksIndividualAggregator* result;
	FolksIndividualAggregator* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_aggregator;
	result = _tmp0_;
	return result;
}


static void folks_inspect_client_set_aggregator (FolksInspectClient* self, FolksIndividualAggregator* value) {
	FolksIndividualAggregator* _tmp0_ = NULL;
	FolksIndividualAggregator* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_aggregator);
	self->priv->_aggregator = _tmp1_;
	g_object_notify ((GObject *) self, "aggregator");
}


FolksBackendStore* folks_inspect_client_get_backend_store (FolksInspectClient* self) {
	FolksBackendStore* result;
	FolksBackendStore* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_backend_store;
	result = _tmp0_;
	return result;
}


static void folks_inspect_client_set_backend_store (FolksInspectClient* self, FolksBackendStore* value) {
	FolksBackendStore* _tmp0_ = NULL;
	FolksBackendStore* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_backend_store);
	self->priv->_backend_store = _tmp1_;
	g_object_notify ((GObject *) self, "backend-store");
}


FolksInspectSignalManager* folks_inspect_client_get_signal_manager (FolksInspectClient* self) {
	FolksInspectSignalManager* result;
	FolksInspectSignalManager* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_signal_manager;
	result = _tmp0_;
	return result;
}


static void folks_inspect_client_set_signal_manager (FolksInspectClient* self, FolksInspectSignalManager* value) {
	FolksInspectSignalManager* _tmp0_ = NULL;
	FolksInspectSignalManager* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_signal_manager);
	self->priv->_signal_manager = _tmp1_;
	g_object_notify ((GObject *) self, "signal-manager");
}


static void folks_inspect_client_class_init (FolksInspectClientClass * klass) {
	folks_inspect_client_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FolksInspectClientPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_folks_inspect_client_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_folks_inspect_client_set_property;
	G_OBJECT_CLASS (klass)->finalize = folks_inspect_client_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INSPECT_CLIENT_AGGREGATOR, g_param_spec_object ("aggregator", "aggregator", "aggregator", FOLKS_TYPE_INDIVIDUAL_AGGREGATOR, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INSPECT_CLIENT_BACKEND_STORE, g_param_spec_object ("backend-store", "backend-store", "backend-store", FOLKS_TYPE_BACKEND_STORE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_INSPECT_CLIENT_SIGNAL_MANAGER, g_param_spec_object ("signal-manager", "signal-manager", "signal-manager", FOLKS_INSPECT_TYPE_SIGNAL_MANAGER, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void folks_inspect_client_instance_init (FolksInspectClient * self) {
	self->priv = FOLKS_INSPECT_CLIENT_GET_PRIVATE (self);
	self->priv->_original_termios_p_valid = FALSE;
	self->priv->_quit_after_pager_dies = FALSE;
	self->priv->_stdin_channel = NULL;
	self->priv->_pager_channel = NULL;
	self->priv->_pager_child_watch_id = (guint) 0;
}


static void folks_inspect_client_finalize (GObject* obj) {
	FolksInspectClient * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_INSPECT_TYPE_CLIENT, FolksInspectClient);
	_g_object_unref0 (self->commands);
	_g_main_loop_unref0 (self->priv->main_loop);
	_g_object_unref0 (self->priv->_aggregator);
	_g_object_unref0 (self->priv->_backend_store);
	_g_object_unref0 (self->priv->_signal_manager);
	_g_io_channel_unref0 (self->priv->_stdin_channel);
	_fclose0 (self->priv->_pager_channel);
	G_OBJECT_CLASS (folks_inspect_client_parent_class)->finalize (obj);
}


GType folks_inspect_client_get_type (void) {
	static volatile gsize folks_inspect_client_type_id__volatile = 0;
	if (g_once_init_enter (&folks_inspect_client_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FolksInspectClientClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_inspect_client_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksInspectClient), 0, (GInstanceInitFunc) folks_inspect_client_instance_init, NULL };
		GType folks_inspect_client_type_id;
		folks_inspect_client_type_id = g_type_register_static (G_TYPE_OBJECT, "FolksInspectClient", &g_define_type_info, 0);
		g_once_init_leave (&folks_inspect_client_type_id__volatile, folks_inspect_client_type_id);
	}
	return folks_inspect_client_type_id__volatile;
}


static void _vala_folks_inspect_client_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	FolksInspectClient * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLKS_INSPECT_TYPE_CLIENT, FolksInspectClient);
	switch (property_id) {
		case FOLKS_INSPECT_CLIENT_AGGREGATOR:
		g_value_set_object (value, folks_inspect_client_get_aggregator (self));
		break;
		case FOLKS_INSPECT_CLIENT_BACKEND_STORE:
		g_value_set_object (value, folks_inspect_client_get_backend_store (self));
		break;
		case FOLKS_INSPECT_CLIENT_SIGNAL_MANAGER:
		g_value_set_object (value, folks_inspect_client_get_signal_manager (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_folks_inspect_client_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	FolksInspectClient * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FOLKS_INSPECT_TYPE_CLIENT, FolksInspectClient);
	switch (property_id) {
		case FOLKS_INSPECT_CLIENT_AGGREGATOR:
		folks_inspect_client_set_aggregator (self, g_value_get_object (value));
		break;
		case FOLKS_INSPECT_CLIENT_BACKEND_STORE:
		folks_inspect_client_set_backend_store (self, g_value_get_object (value));
		break;
		case FOLKS_INSPECT_CLIENT_SIGNAL_MANAGER:
		folks_inspect_client_set_signal_manager (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


FolksInspectCommand* folks_inspect_command_construct (GType object_type, FolksInspectClient* client) {
	FolksInspectCommand* self = NULL;
	FolksInspectClient* _tmp0_ = NULL;
	FolksInspectClient* _tmp1_ = NULL;
	g_return_val_if_fail (client != NULL, NULL);
	self = (FolksInspectCommand*) g_type_create_instance (object_type);
	_tmp0_ = client;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->client);
	self->client = _tmp1_;
	return self;
}


void folks_inspect_command_run (FolksInspectCommand* self, const gchar* command_string, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FOLKS_INSPECT_COMMAND_GET_CLASS (self)->run (self, command_string, _callback_, _user_data_);
}


gint folks_inspect_command_run_finish (FolksInspectCommand* self, GAsyncResult* _res_) {
	return FOLKS_INSPECT_COMMAND_GET_CLASS (self)->run_finish (self, _res_);
}


static gchar** folks_inspect_command_real_complete_subcommand (FolksInspectCommand* self, const gchar* subcommand, int* result_length1) {
	gchar** result = NULL;
	gchar** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	g_return_val_if_fail (subcommand != NULL, NULL);
	_tmp0_ = NULL;
	_tmp0__length1 = 0;
	if (result_length1) {
		*result_length1 = _tmp0__length1;
	}
	result = _tmp0_;
	return result;
}


gchar** folks_inspect_command_complete_subcommand (FolksInspectCommand* self, const gchar* subcommand, int* result_length1) {
	g_return_val_if_fail (self != NULL, NULL);
	return FOLKS_INSPECT_COMMAND_GET_CLASS (self)->complete_subcommand (self, subcommand, result_length1);
}


const gchar* folks_inspect_command_get_name (FolksInspectCommand* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FOLKS_INSPECT_COMMAND_GET_CLASS (self)->get_name (self);
}


const gchar* folks_inspect_command_get_description (FolksInspectCommand* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FOLKS_INSPECT_COMMAND_GET_CLASS (self)->get_description (self);
}


const gchar* folks_inspect_command_get_help (FolksInspectCommand* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FOLKS_INSPECT_COMMAND_GET_CLASS (self)->get_help (self);
}


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


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


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


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


static gchar* folks_inspect_value_command_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		FolksInspectCommand* 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_command_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* folks_inspect_value_command_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	FolksInspectCommand** 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_command_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* folks_inspect_param_spec_command (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	FolksInspectParamSpecCommand* spec;
	g_return_val_if_fail (g_type_is_a (object_type, FOLKS_INSPECT_TYPE_COMMAND), 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_command (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_INSPECT_TYPE_COMMAND), NULL);
	return value->data[0].v_pointer;
}


void folks_inspect_value_set_command (GValue* value, gpointer v_object) {
	FolksInspectCommand* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_INSPECT_TYPE_COMMAND));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_INSPECT_TYPE_COMMAND));
		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_command_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		folks_inspect_command_unref (old);
	}
}


void folks_inspect_value_take_command (GValue* value, gpointer v_object) {
	FolksInspectCommand* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, FOLKS_INSPECT_TYPE_COMMAND));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, FOLKS_INSPECT_TYPE_COMMAND));
		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_command_unref (old);
	}
}


static void folks_inspect_command_class_init (FolksInspectCommandClass * klass) {
	folks_inspect_command_parent_class = g_type_class_peek_parent (klass);
	((FolksInspectCommandClass *) klass)->finalize = folks_inspect_command_finalize;
	((FolksInspectCommandClass *) klass)->complete_subcommand = folks_inspect_command_real_complete_subcommand;
}


static void folks_inspect_command_instance_init (FolksInspectCommand * self) {
	self->ref_count = 1;
}


static void folks_inspect_command_finalize (FolksInspectCommand* obj) {
	FolksInspectCommand * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FOLKS_INSPECT_TYPE_COMMAND, FolksInspectCommand);
	g_signal_handlers_destroy (self);
	_g_object_unref0 (self->client);
}


GType folks_inspect_command_get_type (void) {
	static volatile gsize folks_inspect_command_type_id__volatile = 0;
	if (g_once_init_enter (&folks_inspect_command_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { folks_inspect_value_command_init, folks_inspect_value_command_free_value, folks_inspect_value_command_copy_value, folks_inspect_value_command_peek_pointer, "p", folks_inspect_value_command_collect_value, "p", folks_inspect_value_command_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (FolksInspectCommandClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_inspect_command_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksInspectCommand), 0, (GInstanceInitFunc) folks_inspect_command_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_command_type_id;
		folks_inspect_command_type_id = g_type_register_fundamental (g_type_fundamental_next (), "FolksInspectCommand", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&folks_inspect_command_type_id__volatile, folks_inspect_command_type_id);
	}
	return folks_inspect_command_type_id__volatile;
}


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


void folks_inspect_command_unref (gpointer instance) {
	FolksInspectCommand* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		FOLKS_INSPECT_COMMAND_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


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


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


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



