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

#include "xmpp-vala.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	XMPP_FLAG_IDENTITY_0_PROPERTY,
	XMPP_FLAG_IDENTITY_T_TYPE,
	XMPP_FLAG_IDENTITY_T_DUP_FUNC,
	XMPP_FLAG_IDENTITY_T_DESTROY_FUNC,
	XMPP_FLAG_IDENTITY_NS_PROPERTY,
	XMPP_FLAG_IDENTITY_ID_PROPERTY,
	XMPP_FLAG_IDENTITY_NUM_PROPERTIES
};
static GParamSpec* xmpp_flag_identity_properties[XMPP_FLAG_IDENTITY_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	XMPP_XMPP_STREAM_FLAG_0_PROPERTY,
	XMPP_XMPP_STREAM_FLAG_NUM_PROPERTIES
};
static GParamSpec* xmpp_xmpp_stream_flag_properties[XMPP_XMPP_STREAM_FLAG_NUM_PROPERTIES];
enum  {
	XMPP_MODULE_IDENTITY_0_PROPERTY,
	XMPP_MODULE_IDENTITY_T_TYPE,
	XMPP_MODULE_IDENTITY_T_DUP_FUNC,
	XMPP_MODULE_IDENTITY_T_DESTROY_FUNC,
	XMPP_MODULE_IDENTITY_NS_PROPERTY,
	XMPP_MODULE_IDENTITY_ID_PROPERTY,
	XMPP_MODULE_IDENTITY_NUM_PROPERTIES
};
static GParamSpec* xmpp_module_identity_properties[XMPP_MODULE_IDENTITY_NUM_PROPERTIES];
enum  {
	XMPP_XMPP_STREAM_MODULE_0_PROPERTY,
	XMPP_XMPP_STREAM_MODULE_NUM_PROPERTIES
};
static GParamSpec* xmpp_xmpp_stream_module_properties[XMPP_XMPP_STREAM_MODULE_NUM_PROPERTIES];
enum  {
	XMPP_XMPP_STREAM_NEGOTIATION_MODULE_0_PROPERTY,
	XMPP_XMPP_STREAM_NEGOTIATION_MODULE_NUM_PROPERTIES
};
static GParamSpec* xmpp_xmpp_stream_negotiation_module_properties[XMPP_XMPP_STREAM_NEGOTIATION_MODULE_NUM_PROPERTIES];

struct _XmppFlagIdentityPrivate {
	GType t_type;
	GBoxedCopyFunc t_dup_func;
	GDestroyNotify t_destroy_func;
	gchar* _ns;
	gchar* _id;
};

struct _XmppModuleIdentityPrivate {
	GType t_type;
	GBoxedCopyFunc t_dup_func;
	GDestroyNotify t_destroy_func;
	gchar* _ns;
	gchar* _id;
};

static gint XmppFlagIdentity_private_offset;
static gpointer xmpp_flag_identity_parent_class = NULL;
static gpointer xmpp_xmpp_stream_flag_parent_class = NULL;
static gint XmppModuleIdentity_private_offset;
static gpointer xmpp_module_identity_parent_class = NULL;
static gpointer xmpp_xmpp_stream_module_parent_class = NULL;
static gpointer xmpp_xmpp_stream_negotiation_module_parent_class = NULL;

static void xmpp_flag_identity_set_ns (XmppFlagIdentity* self,
                                const gchar* value);
static void xmpp_flag_identity_set_id (XmppFlagIdentity* self,
                                const gchar* value);
static void xmpp_flag_identity_finalize (GObject * obj);
static GType xmpp_flag_identity_get_type_once (void);
static void _vala_xmpp_flag_identity_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);
static void _vala_xmpp_flag_identity_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec);
static gchar* xmpp_xmpp_stream_flag_real_get_ns (XmppXmppStreamFlag* self);
static gchar* xmpp_xmpp_stream_flag_real_get_id (XmppXmppStreamFlag* self);
static GType xmpp_xmpp_stream_flag_get_type_once (void);
static void xmpp_module_identity_set_ns (XmppModuleIdentity* self,
                                  const gchar* value);
static void xmpp_module_identity_set_id (XmppModuleIdentity* self,
                                  const gchar* value);
