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

#include "xmpp-vala.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <glib-object.h>
#include <gobject/gvaluecollector.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

#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _xmpp_stanza_entry_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_stanza_entry_unref (var), NULL)))
#define _xmpp_xep_jingle_rtp_rtcp_feedback_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_jingle_rtp_rtcp_feedback_unref (var), NULL)))
typedef struct _Block11Data Block11Data;
typedef struct _XmppXepJingleRtpParamSpecPayloadType XmppXepJingleRtpParamSpecPayloadType;
typedef struct _XmppXepJingleRtpParamSpecRtcpFeedback XmppXepJingleRtpParamSpecRtcpFeedback;

struct _XmppXepJingleRtpPayloadTypePrivate {
	guint8 _id;
	gchar* _name;
	guint8 _channels;
	guint32 _clockrate;
	guint32 _maxptime;
	guint32 _ptime;
};

struct _Block11Data {
	int _ref_count_;
	XmppXepJingleRtpRtcpFeedback* fb;
};

struct _XmppXepJingleRtpParamSpecPayloadType {
	GParamSpec parent_instance;
};

struct _XmppXepJingleRtpRtcpFeedbackPrivate {
	gchar* _type_;
	gchar* _subtype;
};

struct _XmppXepJingleRtpParamSpecRtcpFeedback {
	GParamSpec parent_instance;
};

static gint XmppXepJingleRtpPayloadType_private_offset;
static gpointer xmpp_xep_jingle_rtp_payload_type_parent_class = NULL;
static gint XmppXepJingleRtpRtcpFeedback_private_offset;
static gpointer xmpp_xep_jingle_rtp_rtcp_feedback_parent_class = NULL;

static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static gboolean ____lambda19_ (Block11Data* _data11_,
                        XmppXepJingleRtpRtcpFeedback* it);
static gboolean _____lambda19__gee_predicate (gconstpointer g,
                                       gpointer self);
static void xmpp_xep_jingle_rtp_payload_type_finalize (XmppXepJingleRtpPayloadType * obj);
static GType xmpp_xep_jingle_rtp_payload_type_get_type_once (void);
static void xmpp_xep_jingle_rtp_rtcp_feedback_set_type_ (XmppXepJingleRtpRtcpFeedback* self,
                                                  const gchar* value);
static void xmpp_xep_jingle_rtp_rtcp_feedback_set_subtype (XmppXepJingleRtpRtcpFeedback* self,
                                                    const gchar* value);
static void xmpp_xep_jingle_rtp_rtcp_feedback_finalize (XmppXepJingleRtpRtcpFeedback * obj);
static GType xmpp_xep_jingle_rtp_rtcp_feedback_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
xmpp_xep_jingle_rtp_payload_type_get_instance_private (XmppXepJingleRtpPayloadType* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepJingleRtpPayloadType_private_offset);
}

