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

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

#define XMPP_XEP_MUC_NS_URI "http://jabber.org/protocol/muc"
#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_MUC_FLAG_0_PROPERTY,
	XMPP_XEP_MUC_FLAG_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_muc_flag_properties[XMPP_XEP_MUC_FLAG_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)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _XmppXepMucFlagPrivate {
	GeeHashMap* room_features;
	GeeHashMap* room_names;
	GeeHashMap* enter_ids;
	GeeHashMap* own_nicks;
	GeeHashMap* subjects;
	GeeHashMap* subjects_by;
	GeeHashMap* occupant_real_jids;
	GeeHashMap* affiliations;
	GeeHashMap* occupant_role;
};

static gint XmppXepMucFlag_private_offset;
static gpointer xmpp_xep_muc_flag_parent_class = NULL;
XmppFlagIdentity* xmpp_xep_muc_flag_IDENTITY = NULL;

static guint _xmpp_jid_hash_bare_func_gee_hash_data_func (gconstpointer v,
                                                   gpointer self);
static gboolean _xmpp_jid_equals_bare_func_gee_equal_data_func (gconstpointer a,
                                                         gconstpointer b,
                                                         gpointer self);
static guint _xmpp_jid_hash_func_gee_hash_data_func (gconstpointer v,
                                              gpointer self);
static gboolean _xmpp_jid_equals_func_gee_equal_data_func (gconstpointer a,
                                                    gconstpointer b,
                                                    gpointer self);
static XmppXepMucRole* _xmpp_xep_muc_role_dup (XmppXepMucRole* self);
VALA_EXTERN void xmpp_xep_muc_flag_set_room_name (XmppXepMucFlag* self,
                                      XmppJid* muc_jid,
                                      const gchar* name);
VALA_EXTERN void xmpp_xep_muc_flag_set_room_features (XmppXepMucFlag* self,
                                          XmppJid* muc_jid,
                                          GeeList* features);
VALA_EXTERN void xmpp_xep_muc_flag_set_real_jid (XmppXepMucFlag* self,
                                     XmppJid* full_jid,
                                     XmppJid* real_jid);
VALA_EXTERN void xmpp_xep_muc_flag_set_offline_member (XmppXepMucFlag* self,
                                           XmppJid* muc_jid,
                                           XmppJid* real_jid,
                                           XmppXepMucAffiliation affiliation);
VALA_EXTERN void xmpp_xep_muc_flag_set_affiliation (XmppXepMucFlag* self,
                                        XmppJid* muc_jid,
                                        XmppJid* full_jid,
                                        XmppXepMucAffiliation affiliation);
VALA_EXTERN void xmpp_xep_muc_flag_set_occupant_role (XmppXepMucFlag* self,
                                          XmppJid* full_jid,
                                          XmppXepMucRole role);
VALA_EXTERN void xmpp_xep_muc_flag_set_muc_subject (XmppXepMucFlag* self,
                                        XmppJid* full_jid,
                                        const gchar* subject);
VALA_EXTERN void xmpp_xep_muc_flag_start_muc_enter (XmppXepMucFlag* self,
                                        XmppJid* jid,
                                        const gchar* presence_id);
VALA_EXTERN void xmpp_xep_muc_flag_finish_muc_enter (XmppXepMucFlag* self,
                                         XmppJid* jid);
VALA_EXTERN void xmpp_xep_muc_flag_left_muc (XmppXepMucFlag* self,
                                 XmppXmppStream* stream,
                                 XmppJid* muc_jid);
VALA_EXTERN void xmpp_xep_muc_flag_remove_occupant_info (XmppXepMucFlag* self,
                                             XmppJid* jid);
static gchar* xmpp_xep_muc_flag_real_get_ns (XmppXmppStreamFlag* base);
static gchar* xmpp_xep_muc_flag_real_get_id (XmppXmppStreamFlag* base);
static void xmpp_xep_muc_flag_finalize (GObject * obj);
static GType xmpp_xep_muc_flag_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
xmpp_xep_muc_flag_get_instance_private (XmppXepMucFlag* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepMucFlag_private_offset);
}

static guint
_xmpp_jid_hash_bare_func_gee_hash_data_func (gconstpointer v,
                                             gpointer self)
{
	guint result;
	result = xmpp_jid_hash_bare_func ((XmppJid*) v);
	return result;
}

static gboolean
_xmpp_jid_equals_bare_func_gee_equal_data_func (gconstpointer a,
                                                gconstpointer b,
                                                gpointer self)
{
	gboolean result;
	result = xmpp_jid_equals_bare_func ((XmppJid*) a, (XmppJid*) b);
	return result;
}