static void xmpp_module_identity_finalize (GObject * obj);
static GType xmpp_module_identity_get_type_once (void);
static void _vala_xmpp_module_identity_get_property (GObject * object,
                                              guint property_id,
                                              GValue * value,
                                              GParamSpec * pspec);
static void _vala_xmpp_module_identity_set_property (GObject * object,
                                              guint property_id,
                                              const GValue * value,
                                              GParamSpec * pspec);
static void xmpp_xmpp_stream_module_real_attach (XmppXmppStreamModule* self,
                                          XmppXmppStream* stream);
static void xmpp_xmpp_stream_module_real_detach (XmppXmppStreamModule* self,
                                          XmppXmppStream* stream);
static gchar* xmpp_xmpp_stream_module_real_get_ns (XmppXmppStreamModule* self);
static gchar* xmpp_xmpp_stream_module_real_get_id (XmppXmppStreamModule* self);
static GType xmpp_xmpp_stream_module_get_type_once (void);
static gboolean xmpp_xmpp_stream_negotiation_module_real_mandatory_outstanding (XmppXmppStreamNegotiationModule* self,
                                                                         XmppXmppStream* stream);
static gboolean xmpp_xmpp_stream_negotiation_module_real_negotiation_active (XmppXmppStreamNegotiationModule* self,
                                                                      XmppXmppStream* stream);
static GType xmpp_xmpp_stream_negotiation_module_get_type_once (void);

static inline gpointer
xmpp_flag_identity_get_instance_private (XmppFlagIdentity* self)
{
	return G_STRUCT_MEMBER_P (self, XmppFlagIdentity_private_offset);
}

XmppFlagIdentity*
xmpp_flag_identity_construct (GType object_type,
                              GType t_type,
                              GBoxedCopyFunc t_dup_func,
                              GDestroyNotify t_destroy_func,
                              const gchar* ns,
                              const gchar* id)
{
	XmppFlagIdentity * self = NULL;
	g_return_val_if_fail (ns != NULL, NULL);
	g_return_val_if_fail (id != NULL, NULL);
	self = (XmppFlagIdentity*) g_object_new (object_type, "t-type", t_type, "t-dup-func", t_dup_func, "t-destroy-func", t_destroy_func, NULL);
	self->priv->t_type = t_type;
	self->priv->t_dup_func = t_dup_func;
	self->priv->t_destroy_func = t_destroy_func;
	xmpp_flag_identity_set_ns (self, ns);
	xmpp_flag_identity_set_id (self, id);
	return self;
}

XmppFlagIdentity*
xmpp_flag_identity_new (GType t_type,
                        GBoxedCopyFunc t_dup_func,
                        GDestroyNotify t_destroy_func,
                        const gchar* ns,
                        const gchar* id)
{
	return xmpp_flag_identity_construct (XMPP_TYPE_FLAG_IDENTITY, t_type, t_dup_func, t_destroy_func, ns, id);
}

gpointer
xmpp_flag_identity_cast (XmppFlagIdentity* self,
                         XmppXmppStreamFlag* flag)
{
	gconstpointer _tmp0_ = NULL;
	gpointer _tmp1_;
	gpointer result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (flag != NULL, NULL);
	if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) flag), self->priv->t_type)) {
		_tmp0_ = (gconstpointer) flag;
	} else {
		_tmp0_ = NULL;
	}
	_tmp1_ = ((_tmp0_ != NULL) && (self->priv->t_dup_func != NULL)) ? self->priv->t_dup_func ((gpointer) _tmp0_) : ((gpointer) _tmp0_);
	result = _tmp1_;
	return result;
}

