/* command-signals.c generated by valac 0.21.1.1-0d6f, the Vala compiler
 * generated from command-signals.vala, do not modify */

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

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


#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;
typedef struct _FolksInspectCommandPrivate FolksInspectCommandPrivate;

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

#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;
typedef struct _FolksInspectCommandsSignalsPrivate FolksInspectCommandsSignalsPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _folks_inspect_command_unref0(var) ((var == NULL) ? NULL : (var = (folks_inspect_command_unref (var), NULL)))

#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)))
typedef struct _FolksInspectCommandsSignalsRunData FolksInspectCommandsSignalsRunData;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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_);
	void (*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 _FolksInspectCommandsSignals {
	FolksInspectCommand parent_instance;
	FolksInspectCommandsSignalsPrivate * priv;
};

struct _FolksInspectCommandsSignalsClass {
	FolksInspectCommandClass parent_class;
};

struct _FolksInspectCommandsSignalsRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksInspectCommandsSignals* self;
	gchar* command_string;
	const gchar* _tmp0_;
	FolksInspectClient* _tmp1_;
	FolksInspectSignalManager* _tmp2_;
	FolksInspectSignalManager* _tmp3_;
	gchar** parts;
	const gchar* _tmp4_;
	gchar** _tmp5_;
	gchar** _tmp6_;
	gint parts_length1;
	gint _parts_size_;
	gchar** _tmp7_;
	gint _tmp7__length1;
	const gchar* _tmp8_;
	GType class_type;
	GObject* class_instance;
	gchar* signal_name;
	gchar* detail_string;
	gboolean _tmp9_;
	gchar** _tmp10_;
	gint _tmp10__length1;
	const gchar* _tmp11_;
	gchar** _tmp12_;
	gint _tmp12__length1;
	const gchar* _tmp13_;
	gboolean _tmp14_;
	gboolean _tmp15_;
	gchar** _tmp16_;
	gint _tmp16__length1;
	const gchar* _tmp17_;
	gchar** _tmp18_;
	gint _tmp18__length1;
	const gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gboolean _tmp22_;
	gchar** _tmp23_;
	gint _tmp23__length1;
	const gchar* _tmp24_;
	gchar** _tmp25_;
	gint _tmp25__length1;
	const gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	GType _tmp29_;
	GObject* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gboolean _tmp33_;
	gboolean _tmp34_;
	gchar** _tmp35_;
	gint _tmp35__length1;
	const gchar* _tmp36_;
	guint signal_count;
	FolksInspectClient* _tmp37_;
	FolksInspectSignalManager* _tmp38_;
	FolksInspectSignalManager* _tmp39_;
	GType _tmp40_;
	GObject* _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	guint _tmp44_;
	guint _tmp45_;
	guint _vala1_signal_count;
	FolksInspectClient* _tmp46_;
	FolksInspectSignalManager* _tmp47_;
	FolksInspectSignalManager* _tmp48_;
	GType _tmp49_;
	GObject* _tmp50_;
	const gchar* _tmp51_;
	const gchar* _tmp52_;
	guint _tmp53_;
	guint _tmp54_;
	gchar** _tmp55_;
	gint _tmp55__length1;
	const gchar* _tmp56_;
	gchar* _tmp57_;
	gchar* _tmp58_;
	GType _tmp59_;
	GObject* _tmp60_;
	gchar* _tmp61_;
	gchar* _tmp62_;
	gboolean _tmp63_;
	gboolean _tmp64_;
	const gchar* _tmp65_;
	FolksInspectClient* _tmp66_;
	FolksInspectSignalManager* _tmp67_;
	FolksInspectSignalManager* _tmp68_;
	GType _tmp69_;
	GObject* _tmp70_;
	GType _tmp71_;
	GObject* _tmp72_;
	GType _tmp73_;
	FolksInspectClient* _tmp74_;
	FolksInspectSignalManager* _tmp75_;
	FolksInspectSignalManager* _tmp76_;
	GType _tmp77_;
	const gchar* _tmp78_;
	const gchar* _tmp79_;
};