static guint
_xmpp_jid_hash_func_gee_hash_data_func (gconstpointer v,
                                        gpointer self)
{
	guint result;
	result = xmpp_jid_hash_func ((XmppJid*) v);
	return result;
}

static gboolean
_xmpp_jid_equals_func_gee_equal_data_func (gconstpointer a,
                                           gconstpointer b,
                                           gpointer self)
{
	gboolean result;
	result = xmpp_jid_equals_func ((XmppJid*) a, (XmppJid*) b);
	return result;
}

gchar*
xmpp_xep_muc_flag_get_room_name (XmppXepMucFlag* self,
                                 XmppJid* muc_jid)
{
	gchar* _tmp0_ = NULL;
	GeeHashMap* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	gboolean _tmp5_;
	gchar* _tmp11_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (muc_jid != NULL, NULL);
	_tmp1_ = self->priv->room_names;
	_tmp2_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp5_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _tmp4_);
	_xmpp_jid_unref0 (_tmp4_);
	if (_tmp5_) {
		GeeHashMap* _tmp6_;
		XmppJid* _tmp7_;
		XmppJid* _tmp8_;
		XmppJid* _tmp9_;
		gpointer _tmp10_;
		_tmp6_ = self->priv->room_names;
		_tmp7_ = xmpp_jid_get_bare_jid (muc_jid);
		_tmp8_ = _tmp7_;
		_tmp9_ = _tmp8_;
		_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, _tmp9_);
		_g_free0 (_tmp0_);
		_tmp0_ = (gchar*) _tmp10_;
		_xmpp_jid_unref0 (_tmp9_);
	} else {
		_g_free0 (_tmp0_);
		_tmp0_ = NULL;
	}
	_tmp11_ = _tmp0_;
	_tmp0_ = NULL;
	result = _tmp11_;
	_g_free0 (_tmp0_);
	return result;
}

gboolean
xmpp_xep_muc_flag_has_room_feature (XmppXepMucFlag* self,
                                    XmppJid* muc_jid,
                                    XmppXepMucFeature feature)
{
	gboolean _tmp0_ = FALSE;
	GeeHashMap* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	gboolean _tmp5_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (muc_jid != NULL, FALSE);
	_tmp1_ = self->priv->room_features;
	_tmp2_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp5_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _tmp4_);
	_xmpp_jid_unref0 (_tmp4_);
	if (_tmp5_) {
		GeeHashMap* _tmp6_;
		XmppJid* _tmp7_;
		XmppJid* _tmp8_;
		XmppJid* _tmp9_;
		gpointer _tmp10_;
		GeeList* _tmp11_;
		_tmp6_ = self->priv->room_features;
		_tmp7_ = xmpp_jid_get_bare_jid (muc_jid);
		_tmp8_ = _tmp7_;
		_tmp9_ = _tmp8_;
		_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, _tmp9_);
		_tmp11_ = (GeeList*) _tmp10_;
		_tmp0_ = gee_collection_contains ((GeeCollection*) _tmp11_, (gpointer) ((gintptr) feature));
		_g_object_unref0 (_tmp11_);
		_xmpp_jid_unref0 (_tmp9_);
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

XmppJid*
xmpp_xep_muc_flag_get_real_jid (XmppXepMucFlag* self,
                                XmppJid* full_jid)
{
	GeeHashMap* _tmp0_;
	gpointer _tmp1_;
	XmppJid* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (full_jid != NULL, NULL);
	_tmp0_ = self->priv->occupant_real_jids;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, full_jid);
	result = (XmppJid*) _tmp1_;
	return result;
}

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