gboolean
xmpp_flag_identity_matches (XmppFlagIdentity* self,
                            XmppXmppStreamFlag* module)
{
	gboolean _tmp0_ = FALSE;
	gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (module != NULL, FALSE);
	_tmp1_ = xmpp_xmpp_stream_flag_get_ns (module);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_ns;
	_tmp4_ = g_strcmp0 (_tmp2_, _tmp3_) == 0;
	_g_free0 (_tmp2_);
	if (_tmp4_) {
		gchar* _tmp5_;
		gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = xmpp_xmpp_stream_flag_get_id (module);
		_tmp6_ = _tmp5_;
		_tmp7_ = self->priv->_id;
		_tmp0_ = g_strcmp0 (_tmp6_, _tmp7_) == 0;
		_g_free0 (_tmp6_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

const gchar*
xmpp_flag_identity_get_ns (XmppFlagIdentity* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_ns;
	result = _tmp0_;
	return result;
}

static void
xmpp_flag_identity_set_ns (XmppFlagIdentity* self,
                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = xmpp_flag_identity_get_ns (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_ns);
		self->priv->_ns = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, xmpp_flag_identity_properties[XMPP_FLAG_IDENTITY_NS_PROPERTY]);
	}
}

const gchar*
xmpp_flag_identity_get_id (XmppFlagIdentity* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}

static void
xmpp_flag_identity_set_id (XmppFlagIdentity* self,
                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = xmpp_flag_identity_get_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_id);
		self->priv->_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, xmpp_flag_identity_properties[XMPP_FLAG_IDENTITY_ID_PROPERTY]);
	}
}

static void
xmpp_flag_identity_class_init (XmppFlagIdentityClass * klass,
                               gpointer klass_data)
{
	xmpp_flag_identity_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &XmppFlagIdentity_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_flag_identity_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_flag_identity_set_property;
	G_OBJECT_CLASS (klass)->finalize = xmpp_flag_identity_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_FLAG_IDENTITY_T_TYPE, g_param_spec_gtype ("t-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_FLAG_IDENTITY_T_DUP_FUNC, g_param_spec_pointer ("t-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_FLAG_IDENTITY_T_DESTROY_FUNC, g_param_spec_pointer ("t-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_FLAG_IDENTITY_NS_PROPERTY, xmpp_flag_identity_properties[XMPP_FLAG_IDENTITY_NS_PROPERTY] = g_param_spec_string ("ns", "ns", "ns", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_FLAG_IDENTITY_ID_PROPERTY, xmpp_flag_identity_properties[XMPP_FLAG_IDENTITY_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
xmpp_flag_identity_instance_init (XmppFlagIdentity * self,
                                  gpointer klass)
{
	self->priv = xmpp_flag_identity_get_instance_private (self);
}

static void
xmpp_flag_identity_finalize (GObject * obj)
{
	XmppFlagIdentity * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_TYPE_FLAG_IDENTITY, XmppFlagIdentity);
	_g_free0 (self->priv->_ns);
	_g_free0 (self->priv->_id);
	G_OBJECT_CLASS (xmpp_flag_identity_parent_class)->finalize (obj);
}

static GType
xmpp_flag_identity_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppFlagIdentityClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_flag_identity_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppFlagIdentity), 0, (GInstanceInitFunc) xmpp_flag_identity_instance_init, NULL };
	GType xmpp_flag_identity_type_id;
	xmpp_flag_identity_type_id = g_type_register_static (G_TYPE_OBJECT, "XmppFlagIdentity", &g_define_type_info, 0);
	XmppFlagIdentity_private_offset = g_type_add_instance_private (xmpp_flag_identity_type_id, sizeof (XmppFlagIdentityPrivate));
	return xmpp_flag_identity_type_id;
}

GType
xmpp_flag_identity_get_type (void)
{
	static volatile gsize xmpp_flag_identity_type_id__once = 0;
	if (g_once_init_enter (&xmpp_flag_identity_type_id__once)) {
		GType xmpp_flag_identity_type_id;
		xmpp_flag_identity_type_id = xmpp_flag_identity_get_type_once ();
		g_once_init_leave (&xmpp_flag_identity_type_id__once, xmpp_flag_identity_type_id);
	}
	return xmpp_flag_identity_type_id__once;
}