XmppXepJingleRtpPayloadType*
xmpp_xep_jingle_rtp_payload_type_parse (XmppStanzaNode* node)
{
	XmppXepJingleRtpPayloadType* payloadType = NULL;
	XmppXepJingleRtpPayloadType* _tmp0_;
	XmppXepJingleRtpPayloadType* _tmp1_;
	XmppXepJingleRtpPayloadType* _tmp2_;
	guint8 _tmp3_;
	XmppXepJingleRtpPayloadType* _tmp4_;
	XmppXepJingleRtpPayloadType* _tmp5_;
	XmppXepJingleRtpPayloadType* _tmp6_;
	XmppXepJingleRtpPayloadType* _tmp7_;
	const gchar* _tmp8_;
	XmppXepJingleRtpPayloadType* _tmp9_;
	XmppXepJingleRtpPayloadType* result;
	g_return_val_if_fail (node != NULL, NULL);
	_tmp0_ = xmpp_xep_jingle_rtp_payload_type_new ();
	payloadType = _tmp0_;
	_tmp1_ = payloadType;
	_tmp2_ = payloadType;
	_tmp3_ = _tmp2_->priv->_channels;
	xmpp_xep_jingle_rtp_payload_type_set_channels (_tmp1_, (guint8) xmpp_stanza_node_get_attribute_uint (node, "channels", (guint) _tmp3_, NULL));
	_tmp4_ = payloadType;
	xmpp_xep_jingle_rtp_payload_type_set_clockrate (_tmp4_, (guint32) xmpp_stanza_node_get_attribute_uint (node, "clockrate", (guint) 0, NULL));
	_tmp5_ = payloadType;
	xmpp_xep_jingle_rtp_payload_type_set_id (_tmp5_, (guint8) xmpp_stanza_node_get_attribute_uint (node, "id", (guint) 0, NULL));
	_tmp6_ = payloadType;
	xmpp_xep_jingle_rtp_payload_type_set_maxptime (_tmp6_, (guint32) xmpp_stanza_node_get_attribute_uint (node, "maxptime", (guint) 0, NULL));
	_tmp7_ = payloadType;
	_tmp8_ = xmpp_stanza_node_get_attribute (node, "name", NULL);
	xmpp_xep_jingle_rtp_payload_type_set_name (_tmp7_, _tmp8_);
	_tmp9_ = payloadType;
	xmpp_xep_jingle_rtp_payload_type_set_ptime (_tmp9_, (guint32) xmpp_stanza_node_get_attribute_uint (node, "ptime", (guint) 0, NULL));
	{
		GeeList* _parameter_list = NULL;
		GeeList* _tmp10_;
		gint _parameter_size = 0;
		GeeList* _tmp11_;
		gint _tmp12_;
		gint _tmp13_;
		gint _parameter_index = 0;
		_tmp10_ = xmpp_stanza_node_get_subnodes (node, "parameter", NULL, FALSE);
		_parameter_list = _tmp10_;
		_tmp11_ = _parameter_list;
		_tmp12_ = gee_collection_get_size ((GeeCollection*) _tmp11_);
		_tmp13_ = _tmp12_;
		_parameter_size = _tmp13_;
		_parameter_index = -1;
		while (TRUE) {
			gint _tmp14_;
			gint _tmp15_;
			XmppStanzaNode* parameter = NULL;
			GeeList* _tmp16_;
			gpointer _tmp17_;
			XmppXepJingleRtpPayloadType* _tmp18_;
			GeeMap* _tmp19_;
			XmppStanzaNode* _tmp20_;
			const gchar* _tmp21_;
			XmppStanzaNode* _tmp22_;
			const gchar* _tmp23_;
			_parameter_index = _parameter_index + 1;
			_tmp14_ = _parameter_index;
			_tmp15_ = _parameter_size;
			if (!(_tmp14_ < _tmp15_)) {
				break;
			}
			_tmp16_ = _parameter_list;
			_tmp17_ = gee_list_get (_tmp16_, _parameter_index);
			parameter = (XmppStanzaNode*) _tmp17_;
			_tmp18_ = payloadType;
			_tmp19_ = _tmp18_->parameters;
			_tmp20_ = parameter;
			_tmp21_ = xmpp_stanza_node_get_attribute (_tmp20_, "name", NULL);
			_tmp22_ = parameter;
			_tmp23_ = xmpp_stanza_node_get_attribute (_tmp22_, "value", NULL);
			gee_map_set (_tmp19_, _tmp21_, _tmp23_);
			_xmpp_stanza_entry_unref0 (parameter);
		}
		_g_object_unref0 (_parameter_list);
	}
	{
		GeeList* _subnode_list = NULL;
		GeeList* _tmp24_;
		gint _subnode_size = 0;
		GeeList* _tmp25_;
		gint _tmp26_;
		gint _tmp27_;
		gint _subnode_index = 0;
		_tmp24_ = xmpp_stanza_node_get_subnodes (node, XMPP_XEP_JINGLE_RTP_RTCP_FEEDBACK_NAME, XMPP_XEP_JINGLE_RTP_RTCP_FEEDBACK_NS_URI, FALSE);
		_subnode_list = _tmp24_;
		_tmp25_ = _subnode_list;
		_tmp26_ = gee_collection_get_size ((GeeCollection*) _tmp25_);
		_tmp27_ = _tmp26_;
		_subnode_size = _tmp27_;
		_subnode_index = -1;
		while (TRUE) {
			gint _tmp28_;
			gint _tmp29_;
			XmppStanzaNode* subnode = NULL;
			GeeList* _tmp30_;
			gpointer _tmp31_;
			XmppXepJingleRtpPayloadType* _tmp32_;
			GeeList* _tmp33_;
			XmppStanzaNode* _tmp34_;
			XmppXepJingleRtpRtcpFeedback* _tmp35_;
			XmppXepJingleRtpRtcpFeedback* _tmp36_;
			_subnode_index = _subnode_index + 1;
			_tmp28_ = _subnode_index;
			_tmp29_ = _subnode_size;
			if (!(_tmp28_ < _tmp29_)) {
				break;
			}
			_tmp30_ = _subnode_list;
			_tmp31_ = gee_list_get (_tmp30_, _subnode_index);
			subnode = (XmppStanzaNode*) _tmp31_;
			_tmp32_ = payloadType;
			_tmp33_ = _tmp32_->rtcp_fbs;
			_tmp34_ = subnode;
			_tmp35_ = xmpp_xep_jingle_rtp_rtcp_feedback_parse (_tmp34_);
			_tmp36_ = _tmp35_;
			gee_collection_add ((GeeCollection*) _tmp33_, _tmp36_);
			_xmpp_xep_jingle_rtp_rtcp_feedback_unref0 (_tmp36_);
			_xmpp_stanza_entry_unref0 (subnode);
		}
		_g_object_unref0 (_subnode_list);
	}
	result = payloadType;
	return result;
}