XmppJid*
xmpp_xep_muc_flag_get_occupant_jid (XmppXepMucFlag* self,
                                    XmppJid* real_jid,
                                    XmppJid* room)
{
	XmppJid* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (real_jid != NULL, NULL);
	g_return_val_if_fail (room != NULL, NULL);
	{
		GeeIterator* _entry_it = NULL;
		GeeHashMap* _tmp0_;
		GeeIterator* _tmp1_;
		_tmp0_ = self->priv->occupant_real_jids;
		_tmp1_ = gee_iterable_iterator ((GeeIterable*) _tmp0_);
		_entry_it = _tmp1_;
		while (TRUE) {
			GeeIterator* _tmp2_;
			GeeMapEntry* entry = NULL;
			GeeIterator* _tmp3_;
			gpointer _tmp4_;
			gboolean _tmp5_ = FALSE;
			GeeMapEntry* _tmp6_;
			gconstpointer _tmp7_;
			gconstpointer _tmp8_;
			_tmp2_ = _entry_it;
			if (!gee_iterator_next (_tmp2_)) {
				break;
			}
			_tmp3_ = _entry_it;
			_tmp4_ = gee_iterator_get (_tmp3_);
			entry = (GeeMapEntry*) _tmp4_;
			_tmp6_ = entry;
			_tmp7_ = gee_map_entry_get_value (_tmp6_);
			_tmp8_ = _tmp7_;
			if (xmpp_jid_equals_bare ((XmppJid*) _tmp8_, real_jid)) {
				GeeMapEntry* _tmp9_;
				gconstpointer _tmp10_;
				gconstpointer _tmp11_;
				_tmp9_ = entry;
				_tmp10_ = gee_map_entry_get_key (_tmp9_);
				_tmp11_ = _tmp10_;
				_tmp5_ = xmpp_jid_equals_bare ((XmppJid*) _tmp11_, room);
			} else {
				_tmp5_ = FALSE;
			}
			if (_tmp5_) {
				GeeMapEntry* _tmp12_;
				gconstpointer _tmp13_;
				gconstpointer _tmp14_;
				XmppJid* _tmp15_;
				_tmp12_ = entry;
				_tmp13_ = gee_map_entry_get_key (_tmp12_);
				_tmp14_ = _tmp13_;
				_tmp15_ = _xmpp_jid_ref0 ((XmppJid*) _tmp14_);
				result = _tmp15_;
				_g_object_unref0 (entry);
				_g_object_unref0 (_entry_it);
				return result;
			}
			_g_object_unref0 (entry);
		}
		_g_object_unref0 (_entry_it);
	}
	result = NULL;
	return result;
}

GeeList*
xmpp_xep_muc_flag_get_offline_members (XmppXepMucFlag* self,
                                       XmppJid* muc_jid)
{
	GeeList* ret = NULL;
	GeeArrayList* _tmp0_;
	GeeHashMap* muc_affiliations = NULL;
	GeeHashMap* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	gpointer _tmp5_;
	GeeHashMap* _tmp6_;
	GeeHashMap* _tmp7_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (muc_jid != NULL, NULL);
	_tmp0_ = gee_array_list_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, _xmpp_jid_equals_func_gee_equal_data_func, NULL, NULL);
	ret = (GeeList*) _tmp0_;
	_tmp1_ = self->priv->affiliations;
	_tmp2_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp5_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, _tmp4_);
	_tmp6_ = (GeeHashMap*) _tmp5_;
	_xmpp_jid_unref0 (_tmp4_);
	muc_affiliations = _tmp6_;
	_tmp7_ = muc_affiliations;
	if (_tmp7_ != NULL) {
		{
			GeeIterator* _jid_it = NULL;
			GeeHashMap* _tmp8_;
			GeeSet* _tmp9_;
			GeeSet* _tmp10_;
			GeeSet* _tmp11_;
			GeeIterator* _tmp12_;
			GeeIterator* _tmp13_;
			_tmp8_ = muc_affiliations;
			_tmp9_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _tmp8_);
			_tmp10_ = _tmp9_;
			_tmp11_ = _tmp10_;
			_tmp12_ = gee_iterable_iterator ((GeeIterable*) _tmp11_);
			_tmp13_ = _tmp12_;
			_g_object_unref0 (_tmp11_);
			_jid_it = _tmp13_;
			while (TRUE) {
				GeeIterator* _tmp14_;
				XmppJid* jid = NULL;
				GeeIterator* _tmp15_;
				gpointer _tmp16_;
				XmppJid* _tmp17_;
				_tmp14_ = _jid_it;
				if (!gee_iterator_next (_tmp14_)) {
					break;
				}
				_tmp15_ = _jid_it;
				_tmp16_ = gee_iterator_get (_tmp15_);
				jid = (XmppJid*) _tmp16_;
				_tmp17_ = jid;
				if (!xmpp_jid_equals_bare (_tmp17_, muc_jid)) {
					GeeList* _tmp18_;
					XmppJid* _tmp19_;
					_tmp18_ = ret;
					_tmp19_ = jid;
					gee_collection_add ((GeeCollection*) _tmp18_, _tmp19_);
				}
				_xmpp_jid_unref0 (jid);
			}
			_g_object_unref0 (_jid_it);
		}
	}
	result = ret;
	_g_object_unref0 (muc_affiliations);
	return result;
}