static void
_vala_xmpp_flag_identity_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	XmppFlagIdentity * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_TYPE_FLAG_IDENTITY, XmppFlagIdentity);
	switch (property_id) {
		case XMPP_FLAG_IDENTITY_NS_PROPERTY:
		g_value_set_string (value, xmpp_flag_identity_get_ns (self));
		break;
		case XMPP_FLAG_IDENTITY_ID_PROPERTY:
		g_value_set_string (value, xmpp_flag_identity_get_id (self));
		break;
		case XMPP_FLAG_IDENTITY_T_TYPE:
		g_value_set_gtype (value, self->priv->t_type);
		break;
		case XMPP_FLAG_IDENTITY_T_DUP_FUNC:
		g_value_set_pointer (value, self->priv->t_dup_func);
		break;
		case XMPP_FLAG_IDENTITY_T_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->t_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_flag_identity_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec)
{
	XmppFlagIdentity * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_TYPE_FLAG_IDENTITY, XmppFlagIdentity);
	switch (property_id) {
		case XMPP_FLAG_IDENTITY_NS_PROPERTY:
		xmpp_flag_identity_set_ns (self, g_value_get_string (value));
		break;
		case XMPP_FLAG_IDENTITY_ID_PROPERTY:
		xmpp_flag_identity_set_id (self, g_value_get_string (value));
		break;
		case XMPP_FLAG_IDENTITY_T_TYPE:
		self->priv->t_type = g_value_get_gtype (value);
		break;
		case XMPP_FLAG_IDENTITY_T_DUP_FUNC:
		self->priv->t_dup_func = g_value_get_pointer (value);
		break;
		case XMPP_FLAG_IDENTITY_T_DESTROY_FUNC:
		self->priv->t_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static gchar*
xmpp_xmpp_stream_flag_real_get_ns (XmppXmppStreamFlag* self)
{
	g_critical ("Type `%s' does not implement abstract method `xmpp_xmpp_stream_flag_get_ns'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

gchar*
xmpp_xmpp_stream_flag_get_ns (XmppXmppStreamFlag* self)
{
	XmppXmppStreamFlagClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = XMPP_XMPP_STREAM_FLAG_GET_CLASS (self);
	if (_klass_->get_ns) {
		return _klass_->get_ns (self);
	}
	return NULL;
}

static gchar*
xmpp_xmpp_stream_flag_real_get_id (XmppXmppStreamFlag* self)
{
	g_critical ("Type `%s' does not implement abstract method `xmpp_xmpp_stream_flag_get_id'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

gchar*
xmpp_xmpp_stream_flag_get_id (XmppXmppStreamFlag* self)
{
	XmppXmppStreamFlagClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = XMPP_XMPP_STREAM_FLAG_GET_CLASS (self);
	if (_klass_->get_id) {
		return _klass_->get_id (self);
	}
	return NULL;
}

XmppXmppStreamFlag*
xmpp_xmpp_stream_flag_construct (GType object_type)
{
	XmppXmppStreamFlag * self = NULL;
	self = (XmppXmppStreamFlag*) g_object_new (object_type, NULL);
	return self;
}

static void
xmpp_xmpp_stream_flag_class_init (XmppXmppStreamFlagClass * klass,
                                  gpointer klass_data)
{
	xmpp_xmpp_stream_flag_parent_class = g_type_class_peek_parent (klass);
	((XmppXmppStreamFlagClass *) klass)->get_ns = (gchar* (*) (XmppXmppStreamFlag*)) xmpp_xmpp_stream_flag_real_get_ns;
	((XmppXmppStreamFlagClass *) klass)->get_id = (gchar* (*) (XmppXmppStreamFlag*)) xmpp_xmpp_stream_flag_real_get_id;
}

static void
xmpp_xmpp_stream_flag_instance_init (XmppXmppStreamFlag * self,
                                     gpointer klass)
{
}

static GType
xmpp_xmpp_stream_flag_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXmppStreamFlagClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xmpp_stream_flag_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXmppStreamFlag), 0, (GInstanceInitFunc) xmpp_xmpp_stream_flag_instance_init, NULL };
	GType xmpp_xmpp_stream_flag_type_id;
	xmpp_xmpp_stream_flag_type_id = g_type_register_static (G_TYPE_OBJECT, "XmppXmppStreamFlag", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return xmpp_xmpp_stream_flag_type_id;
}

GType
xmpp_xmpp_stream_flag_get_type (void)
{
	static volatile gsize xmpp_xmpp_stream_flag_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xmpp_stream_flag_type_id__once)) {
		GType xmpp_xmpp_stream_flag_type_id;
		xmpp_xmpp_stream_flag_type_id = xmpp_xmpp_stream_flag_get_type_once ();
		g_once_init_leave (&xmpp_xmpp_stream_flag_type_id__once, xmpp_xmpp_stream_flag_type_id);
	}
	return xmpp_xmpp_stream_flag_type_id__once;
}

static inline gpointer
xmpp_module_identity_get_instance_private (XmppModuleIdentity* self)
{
	return G_STRUCT_MEMBER_P (self, XmppModuleIdentity_private_offset);
}

XmppModuleIdentity*
xmpp_module_identity_construct (GType object_type,
                                GType t_type,
                                GBoxedCopyFunc t_dup_func,
                                GDestroyNotify t_destroy_func,
                                const gchar* ns,
                                const gchar* id)
{
	XmppModuleIdentity * self = NULL;
	g_return_val_if_fail (ns != NULL, NULL);
	g_return_val_if_fail (id != NULL, NULL);
	self = (XmppModuleIdentity*) g_object_new (object_type, "t-type", t_type, "t-dup-func", t_dup_func, "t-destroy-func", t_destroy_func, NULL);
	self->priv->t_type = t_type;
	self->priv->t_dup_func = t_dup_func;
	self->priv->t_destroy_func = t_destroy_func;
	xmpp_module_identity_set_ns (self, ns);
	xmpp_module_identity_set_id (self, id);
	return self;
}

XmppModuleIdentity*
xmpp_module_identity_new (GType t_type,
                          GBoxedCopyFunc t_dup_func,
                          GDestroyNotify t_destroy_func,
                          const gchar* ns,
                          const gchar* id)
{
	return xmpp_module_identity_construct (XMPP_TYPE_MODULE_IDENTITY, t_type, t_dup_func, t_destroy_func, ns, id);
}

gpointer
xmpp_module_identity_cast (XmppModuleIdentity* self,
                           XmppXmppStreamModule* module)
{
	gconstpointer _tmp0_ = NULL;
	gpointer _tmp1_;
	gpointer result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (module != NULL, NULL);
	if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) module), self->priv->t_type)) {
		_tmp0_ = (gconstpointer) module;
	} else {
		_tmp0_ = NULL;
	}
	_tmp1_ = ((_tmp0_ != NULL) && (self->priv->t_dup_func != NULL)) ? self->priv->t_dup_func ((gpointer) _tmp0_) : ((gpointer) _tmp0_);
	result = _tmp1_;
	return result;
}

