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

#include "xmpp-vala.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.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_XEP_JINGLE_ICE_UDP_MODULE_0_PROPERTY,
	XMPP_XEP_JINGLE_ICE_UDP_MODULE_NS_URI_PROPERTY,
	XMPP_XEP_JINGLE_ICE_UDP_MODULE_TYPE__PROPERTY,
	XMPP_XEP_JINGLE_ICE_UDP_MODULE_PRIORITY_PROPERTY,
	XMPP_XEP_JINGLE_ICE_UDP_MODULE_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_jingle_ice_udp_module_properties[XMPP_XEP_JINGLE_ICE_UDP_MODULE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
typedef struct _XmppXepJingleIceUdpModuleIsTransportAvailableData XmppXepJingleIceUdpModuleIsTransportAvailableData;

struct _XmppXepJingleIceUdpModuleIsTransportAvailableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepJingleIceUdpModule* self;
	XmppXmppStream* stream;
	guint8 components;
	XmppJid* full_jid;
	gboolean result;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepServiceDiscoveryModule* _tmp2_;
	gboolean _tmp3_;
};

static gpointer xmpp_xep_jingle_ice_udp_module_parent_class = NULL;
XmppModuleIdentity* xmpp_xep_jingle_ice_udp_module_IDENTITY = NULL;
static XmppXepJingleTransportIface * xmpp_xep_jingle_ice_udp_module_xmpp_xep_jingle_transport_parent_iface = NULL;

static void xmpp_xep_jingle_ice_udp_module_real_attach (XmppXmppStreamModule* base,
                                                 XmppXmppStream* stream);
static void xmpp_xep_jingle_ice_udp_module_real_detach (XmppXmppStreamModule* base,
                                                 XmppXmppStream* stream);
static gchar* xmpp_xep_jingle_ice_udp_module_real_get_ns (XmppXmppStreamModule* base);
static gchar* xmpp_xep_jingle_ice_udp_module_real_get_id (XmppXmppStreamModule* base);
static void xmpp_xep_jingle_ice_udp_module_real_is_transport_available_data_free (gpointer _data);
static void xmpp_xep_jingle_ice_udp_module_real_is_transport_available (XmppXepJingleTransport* base,
                                                                 XmppXmppStream* stream,
                                                                 guint8 components,
                                                                 XmppJid* full_jid,
                                                                 GAsyncReadyCallback _callback_,
                                                                 gpointer _user_data_);
static gboolean xmpp_xep_jingle_ice_udp_module_real_is_transport_available_co (XmppXepJingleIceUdpModuleIsTransportAvailableData* _data_);
static void xmpp_xep_jingle_ice_udp_module_is_transport_available_ready (GObject* source_object,
                                                                  GAsyncResult* _res_,
                                                                  gpointer _user_data_);
static XmppXepJingleTransportParameters* xmpp_xep_jingle_ice_udp_module_real_create_transport_parameters (XmppXepJingleIceUdpModule* self,
                                                                                                   XmppXmppStream* stream,
                                                                                                   guint8 components,
                                                                                                   XmppJid* local_full_jid,
                                                                                                   XmppJid* peer_full_jid,
                                                                                                   GError** error);
static XmppXepJingleTransportParameters* xmpp_xep_jingle_ice_udp_module_real_parse_transport_parameters (XmppXepJingleIceUdpModule* self,
                                                                                                  XmppXmppStream* stream,
                                                                                                  guint8 components,
                                                                                                  XmppJid* local_full_jid,
                                                                                                  XmppJid* peer_full_jid,
                                                                                                  XmppStanzaNode* transport,
                                                                                                  GError** error);