XmppStanzaNode*
xmpp_xep_jingle_rtp_payload_type_to_xml (XmppXepJingleRtpPayloadType* self)
{
	XmppStanzaNode* node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	guint8 _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	guint8 _tmp7_;
	guint32 _tmp14_;
	guint32 _tmp21_;
	const gchar* _tmp28_;
	guint32 _tmp33_;
	XmppStanzaNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_stanza_node_new_build (XMPP_XEP_JINGLE_RTP_PAYLOAD_TYPE_NAME, XMPP_XEP_JINGLE_RTP_NS_URI, NULL, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->_id;
	_tmp3_ = g_strdup_printf ("%hhu", _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = xmpp_stanza_node_put_attribute (_tmp1_, "id", _tmp4_, NULL);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	_xmpp_stanza_entry_unref0 (_tmp1_);
	node = _tmp6_;
	_tmp7_ = self->priv->_channels;
	if (((gint) _tmp7_) != 1) {
		XmppStanzaNode* _tmp8_;
		guint8 _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		XmppStanzaNode* _tmp12_;
		XmppStanzaNode* _tmp13_;
		_tmp8_ = node;
		_tmp9_ = self->priv->_channels;
		_tmp10_ = g_strdup_printf ("%hhu", _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = xmpp_stanza_node_put_attribute (_tmp8_, "channels", _tmp11_, NULL);
		_tmp13_ = _tmp12_;
		_xmpp_stanza_entry_unref0 (_tmp13_);
		_g_free0 (_tmp11_);
	}
	_tmp14_ = self->priv->_clockrate;
	if (_tmp14_ != ((guint32) 0)) {
		XmppStanzaNode* _tmp15_;
		guint32 _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		XmppStanzaNode* _tmp19_;
		XmppStanzaNode* _tmp20_;
		_tmp15_ = node;
		_tmp16_ = self->priv->_clockrate;
		_tmp17_ = g_strdup_printf ("%u", _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = xmpp_stanza_node_put_attribute (_tmp15_, "clockrate", _tmp18_, NULL);
		_tmp20_ = _tmp19_;
		_xmpp_stanza_entry_unref0 (_tmp20_);
		_g_free0 (_tmp18_);
	}
	_tmp21_ = self->priv->_maxptime;
	if (_tmp21_ != ((guint32) 0)) {
		XmppStanzaNode* _tmp22_;
		guint32 _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp25_;
		XmppStanzaNode* _tmp26_;
		XmppStanzaNode* _tmp27_;
		_tmp22_ = node;
		_tmp23_ = self->priv->_maxptime;
		_tmp24_ = g_strdup_printf ("%u", _tmp23_);
		_tmp25_ = _tmp24_;
		_tmp26_ = xmpp_stanza_node_put_attribute (_tmp22_, "maxptime", _tmp25_, NULL);
		_tmp27_ = _tmp26_;
		_xmpp_stanza_entry_unref0 (_tmp27_);
		_g_free0 (_tmp25_);
	}
	_tmp28_ = self->priv->_name;
	if (_tmp28_ != NULL) {
		XmppStanzaNode* _tmp29_;
		const gchar* _tmp30_;
		XmppStanzaNode* _tmp31_;
		XmppStanzaNode* _tmp32_;
		_tmp29_ = node;
		_tmp30_ = self->priv->_name;
		_tmp31_ = xmpp_stanza_node_put_attribute (_tmp29_, "name", _tmp30_, NULL);
		_tmp32_ = _tmp31_;
		_xmpp_stanza_entry_unref0 (_tmp32_);
	}
	_tmp33_ = self->priv->_ptime;
	if (_tmp33_ != ((guint32) 0)) {
		XmppStanzaNode* _tmp34_;
		guint32 _tmp35_;
		gchar* _tmp36_;
		gchar* _tmp37_;
		XmppStanzaNode* _tmp38_;
		XmppStanzaNode* _tmp39_;
		_tmp34_ = node;
		_tmp35_ = self->priv->_ptime;
		_tmp36_ = g_strdup_printf ("%u", _tmp35_);
		_tmp37_ = _tmp36_;
		_tmp38_ = xmpp_stanza_node_put_attribute (_tmp34_, "ptime", _tmp37_, NULL);
		_tmp39_ = _tmp38_;
		_xmpp_stanza_entry_unref0 (_tmp39_);
		_g_free0 (_tmp37_);
	}
	{
		GeeIterator* _parameter_it = NULL;
		GeeMap* _tmp40_;
		GeeSet* _tmp41_;
		GeeSet* _tmp42_;
		GeeSet* _tmp43_;
		GeeIterator* _tmp44_;
		GeeIterator* _tmp45_;
		_tmp40_ = self->parameters;
		_tmp41_ = gee_map_get_keys (_tmp40_);
		_tmp42_ = _tmp41_;
		_tmp43_ = _tmp42_;
		_tmp44_ = gee_iterable_iterator ((GeeIterable*) _tmp43_);
		_tmp45_ = _tmp44_;
		_g_object_unref0 (_tmp43_);
		_parameter_it = _tmp45_;
		while (TRUE) {
			GeeIterator* _tmp46_;
			gchar* parameter = NULL;
			GeeIterator* _tmp47_;
			gpointer _tmp48_;
			XmppStanzaNode* _tmp49_;
			XmppStanzaNode* _tmp50_;
			XmppStanzaNode* _tmp51_;
			const gchar* _tmp52_;
			XmppStanzaNode* _tmp53_;
			XmppStanzaNode* _tmp54_;
			GeeMap* _tmp55_;
			const gchar* _tmp56_;
			gpointer _tmp57_;
			gchar* _tmp58_;
			XmppStanzaNode* _tmp59_;
			XmppStanzaNode* _tmp60_;
			XmppStanzaNode* _tmp61_;
			XmppStanzaNode* _tmp62_;
			_tmp46_ = _parameter_it;
			if (!gee_iterator_next (_tmp46_)) {
				break;
			}
			_tmp47_ = _parameter_it;
			_tmp48_ = gee_iterator_get (_tmp47_);
			parameter = (gchar*) _tmp48_;
			_tmp49_ = node;
			_tmp50_ = xmpp_stanza_node_new_build ("parameter", XMPP_XEP_JINGLE_RTP_NS_URI, NULL, NULL);
			_tmp51_ = _tmp50_;
			_tmp52_ = parameter;
			_tmp53_ = xmpp_stanza_node_put_attribute (_tmp51_, "name", _tmp52_, NULL);
			_tmp54_ = _tmp53_;
			_tmp55_ = self->parameters;
			_tmp56_ = parameter;
			_tmp57_ = gee_map_get (_tmp55_, _tmp56_);
			_tmp58_ = (gchar*) _tmp57_;
			_tmp59_ = xmpp_stanza_node_put_attribute (_tmp54_, "value", _tmp58_, NULL);
			_tmp60_ = _tmp59_;
			_tmp61_ = xmpp_stanza_node_put_node (_tmp49_, _tmp60_);
			_tmp62_ = _tmp61_;
			_xmpp_stanza_entry_unref0 (_tmp62_);
			_xmpp_stanza_entry_unref0 (_tmp60_);
			_g_free0 (_tmp58_);
			_xmpp_stanza_entry_unref0 (_tmp54_);
			_xmpp_stanza_entry_unref0 (_tmp51_);
			_g_free0 (parameter);
		}
		_g_object_unref0 (_parameter_it);
	}
	{
		GeeList* _rtcp_fb_list = NULL;
		GeeList* _tmp63_;
		gint _rtcp_fb_size = 0;
		GeeList* _tmp64_;
		gint _tmp65_;
		gint _tmp66_;
		gint _rtcp_fb_index = 0;
		_tmp63_ = self->rtcp_fbs;
		_rtcp_fb_list = _tmp63_;
		_tmp64_ = _rtcp_fb_list;
		_tmp65_ = gee_collection_get_size ((GeeCollection*) _tmp64_);
		_tmp66_ = _tmp65_;
		_rtcp_fb_size = _tmp66_;
		_rtcp_fb_index = -1;
		while (TRUE) {
			gint _tmp67_;
			gint _tmp68_;
			XmppXepJingleRtpRtcpFeedback* rtcp_fb = NULL;
			GeeList* _tmp69_;
			gpointer _tmp70_;
			XmppStanzaNode* _tmp71_;
			XmppXepJingleRtpRtcpFeedback* _tmp72_;
			XmppStanzaNode* _tmp73_;
			XmppStanzaNode* _tmp74_;
			XmppStanzaNode* _tmp75_;
			XmppStanzaNode* _tmp76_;
			_rtcp_fb_index = _rtcp_fb_index + 1;
			_tmp67_ = _rtcp_fb_index;
			_tmp68_ = _rtcp_fb_size;
			if (!(_tmp67_ < _tmp68_)) {
				break;
			}
			_tmp69_ = _rtcp_fb_list;
			_tmp70_ = gee_list_get (_tmp69_, _rtcp_fb_index);
			rtcp_fb = (XmppXepJingleRtpRtcpFeedback*) _tmp70_;
			_tmp71_ = node;
			_tmp72_ = rtcp_fb;
			_tmp73_ = xmpp_xep_jingle_rtp_rtcp_feedback_to_xml (_tmp72_);
			_tmp74_ = _tmp73_;
			_tmp75_ = xmpp_stanza_node_put_node (_tmp71_, _tmp74_);
			_tmp76_ = _tmp75_;
			_xmpp_stanza_entry_unref0 (_tmp76_);
			_xmpp_stanza_entry_unref0 (_tmp74_);
			_xmpp_xep_jingle_rtp_rtcp_feedback_unref0 (rtcp_fb);
		}
	}
	result = node;
	return result;
}

XmppXepJingleRtpPayloadType*
xmpp_xep_jingle_rtp_payload_type_clone (XmppXepJingleRtpPayloadType* self)
{
	XmppXepJingleRtpPayloadType* clone = NULL;
	XmppXepJingleRtpPayloadType* _tmp0_;
	guint8 _tmp1_;
	const gchar* _tmp2_;
	guint8 _tmp3_;
	guint32 _tmp4_;
	guint32 _tmp5_;
	guint32 _tmp6_;
	GeeMap* _tmp7_;
	GeeMap* _tmp8_;
	GeeList* _tmp9_;
	GeeList* _tmp10_;
	XmppXepJingleRtpPayloadType* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_xep_jingle_rtp_payload_type_new ();
	clone = _tmp0_;
	_tmp1_ = self->priv->_id;
	xmpp_xep_jingle_rtp_payload_type_set_id (clone, _tmp1_);
	_tmp2_ = self->priv->_name;
	xmpp_xep_jingle_rtp_payload_type_set_name (clone, _tmp2_);
	_tmp3_ = self->priv->_channels;
	xmpp_xep_jingle_rtp_payload_type_set_channels (clone, _tmp3_);
	_tmp4_ = self->priv->_clockrate;
	xmpp_xep_jingle_rtp_payload_type_set_clockrate (clone, _tmp4_);
	_tmp5_ = self->priv->_maxptime;
	xmpp_xep_jingle_rtp_payload_type_set_maxptime (clone, _tmp5_);
	_tmp6_ = self->priv->_ptime;
	xmpp_xep_jingle_rtp_payload_type_set_ptime (clone, _tmp6_);
	_tmp7_ = clone->parameters;
	_tmp8_ = self->parameters;
	gee_map_set_all (_tmp7_, _tmp8_);
	_tmp9_ = clone->rtcp_fbs;
	_tmp10_ = self->rtcp_fbs;
	gee_collection_add_all ((GeeCollection*) _tmp9_, (GeeCollection*) _tmp10_);
	result = clone;
	return result;
}

static Block11Data*
block11_data_ref (Block11Data* _data11_)
{
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}

static void
block11_data_unref (void * _userdata_)
{
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		_xmpp_xep_jingle_rtp_rtcp_feedback_unref0 (_data11_->fb);
		g_slice_free (Block11Data, _data11_);
	}
}

static gboolean
____lambda19_ (Block11Data* _data11_,
               XmppXepJingleRtpRtcpFeedback* it)
{
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	XmppXepJingleRtpRtcpFeedback* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gboolean result;
	g_return_val_if_fail (it != NULL, FALSE);
	_tmp1_ = xmpp_xep_jingle_rtp_rtcp_feedback_get_type_ (it);
	_tmp2_ = _tmp1_;
	_tmp3_ = _data11_->fb;
	_tmp4_ = xmpp_xep_jingle_rtp_rtcp_feedback_get_type_ (_tmp3_);
	_tmp5_ = _tmp4_;
	if (g_strcmp0 (_tmp2_, _tmp5_) == 0) {
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		XmppXepJingleRtpRtcpFeedback* _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp6_ = xmpp_xep_jingle_rtp_rtcp_feedback_get_subtype (it);
		_tmp7_ = _tmp6_;
		_tmp8_ = _data11_->fb;
		_tmp9_ = xmpp_xep_jingle_rtp_rtcp_feedback_get_subtype (_tmp8_);
		_tmp10_ = _tmp9_;
		_tmp0_ = g_strcmp0 (_tmp7_, _tmp10_) == 0;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
_____lambda19__gee_predicate (gconstpointer g,
                              gpointer self)
{
	gboolean result;
	result = ____lambda19_ (self, (XmppXepJingleRtpRtcpFeedback*) g);
	return result;
}

gboolean
xmpp_xep_jingle_rtp_payload_type_equals_func (XmppXepJingleRtpPayloadType* a,
                                              XmppXepJingleRtpPayloadType* b)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	guint8 _tmp7_;
	guint8 _tmp8_;
	gboolean simple = FALSE;
	gboolean result;
	g_return_val_if_fail (a != NULL, FALSE);
	g_return_val_if_fail (b != NULL, FALSE);
	_tmp7_ = a->priv->_id;
	_tmp8_ = b->priv->_id;
	if (_tmp7_ == _tmp8_) {
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		_tmp9_ = a->priv->_name;
		_tmp10_ = b->priv->_name;
		_tmp6_ = g_strcmp0 (_tmp9_, _tmp10_) == 0;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		guint8 _tmp11_;
		guint8 _tmp12_;
		_tmp11_ = a->priv->_channels;
		_tmp12_ = b->priv->_channels;
		_tmp5_ = _tmp11_ == _tmp12_;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		guint32 _tmp13_;
		guint32 _tmp14_;
		_tmp13_ = a->priv->_clockrate;
		_tmp14_ = b->priv->_clockrate;
		_tmp4_ = _tmp13_ == _tmp14_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		guint32 _tmp15_;
		guint32 _tmp16_;
		_tmp15_ = a->priv->_maxptime;
		_tmp16_ = b->priv->_maxptime;
		_tmp3_ = _tmp15_ == _tmp16_;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		guint32 _tmp17_;
		guint32 _tmp18_;
		_tmp17_ = a->priv->_ptime;
		_tmp18_ = b->priv->_ptime;
		_tmp2_ = _tmp17_ == _tmp18_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GeeMap* _tmp19_;
		gint _tmp20_;
		gint _tmp21_;
		GeeMap* _tmp22_;
		gint _tmp23_;
		gint _tmp24_;
		_tmp19_ = a->parameters;
		_tmp20_ = gee_map_get_size (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = b->parameters;
		_tmp23_ = gee_map_get_size (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp1_ = _tmp21_ == _tmp24_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GeeList* _tmp25_;
		gint _tmp26_;
		gint _tmp27_;
		GeeList* _tmp28_;
		gint _tmp29_;
		gint _tmp30_;
		_tmp25_ = a->rtcp_fbs;
		_tmp26_ = gee_collection_get_size ((GeeCollection*) _tmp25_);
		_tmp27_ = _tmp26_;
		_tmp28_ = b->rtcp_fbs;
		_tmp29_ = gee_collection_get_size ((GeeCollection*) _tmp28_);
		_tmp30_ = _tmp29_;
		_tmp0_ = _tmp27_ == _tmp30_;
	} else {
		_tmp0_ = FALSE;
	}
	simple = _tmp0_;
	if (!simple) {
		result = FALSE;
		return result;
	}
	{
		GeeIterator* _key_it = NULL;
		GeeMap* _tmp31_;
		GeeSet* _tmp32_;
		GeeSet* _tmp33_;
		GeeSet* _tmp34_;
		GeeIterator* _tmp35_;
		GeeIterator* _tmp36_;
		_tmp31_ = a->parameters;
		_tmp32_ = gee_map_get_keys (_tmp31_);
		_tmp33_ = _tmp32_;
		_tmp34_ = _tmp33_;
		_tmp35_ = gee_iterable_iterator ((GeeIterable*) _tmp34_);
		_tmp36_ = _tmp35_;
		_g_object_unref0 (_tmp34_);
		_key_it = _tmp36_;
		while (TRUE) {
			GeeIterator* _tmp37_;
			gchar* key = NULL;
			GeeIterator* _tmp38_;
			gpointer _tmp39_;
			GeeMap* _tmp40_;
			const gchar* _tmp41_;
			GeeMap* _tmp42_;
			const gchar* _tmp43_;
			gpointer _tmp44_;
			gchar* _tmp45_;
			GeeMap* _tmp46_;
			const gchar* _tmp47_;
			gpointer _tmp48_;
			gchar* _tmp49_;
			gboolean _tmp50_;
			_tmp37_ = _key_it;
			if (!gee_iterator_next (_tmp37_)) {
				break;
			}
			_tmp38_ = _key_it;
			_tmp39_ = gee_iterator_get (_tmp38_);
			key = (gchar*) _tmp39_;
			_tmp40_ = b->parameters;
			_tmp41_ = key;
			if (!gee_map_has_key (_tmp40_, _tmp41_)) {
				result = FALSE;
				_g_free0 (key);
				_g_object_unref0 (_key_it);
				return result;
			}
			_tmp42_ = a->parameters;
			_tmp43_ = key;
			_tmp44_ = gee_map_get (_tmp42_, _tmp43_);
			_tmp45_ = (gchar*) _tmp44_;
			_tmp46_ = b->parameters;
			_tmp47_ = key;
			_tmp48_ = gee_map_get (_tmp46_, _tmp47_);
			_tmp49_ = (gchar*) _tmp48_;
			_tmp50_ = g_strcmp0 (_tmp45_, _tmp49_) != 0;
			_g_free0 (_tmp49_);
			_g_free0 (_tmp45_);
			if (_tmp50_) {
				result = FALSE;
				_g_free0 (key);
				_g_object_unref0 (_key_it);
				return result;
			}
			_g_free0 (key);
		}
		_g_object_unref0 (_key_it);
	}
	{
		GeeList* _fb_list = NULL;
		GeeList* _tmp51_;
		gint _fb_size = 0;
		GeeList* _tmp52_;
		gint _tmp53_;
		gint _tmp54_;
		gint _fb_index = 0;
		_tmp51_ = a->rtcp_fbs;
		_fb_list = _tmp51_;
		_tmp52_ = _fb_list;
		_tmp53_ = gee_collection_get_size ((GeeCollection*) _tmp52_);
		_tmp54_ = _tmp53_;
		_fb_size = _tmp54_;
		_fb_index = -1;
		while (TRUE) {
			Block11Data* _data11_;
			gint _tmp55_;
			gint _tmp56_;
			GeeList* _tmp57_;
			gpointer _tmp58_;
			GeeList* _tmp59_;
			_data11_ = g_slice_new0 (Block11Data);
			_data11_->_ref_count_ = 1;
			_fb_index = _fb_index + 1;
			_tmp55_ = _fb_index;
			_tmp56_ = _fb_size;
			if (!(_tmp55_ < _tmp56_)) {
				block11_data_unref (_data11_);
				_data11_ = NULL;
				break;
			}
			_tmp57_ = _fb_list;
			_tmp58_ = gee_list_get (_tmp57_, _fb_index);
			_data11_->fb = (XmppXepJingleRtpRtcpFeedback*) _tmp58_;
			_tmp59_ = b->rtcp_fbs;
			if (!gee_traversable_any_match ((GeeTraversable*) _tmp59_, _____lambda19__gee_predicate, block11_data_ref (_data11_), block11_data_unref)) {
				result = FALSE;
				block11_data_unref (_data11_);
				_data11_ = NULL;
				return result;
			}
			block11_data_unref (_data11_);
			_data11_ = NULL;
		}
	}
	result = TRUE;
	return result;
}

guint
xmpp_xep_jingle_rtp_payload_type_hash_func (XmppXepJingleRtpPayloadType* payload_type)
{
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	guint _tmp4_;
	guint result;
	g_return_val_if_fail (payload_type != NULL, 0U);
	_tmp0_ = xmpp_xep_jingle_rtp_payload_type_to_xml (payload_type);
	_tmp1_ = _tmp0_;
	_tmp2_ = xmpp_stanza_entry_to_string ((XmppStanzaEntry*) _tmp1_, 0);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_str_hash (_tmp3_);
	_g_free0 (_tmp3_);
	_xmpp_stanza_entry_unref0 (_tmp1_);
	result = _tmp4_;
	return result;
}

XmppXepJingleRtpPayloadType*
xmpp_xep_jingle_rtp_payload_type_construct (GType object_type)
{
	XmppXepJingleRtpPayloadType* self = NULL;
	self = (XmppXepJingleRtpPayloadType*) g_type_create_instance (object_type);
	return self;
}

XmppXepJingleRtpPayloadType*
xmpp_xep_jingle_rtp_payload_type_new (void)
{
	return xmpp_xep_jingle_rtp_payload_type_construct (XMPP_XEP_JINGLE_RTP_TYPE_PAYLOAD_TYPE);
}

guint8
xmpp_xep_jingle_rtp_payload_type_get_id (XmppXepJingleRtpPayloadType* self)
{
	guint8 result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_id;
	return result;
}

void
xmpp_xep_jingle_rtp_payload_type_set_id (XmppXepJingleRtpPayloadType* self,
                                         guint8 value)
{
	g_return_if_fail (self != NULL);
	self->priv->_id = value;
}

const gchar*
xmpp_xep_jingle_rtp_payload_type_get_name (XmppXepJingleRtpPayloadType* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

void
xmpp_xep_jingle_rtp_payload_type_set_name (XmppXepJingleRtpPayloadType* self,
                                           const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_name);
	self->priv->_name = _tmp0_;
}

guint8
xmpp_xep_jingle_rtp_payload_type_get_channels (XmppXepJingleRtpPayloadType* self)
{
	guint8 result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_channels;
	return result;
}

void
xmpp_xep_jingle_rtp_payload_type_set_channels (XmppXepJingleRtpPayloadType* self,
                                               guint8 value)
{
	g_return_if_fail (self != NULL);
	self->priv->_channels = value;
}

guint32
xmpp_xep_jingle_rtp_payload_type_get_clockrate (XmppXepJingleRtpPayloadType* self)
{
	guint32 result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_clockrate;
	return result;
}

void
xmpp_xep_jingle_rtp_payload_type_set_clockrate (XmppXepJingleRtpPayloadType* self,
                                                guint32 value)
{
	g_return_if_fail (self != NULL);
	self->priv->_clockrate = value;
}

guint32
xmpp_xep_jingle_rtp_payload_type_get_maxptime (XmppXepJingleRtpPayloadType* self)
{
	guint32 result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_maxptime;
	return result;
}

void
xmpp_xep_jingle_rtp_payload_type_set_maxptime (XmppXepJingleRtpPayloadType* self,
                                               guint32 value)
{
	g_return_if_fail (self != NULL);
	self->priv->_maxptime = value;
}

guint32
xmpp_xep_jingle_rtp_payload_type_get_ptime (XmppXepJingleRtpPayloadType* self)
{
	guint32 result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_ptime;
	return result;
}

void
xmpp_xep_jingle_rtp_payload_type_set_ptime (XmppXepJingleRtpPayloadType* self,
                                            guint32 value)
{
	g_return_if_fail (self != NULL);
	self->priv->_ptime = value;
}

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

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

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

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

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

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

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

void
xmpp_xep_jingle_rtp_value_set_payload_type (GValue* value,
                                            gpointer v_object)
{
	XmppXepJingleRtpPayloadType * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_JINGLE_RTP_TYPE_PAYLOAD_TYPE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_JINGLE_RTP_TYPE_PAYLOAD_TYPE));
		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;
		xmpp_xep_jingle_rtp_payload_type_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_jingle_rtp_payload_type_unref (old);
	}
}

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

static void
xmpp_xep_jingle_rtp_payload_type_class_init (XmppXepJingleRtpPayloadTypeClass * klass,
                                             gpointer klass_data)
{
	xmpp_xep_jingle_rtp_payload_type_parent_class = g_type_class_peek_parent (klass);
	((XmppXepJingleRtpPayloadTypeClass *) klass)->finalize = xmpp_xep_jingle_rtp_payload_type_finalize;
	g_type_class_adjust_private_offset (klass, &XmppXepJingleRtpPayloadType_private_offset);
}

static void
xmpp_xep_jingle_rtp_payload_type_instance_init (XmppXepJingleRtpPayloadType * self,
                                                gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeArrayList* _tmp1_;
	self->priv = xmpp_xep_jingle_rtp_payload_type_get_instance_private (self);
	self->priv->_channels = (guint8) 1;
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->parameters = (GeeMap*) _tmp0_;
	_tmp1_ = gee_array_list_new (XMPP_XEP_JINGLE_RTP_TYPE_RTCP_FEEDBACK, (GBoxedCopyFunc) xmpp_xep_jingle_rtp_rtcp_feedback_ref, (GDestroyNotify) xmpp_xep_jingle_rtp_rtcp_feedback_unref, NULL, NULL, NULL);
	self->rtcp_fbs = (GeeList*) _tmp1_;
	self->ref_count = 1;
}

static void
xmpp_xep_jingle_rtp_payload_type_finalize (XmppXepJingleRtpPayloadType * obj)
{
	XmppXepJingleRtpPayloadType * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_JINGLE_RTP_TYPE_PAYLOAD_TYPE, XmppXepJingleRtpPayloadType);
	g_signal_handlers_destroy (self);
	_g_free0 (self->priv->_name);
	_g_object_unref0 (self->parameters);
	_g_object_unref0 (self->rtcp_fbs);
}

static GType
xmpp_xep_jingle_rtp_payload_type_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_jingle_rtp_value_payload_type_init, xmpp_xep_jingle_rtp_value_payload_type_free_value, xmpp_xep_jingle_rtp_value_payload_type_copy_value, xmpp_xep_jingle_rtp_value_payload_type_peek_pointer, "p", xmpp_xep_jingle_rtp_value_payload_type_collect_value, "p", xmpp_xep_jingle_rtp_value_payload_type_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepJingleRtpPayloadTypeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_jingle_rtp_payload_type_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepJingleRtpPayloadType), 0, (GInstanceInitFunc) xmpp_xep_jingle_rtp_payload_type_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 xmpp_xep_jingle_rtp_payload_type_type_id;
	xmpp_xep_jingle_rtp_payload_type_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepJingleRtpPayloadType", &g_define_type_info, &g_define_type_fundamental_info, 0);
	XmppXepJingleRtpPayloadType_private_offset = g_type_add_instance_private (xmpp_xep_jingle_rtp_payload_type_type_id, sizeof (XmppXepJingleRtpPayloadTypePrivate));
	return xmpp_xep_jingle_rtp_payload_type_type_id;
}