gboolean
xmpp_module_identity_matches (XmppModuleIdentity* self,
                              XmppXmppStreamModule* module)
{
	gboolean _tmp0_ = FALSE;
	gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gboolean _tmp4_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (module != NULL, FALSE);
	_tmp1_ = xmpp_xmpp_stream_module_get_ns (module);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->_ns;
	_tmp4_ = g_strcmp0 (_tmp2_, _tmp3_) == 0;
	_g_free0 (_tmp2_);
	if (_tmp4_) {
		gchar* _tmp5_;
		gchar* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = xmpp_xmpp_stream_module_get_id (module);
		_tmp6_ = _tmp5_;
		_tmp7_ = self->priv->_id;
		_tmp0_ = g_strcmp0 (_tmp6_, _tmp7_) == 0;
		_g_free0 (_tmp6_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

const gchar*
xmpp_module_identity_get_ns (XmppModuleIdentity* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_ns;
	result = _tmp0_;
	return result;
}

static void
xmpp_module_identity_set_ns (XmppModuleIdentity* self,
                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = xmpp_module_identity_get_ns (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_ns);
		self->priv->_ns = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, xmpp_module_identity_properties[XMPP_MODULE_IDENTITY_NS_PROPERTY]);
	}
}

const gchar*
xmpp_module_identity_get_id (XmppModuleIdentity* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}

static void
xmpp_module_identity_set_id (XmppModuleIdentity* self,
                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = xmpp_module_identity_get_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_id);
		self->priv->_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, xmpp_module_identity_properties[XMPP_MODULE_IDENTITY_ID_PROPERTY]);
	}
}