XmppXepMucAffiliation
xmpp_xep_muc_flag_get_affiliation (XmppXepMucFlag* self,
                                   XmppJid* muc_jid,
                                   XmppJid* full_jid)
{
	GeeHashMap* muc_affiliations = NULL;
	GeeHashMap* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	gpointer _tmp4_;
	GeeHashMap* _tmp5_;
	GeeHashMap* _tmp6_;
	XmppXepMucAffiliation result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (muc_jid != NULL, 0);
	g_return_val_if_fail (full_jid != NULL, 0);
	_tmp0_ = self->priv->affiliations;
	_tmp1_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp3_);
	_tmp5_ = (GeeHashMap*) _tmp4_;
	_xmpp_jid_unref0 (_tmp3_);
	muc_affiliations = _tmp5_;
	_tmp6_ = muc_affiliations;
	if (_tmp6_ != NULL) {
		GeeHashMap* _tmp7_;
		gpointer _tmp8_;
		_tmp7_ = muc_affiliations;
		_tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp7_, full_jid);
		result = (XmppXepMucAffiliation) ((gintptr) _tmp8_);
		_g_object_unref0 (muc_affiliations);
		return result;
	}
	result = XMPP_XEP_MUC_AFFILIATION_NONE;
	_g_object_unref0 (muc_affiliations);
	return result;
}

static XmppXepMucRole*
_xmpp_xep_muc_role_dup (XmppXepMucRole* self)
{
	XmppXepMucRole* dup;
	dup = g_new0 (XmppXepMucRole, 1);
	memcpy (dup, self, sizeof (XmppXepMucRole));
	return dup;
}

static gpointer
__xmpp_xep_muc_role_dup0 (gpointer self)
{
	return self ? _xmpp_xep_muc_role_dup (self) : NULL;
}

XmppXepMucRole*
xmpp_xep_muc_flag_get_occupant_role (XmppXepMucFlag* self,
                                     XmppJid* full_jid)
{
	GeeHashMap* _tmp0_;
	XmppXepMucRole _tmp5_;
	XmppXepMucRole* _tmp6_;
	XmppXepMucRole* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (full_jid != NULL, NULL);
	_tmp0_ = self->priv->occupant_role;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, full_jid)) {
		GeeHashMap* _tmp1_;
		gpointer _tmp2_;
		XmppXepMucRole _tmp3_;
		XmppXepMucRole* _tmp4_;
		_tmp1_ = self->priv->occupant_role;
		_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, full_jid);
		_tmp3_ = (XmppXepMucRole) ((gintptr) _tmp2_);
		_tmp4_ = __xmpp_xep_muc_role_dup0 (&_tmp3_);
		result = _tmp4_;
		return result;
	}
	_tmp5_ = XMPP_XEP_MUC_ROLE_NONE;
	_tmp6_ = __xmpp_xep_muc_role_dup0 (&_tmp5_);
	result = _tmp6_;
	return result;
}

gchar*
xmpp_xep_muc_flag_get_muc_nick (XmppXepMucFlag* self,
                                XmppJid* muc_jid)
{
	GeeHashMap* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	gpointer _tmp4_;
	gchar* _tmp5_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (muc_jid != NULL, NULL);
	_tmp0_ = self->priv->own_nicks;
	_tmp1_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp3_);
	_tmp5_ = (gchar*) _tmp4_;
	_xmpp_jid_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

void
xmpp_xep_muc_flag_set_muc_nick (XmppXepMucFlag* self,
                                XmppJid* muc_jid)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (muc_jid != NULL);
	if (xmpp_jid_is_full (muc_jid)) {
		GeeHashMap* _tmp0_;
		XmppJid* _tmp1_;
		XmppJid* _tmp2_;
		XmppJid* _tmp3_;
		const gchar* _tmp4_;
		_tmp0_ = self->priv->own_nicks;
		_tmp1_ = xmpp_jid_get_bare_jid (muc_jid);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = muc_jid->resourcepart;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, _tmp3_, _tmp4_);
		_xmpp_jid_unref0 (_tmp3_);
	}
}

gchar*
xmpp_xep_muc_flag_get_enter_id (XmppXepMucFlag* self,
                                XmppJid* muc_jid)
{
	GeeHashMap* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	gpointer _tmp4_;
	gchar* _tmp5_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (muc_jid != NULL, NULL);
	_tmp0_ = self->priv->enter_ids;
	_tmp1_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp3_);
	_tmp5_ = (gchar*) _tmp4_;
	_xmpp_jid_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