static void xmpp_xep_jingle_ice_udp_module_finalize (GObject * obj);
static GType xmpp_xep_jingle_ice_udp_module_get_type_once (void);
static void _vala_xmpp_xep_jingle_ice_udp_module_get_property (GObject * object,
                                                        guint property_id,
                                                        GValue * value,
                                                        GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static void
xmpp_xep_jingle_ice_udp_module_real_attach (XmppXmppStreamModule* base,
                                            XmppXmppStream* stream)
{
	XmppXepJingleIceUdpModule * self;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepJingleModule* _tmp2_;
	XmppModuleIdentity* _tmp3_;
	gpointer _tmp4_;
	XmppXepServiceDiscoveryModule* _tmp5_;
	XmppModuleIdentity* _tmp6_;
	gpointer _tmp7_;
	XmppXepServiceDiscoveryModule* _tmp8_;
	self = (XmppXepJingleIceUdpModule*) base;
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmpp_xep_jingle_module_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_JINGLE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (XmppXepJingleModule*) _tmp1_;
	xmpp_xep_jingle_module_register_transport (_tmp2_, (XmppXepJingleTransport*) self);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp4_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp3_);
	_tmp5_ = (XmppXepServiceDiscoveryModule*) _tmp4_;
	xmpp_xep_service_discovery_module_add_feature (_tmp5_, stream, XMPP_XEP_JINGLE_ICE_UDP_NS_URI);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp7_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp6_);
	_tmp8_ = (XmppXepServiceDiscoveryModule*) _tmp7_;
	xmpp_xep_service_discovery_module_add_feature (_tmp8_, stream, XMPP_XEP_JINGLE_ICE_UDP_DTLS_NS_URI);
	_g_object_unref0 (_tmp8_);
}

static void
xmpp_xep_jingle_ice_udp_module_real_detach (XmppXmppStreamModule* base,
                                            XmppXmppStream* stream)
{
	XmppXepJingleIceUdpModule * self;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepServiceDiscoveryModule* _tmp2_;
	XmppModuleIdentity* _tmp3_;
	gpointer _tmp4_;
	XmppXepServiceDiscoveryModule* _tmp5_;
	self = (XmppXepJingleIceUdpModule*) base;
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (XmppXepServiceDiscoveryModule*) _tmp1_;
	xmpp_xep_service_discovery_module_remove_feature (_tmp2_, stream, XMPP_XEP_JINGLE_ICE_UDP_NS_URI);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp4_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp3_);
	_tmp5_ = (XmppXepServiceDiscoveryModule*) _tmp4_;
	xmpp_xep_service_discovery_module_remove_feature (_tmp5_, stream, XMPP_XEP_JINGLE_ICE_UDP_DTLS_NS_URI);
	_g_object_unref0 (_tmp5_);
}

static gchar*
xmpp_xep_jingle_ice_udp_module_real_get_ns (XmppXmppStreamModule* base)
{
	XmppXepJingleIceUdpModule * self;
	gchar* _tmp0_;
	gchar* result;
	self = (XmppXepJingleIceUdpModule*) base;
	_tmp0_ = g_strdup (XMPP_XEP_JINGLE_ICE_UDP_NS_URI);
	result = _tmp0_;
	return result;
}

static gchar*
xmpp_xep_jingle_ice_udp_module_real_get_id (XmppXmppStreamModule* base)
{
	XmppXepJingleIceUdpModule * self;
	XmppModuleIdentity* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	self = (XmppXepJingleIceUdpModule*) base;
	_tmp0_ = xmpp_xep_jingle_ice_udp_module_IDENTITY;
	_tmp1_ = xmpp_module_identity_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}

static void
xmpp_xep_jingle_ice_udp_module_real_is_transport_available_data_free (gpointer _data)
{
	XmppXepJingleIceUdpModuleIsTransportAvailableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->full_jid);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepJingleIceUdpModuleIsTransportAvailableData, _data_);
}

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

static gpointer
_xmpp_jid_ref0 (gpointer self)
{
	return self ? xmpp_jid_ref (self) : NULL;
}