GType
xmpp_xep_jingle_rtp_payload_type_get_type (void)
{
	static volatile gsize xmpp_xep_jingle_rtp_payload_type_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_jingle_rtp_payload_type_type_id__once)) {
		GType xmpp_xep_jingle_rtp_payload_type_type_id;
		xmpp_xep_jingle_rtp_payload_type_type_id = xmpp_xep_jingle_rtp_payload_type_get_type_once ();
		g_once_init_leave (&xmpp_xep_jingle_rtp_payload_type_type_id__once, xmpp_xep_jingle_rtp_payload_type_type_id);
	}
	return xmpp_xep_jingle_rtp_payload_type_type_id__once;
}

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

void
xmpp_xep_jingle_rtp_payload_type_unref (gpointer instance)
{
	XmppXepJingleRtpPayloadType * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_JINGLE_RTP_PAYLOAD_TYPE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
xmpp_xep_jingle_rtp_rtcp_feedback_get_instance_private (XmppXepJingleRtpRtcpFeedback* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepJingleRtpRtcpFeedback_private_offset);
}

XmppXepJingleRtpRtcpFeedback*
xmpp_xep_jingle_rtp_rtcp_feedback_construct (GType object_type,
                                             const gchar* type,
                                             const gchar* subtype)
{
	XmppXepJingleRtpRtcpFeedback* self = NULL;
	g_return_val_if_fail (type != NULL, NULL);
	self = (XmppXepJingleRtpRtcpFeedback*) g_type_create_instance (object_type);
	xmpp_xep_jingle_rtp_rtcp_feedback_set_type_ (self, type);
	xmpp_xep_jingle_rtp_rtcp_feedback_set_subtype (self, subtype);
	return self;
}