static void
xmpp_module_identity_class_init (XmppModuleIdentityClass * klass,
                                 gpointer klass_data)
{
	xmpp_module_identity_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &XmppModuleIdentity_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_module_identity_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_module_identity_set_property;
	G_OBJECT_CLASS (klass)->finalize = xmpp_module_identity_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_MODULE_IDENTITY_T_TYPE, g_param_spec_gtype ("t-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_MODULE_IDENTITY_T_DUP_FUNC, g_param_spec_pointer ("t-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_MODULE_IDENTITY_T_DESTROY_FUNC, g_param_spec_pointer ("t-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_MODULE_IDENTITY_NS_PROPERTY, xmpp_module_identity_properties[XMPP_MODULE_IDENTITY_NS_PROPERTY] = g_param_spec_string ("ns", "ns", "ns", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_MODULE_IDENTITY_ID_PROPERTY, xmpp_module_identity_properties[XMPP_MODULE_IDENTITY_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
xmpp_module_identity_instance_init (XmppModuleIdentity * self,
                                    gpointer klass)
{
	self->priv = xmpp_module_identity_get_instance_private (self);
}

static void
xmpp_module_identity_finalize (GObject * obj)
{
	XmppModuleIdentity * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_TYPE_MODULE_IDENTITY, XmppModuleIdentity);
	_g_free0 (self->priv->_ns);
	_g_free0 (self->priv->_id);
	G_OBJECT_CLASS (xmpp_module_identity_parent_class)->finalize (obj);
}

static GType
xmpp_module_identity_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppModuleIdentityClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_module_identity_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppModuleIdentity), 0, (GInstanceInitFunc) xmpp_module_identity_instance_init, NULL };
	GType xmpp_module_identity_type_id;
	xmpp_module_identity_type_id = g_type_register_static (G_TYPE_OBJECT, "XmppModuleIdentity", &g_define_type_info, 0);
	XmppModuleIdentity_private_offset = g_type_add_instance_private (xmpp_module_identity_type_id, sizeof (XmppModuleIdentityPrivate));
	return xmpp_module_identity_type_id;
}

GType
xmpp_module_identity_get_type (void)
{
	static volatile gsize xmpp_module_identity_type_id__once = 0;
	if (g_once_init_enter (&xmpp_module_identity_type_id__once)) {
		GType xmpp_module_identity_type_id;
		xmpp_module_identity_type_id = xmpp_module_identity_get_type_once ();
		g_once_init_leave (&xmpp_module_identity_type_id__once, xmpp_module_identity_type_id);
	}
	return xmpp_module_identity_type_id__once;
}

