/* dbus.c generated by valac, the Vala compiler
 * generated from dbus.vala, do not modify */

/* doclet.vala
 *
 * Copyright (C) 2010 Luca Bruno
 *
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Luca Bruno <lethalman88@gmail.com>
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <valagee.h>
#include <valadoc.h>
#include <glib/gstdio.h>
#include <gobject/gvaluecollector.h>


#define GTKDOC_DBUS_TYPE_PARAMETER (gtkdoc_dbus_parameter_get_type ())
#define GTKDOC_DBUS_PARAMETER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTKDOC_DBUS_TYPE_PARAMETER, GtkdocDBusParameter))
#define GTKDOC_DBUS_PARAMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTKDOC_DBUS_TYPE_PARAMETER, GtkdocDBusParameterClass))
#define GTKDOC_DBUS_IS_PARAMETER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTKDOC_DBUS_TYPE_PARAMETER))
#define GTKDOC_DBUS_IS_PARAMETER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTKDOC_DBUS_TYPE_PARAMETER))
#define GTKDOC_DBUS_PARAMETER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTKDOC_DBUS_TYPE_PARAMETER, GtkdocDBusParameterClass))

typedef struct _GtkdocDBusParameter GtkdocDBusParameter;
typedef struct _GtkdocDBusParameterClass GtkdocDBusParameterClass;
typedef struct _GtkdocDBusParameterPrivate GtkdocDBusParameterPrivate;

#define GTKDOC_DBUS_PARAMETER_TYPE_DIRECTION (gtkdoc_dbus_parameter_direction_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GtkdocDBusParamSpecParameter GtkdocDBusParamSpecParameter;

#define GTKDOC_DBUS_TYPE_MEMBER (gtkdoc_dbus_member_get_type ())
#define GTKDOC_DBUS_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTKDOC_DBUS_TYPE_MEMBER, GtkdocDBusMember))
#define GTKDOC_DBUS_MEMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTKDOC_DBUS_TYPE_MEMBER, GtkdocDBusMemberClass))
#define GTKDOC_DBUS_IS_MEMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTKDOC_DBUS_TYPE_MEMBER))
#define GTKDOC_DBUS_IS_MEMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTKDOC_DBUS_TYPE_MEMBER))
#define GTKDOC_DBUS_MEMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTKDOC_DBUS_TYPE_MEMBER, GtkdocDBusMemberClass))

typedef struct _GtkdocDBusMember GtkdocDBusMember;
typedef struct _GtkdocDBusMemberClass GtkdocDBusMemberClass;
typedef struct _GtkdocDBusMemberPrivate GtkdocDBusMemberPrivate;

#define GTKDOC_TYPE_GCOMMENT (gtkdoc_gcomment_get_type ())
#define GTKDOC_GCOMMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTKDOC_TYPE_GCOMMENT, GtkdocGComment))
#define GTKDOC_GCOMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTKDOC_TYPE_GCOMMENT, GtkdocGCommentClass))
#define GTKDOC_IS_GCOMMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTKDOC_TYPE_GCOMMENT))
#define GTKDOC_IS_GCOMMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTKDOC_TYPE_GCOMMENT))
#define GTKDOC_GCOMMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTKDOC_TYPE_GCOMMENT, GtkdocGCommentClass))

typedef struct _GtkdocGComment GtkdocGComment;
typedef struct _GtkdocGCommentClass GtkdocGCommentClass;

#define GTKDOC_DBUS_TYPE_INTERFACE (gtkdoc_dbus_interface_get_type ())
#define GTKDOC_DBUS_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTKDOC_DBUS_TYPE_INTERFACE, GtkdocDBusInterface))
#define GTKDOC_DBUS_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTKDOC_DBUS_TYPE_INTERFACE, GtkdocDBusInterfaceClass))
#define GTKDOC_DBUS_IS_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTKDOC_DBUS_TYPE_INTERFACE))
#define GTKDOC_DBUS_IS_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTKDOC_DBUS_TYPE_INTERFACE))
#define GTKDOC_DBUS_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTKDOC_DBUS_TYPE_INTERFACE, GtkdocDBusInterfaceClass))

typedef struct _GtkdocDBusInterface GtkdocDBusInterface;
typedef struct _GtkdocDBusInterfaceClass GtkdocDBusInterfaceClass;
#define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL)))
#define _gtkdoc_gcomment_unref0(var) ((var == NULL) ? NULL : (var = (gtkdoc_gcomment_unref (var), NULL)))
#define _gtkdoc_dbus_interface_unref0(var) ((var == NULL) ? NULL : (var = (gtkdoc_dbus_interface_unref (var), NULL)))
#define _gtkdoc_dbus_parameter_unref0(var) ((var == NULL) ? NULL : (var = (gtkdoc_dbus_parameter_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
typedef struct _GtkdocDBusParamSpecMember GtkdocDBusParamSpecMember;
typedef struct _GtkdocDBusInterfacePrivate GtkdocDBusInterfacePrivate;

#define GTKDOC_TYPE_TEXT_WRITER (gtkdoc_text_writer_get_type ())
#define GTKDOC_TEXT_WRITER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTKDOC_TYPE_TEXT_WRITER, GtkdocTextWriter))
#define GTKDOC_TEXT_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTKDOC_TYPE_TEXT_WRITER, GtkdocTextWriterClass))
#define GTKDOC_IS_TEXT_WRITER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTKDOC_TYPE_TEXT_WRITER))
#define GTKDOC_IS_TEXT_WRITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTKDOC_TYPE_TEXT_WRITER))
#define GTKDOC_TEXT_WRITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTKDOC_TYPE_TEXT_WRITER, GtkdocTextWriterClass))

typedef struct _GtkdocTextWriter GtkdocTextWriter;
typedef struct _GtkdocTextWriterClass GtkdocTextWriterClass;
typedef struct _GtkdocTextWriterPrivate GtkdocTextWriterPrivate;
#define _gtkdoc_text_writer_unref0(var) ((var == NULL) ? NULL : (var = (gtkdoc_text_writer_unref (var), NULL)))
#define _gtkdoc_dbus_member_unref0(var) ((var == NULL) ? NULL : (var = (gtkdoc_dbus_member_unref (var), NULL)))
typedef struct _GtkdocDBusParamSpecInterface GtkdocDBusParamSpecInterface;

typedef enum  {
	GTKDOC_DBUS_PARAMETER_DIRECTION_NONE,
	GTKDOC_DBUS_PARAMETER_DIRECTION_IN,
	GTKDOC_DBUS_PARAMETER_DIRECTION_OUT
} GtkdocDBusParameterDirection;

struct _GtkdocDBusParameter {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GtkdocDBusParameterPrivate * priv;
	gchar* name;
	gchar* signature;
	GtkdocDBusParameterDirection direction;
};

struct _GtkdocDBusParameterClass {
	GTypeClass parent_class;
	void (*finalize) (GtkdocDBusParameter *self);
};

struct _GtkdocDBusParamSpecParameter {
	GParamSpec parent_instance;
};

struct _GtkdocDBusMember {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GtkdocDBusMemberPrivate * priv;
	gchar* name;
	ValaList* parameters;
	GtkdocGComment* comment;
	GtkdocDBusInterface* iface;
};

struct _GtkdocDBusMemberClass {
	GTypeClass parent_class;
	void (*finalize) (GtkdocDBusMember *self);
};

struct _GtkdocDBusParamSpecMember {
	GParamSpec parent_instance;
};

struct _GtkdocDBusInterface {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GtkdocDBusInterfacePrivate * priv;
	gchar* package_name;
	gchar* name;
	gchar* purpose;
	gchar* description;
	ValaList* methods;
	ValaList* signals;
};

struct _GtkdocDBusInterfaceClass {
	GTypeClass parent_class;
	void (*finalize) (GtkdocDBusInterface *self);
};

struct _GtkdocTextWriter {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GtkdocTextWriterPrivate * priv;
	gchar* filename;
	gchar* mode;
};

struct _GtkdocTextWriterClass {
	GTypeClass parent_class;
	void (*finalize) (GtkdocTextWriter *self);
};

struct _GtkdocDBusParamSpecInterface {
	GParamSpec parent_instance;
};


static gpointer gtkdoc_dbus_parameter_parent_class = NULL;
static gpointer gtkdoc_dbus_member_parent_class = NULL;
static gpointer gtkdoc_dbus_interface_parent_class = NULL;

gpointer gtkdoc_dbus_parameter_ref (gpointer instance);
void gtkdoc_dbus_parameter_unref (gpointer instance);
GParamSpec* gtkdoc_dbus_param_spec_parameter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void gtkdoc_dbus_value_set_parameter (GValue* value, gpointer v_object);
void gtkdoc_dbus_value_take_parameter (GValue* value, gpointer v_object);
gpointer gtkdoc_dbus_value_get_parameter (const GValue* value);
GType gtkdoc_dbus_parameter_get_type (void) G_GNUC_CONST;
GType gtkdoc_dbus_parameter_direction_get_type (void) G_GNUC_CONST;
gchar* gtkdoc_dbus_parameter_direction_to_string (GtkdocDBusParameterDirection self);
GtkdocDBusParameter* gtkdoc_dbus_parameter_new (const gchar* name, const gchar* signature, GtkdocDBusParameterDirection direction);
GtkdocDBusParameter* gtkdoc_dbus_parameter_construct (GType object_type, const gchar* name, const gchar* signature, GtkdocDBusParameterDirection direction);
gchar* gtkdoc_dbus_parameter_to_string (GtkdocDBusParameter* self);
static void gtkdoc_dbus_parameter_finalize (GtkdocDBusParameter * obj);
gpointer gtkdoc_dbus_member_ref (gpointer instance);
void gtkdoc_dbus_member_unref (gpointer instance);
GParamSpec* gtkdoc_dbus_param_spec_member (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void gtkdoc_dbus_value_set_member (GValue* value, gpointer v_object);
void gtkdoc_dbus_value_take_member (GValue* value, gpointer v_object);
gpointer gtkdoc_dbus_value_get_member (const GValue* value);
GType gtkdoc_dbus_member_get_type (void) G_GNUC_CONST;
gpointer gtkdoc_gcomment_ref (gpointer instance);
void gtkdoc_gcomment_unref (gpointer instance);
GParamSpec* gtkdoc_param_spec_gcomment (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void gtkdoc_value_set_gcomment (GValue* value, gpointer v_object);
void gtkdoc_value_take_gcomment (GValue* value, gpointer v_object);
gpointer gtkdoc_value_get_gcomment (const GValue* value);
GType gtkdoc_gcomment_get_type (void) G_GNUC_CONST;
gpointer gtkdoc_dbus_interface_ref (gpointer instance);
void gtkdoc_dbus_interface_unref (gpointer instance);
GParamSpec* gtkdoc_dbus_param_spec_interface (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void gtkdoc_dbus_value_set_interface (GValue* value, gpointer v_object);
void gtkdoc_dbus_value_take_interface (GValue* value, gpointer v_object);
gpointer gtkdoc_dbus_value_get_interface (const GValue* value);
GType gtkdoc_dbus_interface_get_type (void) G_GNUC_CONST;
GtkdocDBusMember* gtkdoc_dbus_member_new (const gchar* name);
GtkdocDBusMember* gtkdoc_dbus_member_construct (GType object_type, const gchar* name);
void gtkdoc_dbus_member_add_parameter (GtkdocDBusMember* self, GtkdocDBusParameter* parameter);
gchar* gtkdoc_dbus_member_get_docbook_id (GtkdocDBusMember* self);
gchar* gtkdoc_to_docbook_id (const gchar* name);
gchar* gtkdoc_dbus_member_to_string (GtkdocDBusMember* self, gint indent, gboolean link);
gchar* gtkdoc_dbus_interface_get_docbook_id (GtkdocDBusInterface* self);
static void gtkdoc_dbus_member_finalize (GtkdocDBusMember * obj);
GtkdocDBusInterface* gtkdoc_dbus_interface_new (const gchar* package_name, const gchar* name, const gchar* purpose, const gchar* description);
GtkdocDBusInterface* gtkdoc_dbus_interface_construct (GType object_type, const gchar* package_name, const gchar* name, const gchar* purpose, const gchar* description);
void gtkdoc_dbus_interface_add_method (GtkdocDBusInterface* self, GtkdocDBusMember* member);
void gtkdoc_dbus_interface_add_signal (GtkdocDBusInterface* self, GtkdocDBusMember* member);
gboolean gtkdoc_dbus_interface_write (GtkdocDBusInterface* self, ValadocSettings* settings, ValadocErrorReporter* reporter);
gpointer gtkdoc_text_writer_ref (gpointer instance);
void gtkdoc_text_writer_unref (gpointer instance);
GParamSpec* gtkdoc_param_spec_text_writer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void gtkdoc_value_set_text_writer (GValue* value, gpointer v_object);
void gtkdoc_value_take_text_writer (GValue* value, gpointer v_object);
gpointer gtkdoc_value_get_text_writer (const GValue* value);
GType gtkdoc_text_writer_get_type (void) G_GNUC_CONST;
GtkdocTextWriter* gtkdoc_text_writer_new (const gchar* filename, const gchar* mode);
GtkdocTextWriter* gtkdoc_text_writer_construct (GType object_type, const gchar* filename, const gchar* mode);
gboolean gtkdoc_text_writer_open (GtkdocTextWriter* self);
void gtkdoc_text_writer_write_line (GtkdocTextWriter* self, const gchar* line);
gchar* gtkdoc_dbus_interface_to_string (GtkdocDBusInterface* self, ValadocErrorReporter* reporter);
void gtkdoc_text_writer_close (GtkdocTextWriter* self);
gchar* gtkdoc_gcomment_to_docbook (GtkdocGComment* self, ValadocErrorReporter* reporter);
static void gtkdoc_dbus_interface_finalize (GtkdocDBusInterface * obj);


gchar* gtkdoc_dbus_parameter_direction_to_string (GtkdocDBusParameterDirection self) {
	gchar* result = NULL;
	switch (self) {
		case GTKDOC_DBUS_PARAMETER_DIRECTION_NONE:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("");
			result = _tmp0_;
			return result;
		}
		case GTKDOC_DBUS_PARAMETER_DIRECTION_IN:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("in");
			result = _tmp1_;
			return result;
		}
		case GTKDOC_DBUS_PARAMETER_DIRECTION_OUT:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("out");
			result = _tmp2_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}


GType gtkdoc_dbus_parameter_direction_get_type (void) {
	static volatile gsize gtkdoc_dbus_parameter_direction_type_id__volatile = 0;
	if (g_once_init_enter (&gtkdoc_dbus_parameter_direction_type_id__volatile)) {
		static const GEnumValue values[] = {{GTKDOC_DBUS_PARAMETER_DIRECTION_NONE, "GTKDOC_DBUS_PARAMETER_DIRECTION_NONE", "none"}, {GTKDOC_DBUS_PARAMETER_DIRECTION_IN, "GTKDOC_DBUS_PARAMETER_DIRECTION_IN", "in"}, {GTKDOC_DBUS_PARAMETER_DIRECTION_OUT, "GTKDOC_DBUS_PARAMETER_DIRECTION_OUT", "out"}, {0, NULL, NULL}};
		GType gtkdoc_dbus_parameter_direction_type_id;
		gtkdoc_dbus_parameter_direction_type_id = g_enum_register_static ("GtkdocDBusParameterDirection", values);
		g_once_init_leave (&gtkdoc_dbus_parameter_direction_type_id__volatile, gtkdoc_dbus_parameter_direction_type_id);
	}
	return gtkdoc_dbus_parameter_direction_type_id__volatile;
}


GtkdocDBusParameter* gtkdoc_dbus_parameter_construct (GType object_type, const gchar* name, const gchar* signature, GtkdocDBusParameterDirection direction) {
	GtkdocDBusParameter* self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	GtkdocDBusParameterDirection _tmp4_;
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (signature != NULL, NULL);
	self = (GtkdocDBusParameter*) g_type_create_instance (object_type);
	_tmp0_ = name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->name);
	self->name = _tmp1_;
	_tmp2_ = signature;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->signature);
	self->signature = _tmp3_;
	_tmp4_ = direction;
	self->direction = _tmp4_;
	return self;
}


GtkdocDBusParameter* gtkdoc_dbus_parameter_new (const gchar* name, const gchar* signature, GtkdocDBusParameterDirection direction) {
	return gtkdoc_dbus_parameter_construct (GTKDOC_DBUS_TYPE_PARAMETER, name, signature, direction);
}


gchar* gtkdoc_dbus_parameter_to_string (GtkdocDBusParameter* self) {
	gchar* result = NULL;
	GtkdocDBusParameterDirection _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->direction;
	if (_tmp0_ == GTKDOC_DBUS_PARAMETER_DIRECTION_NONE) {
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		_tmp1_ = self->signature;
		_tmp2_ = self->name;
		_tmp3_ = g_strdup_printf ("<parameter><type>'%s'</type> %s</parameter>", _tmp1_, _tmp2_);
		result = _tmp3_;
		return result;
	} else {
		GtkdocDBusParameterDirection _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp4_ = self->direction;
		_tmp5_ = gtkdoc_dbus_parameter_direction_to_string (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = self->signature;
		_tmp8_ = self->name;
		_tmp9_ = g_strdup_printf ("<parameter>%s <type>'%s'</type> %s</parameter>", _tmp6_, _tmp7_, _tmp8_);
		_tmp10_ = _tmp9_;
		_g_free0 (_tmp6_);
		result = _tmp10_;
		return result;
	}
}


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


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


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


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


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


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


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


void gtkdoc_dbus_value_set_parameter (GValue* value, gpointer v_object) {
	GtkdocDBusParameter * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GTKDOC_DBUS_TYPE_PARAMETER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GTKDOC_DBUS_TYPE_PARAMETER));
		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;
		gtkdoc_dbus_parameter_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		gtkdoc_dbus_parameter_unref (old);
	}
}


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


static void gtkdoc_dbus_parameter_class_init (GtkdocDBusParameterClass * klass) {
	gtkdoc_dbus_parameter_parent_class = g_type_class_peek_parent (klass);
	((GtkdocDBusParameterClass *) klass)->finalize = gtkdoc_dbus_parameter_finalize;
}


static void gtkdoc_dbus_parameter_instance_init (GtkdocDBusParameter * self) {
	self->ref_count = 1;
}


static void gtkdoc_dbus_parameter_finalize (GtkdocDBusParameter * obj) {
	GtkdocDBusParameter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GTKDOC_DBUS_TYPE_PARAMETER, GtkdocDBusParameter);
	g_signal_handlers_destroy (self);
	_g_free0 (self->name);
	_g_free0 (self->signature);
}


GType gtkdoc_dbus_parameter_get_type (void) {
	static volatile gsize gtkdoc_dbus_parameter_type_id__volatile = 0;
	if (g_once_init_enter (&gtkdoc_dbus_parameter_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { gtkdoc_dbus_value_parameter_init, gtkdoc_dbus_value_parameter_free_value, gtkdoc_dbus_value_parameter_copy_value, gtkdoc_dbus_value_parameter_peek_pointer, "p", gtkdoc_dbus_value_parameter_collect_value, "p", gtkdoc_dbus_value_parameter_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (GtkdocDBusParameterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gtkdoc_dbus_parameter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GtkdocDBusParameter), 0, (GInstanceInitFunc) gtkdoc_dbus_parameter_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 gtkdoc_dbus_parameter_type_id;
		gtkdoc_dbus_parameter_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GtkdocDBusParameter", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&gtkdoc_dbus_parameter_type_id__volatile, gtkdoc_dbus_parameter_type_id);
	}
	return gtkdoc_dbus_parameter_type_id__volatile;
}


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


void gtkdoc_dbus_parameter_unref (gpointer instance) {
	GtkdocDBusParameter * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		GTKDOC_DBUS_PARAMETER_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


GtkdocDBusMember* gtkdoc_dbus_member_construct (GType object_type, const gchar* name) {
	GtkdocDBusMember* self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (name != NULL, NULL);
	self = (GtkdocDBusMember*) g_type_create_instance (object_type);
	_tmp0_ = name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->name);
	self->name = _tmp1_;
	return self;
}


GtkdocDBusMember* gtkdoc_dbus_member_new (const gchar* name) {
	return gtkdoc_dbus_member_construct (GTKDOC_DBUS_TYPE_MEMBER, name);
}


void gtkdoc_dbus_member_add_parameter (GtkdocDBusMember* self, GtkdocDBusParameter* parameter) {
	ValaList* _tmp0_;
	GtkdocDBusParameter* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (parameter != NULL);
	_tmp0_ = self->parameters;
	_tmp1_ = parameter;
	vala_collection_add ((ValaCollection*) _tmp0_, _tmp1_);
}


gchar* gtkdoc_dbus_member_get_docbook_id (GtkdocDBusMember* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->name;
	_tmp1_ = gtkdoc_to_docbook_id (_tmp0_);
	result = _tmp1_;
	return result;
}


gchar* gtkdoc_dbus_member_to_string (GtkdocDBusMember* self, gint indent, gboolean link) {
	gchar* result = NULL;
	GString* builder = NULL;
	GString* _tmp0_;
	gboolean _tmp1_;
	ValaList* _tmp23_;
	gint _tmp24_;
	gint _tmp25_;
	GString* _tmp50_;
	GString* _tmp51_;
	const gchar* _tmp52_;
	gchar* _tmp53_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_string_new ("");
	builder = _tmp0_;
	_tmp1_ = link;
	if (_tmp1_) {
		GString* _tmp2_;
		GtkdocDBusInterface* _tmp3_;
		gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		const gchar* _tmp8_;
		gint _tmp9_;
		const gchar* _tmp10_;
		gint _tmp11_;
		gint _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp2_ = builder;
		_tmp3_ = self->iface;
		_tmp4_ = gtkdoc_dbus_interface_get_docbook_id (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = gtkdoc_dbus_member_get_docbook_id (self);
		_tmp7_ = _tmp6_;
		_tmp8_ = self->name;
		_tmp9_ = indent;
		_tmp10_ = self->name;
		_tmp11_ = strlen (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = g_strnfill ((gsize) (_tmp9_ - _tmp12_), ' ');
		_tmp14_ = _tmp13_;
		g_string_append_printf (_tmp2_, "\n<link linkend=\"%s-%s\">%s</link>%s(", _tmp5_, _tmp7_, _tmp8_, _tmp14_);
		_g_free0 (_tmp14_);
		_g_free0 (_tmp7_);
		_g_free0 (_tmp5_);
	} else {
		GString* _tmp15_;
		const gchar* _tmp16_;
		gint _tmp17_;
		const gchar* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		_tmp15_ = builder;
		_tmp16_ = self->name;
		_tmp17_ = indent;
		_tmp18_ = self->name;
		_tmp19_ = strlen (_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp21_ = g_strnfill ((gsize) (_tmp17_ - _tmp20_), ' ');
		_tmp22_ = _tmp21_;
		g_string_append_printf (_tmp15_, "\n%s%s(", _tmp16_, _tmp22_);
		_g_free0 (_tmp22_);
	}
	_tmp23_ = self->parameters;
	_tmp24_ = vala_collection_get_size ((ValaCollection*) _tmp23_);
	_tmp25_ = _tmp24_;
	if (_tmp25_ > 0) {
		GString* _tmp26_;
		ValaList* _tmp27_;
		gpointer _tmp28_;
		GtkdocDBusParameter* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		_tmp26_ = builder;
		_tmp27_ = self->parameters;
		_tmp28_ = vala_list_get (_tmp27_, 0);
		_tmp29_ = (GtkdocDBusParameter*) _tmp28_;
		_tmp30_ = gtkdoc_dbus_parameter_to_string (_tmp29_);
		_tmp31_ = _tmp30_;
		g_string_append (_tmp26_, _tmp31_);
		_g_free0 (_tmp31_);
		_gtkdoc_dbus_parameter_unref0 (_tmp29_);
	}
	{
		gint i = 0;
		i = 1;
		{
			gboolean _tmp32_ = FALSE;
			_tmp32_ = TRUE;
			while (TRUE) {
				gint _tmp34_;
				ValaList* _tmp35_;
				gint _tmp36_;
				gint _tmp37_;
				GString* _tmp38_;
				GString* _tmp39_;
				gint _tmp40_;
				gchar* _tmp41_;
				gchar* _tmp42_;
				GString* _tmp43_;
				ValaList* _tmp44_;
				gint _tmp45_;
				gpointer _tmp46_;
				GtkdocDBusParameter* _tmp47_;
				gchar* _tmp48_;
				gchar* _tmp49_;
				if (!_tmp32_) {
					gint _tmp33_;
					_tmp33_ = i;
					i = _tmp33_ + 1;
				}
				_tmp32_ = FALSE;
				_tmp34_ = i;
				_tmp35_ = self->parameters;
				_tmp36_ = vala_collection_get_size ((ValaCollection*) _tmp35_);
				_tmp37_ = _tmp36_;
				if (!(_tmp34_ < _tmp37_)) {
					break;
				}
				_tmp38_ = builder;
				g_string_append (_tmp38_, ",\n");
				_tmp39_ = builder;
				_tmp40_ = indent;
				_tmp41_ = g_strnfill ((gsize) (_tmp40_ + 1), ' ');
				_tmp42_ = _tmp41_;
				g_string_append (_tmp39_, _tmp42_);
				_g_free0 (_tmp42_);
				_tmp43_ = builder;
				_tmp44_ = self->parameters;
				_tmp45_ = i;
				_tmp46_ = vala_list_get (_tmp44_, _tmp45_);
				_tmp47_ = (GtkdocDBusParameter*) _tmp46_;
				_tmp48_ = gtkdoc_dbus_parameter_to_string (_tmp47_);
				_tmp49_ = _tmp48_;
				g_string_append (_tmp43_, _tmp49_);
				_g_free0 (_tmp49_);
				_gtkdoc_dbus_parameter_unref0 (_tmp47_);
			}
		}
	}
	_tmp50_ = builder;
	g_string_append_c (_tmp50_, ')');
	_tmp51_ = builder;
	_tmp52_ = _tmp51_->str;
	_tmp53_ = g_strdup (_tmp52_);
	result = _tmp53_;
	_g_string_free0 (builder);
	return result;
}


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


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


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


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


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


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


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


void gtkdoc_dbus_value_set_member (GValue* value, gpointer v_object) {
	GtkdocDBusMember * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GTKDOC_DBUS_TYPE_MEMBER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GTKDOC_DBUS_TYPE_MEMBER));
		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;
		gtkdoc_dbus_member_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		gtkdoc_dbus_member_unref (old);
	}
}


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


static void gtkdoc_dbus_member_class_init (GtkdocDBusMemberClass * klass) {
	gtkdoc_dbus_member_parent_class = g_type_class_peek_parent (klass);
	((GtkdocDBusMemberClass *) klass)->finalize = gtkdoc_dbus_member_finalize;
}


static void gtkdoc_dbus_member_instance_init (GtkdocDBusMember * self) {
	GEqualFunc _tmp0_;
	ValaArrayList* _tmp1_;
	_tmp0_ = g_direct_equal;
	_tmp1_ = vala_array_list_new (GTKDOC_DBUS_TYPE_PARAMETER, (GBoxedCopyFunc) gtkdoc_dbus_parameter_ref, (GDestroyNotify) gtkdoc_dbus_parameter_unref, _tmp0_);
	self->parameters = (ValaList*) _tmp1_;
	self->ref_count = 1;
}


static void gtkdoc_dbus_member_finalize (GtkdocDBusMember * obj) {
	GtkdocDBusMember * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GTKDOC_DBUS_TYPE_MEMBER, GtkdocDBusMember);
	g_signal_handlers_destroy (self);
	_g_free0 (self->name);
	_vala_iterable_unref0 (self->parameters);
	_gtkdoc_gcomment_unref0 (self->comment);
	_gtkdoc_dbus_interface_unref0 (self->iface);
}


GType gtkdoc_dbus_member_get_type (void) {
	static volatile gsize gtkdoc_dbus_member_type_id__volatile = 0;
	if (g_once_init_enter (&gtkdoc_dbus_member_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { gtkdoc_dbus_value_member_init, gtkdoc_dbus_value_member_free_value, gtkdoc_dbus_value_member_copy_value, gtkdoc_dbus_value_member_peek_pointer, "p", gtkdoc_dbus_value_member_collect_value, "p", gtkdoc_dbus_value_member_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (GtkdocDBusMemberClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gtkdoc_dbus_member_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GtkdocDBusMember), 0, (GInstanceInitFunc) gtkdoc_dbus_member_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 gtkdoc_dbus_member_type_id;
		gtkdoc_dbus_member_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GtkdocDBusMember", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&gtkdoc_dbus_member_type_id__volatile, gtkdoc_dbus_member_type_id);
	}
	return gtkdoc_dbus_member_type_id__volatile;
}


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


void gtkdoc_dbus_member_unref (gpointer instance) {
	GtkdocDBusMember * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		GTKDOC_DBUS_MEMBER_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


GtkdocDBusInterface* gtkdoc_dbus_interface_construct (GType object_type, const gchar* package_name, const gchar* name, const gchar* purpose, const gchar* description) {
	GtkdocDBusInterface* self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	g_return_val_if_fail (package_name != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (purpose != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	self = (GtkdocDBusInterface*) g_type_create_instance (object_type);
	_tmp0_ = package_name;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->package_name);
	self->package_name = _tmp1_;
	_tmp2_ = name;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (self->name);
	self->name = _tmp3_;
	_tmp4_ = purpose;
	_tmp5_ = g_strdup (_tmp4_);
	_g_free0 (self->purpose);
	self->purpose = _tmp5_;
	_tmp6_ = description;
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 (self->description);
	self->description = _tmp7_;
	return self;
}


GtkdocDBusInterface* gtkdoc_dbus_interface_new (const gchar* package_name, const gchar* name, const gchar* purpose, const gchar* description) {
	return gtkdoc_dbus_interface_construct (GTKDOC_DBUS_TYPE_INTERFACE, package_name, name, purpose, description);
}


static gpointer _gtkdoc_dbus_interface_ref0 (gpointer self) {
	return self ? gtkdoc_dbus_interface_ref (self) : NULL;
}


void gtkdoc_dbus_interface_add_method (GtkdocDBusInterface* self, GtkdocDBusMember* member) {
	GtkdocDBusMember* _tmp0_;
	GtkdocDBusInterface* _tmp1_;
	ValaList* _tmp2_;
	GtkdocDBusMember* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (member != NULL);
	_tmp0_ = member;
	_tmp1_ = _gtkdoc_dbus_interface_ref0 (self);
	_gtkdoc_dbus_interface_unref0 (_tmp0_->iface);
	_tmp0_->iface = _tmp1_;
	_tmp2_ = self->methods;
	_tmp3_ = member;
	vala_collection_add ((ValaCollection*) _tmp2_, _tmp3_);
}


void gtkdoc_dbus_interface_add_signal (GtkdocDBusInterface* self, GtkdocDBusMember* member) {
	GtkdocDBusMember* _tmp0_;
	GtkdocDBusInterface* _tmp1_;
	ValaList* _tmp2_;
	GtkdocDBusMember* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (member != NULL);
	_tmp0_ = member;
	_tmp1_ = _gtkdoc_dbus_interface_ref0 (self);
	_gtkdoc_dbus_interface_unref0 (_tmp0_->iface);
	_tmp0_->iface = _tmp1_;
	_tmp2_ = self->signals;
	_tmp3_ = member;
	vala_collection_add ((ValaCollection*) _tmp2_, _tmp3_);
}


gchar* gtkdoc_dbus_interface_get_docbook_id (GtkdocDBusInterface* self) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->name;
	_tmp1_ = gtkdoc_to_docbook_id (_tmp0_);
	result = _tmp1_;
	return result;
}


gboolean gtkdoc_dbus_interface_write (GtkdocDBusInterface* self, ValadocSettings* settings, ValadocErrorReporter* reporter) {
	gboolean result = FALSE;
	gchar* xml_dir = NULL;
	ValadocSettings* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* xml_file = NULL;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	GtkdocTextWriter* writer = NULL;
	const gchar* _tmp12_;
	GtkdocTextWriter* _tmp13_;
	GtkdocTextWriter* _tmp14_;
	gboolean _tmp15_;
	GtkdocTextWriter* _tmp19_;
	ValadocErrorReporter* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	GtkdocTextWriter* _tmp23_;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (settings != NULL, FALSE);
	g_return_val_if_fail (reporter != NULL, FALSE);
	_tmp0_ = settings;
	_tmp1_ = _tmp0_->path;
	_tmp2_ = g_build_filename (_tmp1_, "xml", NULL);
	xml_dir = _tmp2_;
	_tmp3_ = xml_dir;
	g_mkdir_with_parents (_tmp3_, 0777);
	_tmp4_ = xml_dir;
	_tmp5_ = self->name;
	_tmp6_ = gtkdoc_to_docbook_id (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf ("%s.xml", _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_build_filename (_tmp4_, _tmp9_, NULL);
	_tmp11_ = _tmp10_;
	_g_free0 (_tmp9_);
	_g_free0 (_tmp7_);
	xml_file = _tmp11_;
	_tmp12_ = xml_file;
	_tmp13_ = gtkdoc_text_writer_new (_tmp12_, "w");
	writer = _tmp13_;
	_tmp14_ = writer;
	_tmp15_ = gtkdoc_text_writer_open (_tmp14_);
	if (!_tmp15_) {
		ValadocErrorReporter* _tmp16_;
		GtkdocTextWriter* _tmp17_;
		const gchar* _tmp18_;
		_tmp16_ = reporter;
		_tmp17_ = writer;
		_tmp18_ = _tmp17_->filename;
		valadoc_error_reporter_simple_error (_tmp16_, "GtkDoc", "unable to open '%s' for writing", _tmp18_);
		result = FALSE;
		_gtkdoc_text_writer_unref0 (writer);
		_g_free0 (xml_file);
		_g_free0 (xml_dir);
		return result;
	}
	_tmp19_ = writer;
	_tmp20_ = reporter;
	_tmp21_ = gtkdoc_dbus_interface_to_string (self, _tmp20_);
	_tmp22_ = _tmp21_;
	gtkdoc_text_writer_write_line (_tmp19_, _tmp22_);
	_g_free0 (_tmp22_);
	_tmp23_ = writer;
	gtkdoc_text_writer_close (_tmp23_);
	result = TRUE;
	_gtkdoc_text_writer_unref0 (writer);
	_g_free0 (xml_file);
	_g_free0 (xml_dir);
	return result;
}


static gpointer _vala_iterable_ref0 (gpointer self) {
	return self ? vala_iterable_ref (self) : NULL;
}


gchar* gtkdoc_dbus_interface_to_string (GtkdocDBusInterface* self, ValadocErrorReporter* reporter) {
	gchar* result = NULL;
	gint method_indent = 0;
	gint _tmp17_;
	gint signal_indent = 0;
	gint _tmp35_;
	GString* builder = NULL;
	GString* _tmp36_;
	gchar* docbook_id = NULL;
	gchar* _tmp37_;
	GString* _tmp38_;
	const gchar* _tmp39_ = NULL;
	const gchar* _tmp40_;
	GString* _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	gchar* _tmp46_;
	gchar* _tmp47_;
	const gchar* _tmp48_;
	ValaList* _tmp49_;
	gint _tmp50_;
	gint _tmp51_;
	ValaList* _tmp71_;
	gint _tmp72_;
	gint _tmp73_;
	GString* _tmp93_;
	const gchar* _tmp94_;
	const gchar* _tmp95_;
	ValaList* _tmp96_;
	gint _tmp97_;
	gint _tmp98_;
	ValaList* _tmp132_;
	gint _tmp133_;
	gint _tmp134_;
	GString* _tmp168_;
	GString* _tmp169_;
	const gchar* _tmp170_;
	gchar* _tmp171_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (reporter != NULL, NULL);
	method_indent = 0;
	{
		ValaList* _method_list = NULL;
		ValaList* _tmp0_;
		ValaList* _tmp1_;
		gint _method_size = 0;
		ValaList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _method_index = 0;
		_tmp0_ = self->methods;
		_tmp1_ = _vala_iterable_ref0 (_tmp0_);
		_method_list = _tmp1_;
		_tmp2_ = _method_list;
		_tmp3_ = vala_collection_get_size ((ValaCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_method_size = _tmp4_;
		_method_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GtkdocDBusMember* method = NULL;
			ValaList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_;
			gint _tmp11_;
			GtkdocDBusMember* _tmp12_;
			const gchar* _tmp13_;
			gint _tmp14_;
			gint _tmp15_;
			gint _tmp16_;
			_tmp5_ = _method_index;
			_method_index = _tmp5_ + 1;
			_tmp6_ = _method_index;
			_tmp7_ = _method_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _method_list;
			_tmp9_ = _method_index;
			_tmp10_ = vala_list_get (_tmp8_, _tmp9_);
			method = (GtkdocDBusMember*) _tmp10_;
			_tmp11_ = method_indent;
			_tmp12_ = method;
			_tmp13_ = _tmp12_->name;
			_tmp14_ = strlen (_tmp13_);
			_tmp15_ = _tmp14_;
			_tmp16_ = MAX (_tmp11_, (gint) _tmp15_);
			method_indent = _tmp16_;
			_gtkdoc_dbus_member_unref0 (method);
		}
		_vala_iterable_unref0 (_method_list);
	}
	_tmp17_ = method_indent;
	method_indent = _tmp17_ + 5;
	signal_indent = 0;
	{
		ValaList* _sig_list = NULL;
		ValaList* _tmp18_;
		ValaList* _tmp19_;
		gint _sig_size = 0;
		ValaList* _tmp20_;
		gint _tmp21_;
		gint _tmp22_;
		gint _sig_index = 0;
		_tmp18_ = self->signals;
		_tmp19_ = _vala_iterable_ref0 (_tmp18_);
		_sig_list = _tmp19_;
		_tmp20_ = _sig_list;
		_tmp21_ = vala_collection_get_size ((ValaCollection*) _tmp20_);
		_tmp22_ = _tmp21_;
		_sig_size = _tmp22_;
		_sig_index = -1;
		while (TRUE) {
			gint _tmp23_;
			gint _tmp24_;
			gint _tmp25_;
			GtkdocDBusMember* sig = NULL;
			ValaList* _tmp26_;
			gint _tmp27_;
			gpointer _tmp28_;
			gint _tmp29_;
			GtkdocDBusMember* _tmp30_;
			const gchar* _tmp31_;
			gint _tmp32_;
			gint _tmp33_;
			gint _tmp34_;
			_tmp23_ = _sig_index;
			_sig_index = _tmp23_ + 1;
			_tmp24_ = _sig_index;
			_tmp25_ = _sig_size;
			if (!(_tmp24_ < _tmp25_)) {
				break;
			}
			_tmp26_ = _sig_list;
			_tmp27_ = _sig_index;
			_tmp28_ = vala_list_get (_tmp26_, _tmp27_);
			sig = (GtkdocDBusMember*) _tmp28_;
			_tmp29_ = signal_indent;
			_tmp30_ = sig;
			_tmp31_ = _tmp30_->name;
			_tmp32_ = strlen (_tmp31_);
			_tmp33_ = _tmp32_;
			_tmp34_ = MAX (_tmp29_, (gint) _tmp33_);
			signal_indent = _tmp34_;
			_gtkdoc_dbus_member_unref0 (sig);
		}
		_vala_iterable_unref0 (_sig_list);
	}
	_tmp35_ = signal_indent;
	signal_indent = _tmp35_ + 5;
	_tmp36_ = g_string_new ("");
	builder = _tmp36_;
	_tmp37_ = gtkdoc_dbus_interface_get_docbook_id (self);
	docbook_id = _tmp37_;
	_tmp38_ = builder;
	g_string_append (_tmp38_, "<?xml version=\"1.0\"?><!DOCTYPE refentry PUBLIC \"-//OASIS//DTD DocBo" \
"ok XML V4.3//EN\" \"http://www.oasis-open.org/docbook/xml/4.3/docbookx" \
".dtd\"");
	_tmp40_ = self->purpose;
	_tmp39_ = _tmp40_;
	if (_tmp39_ == NULL) {
		_tmp39_ = "";
	}
	_tmp41_ = builder;
	_tmp42_ = docbook_id;
	_tmp43_ = docbook_id;
	_tmp44_ = self->name;
	_tmp45_ = self->package_name;
	_tmp46_ = g_utf8_strup (_tmp45_, (gssize) -1);
	_tmp47_ = _tmp46_;
	_tmp48_ = self->name;
	g_string_append_printf (_tmp41_, "\n" \
"[<!ENTITY %% local.common.attrib \"xmlns:xi  CDATA  #FIXED 'http://www" \
".w3.org/2003/XInclude'\">]>\n" \
"<refentry id=\"docs-%s\">\n" \
"<refmeta>\n" \
"<refentrytitle role=\"top_of_page\" id=\"docs-%s.top_of_page\">%s</ref" \
"entrytitle>\n" \
"<manvolnum>3</manvolnum>\n" \
"<refmiscinfo>\n" \
"%s D-Bus API\n" \
"</refmiscinfo>\n" \
"</refmeta>\n" \
"<refnamediv>\n" \
"<refname>%s</refname>\n" \
"<refpurpose>%s</refpurpose>\n" \
"</refnamediv>", _tmp42_, _tmp43_, _tmp44_, _tmp47_, _tmp48_, _tmp39_);
	_g_free0 (_tmp47_);
	_tmp49_ = self->methods;
	_tmp50_ = vala_collection_get_size ((ValaCollection*) _tmp49_);
	_tmp51_ = _tmp50_;
	if (_tmp51_ > 0) {
		GString* _tmp52_;
		const gchar* _tmp53_;
		GString* _tmp70_;
		_tmp52_ = builder;
		_tmp53_ = docbook_id;
		g_string_append_printf (_tmp52_, "\n" \
"<refsynopsisdiv id=\"docs-%s.synopsis\" role=\"synopsis\">\n" \
"<title role=\"synopsis.title\">Methods</title>\n" \
"<synopsis>", _tmp53_);
		{
			ValaList* _method_list = NULL;
			ValaList* _tmp54_;
			ValaList* _tmp55_;
			gint _method_size = 0;
			ValaList* _tmp56_;
			gint _tmp57_;
			gint _tmp58_;
			gint _method_index = 0;
			_tmp54_ = self->methods;
			_tmp55_ = _vala_iterable_ref0 (_tmp54_);
			_method_list = _tmp55_;
			_tmp56_ = _method_list;
			_tmp57_ = vala_collection_get_size ((ValaCollection*) _tmp56_);
			_tmp58_ = _tmp57_;
			_method_size = _tmp58_;
			_method_index = -1;
			while (TRUE) {
				gint _tmp59_;
				gint _tmp60_;
				gint _tmp61_;
				GtkdocDBusMember* method = NULL;
				ValaList* _tmp62_;
				gint _tmp63_;
				gpointer _tmp64_;
				GString* _tmp65_;
				GtkdocDBusMember* _tmp66_;
				gint _tmp67_;
				gchar* _tmp68_;
				gchar* _tmp69_;
				_tmp59_ = _method_index;
				_method_index = _tmp59_ + 1;
				_tmp60_ = _method_index;
				_tmp61_ = _method_size;
				if (!(_tmp60_ < _tmp61_)) {
					break;
				}
				_tmp62_ = _method_list;
				_tmp63_ = _method_index;
				_tmp64_ = vala_list_get (_tmp62_, _tmp63_);
				method = (GtkdocDBusMember*) _tmp64_;
				_tmp65_ = builder;
				_tmp66_ = method;
				_tmp67_ = method_indent;
				_tmp68_ = gtkdoc_dbus_member_to_string (_tmp66_, _tmp67_, TRUE);
				_tmp69_ = _tmp68_;
				g_string_append (_tmp65_, _tmp69_);
				_g_free0 (_tmp69_);
				_gtkdoc_dbus_member_unref0 (method);
			}
			_vala_iterable_unref0 (_method_list);
		}
		_tmp70_ = builder;
		g_string_append (_tmp70_, "</synopsis></refsynopsisdiv>");
	}
	_tmp71_ = self->signals;
	_tmp72_ = vala_collection_get_size ((ValaCollection*) _tmp71_);
	_tmp73_ = _tmp72_;
	if (_tmp73_ > 0) {
		GString* _tmp74_;
		const gchar* _tmp75_;
		GString* _tmp92_;
		_tmp74_ = builder;
		_tmp75_ = docbook_id;
		g_string_append_printf (_tmp74_, "\n" \
"<refsynopsisdiv id=\"docs-%s.signals\" role=\"signal_proto\">\n" \
"<title role=\"signal_proto.title\">Signals</title>\n" \
"<synopsis>", _tmp75_);
		{
			ValaList* _sig_list = NULL;
			ValaList* _tmp76_;
			ValaList* _tmp77_;
			gint _sig_size = 0;
			ValaList* _tmp78_;
			gint _tmp79_;
			gint _tmp80_;
			gint _sig_index = 0;
			_tmp76_ = self->signals;
			_tmp77_ = _vala_iterable_ref0 (_tmp76_);
			_sig_list = _tmp77_;
			_tmp78_ = _sig_list;
			_tmp79_ = vala_collection_get_size ((ValaCollection*) _tmp78_);
			_tmp80_ = _tmp79_;
			_sig_size = _tmp80_;
			_sig_index = -1;
			while (TRUE) {
				gint _tmp81_;
				gint _tmp82_;
				gint _tmp83_;
				GtkdocDBusMember* sig = NULL;
				ValaList* _tmp84_;
				gint _tmp85_;
				gpointer _tmp86_;
				GString* _tmp87_;
				GtkdocDBusMember* _tmp88_;
				gint _tmp89_;
				gchar* _tmp90_;
				gchar* _tmp91_;
				_tmp81_ = _sig_index;
				_sig_index = _tmp81_ + 1;
				_tmp82_ = _sig_index;
				_tmp83_ = _sig_size;
				if (!(_tmp82_ < _tmp83_)) {
					break;
				}
				_tmp84_ = _sig_list;
				_tmp85_ = _sig_index;
				_tmp86_ = vala_list_get (_tmp84_, _tmp85_);
				sig = (GtkdocDBusMember*) _tmp86_;
				_tmp87_ = builder;
				_tmp88_ = sig;
				_tmp89_ = signal_indent;
				_tmp90_ = gtkdoc_dbus_member_to_string (_tmp88_, _tmp89_, TRUE);
				_tmp91_ = _tmp90_;
				g_string_append (_tmp87_, _tmp91_);
				_g_free0 (_tmp91_);
				_gtkdoc_dbus_member_unref0 (sig);
			}
			_vala_iterable_unref0 (_sig_list);
		}
		_tmp92_ = builder;
		g_string_append (_tmp92_, "</synopsis></refsynopsisdiv>");
	}
	_tmp93_ = builder;
	_tmp94_ = docbook_id;
	_tmp95_ = self->description;
	g_string_append_printf (_tmp93_, "\n" \
"<refsect1 id=\"docs-%s.description\" role=\"desc\">\n" \
"<title role=\"desc.title\">Description</title>\n" \
"%s\n" \
"</refsect1>", _tmp94_, _tmp95_);
	_tmp96_ = self->methods;
	_tmp97_ = vala_collection_get_size ((ValaCollection*) _tmp96_);
	_tmp98_ = _tmp97_;
	if (_tmp98_ > 0) {
		GString* _tmp99_;
		const gchar* _tmp100_;
		GString* _tmp131_;
		_tmp99_ = builder;
		_tmp100_ = docbook_id;
		g_string_append_printf (_tmp99_, "\n" \
"<refsect1 id=\"docs-%s.details\" role=\"details\">\n" \
"<title role=\"details.title\">Details</title>", _tmp100_);
		{
			ValaList* _method_list = NULL;
			ValaList* _tmp101_;
			ValaList* _tmp102_;
			gint _method_size = 0;
			ValaList* _tmp103_;
			gint _tmp104_;
			gint _tmp105_;
			gint _method_index = 0;
			_tmp101_ = self->methods;
			_tmp102_ = _vala_iterable_ref0 (_tmp101_);
			_method_list = _tmp102_;
			_tmp103_ = _method_list;
			_tmp104_ = vala_collection_get_size ((ValaCollection*) _tmp103_);
			_tmp105_ = _tmp104_;
			_method_size = _tmp105_;
			_method_index = -1;
			while (TRUE) {
				gint _tmp106_;
				gint _tmp107_;
				gint _tmp108_;
				GtkdocDBusMember* method = NULL;
				ValaList* _tmp109_;
				gint _tmp110_;
				gpointer _tmp111_;
				gchar* _tmp112_ = NULL;
				GtkdocDBusMember* _tmp113_;
				GtkdocGComment* _tmp114_;
				GString* _tmp120_;
				const gchar* _tmp121_;
				GtkdocDBusMember* _tmp122_;
				gchar* _tmp123_;
				gchar* _tmp124_;
				GtkdocDBusMember* _tmp125_;
				const gchar* _tmp126_;
				GtkdocDBusMember* _tmp127_;
				gint _tmp128_;
				gchar* _tmp129_;
				gchar* _tmp130_;
				_tmp106_ = _method_index;
				_method_index = _tmp106_ + 1;
				_tmp107_ = _method_index;
				_tmp108_ = _method_size;
				if (!(_tmp107_ < _tmp108_)) {
					break;
				}
				_tmp109_ = _method_list;
				_tmp110_ = _method_index;
				_tmp111_ = vala_list_get (_tmp109_, _tmp110_);
				method = (GtkdocDBusMember*) _tmp111_;
				_tmp113_ = method;
				_tmp114_ = _tmp113_->comment;
				if (_tmp114_ != NULL) {
					GtkdocDBusMember* _tmp115_;
					GtkdocGComment* _tmp116_;
					ValadocErrorReporter* _tmp117_;
					gchar* _tmp118_;
					_tmp115_ = method;
					_tmp116_ = _tmp115_->comment;
					_tmp117_ = reporter;
					_tmp118_ = gtkdoc_gcomment_to_docbook (_tmp116_, _tmp117_);
					_g_free0 (_tmp112_);
					_tmp112_ = _tmp118_;
				} else {
					gchar* _tmp119_;
					_tmp119_ = g_strdup ("");
					_g_free0 (_tmp112_);
					_tmp112_ = _tmp119_;
				}
				_tmp120_ = builder;
				_tmp121_ = docbook_id;
				_tmp122_ = method;
				_tmp123_ = gtkdoc_dbus_member_get_docbook_id (_tmp122_);
				_tmp124_ = _tmp123_;
				_tmp125_ = method;
				_tmp126_ = _tmp125_->name;
				_tmp127_ = method;
				_tmp128_ = method_indent;
				_tmp129_ = gtkdoc_dbus_member_to_string (_tmp127_, _tmp128_, FALSE);
				_tmp130_ = _tmp129_;
				g_string_append_printf (_tmp120_, "\n" \
"<refsect2 id=\"%s-%s\" role=\"function\">\n" \
"<title>%s ()</title>\n" \
"<programlisting>%s\n" \
"</programlisting>\n" \
"%s\n" \
"</refsect2>", _tmp121_, _tmp124_, _tmp126_, _tmp130_, _tmp112_);
				_g_free0 (_tmp130_);
				_g_free0 (_tmp124_);
				_g_free0 (_tmp112_);
				_gtkdoc_dbus_member_unref0 (method);
			}
			_vala_iterable_unref0 (_method_list);
		}
		_tmp131_ = builder;
		g_string_append (_tmp131_, "</refsect1>");
	}
	_tmp132_ = self->signals;
	_tmp133_ = vala_collection_get_size ((ValaCollection*) _tmp132_);
	_tmp134_ = _tmp133_;
	if (_tmp134_ > 0) {
		GString* _tmp135_;
		const gchar* _tmp136_;
		GString* _tmp167_;
		_tmp135_ = builder;
		_tmp136_ = docbook_id;
		g_string_append_printf (_tmp135_, "\n" \
"<refsect1 id=\"docs-%s.signal-details\" role=\"signals\">\n" \
"<title role=\"signals.title\">Signal Details</title>", _tmp136_);
		{
			ValaList* _sig_list = NULL;
			ValaList* _tmp137_;
			ValaList* _tmp138_;
			gint _sig_size = 0;
			ValaList* _tmp139_;
			gint _tmp140_;
			gint _tmp141_;
			gint _sig_index = 0;
			_tmp137_ = self->signals;
			_tmp138_ = _vala_iterable_ref0 (_tmp137_);
			_sig_list = _tmp138_;
			_tmp139_ = _sig_list;
			_tmp140_ = vala_collection_get_size ((ValaCollection*) _tmp139_);
			_tmp141_ = _tmp140_;
			_sig_size = _tmp141_;
			_sig_index = -1;
			while (TRUE) {
				gint _tmp142_;
				gint _tmp143_;
				gint _tmp144_;
				GtkdocDBusMember* sig = NULL;
				ValaList* _tmp145_;
				gint _tmp146_;
				gpointer _tmp147_;
				gchar* _tmp148_ = NULL;
				GtkdocDBusMember* _tmp149_;
				GtkdocGComment* _tmp150_;
				GString* _tmp156_;
				const gchar* _tmp157_;
				GtkdocDBusMember* _tmp158_;
				gchar* _tmp159_;
				gchar* _tmp160_;
				GtkdocDBusMember* _tmp161_;
				const gchar* _tmp162_;
				GtkdocDBusMember* _tmp163_;
				gint _tmp164_;
				gchar* _tmp165_;
				gchar* _tmp166_;
				_tmp142_ = _sig_index;
				_sig_index = _tmp142_ + 1;
				_tmp143_ = _sig_index;
				_tmp144_ = _sig_size;
				if (!(_tmp143_ < _tmp144_)) {
					break;
				}
				_tmp145_ = _sig_list;
				_tmp146_ = _sig_index;
				_tmp147_ = vala_list_get (_tmp145_, _tmp146_);
				sig = (GtkdocDBusMember*) _tmp147_;
				_tmp149_ = sig;
				_tmp150_ = _tmp149_->comment;
				if (_tmp150_ != NULL) {
					GtkdocDBusMember* _tmp151_;
					GtkdocGComment* _tmp152_;
					ValadocErrorReporter* _tmp153_;
					gchar* _tmp154_;
					_tmp151_ = sig;
					_tmp152_ = _tmp151_->comment;
					_tmp153_ = reporter;
					_tmp154_ = gtkdoc_gcomment_to_docbook (_tmp152_, _tmp153_);
					_g_free0 (_tmp148_);
					_tmp148_ = _tmp154_;
				} else {
					gchar* _tmp155_;
					_tmp155_ = g_strdup ("");
					_g_free0 (_tmp148_);
					_tmp148_ = _tmp155_;
				}
				_tmp156_ = builder;
				_tmp157_ = docbook_id;
				_tmp158_ = sig;
				_tmp159_ = gtkdoc_dbus_member_get_docbook_id (_tmp158_);
				_tmp160_ = _tmp159_;
				_tmp161_ = sig;
				_tmp162_ = _tmp161_->name;
				_tmp163_ = sig;
				_tmp164_ = signal_indent;
				_tmp165_ = gtkdoc_dbus_member_to_string (_tmp163_, _tmp164_, FALSE);
				_tmp166_ = _tmp165_;
				g_string_append_printf (_tmp156_, "\n" \
"<refsect2 id=\"%s-%s\" role=\"signal\">\n" \
"<title>The <literal>%s</literal> signal</title>\n" \
"<programlisting>%s\n" \
"</programlisting>\n" \
"%s\n" \
"</refsect2>", _tmp157_, _tmp160_, _tmp162_, _tmp166_, _tmp148_);
				_g_free0 (_tmp166_);
				_g_free0 (_tmp160_);
				_g_free0 (_tmp148_);
				_gtkdoc_dbus_member_unref0 (sig);
			}
			_vala_iterable_unref0 (_sig_list);
		}
		_tmp167_ = builder;
		g_string_append (_tmp167_, "</refsect1>");
	}
	_tmp168_ = builder;
	g_string_append (_tmp168_, "</refentry>");
	_tmp169_ = builder;
	_tmp170_ = _tmp169_->str;
	_tmp171_ = g_strdup (_tmp170_);
	result = _tmp171_;
	_g_free0 (docbook_id);
	_g_string_free0 (builder);
	return result;
}


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


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


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


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


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


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


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


void gtkdoc_dbus_value_set_interface (GValue* value, gpointer v_object) {
	GtkdocDBusInterface * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GTKDOC_DBUS_TYPE_INTERFACE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GTKDOC_DBUS_TYPE_INTERFACE));
		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;
		gtkdoc_dbus_interface_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		gtkdoc_dbus_interface_unref (old);
	}
}


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


static void gtkdoc_dbus_interface_class_init (GtkdocDBusInterfaceClass * klass) {
	gtkdoc_dbus_interface_parent_class = g_type_class_peek_parent (klass);
	((GtkdocDBusInterfaceClass *) klass)->finalize = gtkdoc_dbus_interface_finalize;
}


static void gtkdoc_dbus_interface_instance_init (GtkdocDBusInterface * self) {
	GEqualFunc _tmp0_;
	ValaArrayList* _tmp1_;
	GEqualFunc _tmp2_;
	ValaArrayList* _tmp3_;
	_tmp0_ = g_direct_equal;
	_tmp1_ = vala_array_list_new (GTKDOC_DBUS_TYPE_MEMBER, (GBoxedCopyFunc) gtkdoc_dbus_member_ref, (GDestroyNotify) gtkdoc_dbus_member_unref, _tmp0_);
	self->methods = (ValaList*) _tmp1_;
	_tmp2_ = g_direct_equal;
	_tmp3_ = vala_array_list_new (GTKDOC_DBUS_TYPE_MEMBER, (GBoxedCopyFunc) gtkdoc_dbus_member_ref, (GDestroyNotify) gtkdoc_dbus_member_unref, _tmp2_);
	self->signals = (ValaList*) _tmp3_;
	self->ref_count = 1;
}


static void gtkdoc_dbus_interface_finalize (GtkdocDBusInterface * obj) {
	GtkdocDBusInterface * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GTKDOC_DBUS_TYPE_INTERFACE, GtkdocDBusInterface);
	g_signal_handlers_destroy (self);
	_g_free0 (self->package_name);
	_g_free0 (self->name);
	_g_free0 (self->purpose);
	_g_free0 (self->description);
	_vala_iterable_unref0 (self->methods);
	_vala_iterable_unref0 (self->signals);
}


GType gtkdoc_dbus_interface_get_type (void) {
	static volatile gsize gtkdoc_dbus_interface_type_id__volatile = 0;
	if (g_once_init_enter (&gtkdoc_dbus_interface_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { gtkdoc_dbus_value_interface_init, gtkdoc_dbus_value_interface_free_value, gtkdoc_dbus_value_interface_copy_value, gtkdoc_dbus_value_interface_peek_pointer, "p", gtkdoc_dbus_value_interface_collect_value, "p", gtkdoc_dbus_value_interface_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (GtkdocDBusInterfaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gtkdoc_dbus_interface_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GtkdocDBusInterface), 0, (GInstanceInitFunc) gtkdoc_dbus_interface_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 gtkdoc_dbus_interface_type_id;
		gtkdoc_dbus_interface_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GtkdocDBusInterface", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&gtkdoc_dbus_interface_type_id__volatile, gtkdoc_dbus_interface_type_id);
	}
	return gtkdoc_dbus_interface_type_id__volatile;
}


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


void gtkdoc_dbus_interface_unref (gpointer instance) {
	GtkdocDBusInterface * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		GTKDOC_DBUS_INTERFACE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}