XmppXepJingleRtpRtcpFeedback*
xmpp_xep_jingle_rtp_rtcp_feedback_new (const gchar* type,
                                       const gchar* subtype)
{
	return xmpp_xep_jingle_rtp_rtcp_feedback_construct (XMPP_XEP_JINGLE_RTP_TYPE_RTCP_FEEDBACK, type, subtype);
}

XmppXepJingleRtpRtcpFeedback*
xmpp_xep_jingle_rtp_rtcp_feedback_parse (XmppStanzaNode* node)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	XmppXepJingleRtpRtcpFeedback* _tmp2_;
	XmppXepJingleRtpRtcpFeedback* result;
	g_return_val_if_fail (node != NULL, NULL);
	_tmp0_ = xmpp_stanza_node_get_attribute (node, "type", NULL);
	_tmp1_ = xmpp_stanza_node_get_attribute (node, "subtype", NULL);
	_tmp2_ = xmpp_xep_jingle_rtp_rtcp_feedback_new (_tmp0_, _tmp1_);
	result = _tmp2_;
	return result;
}

XmppStanzaNode*
xmpp_xep_jingle_rtp_rtcp_feedback_to_xml (XmppXepJingleRtpRtcpFeedback* self)
{
	XmppStanzaNode* node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	const gchar* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	const gchar* _tmp7_;
	XmppStanzaNode* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = xmpp_stanza_node_new_build (XMPP_XEP_JINGLE_RTP_RTCP_FEEDBACK_NAME, XMPP_XEP_JINGLE_RTP_RTCP_FEEDBACK_NS_URI, NULL, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = xmpp_stanza_node_add_self_xmlns (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->_type_;
	_tmp5_ = xmpp_stanza_node_put_attribute (_tmp3_, "type", _tmp4_, NULL);
	_tmp6_ = _tmp5_;
	_xmpp_stanza_entry_unref0 (_tmp3_);
	_xmpp_stanza_entry_unref0 (_tmp1_);
	node = _tmp6_;
	_tmp7_ = self->priv->_subtype;
	if (_tmp7_ != NULL) {
		XmppStanzaNode* _tmp8_;
		const gchar* _tmp9_;
		XmppStanzaNode* _tmp10_;
		XmppStanzaNode* _tmp11_;
		_tmp8_ = node;
		_tmp9_ = self->priv->_subtype;
		_tmp10_ = xmpp_stanza_node_put_attribute (_tmp8_, "subtype", _tmp9_, NULL);
		_tmp11_ = _tmp10_;
		_xmpp_stanza_entry_unref0 (_tmp11_);
	}
	result = node;
	return result;
}

const gchar*
xmpp_xep_jingle_rtp_rtcp_feedback_get_type_ (XmppXepJingleRtpRtcpFeedback* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_type_;
	result = _tmp0_;
	return result;
}

static void
xmpp_xep_jingle_rtp_rtcp_feedback_set_type_ (XmppXepJingleRtpRtcpFeedback* self,
                                             const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_type_);
	self->priv->_type_ = _tmp0_;
}

const gchar*
xmpp_xep_jingle_rtp_rtcp_feedback_get_subtype (XmppXepJingleRtpRtcpFeedback* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_subtype;
	result = _tmp0_;
	return result;
}

static void
xmpp_xep_jingle_rtp_rtcp_feedback_set_subtype (XmppXepJingleRtpRtcpFeedback* self,
                                               const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_subtype);
	self->priv->_subtype = _tmp0_;
}

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

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

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

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

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

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

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