static gpointer folks_inspect_commands_signals_parent_class = NULL;

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_client_get_type (void) G_GNUC_CONST;
GType folks_inspect_commands_signals_get_type (void) G_GNUC_CONST;
enum  {
	FOLKS_INSPECT_COMMANDS_SIGNALS_DUMMY_PROPERTY
};
FolksInspectCommandsSignals* folks_inspect_commands_signals_new (FolksInspectClient* client);
FolksInspectCommandsSignals* folks_inspect_commands_signals_construct (GType object_type, FolksInspectClient* client);
FolksInspectCommand* folks_inspect_command_construct (GType object_type, FolksInspectClient* client);
static void folks_inspect_commands_signals_real_run_data_free (gpointer _data);
static void folks_inspect_commands_signals_real_run (FolksInspectCommand* base, const gchar* command_string, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean folks_inspect_commands_signals_real_run_co (FolksInspectCommandsSignalsRunData* _data_);
GType folks_inspect_signal_manager_get_type (void) G_GNUC_CONST;
FolksInspectSignalManager* folks_inspect_client_get_signal_manager (FolksInspectClient* self);
void folks_inspect_signal_manager_list_signals (FolksInspectSignalManager* self, GType class_type, GObject* class_instance);
void folks_inspect_utils_print_line (const gchar* format, ...);
static gboolean folks_inspect_commands_signals_parse_signal_id (FolksInspectCommandsSignals* self, const gchar* input, GType* class_type, GObject** class_instance, gchar** signal_name, gchar** detail_string);
guint folks_inspect_signal_manager_connect_to_signal (FolksInspectSignalManager* self, GType class_type, GObject* class_instance, const gchar* signal_name, const gchar* detail_string);
guint folks_inspect_signal_manager_disconnect_from_signal (FolksInspectSignalManager* self, GType class_type, GObject* class_instance, const gchar* signal_name, const gchar* detail_string);
void folks_inspect_signal_manager_show_signal_details (FolksInspectSignalManager* self, GType class_type, const gchar* signal_name, const gchar* detail_string);
static gchar** folks_inspect_commands_signals_real_complete_subcommand (FolksInspectCommand* base, const gchar* subcommand, int* result_length1);
gchar* folks_inspect_utils_backend_name_completion_cb (const gchar* word, gint state);
static gchar* _folks_inspect_utils_backend_name_completion_cb_rl_compentry_func_t (const gchar* str, gint a);
static gchar** _vala_array_dup12 (gchar** self, int length);
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);


FolksInspectCommandsSignals* folks_inspect_commands_signals_construct (GType object_type, FolksInspectClient* client) {
	FolksInspectCommandsSignals* self = NULL;
	FolksInspectClient* _tmp0_ = NULL;
	g_return_val_if_fail (client != NULL, NULL);
	_tmp0_ = client;
	self = (FolksInspectCommandsSignals*) folks_inspect_command_construct (object_type, _tmp0_);
	return self;
}


FolksInspectCommandsSignals* folks_inspect_commands_signals_new (FolksInspectClient* client) {
	return folks_inspect_commands_signals_construct (FOLKS_INSPECT_COMMANDS_TYPE_SIGNALS, client);
}


static void folks_inspect_commands_signals_real_run_data_free (gpointer _data) {
	FolksInspectCommandsSignalsRunData* _data_;
	_data_ = _data;
	_g_free0 (_data_->command_string);
	_folks_inspect_command_unref0 (_data_->self);
	g_slice_free (FolksInspectCommandsSignalsRunData, _data_);
}


static gpointer _folks_inspect_command_ref0 (gpointer self) {
	return self ? folks_inspect_command_ref (self) : NULL;
}


static void folks_inspect_commands_signals_real_run (FolksInspectCommand* base, const gchar* command_string, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksInspectCommandsSignals * self;
	FolksInspectCommandsSignalsRunData* _data_;
	FolksInspectCommandsSignals* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	self = (FolksInspectCommandsSignals*) base;
	_data_ = g_slice_new0 (FolksInspectCommandsSignalsRunData);
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, folks_inspect_commands_signals_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_inspect_commands_signals_real_run_data_free);
	_tmp0_ = _folks_inspect_command_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = command_string;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->command_string);
	_data_->command_string = _tmp2_;
	folks_inspect_commands_signals_real_run_co (_data_);
}