gboolean
xmpp_xep_muc_flag_is_muc (XmppXepMucFlag* self,
                          XmppJid* jid)
{
	GeeHashMap* _tmp0_;
	gpointer _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (jid != NULL, FALSE);
	_tmp0_ = self->priv->own_nicks;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, jid);
	_tmp2_ = (gchar*) _tmp1_;
	_tmp3_ = _tmp2_ != NULL;
	_g_free0 (_tmp2_);
	result = _tmp3_;
	return result;
}

gboolean
xmpp_xep_muc_flag_is_occupant (XmppXepMucFlag* self,
                               XmppJid* jid)
{
	gboolean _tmp0_ = FALSE;
	GeeHashMap* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	gboolean _tmp5_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (jid != NULL, FALSE);
	_tmp1_ = self->priv->own_nicks;
	_tmp2_ = xmpp_jid_get_bare_jid (jid);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp5_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _tmp4_);
	_xmpp_jid_unref0 (_tmp4_);
	if (_tmp5_) {
		_tmp0_ = TRUE;
	} else {
		GeeHashMap* _tmp6_;
		XmppJid* _tmp7_;
		XmppJid* _tmp8_;
		XmppJid* _tmp9_;
		_tmp6_ = self->priv->enter_ids;
		_tmp7_ = xmpp_jid_get_bare_jid (jid);
		_tmp8_ = _tmp7_;
		_tmp9_ = _tmp8_;
		_tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp6_, _tmp9_);
		_xmpp_jid_unref0 (_tmp9_);
	}
	result = _tmp0_;
	return result;
}

gboolean
xmpp_xep_muc_flag_is_muc_enter_outstanding (XmppXepMucFlag* self)
{
	GeeHashMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->enter_ids;
	_tmp1_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_ != 0;
	return result;
}

gchar*
xmpp_xep_muc_flag_get_muc_subject (XmppXepMucFlag* self,
                                   XmppJid* muc_jid)
{
	GeeHashMap* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	gpointer _tmp4_;
	gchar* _tmp5_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (muc_jid != NULL, NULL);
	_tmp0_ = self->priv->subjects;
	_tmp1_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp3_);
	_tmp5_ = (gchar*) _tmp4_;
	_xmpp_jid_unref0 (_tmp3_);
	result = _tmp5_;
	return result;
}

void
xmpp_xep_muc_flag_set_room_name (XmppXepMucFlag* self,
                                 XmppJid* muc_jid,
                                 const gchar* name)
{
	GeeHashMap* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (muc_jid != NULL);
	g_return_if_fail (name != NULL);
	_tmp0_ = self->priv->room_names;
	_tmp1_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, _tmp3_, name);
	_xmpp_jid_unref0 (_tmp3_);
}

void
xmpp_xep_muc_flag_set_room_features (XmppXepMucFlag* self,
                                     XmppJid* muc_jid,
                                     GeeList* features)
{
	GeeHashMap* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (muc_jid != NULL);
	g_return_if_fail (features != NULL);
	_tmp0_ = self->priv->room_features;
	_tmp1_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, _tmp3_, features);
	_xmpp_jid_unref0 (_tmp3_);
}

void
xmpp_xep_muc_flag_set_real_jid (XmppXepMucFlag* self,
                                XmppJid* full_jid,
                                XmppJid* real_jid)
{
	GeeHashMap* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (full_jid != NULL);
	g_return_if_fail (real_jid != NULL);
	_tmp0_ = self->priv->occupant_real_jids;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, full_jid, real_jid);
}

void
xmpp_xep_muc_flag_set_offline_member (XmppXepMucFlag* self,
                                      XmppJid* muc_jid,
                                      XmppJid* real_jid,
                                      XmppXepMucAffiliation affiliation)
{
	XmppJid* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	XmppJid* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (muc_jid != NULL);
	g_return_if_fail (real_jid != NULL);
	_tmp0_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = xmpp_jid_get_bare_jid (real_jid);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	xmpp_xep_muc_flag_set_affiliation (self, _tmp2_, _tmp5_, affiliation);
	_xmpp_jid_unref0 (_tmp5_);
	_xmpp_jid_unref0 (_tmp2_);
}