void
xmpp_xep_jingle_rtp_value_set_rtcp_feedback (GValue* value,
                                             gpointer v_object)
{
	XmppXepJingleRtpRtcpFeedback * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_JINGLE_RTP_TYPE_RTCP_FEEDBACK));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_JINGLE_RTP_TYPE_RTCP_FEEDBACK));
		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;
		xmpp_xep_jingle_rtp_rtcp_feedback_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_jingle_rtp_rtcp_feedback_unref (old);
	}
}

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

static void
xmpp_xep_jingle_rtp_rtcp_feedback_class_init (XmppXepJingleRtpRtcpFeedbackClass * klass,
                                              gpointer klass_data)
{
	xmpp_xep_jingle_rtp_rtcp_feedback_parent_class = g_type_class_peek_parent (klass);
	((XmppXepJingleRtpRtcpFeedbackClass *) klass)->finalize = xmpp_xep_jingle_rtp_rtcp_feedback_finalize;
	g_type_class_adjust_private_offset (klass, &XmppXepJingleRtpRtcpFeedback_private_offset);
}

static void
xmpp_xep_jingle_rtp_rtcp_feedback_instance_init (XmppXepJingleRtpRtcpFeedback * self,
                                                 gpointer klass)
{
	self->priv = xmpp_xep_jingle_rtp_rtcp_feedback_get_instance_private (self);
	self->ref_count = 1;
}