static void folks_inspect_commands_signals_real_run_finish (FolksInspectCommand* base, GAsyncResult* _res_) {
	FolksInspectCommandsSignalsRunData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


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 gboolean folks_inspect_commands_signals_real_run_co (FolksInspectCommandsSignalsRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->command_string;
	if (_data_->_tmp0_ == NULL) {
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = ((FolksInspectCommand*) _data_->self)->client;
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = folks_inspect_client_get_signal_manager (_data_->_tmp1_);
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = _data_->_tmp2_;
		folks_inspect_signal_manager_list_signals (_data_->_tmp3_, G_TYPE_INVALID, NULL);
	} else {
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _data_->command_string;
		_data_->_tmp5_ = NULL;
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = _data_->_tmp5_ = g_strsplit (_data_->_tmp4_, " ", 2);
		_data_->parts_length1 = 0;
		_data_->_parts_size_ = 0;
		_data_->parts = _data_->_tmp6_;
		_data_->parts_length1 = _vala_array_length (_data_->_tmp5_);
		_data_->_parts_size_ = _data_->parts_length1;
		_data_->_tmp7_ = NULL;
		_data_->_tmp7__length1 = 0;
		_data_->_tmp7_ = _data_->parts;
		_data_->_tmp7__length1 = _data_->parts_length1;
		if (_data_->_tmp7__length1 < 1) {
			_data_->_tmp8_ = NULL;
			_data_->_tmp8_ = _data_->command_string;
			folks_inspect_utils_print_line ("Unrecognised 'signals' command '%s'.", _data_->_tmp8_);
			_data_->parts = (_vala_array_free (_data_->parts, _data_->parts_length1, (GDestroyNotify) g_free), 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;
		}
		_data_->_tmp10_ = NULL;
		_data_->_tmp10__length1 = 0;
		_data_->_tmp10_ = _data_->parts;
		_data_->_tmp10__length1 = _data_->parts_length1;
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = _data_->_tmp10_[0];
		if (g_strcmp0 (_data_->_tmp11_, "connect") == 0) {
			_data_->_tmp9_ = TRUE;
		} else {
			_data_->_tmp12_ = NULL;
			_data_->_tmp12__length1 = 0;
			_data_->_tmp12_ = _data_->parts;
			_data_->_tmp12__length1 = _data_->parts_length1;
			_data_->_tmp13_ = NULL;
			_data_->_tmp13_ = _data_->_tmp12_[0];
			_data_->_tmp9_ = g_strcmp0 (_data_->_tmp13_, "disconnect") == 0;
		}
		_data_->_tmp14_ = FALSE;
		_data_->_tmp14_ = _data_->_tmp9_;
		if (_data_->_tmp14_) {
			_data_->_tmp16_ = NULL;
			_data_->_tmp16__length1 = 0;
			_data_->_tmp16_ = _data_->parts;
			_data_->_tmp16__length1 = _data_->parts_length1;
			_data_->_tmp17_ = NULL;
			_data_->_tmp17_ = _data_->_tmp16_[1];
			if (_data_->_tmp17_ == NULL) {
				_data_->_tmp15_ = TRUE;
			} else {
				_data_->_tmp18_ = NULL;
				_data_->_tmp18__length1 = 0;
				_data_->_tmp18_ = _data_->parts;
				_data_->_tmp18__length1 = _data_->parts_length1;
				_data_->_tmp19_ = NULL;
				_data_->_tmp19_ = _data_->_tmp18_[1];
				_data_->_tmp20_ = NULL;
				_data_->_tmp20_ = string_strip (_data_->_tmp19_);
				_data_->_tmp21_ = NULL;
				_data_->_tmp21_ = _data_->_tmp20_;
				_data_->_tmp15_ = g_strcmp0 (_data_->_tmp21_, "") == 0;
				_g_free0 (_data_->_tmp21_);
			}
			_data_->_tmp22_ = FALSE;
			_data_->_tmp22_ = _data_->_tmp15_;
			if (_data_->_tmp22_) {
				_data_->_tmp23_ = NULL;
				_data_->_tmp23__length1 = 0;
				_data_->_tmp23_ = _data_->parts;
				_data_->_tmp23__length1 = _data_->parts_length1;
				_data_->_tmp24_ = NULL;
				_data_->_tmp24_ = _data_->_tmp23_[1];
				folks_inspect_utils_print_line ("Unrecognised signal identifier '%s'.", _data_->_tmp24_);
				_g_free0 (_data_->detail_string);
				_g_free0 (_data_->signal_name);
				_g_object_unref0 (_data_->class_instance);
				_data_->parts = (_vala_array_free (_data_->parts, _data_->parts_length1, (GDestroyNotify) g_free), 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;
			}
			_data_->_tmp25_ = NULL;
			_data_->_tmp25__length1 = 0;
			_data_->_tmp25_ = _data_->parts;
			_data_->_tmp25__length1 = _data_->parts_length1;
			_data_->_tmp26_ = NULL;
			_data_->_tmp26_ = _data_->_tmp25_[1];
			_data_->_tmp27_ = NULL;
			_data_->_tmp27_ = string_strip (_data_->_tmp26_);
			_data_->_tmp28_ = NULL;
			_data_->_tmp28_ = _data_->_tmp27_;
			_data_->_tmp29_ = 0UL;
			_data_->_tmp30_ = NULL;
			_data_->_tmp31_ = NULL;
			_data_->_tmp32_ = NULL;
			_data_->_tmp33_ = FALSE;
			_data_->_tmp33_ = folks_inspect_commands_signals_parse_signal_id (_data_->self, _data_->_tmp28_, &_data_->_tmp29_, &_data_->_tmp30_, &_data_->_tmp31_, &_data_->_tmp32_);
			_data_->class_type = _data_->_tmp29_;
			_g_object_unref0 (_data_->class_instance);
			_data_->class_instance = _data_->_tmp30_;
			_g_free0 (_data_->signal_name);
			_data_->signal_name = _data_->_tmp31_;
			_g_free0 (_data_->detail_string);
			_data_->detail_string = _data_->_tmp32_;
			_data_->_tmp34_ = FALSE;
			_data_->_tmp34_ = _data_->_tmp33_ == FALSE;
			_g_free0 (_data_->_tmp28_);
			if (_data_->_tmp34_) {
				_g_free0 (_data_->detail_string);
				_g_free0 (_data_->signal_name);
				_g_object_unref0 (_data_->class_instance);
				_data_->parts = (_vala_array_free (_data_->parts, _data_->parts_length1, (GDestroyNotify) g_free), 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;
			}
			_data_->_tmp35_ = NULL;
			_data_->_tmp35__length1 = 0;
			_data_->_tmp35_ = _data_->parts;
			_data_->_tmp35__length1 = _data_->parts_length1;
			_data_->_tmp36_ = NULL;
			_data_->_tmp36_ = _data_->_tmp35_[0];
			if (g_strcmp0 (_data_->_tmp36_, "connect") == 0) {
				_data_->_tmp37_ = NULL;
				_data_->_tmp37_ = ((FolksInspectCommand*) _data_->self)->client;
				_data_->_tmp38_ = NULL;
				_data_->_tmp38_ = folks_inspect_client_get_signal_manager (_data_->_tmp37_);
				_data_->_tmp39_ = NULL;
				_data_->_tmp39_ = _data_->_tmp38_;
				_data_->_tmp40_ = 0UL;
				_data_->_tmp40_ = _data_->class_type;
				_data_->_tmp41_ = NULL;
				_data_->_tmp41_ = _data_->class_instance;
				_data_->_tmp42_ = NULL;
				_data_->_tmp42_ = _data_->signal_name;
				_data_->_tmp43_ = NULL;
				_data_->_tmp43_ = _data_->detail_string;
				_data_->_tmp44_ = 0U;
				_data_->_tmp44_ = folks_inspect_signal_manager_connect_to_signal (_data_->_tmp39_, _data_->_tmp40_, _data_->_tmp41_, _data_->_tmp42_, _data_->_tmp43_);
				_data_->signal_count = _data_->_tmp44_;
				_data_->_tmp45_ = 0U;
				_data_->_tmp45_ = _data_->signal_count;
				folks_inspect_utils_print_line ("Connected to %u signals.", _data_->_tmp45_);
			} else {
				_data_->_tmp46_ = NULL;
				_data_->_tmp46_ = ((FolksInspectCommand*) _data_->self)->client;
				_data_->_tmp47_ = NULL;
				_data_->_tmp47_ = folks_inspect_client_get_signal_manager (_data_->_tmp46_);
				_data_->_tmp48_ = NULL;
				_data_->_tmp48_ = _data_->_tmp47_;
				_data_->_tmp49_ = 0UL;
				_data_->_tmp49_ = _data_->class_type;
				_data_->_tmp50_ = NULL;
				_data_->_tmp50_ = _data_->class_instance;
				_data_->_tmp51_ = NULL;
				_data_->_tmp51_ = _data_->signal_name;
				_data_->_tmp52_ = NULL;
				_data_->_tmp52_ = _data_->detail_string;
				_data_->_tmp53_ = 0U;
				_data_->_tmp53_ = folks_inspect_signal_manager_disconnect_from_signal (_data_->_tmp48_, _data_->_tmp49_, _data_->_tmp50_, _data_->_tmp51_, _data_->_tmp52_);
				_data_->_vala1_signal_count = _data_->_tmp53_;
				_data_->_tmp54_ = 0U;
				_data_->_tmp54_ = _data_->_vala1_signal_count;
				folks_inspect_utils_print_line ("Disconnected from %u signals.", _data_->_tmp54_);
			}
		} else {
			_data_->_tmp55_ = NULL;
			_data_->_tmp55__length1 = 0;
			_data_->_tmp55_ = _data_->parts;
			_data_->_tmp55__length1 = _data_->parts_length1;
			_data_->_tmp56_ = NULL;
			_data_->_tmp56_ = _data_->_tmp55_[0];
			_data_->_tmp57_ = NULL;
			_data_->_tmp57_ = string_strip (_data_->_tmp56_);
			_data_->_tmp58_ = NULL;
			_data_->_tmp58_ = _data_->_tmp57_;
			_data_->_tmp59_ = 0UL;
			_data_->_tmp60_ = NULL;
			_data_->_tmp61_ = NULL;
			_data_->_tmp62_ = NULL;
			_data_->_tmp63_ = FALSE;
			_data_->_tmp63_ = folks_inspect_commands_signals_parse_signal_id (_data_->self, _data_->_tmp58_, &_data_->_tmp59_, &_data_->_tmp60_, &_data_->_tmp61_, &_data_->_tmp62_);
			_data_->class_type = _data_->_tmp59_;
			_g_object_unref0 (_data_->class_instance);
			_data_->class_instance = _data_->_tmp60_;
			_g_free0 (_data_->signal_name);
			_data_->signal_name = _data_->_tmp61_;
			_g_free0 (_data_->detail_string);
			_data_->detail_string = _data_->_tmp62_;
			_data_->_tmp64_ = FALSE;
			_data_->_tmp64_ = _data_->_tmp63_ == FALSE;
			_g_free0 (_data_->_tmp58_);
			if (_data_->_tmp64_) {
				_g_free0 (_data_->detail_string);
				_g_free0 (_data_->signal_name);
				_g_object_unref0 (_data_->class_instance);
				_data_->parts = (_vala_array_free (_data_->parts, _data_->parts_length1, (GDestroyNotify) g_free), 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;
			}
			_data_->_tmp65_ = NULL;
			_data_->_tmp65_ = _data_->signal_name;
			if (_data_->_tmp65_ == NULL) {
				_data_->_tmp66_ = NULL;
				_data_->_tmp66_ = ((FolksInspectCommand*) _data_->self)->client;
				_data_->_tmp67_ = NULL;
				_data_->_tmp67_ = folks_inspect_client_get_signal_manager (_data_->_tmp66_);
				_data_->_tmp68_ = NULL;
				_data_->_tmp68_ = _data_->_tmp67_;
				_data_->_tmp69_ = 0UL;
				_data_->_tmp69_ = _data_->class_type;
				_data_->_tmp70_ = NULL;
				_data_->_tmp70_ = _data_->class_instance;
				folks_inspect_signal_manager_list_signals (_data_->_tmp68_, _data_->_tmp69_, _data_->_tmp70_);
			} else {
				_data_->_tmp71_ = 0UL;
				_data_->_tmp71_ = _data_->class_type;
				if (_data_->_tmp71_ == G_TYPE_INVALID) {
					_data_->_tmp72_ = NULL;
					_data_->_tmp72_ = _data_->class_instance;
					_data_->_tmp73_ = 0UL;
					_data_->_tmp73_ = G_TYPE_FROM_INSTANCE (_data_->_tmp72_);
					_data_->class_type = _data_->_tmp73_;
				}
				_data_->_tmp74_ = NULL;
				_data_->_tmp74_ = ((FolksInspectCommand*) _data_->self)->client;
				_data_->_tmp75_ = NULL;
				_data_->_tmp75_ = folks_inspect_client_get_signal_manager (_data_->_tmp74_);
				_data_->_tmp76_ = NULL;
				_data_->_tmp76_ = _data_->_tmp75_;
				_data_->_tmp77_ = 0UL;
				_data_->_tmp77_ = _data_->class_type;
				_data_->_tmp78_ = NULL;
				_data_->_tmp78_ = _data_->signal_name;
				_data_->_tmp79_ = NULL;
				_data_->_tmp79_ = _data_->detail_string;
				folks_inspect_signal_manager_show_signal_details (_data_->_tmp76_, _data_->_tmp77_, _data_->_tmp78_, _data_->_tmp79_);
			}
		}
		_g_free0 (_data_->detail_string);
		_g_free0 (_data_->signal_name);
		_g_object_unref0 (_data_->class_instance);
		_data_->parts = (_vala_array_free (_data_->parts, _data_->parts_length1, (GDestroyNotify) g_free), 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 gchar* _folks_inspect_utils_backend_name_completion_cb_rl_compentry_func_t (const gchar* str, gint a) {
	gchar* result;
	result = folks_inspect_utils_backend_name_completion_cb (str, a);
	return result;
}


static gchar** _vala_array_dup12 (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_commands_signals_real_complete_subcommand (FolksInspectCommand* base, const gchar* subcommand, int* result_length1) {
	FolksInspectCommandsSignals * self;
	gchar** result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar** _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
	gchar** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	self = (FolksInspectCommandsSignals*) base;
	g_return_val_if_fail (subcommand != NULL, NULL);
	_tmp0_ = subcommand;
	_tmp2_ = _tmp1_ = rl_completion_matches (_tmp0_, _folks_inspect_utils_backend_name_completion_cb_rl_compentry_func_t);
	_tmp3_ = (_tmp2_ != NULL) ? _vala_array_dup12 (_tmp2_, _vala_array_length (_tmp1_)) : ((gpointer) _tmp2_);
	_tmp3__length1 = _vala_array_length (_tmp1_);
	_tmp4_ = _tmp3_;
	_tmp4__length1 = _tmp3__length1;
	if (result_length1) {
		*result_length1 = _tmp4__length1;
	}
	result = _tmp4_;
	return result;
}


static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	glong _tmp0_ = 0L;
	gchar _tmp1_ = '\0';
	g_return_val_if_fail (self != NULL, '\0');
	_tmp0_ = index;
	_tmp1_ = ((gchar*) self)[_tmp0_];
	result = _tmp1_;
	return result;
}


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


static gboolean folks_inspect_commands_signals_parse_signal_id (FolksInspectCommandsSignals* self, const gchar* input, GType* class_type, GObject** class_instance, gchar** signal_name, gchar** detail_string) {
	GType _vala_class_type = 0UL;
	GObject* _vala_class_instance = NULL;
	gchar* _vala_signal_name = NULL;
	gchar* _vala_detail_string = NULL;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp3_ = FALSE;
	gchar** parts = NULL;
	const gchar* _tmp4_ = NULL;
	gchar** _tmp5_ = NULL;
	gchar** _tmp6_ = NULL;
	gint parts_length1 = 0;
	gint _parts_size_ = 0;
	gchar* class_name_or_instance = NULL;
	gchar** _tmp7_ = NULL;
	gint _tmp7__length1 = 0;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	gchar** _tmp11_ = NULL;
	gint _tmp11__length1 = 0;
	gchar* signal_name_inner = NULL;
	const gchar* _tmp14_ = NULL;
	gchar* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	gchar** _tmp17_ = NULL;
	gint _tmp17__length1 = 0;
	gchar* detail_string_inner = NULL;
	const gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	gboolean _tmp22_ = FALSE;
	const gchar* _tmp23_ = NULL;
	gboolean _tmp25_ = FALSE;
	gboolean _tmp27_ = FALSE;
	gboolean _tmp28_ = FALSE;
	const gchar* _tmp29_ = NULL;
	gint _tmp30_ = 0;
	gint _tmp31_ = 0;
	gboolean _tmp34_ = FALSE;
	gboolean _tmp37_ = FALSE;
	const gchar* _tmp57_ = NULL;
	gchar* _tmp58_ = NULL;
	const gchar* _tmp59_ = NULL;
	gchar* _tmp60_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (input != NULL, FALSE);
	_tmp1_ = input;
	if (_tmp1_ != NULL) {
		const gchar* _tmp2_ = NULL;
		_tmp2_ = input;
		_tmp0_ = g_strcmp0 (_tmp2_, "") != 0;
	} else {
		_tmp0_ = FALSE;
	}
	_tmp3_ = _tmp0_;
	_vala_assert (_tmp3_, "input != null && input != \"\"");
	_vala_class_type = G_TYPE_INVALID;
	_g_object_unref0 (_vala_class_instance);
	_vala_class_instance = NULL;
	_g_free0 (_vala_signal_name);
	_vala_signal_name = NULL;
	_g_free0 (_vala_detail_string);
	_vala_detail_string = NULL;
	_tmp4_ = input;
	_tmp6_ = _tmp5_ = g_strsplit (_tmp4_, "::", 3);
	parts = _tmp6_;
	parts_length1 = _vala_array_length (_tmp5_);
	_parts_size_ = parts_length1;
	_tmp7_ = parts;
	_tmp7__length1 = parts_length1;
	_tmp8_ = _tmp7_[0];
	_tmp9_ = g_strdup (_tmp8_);
	class_name_or_instance = _tmp9_;
	_tmp11_ = parts;
	_tmp11__length1 = parts_length1;
	if (_tmp11__length1 > 1) {
		gchar** _tmp12_ = NULL;
		gint _tmp12__length1 = 0;
		const gchar* _tmp13_ = NULL;
		_tmp12_ = parts;
		_tmp12__length1 = parts_length1;
		_tmp13_ = _tmp12_[1];
		_tmp10_ = _tmp13_;
	} else {
		_tmp10_ = NULL;
	}
	_tmp14_ = _tmp10_;
	_tmp15_ = g_strdup (_tmp14_);
	signal_name_inner = _tmp15_;
	_tmp17_ = parts;
	_tmp17__length1 = parts_length1;
	if (_tmp17__length1 > 2) {
		gchar** _tmp18_ = NULL;
		gint _tmp18__length1 = 0;
		const gchar* _tmp19_ = NULL;
		_tmp18_ = parts;
		_tmp18__length1 = parts_length1;
		_tmp19_ = _tmp18_[2];
		_tmp16_ = _tmp19_;
	} else {
		_tmp16_ = NULL;
	}
	_tmp20_ = _tmp16_;
	_tmp21_ = g_strdup (_tmp20_);
	detail_string_inner = _tmp21_;
	_tmp23_ = signal_name_inner;
	if (g_strcmp0 (_tmp23_, "") == 0) {
		_tmp22_ = TRUE;
	} else {
		const gchar* _tmp24_ = NULL;
		_tmp24_ = detail_string_inner;
		_tmp22_ = g_strcmp0 (_tmp24_, "") == 0;
	}
	_tmp25_ = _tmp22_;
	if (_tmp25_) {
		const gchar* _tmp26_ = NULL;
		_tmp26_ = input;
		folks_inspect_utils_print_line ("Invalid signal identifier '%s'.", _tmp26_);
		result = FALSE;
		_g_free0 (detail_string_inner);
		_g_free0 (signal_name_inner);
		_g_free0 (class_name_or_instance);
		parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
		if (class_type) {
			*class_type = _vala_class_type;
		}
		if (class_instance) {
			*class_instance = _vala_class_instance;
		} else {
			_g_object_unref0 (_vala_class_instance);
		}
		if (signal_name) {
			*signal_name = _vala_signal_name;
		} else {
			_g_free0 (_vala_signal_name);
		}
		if (detail_string) {
			*detail_string = _vala_detail_string;
		} else {
			_g_free0 (_vala_detail_string);
		}
		return result;
	}
	_tmp29_ = class_name_or_instance;
	_tmp30_ = strlen (_tmp29_);
	_tmp31_ = _tmp30_;
	if (_tmp31_ > 2) {
		const gchar* _tmp32_ = NULL;
		gchar _tmp33_ = '\0';
		_tmp32_ = class_name_or_instance;
		_tmp33_ = string_get (_tmp32_, (glong) 0);
		_tmp28_ = _tmp33_ == '0';
	} else {
		_tmp28_ = FALSE;
	}
	_tmp34_ = _tmp28_;
	if (_tmp34_) {
		const gchar* _tmp35_ = NULL;
		gchar _tmp36_ = '\0';
		_tmp35_ = class_name_or_instance;
		_tmp36_ = string_get (_tmp35_, (glong) 1);
		_tmp27_ = _tmp36_ == 'x';
	} else {
		_tmp27_ = FALSE;
	}
	_tmp37_ = _tmp27_;
	if (_tmp37_) {
		gulong address = 0UL;
		const gchar* _tmp38_ = NULL;
		gulong _tmp39_ = 0UL;
		gulong _tmp40_ = 0UL;
		GObject* _tmp41_ = NULL;
		GObject* _tmp42_ = NULL;
		GType _tmp43_ = 0UL;
		gboolean _tmp44_ = FALSE;
		_tmp38_ = class_name_or_instance;
		_tmp39_ = strtoul (_tmp38_, NULL, 16);
		address = _tmp39_;
		_tmp40_ = address;
		_tmp41_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, G_TYPE_OBJECT, GObject));
		_g_object_unref0 (_vala_class_instance);
		_vala_class_instance = _tmp41_;
		_tmp42_ = _vala_class_instance;
		_tmp43_ = G_TYPE_FROM_INSTANCE (_tmp42_);
		_tmp44_ = G_TYPE_IS_OBJECT (_tmp43_);
		_vala_assert (_tmp44_, "class_instance.get_type ().is_object ()");
	} else {
		const gchar* _tmp45_ = NULL;
		GType _tmp46_ = 0UL;
		gboolean _tmp47_ = FALSE;
		GType _tmp48_ = 0UL;
		gboolean _tmp55_ = FALSE;
		_tmp45_ = class_name_or_instance;
		_tmp46_ = g_type_from_name (_tmp45_);
		_vala_class_type = _tmp46_;
		_tmp48_ = _vala_class_type;
		if (_tmp48_ == G_TYPE_INVALID) {
			_tmp47_ = TRUE;
		} else {
			gboolean _tmp49_ = FALSE;
			GType _tmp50_ = 0UL;
			gboolean _tmp51_ = FALSE;
			gboolean _tmp54_ = FALSE;
			_tmp50_ = _vala_class_type;
			_tmp51_ = G_TYPE_IS_INSTANTIATABLE (_tmp50_);
			if (_tmp51_ == FALSE) {
				GType _tmp52_ = 0UL;
				gboolean _tmp53_ = FALSE;
				_tmp52_ = _vala_class_type;
				_tmp53_ = G_TYPE_IS_INTERFACE (_tmp52_);
				_tmp49_ = _tmp53_ == FALSE;
			} else {
				_tmp49_ = FALSE;
			}
			_tmp54_ = _tmp49_;
			_tmp47_ = _tmp54_;
		}
		_tmp55_ = _tmp47_;
		if (_tmp55_) {
			const gchar* _tmp56_ = NULL;
			_tmp56_ = class_name_or_instance;
			folks_inspect_utils_print_line ("Unrecognised class name '%s'.", _tmp56_);
			result = FALSE;
			_g_free0 (detail_string_inner);
			_g_free0 (signal_name_inner);
			_g_free0 (class_name_or_instance);
			parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
			if (class_type) {
				*class_type = _vala_class_type;
			}
			if (class_instance) {
				*class_instance = _vala_class_instance;
			} else {
				_g_object_unref0 (_vala_class_instance);
			}
			if (signal_name) {
				*signal_name = _vala_signal_name;
			} else {
				_g_free0 (_vala_signal_name);
			}
			if (detail_string) {
				*detail_string = _vala_detail_string;
			} else {
				_g_free0 (_vala_detail_string);
			}
			return result;
		}
	}
	_tmp57_ = signal_name_inner;
	_tmp58_ = g_strdup (_tmp57_);
	_g_free0 (_vala_signal_name);
	_vala_signal_name = _tmp58_;
	_tmp59_ = detail_string_inner;
	_tmp60_ = g_strdup (_tmp59_);
	_g_free0 (_vala_detail_string);
	_vala_detail_string = _tmp60_;
	result = TRUE;
	_g_free0 (detail_string_inner);
	_g_free0 (signal_name_inner);
	_g_free0 (class_name_or_instance);
	parts = (_vala_array_free (parts, parts_length1, (GDestroyNotify) g_free), NULL);
	if (class_type) {
		*class_type = _vala_class_type;
	}
	if (class_instance) {
		*class_instance = _vala_class_instance;
	} else {
		_g_object_unref0 (_vala_class_instance);
	}
	if (signal_name) {
		*signal_name = _vala_signal_name;
	} else {
		_g_free0 (_vala_signal_name);
	}
	if (detail_string) {
		*detail_string = _vala_detail_string;
	} else {
		_g_free0 (_vala_detail_string);
	}
	return result;
}


static const gchar* folks_inspect_commands_signals_real_get_name (FolksInspectCommand* base) {
	const gchar* result;
	FolksInspectCommandsSignals* self;
	self = (FolksInspectCommandsSignals*) base;
	result = "signals";
	return result;
}


static const gchar* folks_inspect_commands_signals_real_get_description (FolksInspectCommand* base) {
	const gchar* result;
	FolksInspectCommandsSignals* self;
	self = (FolksInspectCommandsSignals*) base;
	result = "Allow connection to and display of signals emitted by " "libfolks.";
	return result;
}


static const gchar* folks_inspect_commands_signals_real_get_help (FolksInspectCommand* base) {
	const gchar* result;
	FolksInspectCommandsSignals* self;
	self = (FolksInspectCommandsSignals*) base;
	result = "signals                                            " "List signals we're currently connected to.\n" "signals connect [class name]                       " "Connect to all the signals on all the instances of that " "class.\n" "signals connect [class name]::[signal name]        " "Connect to the given signal on all the instances of that " "class.\n" "signals connect [object pointer]                   " "Connect to all the signals on a particular class instance.\n" "signals connect [object pointer]::[signal name]    " "Connect to the given signal on a particular class instance.\n" "signals disconnect                                 " "(As for 'connect'.)\n" "signals [class name]                               " "List all the signals on all the instances of that class, " "highlighting the ones we're currently connected to.\n" "signals [object pointer]                           " "List all the signals on a particular class instance, " "highlighting the ones we're currently connected to.\n" "signals [class name]::[signal name]                " "Show the details of this signal.\n" "signals [object pointer]::[signal name]            " "Show the details of this signal.";
	return result;
}


static void folks_inspect_commands_signals_class_init (FolksInspectCommandsSignalsClass * klass) {
	folks_inspect_commands_signals_parent_class = g_type_class_peek_parent (klass);
	FOLKS_INSPECT_COMMAND_CLASS (klass)->run = folks_inspect_commands_signals_real_run;
	FOLKS_INSPECT_COMMAND_CLASS (klass)->run_finish = folks_inspect_commands_signals_real_run_finish;
	FOLKS_INSPECT_COMMAND_CLASS (klass)->complete_subcommand = folks_inspect_commands_signals_real_complete_subcommand;
	FOLKS_INSPECT_COMMAND_CLASS (klass)->get_name = folks_inspect_commands_signals_real_get_name;
	FOLKS_INSPECT_COMMAND_CLASS (klass)->get_description = folks_inspect_commands_signals_real_get_description;
	FOLKS_INSPECT_COMMAND_CLASS (klass)->get_help = folks_inspect_commands_signals_real_get_help;
}


static void folks_inspect_commands_signals_instance_init (FolksInspectCommandsSignals * self) {
}


GType folks_inspect_commands_signals_get_type (void) {
	static volatile gsize folks_inspect_commands_signals_type_id__volatile = 0;
	if (g_once_init_enter (&folks_inspect_commands_signals_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FolksInspectCommandsSignalsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_inspect_commands_signals_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksInspectCommandsSignals), 0, (GInstanceInitFunc) folks_inspect_commands_signals_instance_init, NULL };
		GType folks_inspect_commands_signals_type_id;
		folks_inspect_commands_signals_type_id = g_type_register_static (FOLKS_INSPECT_TYPE_COMMAND, "FolksInspectCommandsSignals", &g_define_type_info, 0);
		g_once_init_leave (&folks_inspect_commands_signals_type_id__volatile, folks_inspect_commands_signals_type_id);
	}
	return folks_inspect_commands_signals_type_id__volatile;
}


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