static void
_vala_xmpp_module_identity_get_property (GObject * object,
                                         guint property_id,
                                         GValue * value,
                                         GParamSpec * pspec)
{
	XmppModuleIdentity * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_TYPE_MODULE_IDENTITY, XmppModuleIdentity);
	switch (property_id) {
		case XMPP_MODULE_IDENTITY_NS_PROPERTY:
		g_value_set_string (value, xmpp_module_identity_get_ns (self));
		break;
		case XMPP_MODULE_IDENTITY_ID_PROPERTY:
		g_value_set_string (value, xmpp_module_identity_get_id (self));
		break;
		case XMPP_MODULE_IDENTITY_T_TYPE:
		g_value_set_gtype (value, self->priv->t_type);
		break;
		case XMPP_MODULE_IDENTITY_T_DUP_FUNC:
		g_value_set_pointer (value, self->priv->t_dup_func);
		break;
		case XMPP_MODULE_IDENTITY_T_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->t_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_module_identity_set_property (GObject * object,
                                         guint property_id,
                                         const GValue * value,
                                         GParamSpec * pspec)
{
	XmppModuleIdentity * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_TYPE_MODULE_IDENTITY, XmppModuleIdentity);
	switch (property_id) {
		case XMPP_MODULE_IDENTITY_NS_PROPERTY:
		xmpp_module_identity_set_ns (self, g_value_get_string (value));
		break;
		case XMPP_MODULE_IDENTITY_ID_PROPERTY:
		xmpp_module_identity_set_id (self, g_value_get_string (value));
		break;
		case XMPP_MODULE_IDENTITY_T_TYPE:
		self->priv->t_type = g_value_get_gtype (value);
		break;
		case XMPP_MODULE_IDENTITY_T_DUP_FUNC:
		self->priv->t_dup_func = g_value_get_pointer (value);
		break;
		case XMPP_MODULE_IDENTITY_T_DESTROY_FUNC:
		self->priv->t_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
xmpp_xmpp_stream_module_real_attach (XmppXmppStreamModule* self,
                                     XmppXmppStream* stream)
{
	g_critical ("Type `%s' does not implement abstract method `xmpp_xmpp_stream_module_attach'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
xmpp_xmpp_stream_module_attach (XmppXmppStreamModule* self,
                                XmppXmppStream* stream)
{
	XmppXmppStreamModuleClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = XMPP_XMPP_STREAM_MODULE_GET_CLASS (self);
	if (_klass_->attach) {
		_klass_->attach (self, stream);
	}
}

static void
xmpp_xmpp_stream_module_real_detach (XmppXmppStreamModule* self,
                                     XmppXmppStream* stream)
{
	g_critical ("Type `%s' does not implement abstract method `xmpp_xmpp_stream_module_detach'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
xmpp_xmpp_stream_module_detach (XmppXmppStreamModule* self,
                                XmppXmppStream* stream)
{
	XmppXmppStreamModuleClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = XMPP_XMPP_STREAM_MODULE_GET_CLASS (self);
	if (_klass_->detach) {
		_klass_->detach (self, stream);
	}
}

static gchar*
xmpp_xmpp_stream_module_real_get_ns (XmppXmppStreamModule* self)
{
	g_critical ("Type `%s' does not implement abstract method `xmpp_xmpp_stream_module_get_ns'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

gchar*
xmpp_xmpp_stream_module_get_ns (XmppXmppStreamModule* self)
{
	XmppXmppStreamModuleClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = XMPP_XMPP_STREAM_MODULE_GET_CLASS (self);
	if (_klass_->get_ns) {
		return _klass_->get_ns (self);
	}
	return NULL;
}

static gchar*
xmpp_xmpp_stream_module_real_get_id (XmppXmppStreamModule* self)
{
	g_critical ("Type `%s' does not implement abstract method `xmpp_xmpp_stream_module_get_id'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

gchar*
xmpp_xmpp_stream_module_get_id (XmppXmppStreamModule* self)
{
	XmppXmppStreamModuleClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = XMPP_XMPP_STREAM_MODULE_GET_CLASS (self);
	if (_klass_->get_id) {
		return _klass_->get_id (self);
	}
	return NULL;
}

XmppXmppStreamModule*
xmpp_xmpp_stream_module_construct (GType object_type)
{
	XmppXmppStreamModule * self = NULL;
	self = (XmppXmppStreamModule*) g_object_new (object_type, NULL);
	return self;
}

static void
xmpp_xmpp_stream_module_class_init (XmppXmppStreamModuleClass * klass,
                                    gpointer klass_data)
{
	xmpp_xmpp_stream_module_parent_class = g_type_class_peek_parent (klass);
	((XmppXmppStreamModuleClass *) klass)->attach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xmpp_stream_module_real_attach;
	((XmppXmppStreamModuleClass *) klass)->detach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xmpp_stream_module_real_detach;
	((XmppXmppStreamModuleClass *) klass)->get_ns = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xmpp_stream_module_real_get_ns;
	((XmppXmppStreamModuleClass *) klass)->get_id = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xmpp_stream_module_real_get_id;
}

static void
xmpp_xmpp_stream_module_instance_init (XmppXmppStreamModule * self,
                                       gpointer klass)
{
}

static GType
xmpp_xmpp_stream_module_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXmppStreamModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xmpp_stream_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXmppStreamModule), 0, (GInstanceInitFunc) xmpp_xmpp_stream_module_instance_init, NULL };
	GType xmpp_xmpp_stream_module_type_id;
	xmpp_xmpp_stream_module_type_id = g_type_register_static (G_TYPE_OBJECT, "XmppXmppStreamModule", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return xmpp_xmpp_stream_module_type_id;
}

GType
xmpp_xmpp_stream_module_get_type (void)
{
	static volatile gsize xmpp_xmpp_stream_module_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xmpp_stream_module_type_id__once)) {
		GType xmpp_xmpp_stream_module_type_id;
		xmpp_xmpp_stream_module_type_id = xmpp_xmpp_stream_module_get_type_once ();
		g_once_init_leave (&xmpp_xmpp_stream_module_type_id__once, xmpp_xmpp_stream_module_type_id);
	}
	return xmpp_xmpp_stream_module_type_id__once;
}

static gboolean
xmpp_xmpp_stream_negotiation_module_real_mandatory_outstanding (XmppXmppStreamNegotiationModule* self,
                                                                XmppXmppStream* stream)
{
	gboolean _tmp0_ = FALSE;
	g_critical ("Type `%s' does not implement abstract method `xmpp_xmpp_stream_negotiation_module_mandatory_outstanding'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return _tmp0_;
}

gboolean
xmpp_xmpp_stream_negotiation_module_mandatory_outstanding (XmppXmppStreamNegotiationModule* self,
                                                           XmppXmppStream* stream)
{
	XmppXmppStreamNegotiationModuleClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = XMPP_XMPP_STREAM_NEGOTIATION_MODULE_GET_CLASS (self);
	if (_klass_->mandatory_outstanding) {
		return _klass_->mandatory_outstanding (self, stream);
	}
	return FALSE;
}

static gboolean
xmpp_xmpp_stream_negotiation_module_real_negotiation_active (XmppXmppStreamNegotiationModule* self,
                                                             XmppXmppStream* stream)
{
	gboolean _tmp0_ = FALSE;
	g_critical ("Type `%s' does not implement abstract method `xmpp_xmpp_stream_negotiation_module_negotiation_active'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return _tmp0_;
}

gboolean
xmpp_xmpp_stream_negotiation_module_negotiation_active (XmppXmppStreamNegotiationModule* self,
                                                        XmppXmppStream* stream)
{
	XmppXmppStreamNegotiationModuleClass* _klass_;
	g_return_val_if_fail (self != NULL, FALSE);
	_klass_ = XMPP_XMPP_STREAM_NEGOTIATION_MODULE_GET_CLASS (self);
	if (_klass_->negotiation_active) {
		return _klass_->negotiation_active (self, stream);
	}
	return FALSE;
}

XmppXmppStreamNegotiationModule*
xmpp_xmpp_stream_negotiation_module_construct (GType object_type)
{
	XmppXmppStreamNegotiationModule * self = NULL;
	self = (XmppXmppStreamNegotiationModule*) xmpp_xmpp_stream_module_construct (object_type);
	return self;
}

static void
xmpp_xmpp_stream_negotiation_module_class_init (XmppXmppStreamNegotiationModuleClass * klass,
                                                gpointer klass_data)
{
	xmpp_xmpp_stream_negotiation_module_parent_class = g_type_class_peek_parent (klass);
	((XmppXmppStreamNegotiationModuleClass *) klass)->mandatory_outstanding = (gboolean (*) (XmppXmppStreamNegotiationModule*, XmppXmppStream*)) xmpp_xmpp_stream_negotiation_module_real_mandatory_outstanding;
	((XmppXmppStreamNegotiationModuleClass *) klass)->negotiation_active = (gboolean (*) (XmppXmppStreamNegotiationModule*, XmppXmppStream*)) xmpp_xmpp_stream_negotiation_module_real_negotiation_active;
}

static void
xmpp_xmpp_stream_negotiation_module_instance_init (XmppXmppStreamNegotiationModule * self,
                                                   gpointer klass)
{
}

static GType
xmpp_xmpp_stream_negotiation_module_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXmppStreamNegotiationModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xmpp_stream_negotiation_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXmppStreamNegotiationModule), 0, (GInstanceInitFunc) xmpp_xmpp_stream_negotiation_module_instance_init, NULL };
	GType xmpp_xmpp_stream_negotiation_module_type_id;
	xmpp_xmpp_stream_negotiation_module_type_id = g_type_register_static (XMPP_TYPE_XMPP_STREAM_MODULE, "XmppXmppStreamNegotiationModule", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return xmpp_xmpp_stream_negotiation_module_type_id;
}

GType
xmpp_xmpp_stream_negotiation_module_get_type (void)
{
	static volatile gsize xmpp_xmpp_stream_negotiation_module_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xmpp_stream_negotiation_module_type_id__once)) {
		GType xmpp_xmpp_stream_negotiation_module_type_id;
		xmpp_xmpp_stream_negotiation_module_type_id = xmpp_xmpp_stream_negotiation_module_get_type_once ();
		g_once_init_leave (&xmpp_xmpp_stream_negotiation_module_type_id__once, xmpp_xmpp_stream_negotiation_module_type_id);
	}
	return xmpp_xmpp_stream_negotiation_module_type_id__once;
}