static void
xmpp_xep_jingle_rtp_rtcp_feedback_finalize (XmppXepJingleRtpRtcpFeedback * obj)
{
	XmppXepJingleRtpRtcpFeedback * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_JINGLE_RTP_TYPE_RTCP_FEEDBACK, XmppXepJingleRtpRtcpFeedback);
	g_signal_handlers_destroy (self);
	_g_free0 (self->priv->_type_);
	_g_free0 (self->priv->_subtype);
}

static GType
xmpp_xep_jingle_rtp_rtcp_feedback_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_jingle_rtp_value_rtcp_feedback_init, xmpp_xep_jingle_rtp_value_rtcp_feedback_free_value, xmpp_xep_jingle_rtp_value_rtcp_feedback_copy_value, xmpp_xep_jingle_rtp_value_rtcp_feedback_peek_pointer, "p", xmpp_xep_jingle_rtp_value_rtcp_feedback_collect_value, "p", xmpp_xep_jingle_rtp_value_rtcp_feedback_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepJingleRtpRtcpFeedbackClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_jingle_rtp_rtcp_feedback_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepJingleRtpRtcpFeedback), 0, (GInstanceInitFunc) xmpp_xep_jingle_rtp_rtcp_feedback_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 xmpp_xep_jingle_rtp_rtcp_feedback_type_id;
	xmpp_xep_jingle_rtp_rtcp_feedback_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepJingleRtpRtcpFeedback", &g_define_type_info, &g_define_type_fundamental_info, 0);
	XmppXepJingleRtpRtcpFeedback_private_offset = g_type_add_instance_private (xmpp_xep_jingle_rtp_rtcp_feedback_type_id, sizeof (XmppXepJingleRtpRtcpFeedbackPrivate));
	return xmpp_xep_jingle_rtp_rtcp_feedback_type_id;
}

GType
xmpp_xep_jingle_rtp_rtcp_feedback_get_type (void)
{
	static volatile gsize xmpp_xep_jingle_rtp_rtcp_feedback_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_jingle_rtp_rtcp_feedback_type_id__once)) {
		GType xmpp_xep_jingle_rtp_rtcp_feedback_type_id;
		xmpp_xep_jingle_rtp_rtcp_feedback_type_id = xmpp_xep_jingle_rtp_rtcp_feedback_get_type_once ();
		g_once_init_leave (&xmpp_xep_jingle_rtp_rtcp_feedback_type_id__once, xmpp_xep_jingle_rtp_rtcp_feedback_type_id);
	}
	return xmpp_xep_jingle_rtp_rtcp_feedback_type_id__once;
}

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

void
xmpp_xep_jingle_rtp_rtcp_feedback_unref (gpointer instance)
{
	XmppXepJingleRtpRtcpFeedback * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_JINGLE_RTP_RTCP_FEEDBACK_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

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