void
xmpp_xep_muc_flag_set_affiliation (XmppXepMucFlag* self,
                                   XmppJid* muc_jid,
                                   XmppJid* full_jid,
                                   XmppXepMucAffiliation affiliation)
{
	GeeHashMap* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (muc_jid != NULL);
	g_return_if_fail (full_jid != NULL);
	_tmp0_ = self->priv->affiliations;
	_tmp1_ = xmpp_jid_get_bare_jid (muc_jid);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	_tmp4_ = !gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, _tmp3_);
	_xmpp_jid_unref0 (_tmp3_);
	if (_tmp4_) {
		GeeHashMap* _tmp5_;
		XmppJid* _tmp6_;
		XmppJid* _tmp7_;
		XmppJid* _tmp8_;
		GeeHashMap* _tmp9_;
		GeeHashMap* _tmp10_;
		_tmp5_ = self->priv->affiliations;
		_tmp6_ = xmpp_jid_get_bare_jid (muc_jid);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_;
		_tmp9_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, XMPP_XEP_MUC_TYPE_AFFILIATION, NULL, NULL, _xmpp_jid_hash_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
		_tmp10_ = _tmp9_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, _tmp8_, _tmp10_);
		_g_object_unref0 (_tmp10_);
		_xmpp_jid_unref0 (_tmp8_);
	}
	if (affiliation == XMPP_XEP_MUC_AFFILIATION_NONE) {
		GeeHashMap* _tmp11_;
		XmppJid* _tmp12_;
		XmppJid* _tmp13_;
		XmppJid* _tmp14_;
		gpointer _tmp15_;
		GeeHashMap* _tmp16_;
		_tmp11_ = self->priv->affiliations;
		_tmp12_ = xmpp_jid_get_bare_jid (muc_jid);
		_tmp13_ = _tmp12_;
		_tmp14_ = _tmp13_;
		_tmp15_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp14_);
		_tmp16_ = (GeeHashMap*) _tmp15_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp16_, full_jid, NULL);
		_g_object_unref0 (_tmp16_);
		_xmpp_jid_unref0 (_tmp14_);
	} else {
		GeeHashMap* _tmp17_;
		XmppJid* _tmp18_;
		XmppJid* _tmp19_;
		XmppJid* _tmp20_;
		gpointer _tmp21_;
		GeeHashMap* _tmp22_;
		_tmp17_ = self->priv->affiliations;
		_tmp18_ = xmpp_jid_get_bare_jid (muc_jid);
		_tmp19_ = _tmp18_;
		_tmp20_ = _tmp19_;
		_tmp21_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp17_, _tmp20_);
		_tmp22_ = (GeeHashMap*) _tmp21_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp22_, full_jid, (gpointer) ((gintptr) affiliation));
		_g_object_unref0 (_tmp22_);
		_xmpp_jid_unref0 (_tmp20_);
	}
}

void
xmpp_xep_muc_flag_set_occupant_role (XmppXepMucFlag* self,
                                     XmppJid* full_jid,
                                     XmppXepMucRole role)
{
	GeeHashMap* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (full_jid != NULL);
	_tmp0_ = self->priv->occupant_role;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, full_jid, (gpointer) ((gintptr) role));
}

void
xmpp_xep_muc_flag_set_muc_subject (XmppXepMucFlag* self,
                                   XmppJid* full_jid,
                                   const gchar* subject)
{
	GeeHashMap* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	GeeHashMap* _tmp4_;
	XmppJid* _tmp5_;
	XmppJid* _tmp6_;
	XmppJid* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (full_jid != NULL);
	_tmp0_ = self->priv->subjects;
	_tmp1_ = xmpp_jid_get_bare_jid (full_jid);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, _tmp3_, subject);
	_xmpp_jid_unref0 (_tmp3_);
	_tmp4_ = self->priv->subjects_by;
	_tmp5_ = xmpp_jid_get_bare_jid (full_jid);
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp4_, _tmp7_, full_jid);
	_xmpp_jid_unref0 (_tmp7_);
}

void
xmpp_xep_muc_flag_start_muc_enter (XmppXepMucFlag* self,
                                   XmppJid* jid,
                                   const gchar* presence_id)
{
	GeeHashMap* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (presence_id != NULL);
	_tmp0_ = self->priv->enter_ids;
	_tmp1_ = xmpp_jid_get_bare_jid (jid);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, _tmp3_, presence_id);
	_xmpp_jid_unref0 (_tmp3_);
}

void
xmpp_xep_muc_flag_finish_muc_enter (XmppXepMucFlag* self,
                                    XmppJid* jid)
{
	GeeHashMap* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (jid != NULL);
	_tmp0_ = self->priv->enter_ids;
	_tmp1_ = xmpp_jid_get_bare_jid (jid);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp0_, _tmp3_, NULL);
	_xmpp_jid_unref0 (_tmp3_);
}