static void
xmpp_xep_jingle_ice_udp_module_real_is_transport_available (XmppXepJingleTransport* base,
                                                            XmppXmppStream* stream,
                                                            guint8 components,
                                                            XmppJid* full_jid,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_)
{
	XmppXepJingleIceUdpModule * self;
	XmppXepJingleIceUdpModuleIsTransportAvailableData* _data_;
	XmppXepJingleIceUdpModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	g_return_if_fail (stream != NULL);
	g_return_if_fail (full_jid != NULL);
	self = (XmppXepJingleIceUdpModule*) base;
	_data_ = g_slice_new0 (XmppXepJingleIceUdpModuleIsTransportAvailableData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_jingle_ice_udp_module_real_is_transport_available_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_data_->components = components;
	_tmp2_ = _xmpp_jid_ref0 (full_jid);
	_xmpp_jid_unref0 (_data_->full_jid);
	_data_->full_jid = _tmp2_;
	xmpp_xep_jingle_ice_udp_module_real_is_transport_available_co (_data_);
}

static gboolean
xmpp_xep_jingle_ice_udp_module_is_transport_available_finish (XmppXepJingleTransport* base,
                                                              GAsyncResult* _res_)
{
	gboolean result;
	XmppXepJingleIceUdpModuleIsTransportAvailableData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
xmpp_xep_jingle_ice_udp_module_is_transport_available_ready (GObject* source_object,
                                                             GAsyncResult* _res_,
                                                             gpointer _user_data_)
{
	XmppXepJingleIceUdpModuleIsTransportAvailableData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_jingle_ice_udp_module_real_is_transport_available_co (_data_);
}

static gboolean
xmpp_xep_jingle_ice_udp_module_real_is_transport_available_co (XmppXepJingleIceUdpModuleIsTransportAvailableData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = xmpp_xep_service_discovery_module_IDENTITY;
	_data_->_tmp1_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp0_);
	_data_->_tmp2_ = (XmppXepServiceDiscoveryModule*) _data_->_tmp1_;
	_data_->_state_ = 1;
	xmpp_xep_service_discovery_module_has_entity_feature (_data_->_tmp2_, _data_->stream, _data_->full_jid, XMPP_XEP_JINGLE_ICE_UDP_NS_URI, xmpp_xep_jingle_ice_udp_module_is_transport_available_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = xmpp_xep_service_discovery_module_has_entity_feature_finish (_data_->_tmp2_, _data_->_res_);
	_g_object_unref0 (_data_->_tmp2_);
	_data_->result = _data_->_tmp3_;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static XmppXepJingleTransportParameters*
xmpp_xep_jingle_ice_udp_module_real_create_transport_parameters (XmppXepJingleIceUdpModule* self,
                                                                 XmppXmppStream* stream,
                                                                 guint8 components,
                                                                 XmppJid* local_full_jid,
                                                                 XmppJid* peer_full_jid,
                                                                 GError** error)
{
	g_critical ("Type `%s' does not implement abstract method `xmpp_xep_jingle_ice_udp_module_create_transport_parameters'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

XmppXepJingleTransportParameters*
xmpp_xep_jingle_ice_udp_module_create_transport_parameters (XmppXepJingleIceUdpModule* self,
                                                            XmppXmppStream* stream,
                                                            guint8 components,
                                                            XmppJid* local_full_jid,
                                                            XmppJid* peer_full_jid,
                                                            GError** error)
{
	XmppXepJingleIceUdpModuleClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = XMPP_XEP_JINGLE_ICE_UDP_MODULE_GET_CLASS (self);
	if (_klass_->create_transport_parameters) {
		return _klass_->create_transport_parameters (self, stream, components, local_full_jid, peer_full_jid, error);
	}
	return NULL;
}

static XmppXepJingleTransportParameters*
xmpp_xep_jingle_ice_udp_module_real_parse_transport_parameters (XmppXepJingleIceUdpModule* self,
                                                                XmppXmppStream* stream,
                                                                guint8 components,
                                                                XmppJid* local_full_jid,
                                                                XmppJid* peer_full_jid,
                                                                XmppStanzaNode* transport,
                                                                GError** error)
{
	g_critical ("Type `%s' does not implement abstract method `xmpp_xep_jingle_ice_udp_module_parse_transport_parameters'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

XmppXepJingleTransportParameters*
xmpp_xep_jingle_ice_udp_module_parse_transport_parameters (XmppXepJingleIceUdpModule* self,
                                                           XmppXmppStream* stream,
                                                           guint8 components,
                                                           XmppJid* local_full_jid,
                                                           XmppJid* peer_full_jid,
                                                           XmppStanzaNode* transport,
                                                           GError** error)
{
	XmppXepJingleIceUdpModuleClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = XMPP_XEP_JINGLE_ICE_UDP_MODULE_GET_CLASS (self);
	if (_klass_->parse_transport_parameters) {
		return _klass_->parse_transport_parameters (self, stream, components, local_full_jid, peer_full_jid, transport, error);
	}
	return NULL;
}

XmppXepJingleIceUdpModule*
xmpp_xep_jingle_ice_udp_module_construct (GType object_type)
{
	XmppXepJingleIceUdpModule * self = NULL;
	self = (XmppXepJingleIceUdpModule*) xmpp_xmpp_stream_module_construct (object_type);
	return self;
}

static const gchar*
xmpp_xep_jingle_ice_udp_module_real_get_ns_uri (XmppXepJingleTransport* base)
{
	const gchar* result;
	XmppXepJingleIceUdpModule* self;
	self = (XmppXepJingleIceUdpModule*) base;
	result = XMPP_XEP_JINGLE_ICE_UDP_NS_URI;
	return result;
}

static XmppXepJingleTransportType
xmpp_xep_jingle_ice_udp_module_real_get_type_ (XmppXepJingleTransport* base)
{
	XmppXepJingleTransportType result;
	XmppXepJingleIceUdpModule* self;
	self = (XmppXepJingleIceUdpModule*) base;
	result = XMPP_XEP_JINGLE_TRANSPORT_TYPE_DATAGRAM;
	return result;
}

static gint
xmpp_xep_jingle_ice_udp_module_real_get_priority (XmppXepJingleTransport* base)
{
	gint result;
	XmppXepJingleIceUdpModule* self;
	self = (XmppXepJingleIceUdpModule*) base;
	result = 1;
	return result;
}

static void
xmpp_xep_jingle_ice_udp_module_class_init (XmppXepJingleIceUdpModuleClass * klass,
                                           gpointer klass_data)
{
	XmppModuleIdentity* _tmp0_;
	xmpp_xep_jingle_ice_udp_module_parent_class = g_type_class_peek_parent (klass);
	((XmppXmppStreamModuleClass *) klass)->attach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xep_jingle_ice_udp_module_real_attach;
	((XmppXmppStreamModuleClass *) klass)->detach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xep_jingle_ice_udp_module_real_detach;
	((XmppXmppStreamModuleClass *) klass)->get_ns = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xep_jingle_ice_udp_module_real_get_ns;
	((XmppXmppStreamModuleClass *) klass)->get_id = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xep_jingle_ice_udp_module_real_get_id;
	((XmppXepJingleIceUdpModuleClass *) klass)->create_transport_parameters = (XmppXepJingleTransportParameters* (*) (XmppXepJingleIceUdpModule*, XmppXmppStream*, guint8, XmppJid*, XmppJid*, GError**)) xmpp_xep_jingle_ice_udp_module_real_create_transport_parameters;
	((XmppXepJingleIceUdpModuleClass *) klass)->parse_transport_parameters = (XmppXepJingleTransportParameters* (*) (XmppXepJingleIceUdpModule*, XmppXmppStream*, guint8, XmppJid*, XmppJid*, XmppStanzaNode*, GError**)) xmpp_xep_jingle_ice_udp_module_real_parse_transport_parameters;
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_jingle_ice_udp_module_get_property;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_jingle_ice_udp_module_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_JINGLE_ICE_UDP_MODULE_NS_URI_PROPERTY, xmpp_xep_jingle_ice_udp_module_properties[XMPP_XEP_JINGLE_ICE_UDP_MODULE_NS_URI_PROPERTY] = g_param_spec_string ("ns-uri", "ns-uri", "ns-uri", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_JINGLE_ICE_UDP_MODULE_TYPE__PROPERTY, xmpp_xep_jingle_ice_udp_module_properties[XMPP_XEP_JINGLE_ICE_UDP_MODULE_TYPE__PROPERTY] = g_param_spec_enum ("type-", "type-", "type-", XMPP_XEP_JINGLE_TYPE_TRANSPORT_TYPE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_JINGLE_ICE_UDP_MODULE_PRIORITY_PROPERTY, xmpp_xep_jingle_ice_udp_module_properties[XMPP_XEP_JINGLE_ICE_UDP_MODULE_PRIORITY_PROPERTY] = g_param_spec_int ("priority", "priority", "priority", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	_tmp0_ = xmpp_module_identity_new (XMPP_XEP_JINGLE_ICE_UDP_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, XMPP_XEP_JINGLE_ICE_UDP_NS_URI, "0176_jingle_ice_udp");
	xmpp_xep_jingle_ice_udp_module_IDENTITY = _tmp0_;
}

static void
xmpp_xep_jingle_ice_udp_module_xmpp_xep_jingle_transport_interface_init (XmppXepJingleTransportIface * iface,
                                                                         gpointer iface_data)
{
	xmpp_xep_jingle_ice_udp_module_xmpp_xep_jingle_transport_parent_iface = g_type_interface_peek_parent (iface);
	iface->is_transport_available = (void (*) (XmppXepJingleTransport*, XmppXmppStream*, guint8, XmppJid*, GAsyncReadyCallback, gpointer)) xmpp_xep_jingle_ice_udp_module_real_is_transport_available;
	iface->is_transport_available_finish = (gboolean (*) (XmppXepJingleTransport*, GAsyncResult*)) xmpp_xep_jingle_ice_udp_module_is_transport_available_finish;
	iface->create_transport_parameters = (XmppXepJingleTransportParameters* (*) (XmppXepJingleTransport*, XmppXmppStream*, guint8, XmppJid*, XmppJid*, GError**)) xmpp_xep_jingle_ice_udp_module_create_transport_parameters;
	iface->parse_transport_parameters = (XmppXepJingleTransportParameters* (*) (XmppXepJingleTransport*, XmppXmppStream*, guint8, XmppJid*, XmppJid*, XmppStanzaNode*, GError**)) xmpp_xep_jingle_ice_udp_module_parse_transport_parameters;
	iface->get_ns_uri = xmpp_xep_jingle_ice_udp_module_real_get_ns_uri;
	iface->get_type_ = xmpp_xep_jingle_ice_udp_module_real_get_type_;
	iface->get_priority = xmpp_xep_jingle_ice_udp_module_real_get_priority;
}

static void
xmpp_xep_jingle_ice_udp_module_instance_init (XmppXepJingleIceUdpModule * self,
                                              gpointer klass)
{
}

static void
xmpp_xep_jingle_ice_udp_module_finalize (GObject * obj)
{
	XmppXepJingleIceUdpModule * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_JINGLE_ICE_UDP_TYPE_MODULE, XmppXepJingleIceUdpModule);
	G_OBJECT_CLASS (xmpp_xep_jingle_ice_udp_module_parent_class)->finalize (obj);
}

static GType
xmpp_xep_jingle_ice_udp_module_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepJingleIceUdpModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_jingle_ice_udp_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepJingleIceUdpModule), 0, (GInstanceInitFunc) xmpp_xep_jingle_ice_udp_module_instance_init, NULL };
	static const GInterfaceInfo xmpp_xep_jingle_transport_info = { (GInterfaceInitFunc) xmpp_xep_jingle_ice_udp_module_xmpp_xep_jingle_transport_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType xmpp_xep_jingle_ice_udp_module_type_id;
	xmpp_xep_jingle_ice_udp_module_type_id = g_type_register_static (XMPP_TYPE_XMPP_STREAM_MODULE, "XmppXepJingleIceUdpModule", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	g_type_add_interface_static (xmpp_xep_jingle_ice_udp_module_type_id, XMPP_XEP_JINGLE_TYPE_TRANSPORT, &xmpp_xep_jingle_transport_info);
	return xmpp_xep_jingle_ice_udp_module_type_id;
}

GType
xmpp_xep_jingle_ice_udp_module_get_type (void)
{
	static volatile gsize xmpp_xep_jingle_ice_udp_module_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_jingle_ice_udp_module_type_id__once)) {
		GType xmpp_xep_jingle_ice_udp_module_type_id;
		xmpp_xep_jingle_ice_udp_module_type_id = xmpp_xep_jingle_ice_udp_module_get_type_once ();
		g_once_init_leave (&xmpp_xep_jingle_ice_udp_module_type_id__once, xmpp_xep_jingle_ice_udp_module_type_id);
	}
	return xmpp_xep_jingle_ice_udp_module_type_id__once;
}

static void
_vala_xmpp_xep_jingle_ice_udp_module_get_property (GObject * object,
                                                   guint property_id,
                                                   GValue * value,
                                                   GParamSpec * pspec)
{
	XmppXepJingleIceUdpModule * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_JINGLE_ICE_UDP_TYPE_MODULE, XmppXepJingleIceUdpModule);
	switch (property_id) {
		case XMPP_XEP_JINGLE_ICE_UDP_MODULE_NS_URI_PROPERTY:
		g_value_set_string (value, xmpp_xep_jingle_transport_get_ns_uri ((XmppXepJingleTransport*) self));
		break;
		case XMPP_XEP_JINGLE_ICE_UDP_MODULE_TYPE__PROPERTY:
		g_value_set_enum (value, xmpp_xep_jingle_transport_get_type_ ((XmppXepJingleTransport*) self));
		break;
		case XMPP_XEP_JINGLE_ICE_UDP_MODULE_PRIORITY_PROPERTY:
		g_value_set_int (value, xmpp_xep_jingle_transport_get_priority ((XmppXepJingleTransport*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