void
xmpp_xep_muc_flag_left_muc (XmppXepMucFlag* self,
                            XmppXmppStream* stream,
                            XmppJid* muc_jid)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp2_;
	GeeList* occupants = NULL;
	XmppFlagIdentity* _tmp3_;
	gpointer _tmp4_;
	XmppPresenceFlag* _tmp5_;
	GeeList* _tmp6_;
	GeeList* _tmp7_;
	GeeList* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (muc_jid != NULL);
	_tmp0_ = self->priv->own_nicks;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp0_, muc_jid, NULL);
	_tmp1_ = self->priv->subjects;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp1_, muc_jid, NULL);
	_tmp2_ = self->priv->subjects_by;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp2_, muc_jid, NULL);
	_tmp3_ = xmpp_presence_flag_IDENTITY;
	_tmp4_ = xmpp_xmpp_stream_get_flag (stream, XMPP_PRESENCE_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp3_);
	_tmp5_ = (XmppPresenceFlag*) _tmp4_;
	_tmp6_ = xmpp_presence_flag_get_resources (_tmp5_, muc_jid);
	_tmp7_ = _tmp6_;
	_g_object_unref0 (_tmp5_);
	occupants = _tmp7_;
	_tmp8_ = occupants;
	if (_tmp8_ != NULL) {
		{
			GeeList* _occupant_list = NULL;
			GeeList* _tmp9_;
			gint _occupant_size = 0;
			GeeList* _tmp10_;
			gint _tmp11_;
			gint _tmp12_;
			gint _occupant_index = 0;
			_tmp9_ = occupants;
			_occupant_list = _tmp9_;
			_tmp10_ = _occupant_list;
			_tmp11_ = gee_collection_get_size ((GeeCollection*) _tmp10_);
			_tmp12_ = _tmp11_;
			_occupant_size = _tmp12_;
			_occupant_index = -1;
			while (TRUE) {
				gint _tmp13_;
				gint _tmp14_;
				XmppJid* occupant = NULL;
				GeeList* _tmp15_;
				gpointer _tmp16_;
				XmppJid* _tmp17_;
				_occupant_index = _occupant_index + 1;
				_tmp13_ = _occupant_index;
				_tmp14_ = _occupant_size;
				if (!(_tmp13_ < _tmp14_)) {
					break;
				}
				_tmp15_ = _occupant_list;
				_tmp16_ = gee_list_get (_tmp15_, _occupant_index);
				occupant = (XmppJid*) _tmp16_;
				_tmp17_ = occupant;
				xmpp_xep_muc_flag_remove_occupant_info (self, _tmp17_);
				_xmpp_jid_unref0 (occupant);
			}
		}
	}
	_g_object_unref0 (occupants);
}

void
xmpp_xep_muc_flag_remove_occupant_info (XmppXepMucFlag* self,
                                        XmppJid* jid)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (jid != NULL);
	_tmp0_ = self->priv->occupant_real_jids;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp0_, jid, NULL);
	_tmp1_ = self->priv->affiliations;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, jid)) {
		GeeHashMap* _tmp2_;
		gpointer _tmp3_;
		GeeHashMap* _tmp4_;
		_tmp2_ = self->priv->affiliations;
		_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp2_, jid);
		_tmp4_ = (GeeHashMap*) _tmp3_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp4_, jid, NULL);
		_g_object_unref0 (_tmp4_);
	}
	_tmp5_ = self->priv->occupant_role;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp5_, jid, NULL);
}

static gchar*
xmpp_xep_muc_flag_real_get_ns (XmppXmppStreamFlag* base)
{
	XmppXepMucFlag * self;
	gchar* _tmp0_;
	gchar* result;
	self = (XmppXepMucFlag*) base;
	_tmp0_ = g_strdup (XMPP_XEP_MUC_NS_URI);
	result = _tmp0_;
	return result;
}

static gchar*
xmpp_xep_muc_flag_real_get_id (XmppXmppStreamFlag* base)
{
	XmppXepMucFlag * self;
	XmppFlagIdentity* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	self = (XmppXepMucFlag*) base;
	_tmp0_ = xmpp_xep_muc_flag_IDENTITY;
	_tmp1_ = xmpp_flag_identity_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}

XmppXepMucFlag*
xmpp_xep_muc_flag_construct (GType object_type)
{
	XmppXepMucFlag * self = NULL;
	self = (XmppXepMucFlag*) xmpp_xmpp_stream_flag_construct (object_type);
	return self;
}

XmppXepMucFlag*
xmpp_xep_muc_flag_new (void)
{
	return xmpp_xep_muc_flag_construct (XMPP_XEP_MUC_TYPE_FLAG);
}

static void
xmpp_xep_muc_flag_class_init (XmppXepMucFlagClass * klass,
                              gpointer klass_data)
{
	XmppFlagIdentity* _tmp0_;
	xmpp_xep_muc_flag_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &XmppXepMucFlag_private_offset);
	((XmppXmppStreamFlagClass *) klass)->get_ns = (gchar* (*) (XmppXmppStreamFlag*)) xmpp_xep_muc_flag_real_get_ns;
	((XmppXmppStreamFlagClass *) klass)->get_id = (gchar* (*) (XmppXmppStreamFlag*)) xmpp_xep_muc_flag_real_get_id;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_muc_flag_finalize;
	_tmp0_ = xmpp_flag_identity_new (XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, XMPP_XEP_MUC_NS_URI, "muc");
	xmpp_xep_muc_flag_IDENTITY = _tmp0_;
}

static void
xmpp_xep_muc_flag_instance_init (XmppXepMucFlag * self,
                                 gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp2_;
	GeeHashMap* _tmp3_;
	GeeHashMap* _tmp4_;
	GeeHashMap* _tmp5_;
	GeeHashMap* _tmp6_;
	GeeHashMap* _tmp7_;
	GeeHashMap* _tmp8_;
	GeeHashMap* _tmp9_;
	self->priv = xmpp_xep_muc_flag_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, GEE_TYPE_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _xmpp_jid_hash_bare_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_bare_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->priv->room_features = _tmp0_;
	_tmp1_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _xmpp_jid_hash_bare_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_bare_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->priv->room_names = _tmp1_;
	_tmp2_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _xmpp_jid_hash_bare_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_bare_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->priv->enter_ids = _tmp2_;
	_tmp3_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, GEE_TYPE_PROMISE, (GBoxedCopyFunc) gee_promise_ref, (GDestroyNotify) gee_promise_unref, _xmpp_jid_hash_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->enter_futures = _tmp3_;
	_tmp4_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _xmpp_jid_hash_bare_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_bare_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->priv->own_nicks = _tmp4_;
	_tmp5_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _xmpp_jid_hash_bare_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_bare_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->priv->subjects = _tmp5_;
	_tmp6_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, _xmpp_jid_hash_bare_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_bare_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->priv->subjects_by = _tmp6_;
	_tmp7_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, _xmpp_jid_hash_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_bare_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->priv->occupant_real_jids = _tmp7_;
	_tmp8_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, GEE_TYPE_HASH_MAP, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _xmpp_jid_hash_bare_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_bare_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->priv->affiliations = _tmp8_;
	_tmp9_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, XMPP_XEP_MUC_TYPE_ROLE, NULL, NULL, _xmpp_jid_hash_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->priv->occupant_role = _tmp9_;
}

static void
xmpp_xep_muc_flag_finalize (GObject * obj)
{
	XmppXepMucFlag * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_MUC_TYPE_FLAG, XmppXepMucFlag);
	_g_object_unref0 (self->priv->room_features);
	_g_object_unref0 (self->priv->room_names);
	_g_object_unref0 (self->priv->enter_ids);
	_g_object_unref0 (self->enter_futures);
	_g_object_unref0 (self->priv->own_nicks);
	_g_object_unref0 (self->priv->subjects);
	_g_object_unref0 (self->priv->subjects_by);
	_g_object_unref0 (self->priv->occupant_real_jids);
	_g_object_unref0 (self->priv->affiliations);
	_g_object_unref0 (self->priv->occupant_role);
	G_OBJECT_CLASS (xmpp_xep_muc_flag_parent_class)->finalize (obj);
}

static GType
xmpp_xep_muc_flag_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepMucFlagClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_muc_flag_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepMucFlag), 0, (GInstanceInitFunc) xmpp_xep_muc_flag_instance_init, NULL };
	GType xmpp_xep_muc_flag_type_id;
	xmpp_xep_muc_flag_type_id = g_type_register_static (XMPP_TYPE_XMPP_STREAM_FLAG, "XmppXepMucFlag", &g_define_type_info, 0);
	XmppXepMucFlag_private_offset = g_type_add_instance_private (xmpp_xep_muc_flag_type_id, sizeof (XmppXepMucFlagPrivate));
	return xmpp_xep_muc_flag_type_id;
}

GType
xmpp_xep_muc_flag_get_type (void)
{
	static volatile gsize xmpp_xep_muc_flag_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muc_flag_type_id__once)) {
		GType xmpp_xep_muc_flag_type_id;
		xmpp_xep_muc_flag_type_id = xmpp_xep_muc_flag_get_type_once ();
		g_once_init_leave (&xmpp_xep_muc_flag_type_id__once, xmpp_xep_muc_flag_type_id);
	}
	return xmpp_xep_muc_flag_type_id__once;
}

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

