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

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "xmpp-vala.h"
#include <glib-object.h>
#include <gobject/gvaluecollector.h>
#include <gio/gio.h>
#include <gee.h>

#define XMPP_XEP_MUC_NS_URI "http://jabber.org/protocol/muc"
#define XMPP_XEP_MUC_NS_URI_ADMIN XMPP_XEP_MUC_NS_URI "#admin"
#define XMPP_XEP_MUC_NS_URI_OWNER XMPP_XEP_MUC_NS_URI "#owner"
#define XMPP_XEP_MUC_NS_URI_USER XMPP_XEP_MUC_NS_URI "#user"
#define XMPP_XEP_MUC_NS_URI_REQUEST XMPP_XEP_MUC_NS_URI "#request"
#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 _xmpp_stanza_entry_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_stanza_entry_unref (var), NULL)))
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))
typedef struct _XmppXepMucParamSpecJoinResult XmppXepMucParamSpecJoinResult;
enum  {
	XMPP_XEP_MUC_MODULE_0_PROPERTY,
	XMPP_XEP_MUC_MODULE_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_muc_module_properties[XMPP_XEP_MUC_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)))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _xmpp_xep_muc_join_result_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_muc_join_result_unref (var), NULL)))
#define _gee_promise_unref0(var) ((var == NULL) ? NULL : (var = (gee_promise_unref (var), NULL)))
typedef struct _XmppXepMucModuleEnterData XmppXepMucModuleEnterData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _xmpp_xep_data_forms_data_form_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_data_forms_data_form_unref (var), NULL)))
typedef struct _XmppXepMucModuleChangeAffiliationData XmppXepMucModuleChangeAffiliationData;
typedef struct _XmppXepMucModuleGetConfigFormData XmppXepMucModuleGetConfigFormData;
typedef struct _XmppXepMucModuleSetConfigFormData XmppXepMucModuleSetConfigFormData;
#define _xmpp_error_stanza_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_error_stanza_unref (var), NULL)))
#define _xmpp_xep_service_discovery_info_result_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_service_discovery_info_result_unref (var), NULL)))
#define _xmpp_xep_service_discovery_identity_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_service_discovery_identity_unref (var), NULL)))
typedef struct _XmppXepMucModuleQueryRoomInfoData XmppXepMucModuleQueryRoomInfoData;
typedef struct _XmppXepMucModuleQueryAffiliationData XmppXepMucModuleQueryAffiliationData;
enum  {
	XMPP_XEP_MUC_MODULE_RECEIVED_OCCUPANT_AFFILIATION_SIGNAL,
	XMPP_XEP_MUC_MODULE_RECEIVED_OCCUPANT_JID_SIGNAL,
	XMPP_XEP_MUC_MODULE_RECEIVED_OCCUPANT_ROLE_SIGNAL,
	XMPP_XEP_MUC_MODULE_SUBJECT_SET_SIGNAL,
	XMPP_XEP_MUC_MODULE_INVITE_RECEIVED_SIGNAL,
	XMPP_XEP_MUC_MODULE_VOICE_REQUEST_RECEIVED_SIGNAL,
	XMPP_XEP_MUC_MODULE_ROOM_INFO_UPDATED_SIGNAL,
	XMPP_XEP_MUC_MODULE_SELF_REMOVED_FROM_ROOM_SIGNAL,
	XMPP_XEP_MUC_MODULE_REMOVED_FROM_ROOM_SIGNAL,
	XMPP_XEP_MUC_MODULE_NUM_SIGNALS
};
static guint xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_NUM_SIGNALS] = {0};
enum  {
	XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_0_PROPERTY,
	XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_ACTION_GROUP_PROPERTY,
	XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_AFTER_ACTIONS_PROPERTY,
	XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_muc_received_pipeline_listener_properties[XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_NUM_PROPERTIES];
typedef struct _XmppXepMucReceivedPipelineListenerRunData XmppXepMucReceivedPipelineListenerRunData;

struct _XmppXepMucParamSpecJoinResult {
	GParamSpec parent_instance;
};

struct _XmppXepMucModulePrivate {
	XmppXepMucReceivedPipelineListener* received_pipeline_listener;
};

struct _XmppXepMucModuleEnterData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepMucModule* self;
	XmppXmppStream* stream;
	XmppJid* bare_jid;
	gchar* nick;
	gchar* password;
	GDateTime* history_since;
	gboolean receive_history;
	XmppStanzaNode* additional_node;
	XmppXepMucJoinResult* result;
	XmppPresenceStanza* presence;
	XmppPresenceStanza* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	XmppStanzaNode* x_node;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppStanzaNode* _tmp10_;
	XmppStanzaNode* _tmp11_;
	XmppStanzaNode* _tmp12_;
	XmppStanzaNode* _tmp13_;
	XmppStanzaNode* _tmp14_;
	XmppStanzaNode* _tmp15_;
	gboolean _tmp16_;
	XmppStanzaNode* history_node;
	XmppStanzaNode* _tmp17_;
	XmppStanzaNode* _tmp18_;
	XmppStanzaNode* _tmp19_;
	XmppStanzaNode* _tmp20_;
	XmppStanzaNode* _tmp21_;
	XmppStanzaNode* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	XmppStanzaNode* _tmp25_;
	XmppStanzaNode* _tmp26_;
	XmppStanzaNode* _tmp27_;
	XmppStanzaNode* _tmp28_;
	XmppStanzaNode* _tmp29_;
	XmppStanzaNode* _tmp30_;
	XmppStanzaNode* _tmp31_;
	XmppStanzaNode* _tmp32_;
	XmppFlagIdentity* _tmp33_;
	gpointer _tmp34_;
	XmppXepMucFlag* _tmp35_;
	const gchar* _tmp36_;
	const gchar* _tmp37_;
	XmppModuleIdentity* _tmp38_;
	gpointer _tmp39_;
	XmppPresenceModule* _tmp40_;
	GeePromise* promise;
	GeePromise* _tmp41_;
	XmppFlagIdentity* _tmp42_;
	gpointer _tmp43_;
	XmppXepMucFlag* _tmp44_;
	GeeHashMap* _tmp45_;
	GeePromise* _tmp46_;
	XmppXepMucJoinResult* enter_result;
	GeePromise* _tmp47_;
	GeeFuture* _tmp48_;
	GeeFuture* _tmp49_;
	gconstpointer _tmp50_;
	XmppXepMucJoinResult* _tmp51_;
	XmppFlagIdentity* _tmp52_;
	gpointer _tmp53_;
	XmppXepMucFlag* _tmp54_;
	GeeHashMap* _tmp55_;
	XmppXepMucMucEnterError _tmp56_;
	XmppXepMucMucEnterError* _tmp57_;
	XmppXepMucJoinResult* _tmp58_;
	GError* _inner_error0_;
};

struct _XmppXepMucModuleChangeAffiliationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepMucModule* self;
	XmppXmppStream* stream;
	XmppJid* muc_jid;
	XmppJid* user_jid;
	gchar* nick;
	gchar* new_affiliation;
	XmppStanzaNode* item_node;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppJid* _tmp5_;
	XmppJid* _tmp6_;
	XmppJid* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	XmppStanzaNode* _tmp10_;
	XmppStanzaNode* _tmp11_;
	XmppStanzaNode* _tmp12_;
	XmppStanzaNode* _tmp13_;
	XmppStanzaNode* _tmp14_;
	XmppStanzaNode* query;
	XmppStanzaNode* _tmp15_;
	XmppStanzaNode* _tmp16_;
	XmppStanzaNode* _tmp17_;
	XmppStanzaNode* _tmp18_;
	XmppStanzaNode* _tmp19_;
	XmppStanzaNode* _tmp20_;
	XmppStanzaNode* _tmp21_;
	XmppIqStanza* iq;
	XmppJid* _tmp22_;
	XmppIqStanza* _tmp23_;
	XmppModuleIdentity* _tmp24_;
	gpointer _tmp25_;
	XmppIqModule* _tmp26_;
	XmppIqStanza* _tmp27_;
	XmppIqStanza* _tmp28_;
	GError* _inner_error0_;
};

struct _XmppXepMucModuleGetConfigFormData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepMucModule* self;
	XmppXmppStream* stream;
	XmppJid* jid;
	XmppXepDataFormsDataForm* result;
	XmppIqStanza* get_iq;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppJid* _tmp4_;
	XmppIqStanza* _tmp5_;
	XmppIqStanza* _tmp6_;
	XmppIqStanza* result_iq;
	XmppModuleIdentity* _tmp7_;
	gpointer _tmp8_;
	XmppIqModule* _tmp9_;
	XmppIqStanza* _tmp10_;
	XmppIqStanza* _tmp11_;
	XmppStanzaNode* x_node;
	XmppStanzaNode* _tmp12_;
	XmppStanzaNode* _tmp13_;
	XmppStanzaNode* _tmp14_;
	XmppXepDataFormsDataForm* data_form;
	XmppStanzaNode* _tmp15_;
	XmppXepDataFormsDataForm* _tmp16_;
	GError* _inner_error0_;
};

struct _XmppXepMucModuleSetConfigFormData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepMucModule* self;
	XmppXmppStream* stream;
	XmppJid* jid;
	XmppXepDataFormsDataForm* data_form;
	XmppStanzaNode* stanza_node;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppIqStanza* set_iq;
	XmppJid* _tmp7_;
	XmppIqStanza* _tmp8_;
	XmppModuleIdentity* _tmp9_;
	gpointer _tmp10_;
	XmppIqModule* _tmp11_;
	XmppIqStanza* _tmp12_;
	XmppIqStanza* _tmp13_;
	GError* _inner_error0_;
};

struct _XmppXepMucModuleQueryRoomInfoData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepMucModule* self;
	XmppXmppStream* stream;
	XmppJid* jid;
	XmppXepServiceDiscoveryInfoResult* info_result;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepServiceDiscoveryModule* _tmp2_;
	XmppXepServiceDiscoveryInfoResult* _tmp3_;
	XmppXepServiceDiscoveryInfoResult* _tmp4_;
	XmppXepServiceDiscoveryInfoResult* _tmp5_;
	GeeList* features;
	GeeArrayList* _tmp6_;
	GeeIterator* _identity_it;
	XmppXepServiceDiscoveryInfoResult* _tmp7_;
	GeeSet* _tmp8_;
	GeeSet* _tmp9_;
	GeeSet* _tmp10_;
	GeeIterator* _tmp11_;
	GeeIterator* _tmp12_;
	GeeIterator* _tmp13_;
	XmppXepServiceDiscoveryIdentity* identity;
	GeeIterator* _tmp14_;
	gpointer _tmp15_;
	gboolean _tmp16_;
	XmppXepServiceDiscoveryIdentity* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	XmppXepServiceDiscoveryIdentity* _tmp20_;
	const gchar* _tmp21_;
	const gchar* _tmp22_;
	XmppFlagIdentity* _tmp23_;
	gpointer _tmp24_;
	XmppXepMucFlag* _tmp25_;
	XmppXepServiceDiscoveryIdentity* _tmp26_;
	const gchar* _tmp27_;
	const gchar* _tmp28_;
	GeeList* _feature_list;
	XmppXepServiceDiscoveryInfoResult* _tmp29_;
	GeeList* _tmp30_;
	GeeList* _tmp31_;
	gint _feature_size;
	GeeList* _tmp32_;
	gint _tmp33_;
	gint _tmp34_;
	gint _feature_index;
	gint _tmp35_;
	gint _tmp36_;
	gchar* feature;
	GeeList* _tmp37_;
	gpointer _tmp38_;
	XmppXepMucFeature* parsed;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	GQuark _tmp42_;
	XmppXepMucFeature _tmp43_;
	XmppXepMucFeature* _tmp44_;
	XmppXepMucFeature _tmp45_;
	XmppXepMucFeature* _tmp46_;
	XmppXepMucFeature _tmp47_;
	XmppXepMucFeature* _tmp48_;
	XmppXepMucFeature _tmp49_;
	XmppXepMucFeature* _tmp50_;
	XmppXepMucFeature _tmp51_;
	XmppXepMucFeature* _tmp52_;
	XmppXepMucFeature _tmp53_;
	XmppXepMucFeature* _tmp54_;
	XmppXepMucFeature _tmp55_;
	XmppXepMucFeature* _tmp56_;
	XmppXepMucFeature _tmp57_;
	XmppXepMucFeature* _tmp58_;
	XmppXepMucFeature _tmp59_;
	XmppXepMucFeature* _tmp60_;
	XmppXepMucFeature _tmp61_;
	XmppXepMucFeature* _tmp62_;
	XmppXepMucFeature _tmp63_;
	XmppXepMucFeature* _tmp64_;
	XmppXepMucFeature _tmp65_;
	XmppXepMucFeature* _tmp66_;
	XmppXepMucFeature _tmp67_;
	XmppXepMucFeature* _tmp68_;
	XmppXepMucFeature _tmp69_;
	XmppXepMucFeature* _tmp70_;
	XmppXepMucFeature _tmp71_;
	XmppXepMucFeature* _tmp72_;
	XmppXepMucFeature _tmp73_;
	XmppXepMucFeature* _tmp74_;
	XmppXepMucFeature _tmp75_;
	XmppXepMucFeature* _tmp76_;
	XmppXepMucFeature* _tmp77_;
	GeeList* _tmp78_;
	XmppXepMucFeature* _tmp79_;
	XmppFlagIdentity* _tmp80_;
	gpointer _tmp81_;
	XmppXepMucFlag* _tmp82_;
	GeeList* _tmp83_;
};

struct _XmppXepMucModuleQueryAffiliationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepMucModule* self;
	XmppXmppStream* stream;
	XmppJid* jid;
	gchar* affiliation;
	GeeList* result;
	XmppIqStanza* iq;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppJid* _tmp10_;
	XmppIqStanza* _tmp11_;
	XmppIqStanza* _tmp12_;
	XmppIqStanza* iq_result;
	XmppModuleIdentity* _tmp13_;
	gpointer _tmp14_;
	XmppIqModule* _tmp15_;
	XmppIqStanza* _tmp16_;
	XmppIqStanza* _tmp17_;
	XmppIqStanza* _tmp18_;
	XmppIqStanza* _tmp19_;
	XmppStanzaNode* query_node;
	XmppIqStanza* _tmp20_;
	XmppStanzaNode* _tmp21_;
	XmppStanzaNode* _tmp22_;
	XmppStanzaNode* _tmp23_;
	GeeList* item_nodes;
	XmppStanzaNode* _tmp24_;
	GeeList* _tmp25_;
	GeeList* ret_jids;
	GeeArrayList* _tmp26_;
	GeeList* _item_list;
	GeeList* _tmp27_;
	gint _item_size;
	GeeList* _tmp28_;
	gint _tmp29_;
	gint _tmp30_;
	gint _item_index;
	gint _tmp31_;
	gint _tmp32_;
	XmppStanzaNode* item;
	GeeList* _tmp33_;
	gpointer _tmp34_;
	gchar* jid__;
	XmppStanzaNode* _tmp35_;
	const gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* affiliation_;
	XmppStanzaNode* _tmp38_;
	const gchar* _tmp39_;
	gchar* _tmp40_;
	gboolean _tmp41_;
	const gchar* _tmp42_;
	const gchar* _tmp43_;
	XmppJid* jid_;
	const gchar* _tmp44_;
	XmppJid* _tmp45_;
	XmppFlagIdentity* _tmp46_;
	gpointer _tmp47_;
	XmppXepMucFlag* _tmp48_;
	XmppIqStanza* _tmp49_;
	XmppJid* _tmp50_;
	XmppJid* _tmp51_;
	XmppJid* _tmp52_;
	XmppJid* _tmp53_;
	const gchar* _tmp54_;
	GeeList* _tmp55_;
	XmppJid* _tmp56_;
	XmppIqStanza* _tmp57_;
	XmppJid* _tmp58_;
	XmppJid* _tmp59_;
	XmppJid* _tmp60_;
	XmppJid* _tmp61_;
	GError* e;
	GError* _tmp62_;
	const gchar* _tmp63_;
	GError* _inner_error0_;
};

struct _XmppXepMucReceivedPipelineListenerPrivate {
	gchar** after_actions_const;
	gint after_actions_const_length1;
	gint _after_actions_const_size_;
	XmppXepMucModule* outer;
};

struct _XmppXepMucReceivedPipelineListenerRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepMucReceivedPipelineListener* self;
	XmppXmppStream* stream;
	XmppMessageStanza* message;
	gboolean result;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	XmppStanzaNode* x_node;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* invite_node;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	gchar* password;
	XmppStanzaNode* password_node;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppStanzaNode* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	XmppStanzaNode* _tmp13_;
	XmppJid* from_jid;
	gchar* from;
	XmppStanzaNode* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	XmppJid* _tmp18_;
	const gchar* _tmp19_;
	XmppJid* _tmp20_;
	XmppJid* _tmp21_;
	GError* e;
	GError* _tmp22_;
	const gchar* _tmp23_;
	XmppJid* _tmp24_;
	XmppStanzaNode* reason_node;
	XmppStanzaNode* _tmp25_;
	XmppStanzaNode* _tmp26_;
	gchar* reason;
	XmppStanzaNode* _tmp27_;
	XmppStanzaNode* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gboolean is_mam_message;
	XmppMessageArchiveManagementMessageFlag* _tmp31_;
	XmppMessageArchiveManagementMessageFlag* _tmp32_;
	gboolean _tmp33_;
	XmppXepMucModule* _tmp34_;
	XmppJid* _tmp35_;
	XmppJid* _tmp36_;
	XmppJid* _tmp37_;
	XmppJid* _tmp38_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	XmppStanzaNode* x_field_node;
	XmppStanzaNode* _tmp41_;
	XmppStanzaNode* _tmp42_;
	XmppStanzaNode* _tmp43_;
	GeeList* fields;
	XmppStanzaNode* _tmp44_;
	GeeList* _tmp45_;
	XmppJid* _vala1_from_jid;
	gchar* nick;
	GeeList* _tmp46_;
	gint _tmp47_;
	gint _tmp48_;
	GeeList* _field_node_list;
	GeeList* _tmp49_;
	gint _field_node_size;
	GeeList* _tmp50_;
	gint _tmp51_;
	gint _tmp52_;
	gint _field_node_index;
	gint _tmp53_;
	gint _tmp54_;
	XmppStanzaNode* field_node;
	GeeList* _tmp55_;
	gpointer _tmp56_;
	gchar* var_;
	XmppStanzaNode* _tmp57_;
	const gchar* _tmp58_;
	gchar* _tmp59_;
	const gchar* _tmp60_;
	XmppStanzaNode* value_node;
	XmppStanzaNode* _tmp61_;
	XmppStanzaNode* _tmp62_;
	XmppStanzaNode* _tmp63_;
	XmppJid* _tmp64_;
	XmppStanzaNode* _tmp65_;
	const gchar* _tmp66_;
	XmppJid* _tmp67_;
	XmppJid* _tmp68_;
	const gchar* _tmp69_;
	XmppStanzaNode* _vala1_value_node;
	XmppStanzaNode* _tmp70_;
	XmppStanzaNode* _tmp71_;
	XmppStanzaNode* _tmp72_;
	XmppStanzaNode* _tmp73_;
	const gchar* _tmp74_;
	gchar* _tmp75_;
	const gchar* _tmp76_;
	XmppStanzaNode* _vala2_value_node;
	XmppStanzaNode* _tmp77_;
	XmppStanzaNode* _tmp78_;
	XmppStanzaNode* _tmp79_;
	XmppStanzaNode* _tmp80_;
	const gchar* _tmp81_;
	gboolean _tmp82_;
	XmppJid* _tmp83_;
	const gchar* _tmp84_;
	XmppXepMucModule* _tmp85_;
	XmppJid* _tmp86_;
	XmppJid* _tmp87_;
	XmppJid* _tmp88_;
	XmppJid* _tmp89_;
	const gchar* _tmp90_;
	GError* _inner_error0_;
};

static gpointer xmpp_xep_muc_join_result_parent_class = NULL;
static gint XmppXepMucModule_private_offset;
static gpointer xmpp_xep_muc_module_parent_class = NULL;
XmppModuleIdentity* xmpp_xep_muc_module_IDENTITY = NULL;
static gint XmppXepMucReceivedPipelineListener_private_offset;
static gpointer xmpp_xep_muc_received_pipeline_listener_parent_class = NULL;

static void xmpp_xep_muc_join_result_finalize (XmppXepMucJoinResult * obj);
static GType xmpp_xep_muc_join_result_get_type_once (void);
static void xmpp_xep_muc_module_enter_data_free (gpointer _data);
static gboolean xmpp_xep_muc_module_enter_co (XmppXepMucModuleEnterData* _data_);
VALA_EXTERN void xmpp_xep_muc_flag_start_muc_enter (XmppXepMucFlag* self,
                                        XmppJid* jid,
                                        const gchar* presence_id);
static void xmpp_xep_muc_module_query_room_info (XmppXepMucModule* self,
                                          XmppXmppStream* stream,
                                          XmppJid* jid,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_);
static void xmpp_xep_muc_module_query_room_info_finish (XmppXepMucModule* self,
                                                 GAsyncResult* _res_);
static void xmpp_xep_muc_module_enter_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_);
static XmppXepMucMucEnterError* _xmpp_xep_muc_muc_enter_error_dup (XmppXepMucMucEnterError* self);
VALA_EXTERN XmppXepDataFormsDataForm* xmpp_xep_data_forms_data_form_new (void);
VALA_EXTERN XmppXepDataFormsDataForm* xmpp_xep_data_forms_data_form_construct (GType object_type);
static void xmpp_xep_muc_module_change_affiliation_data_free (gpointer _data);
static gboolean xmpp_xep_muc_module_change_affiliation_co (XmppXepMucModuleChangeAffiliationData* _data_);
static void xmpp_xep_muc_module_change_affiliation_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
static void xmpp_xep_muc_module_get_config_form_data_free (gpointer _data);
static gboolean xmpp_xep_muc_module_get_config_form_co (XmppXepMucModuleGetConfigFormData* _data_);
static void xmpp_xep_muc_module_get_config_form_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_);
static void xmpp_xep_muc_module_set_config_form_data_free (gpointer _data);
static gboolean xmpp_xep_muc_module_set_config_form_co (XmppXepMucModuleSetConfigFormData* _data_);
static void xmpp_xep_muc_module_set_config_form_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_);
static void xmpp_xep_muc_module_real_attach (XmppXmppStreamModule* base,
                                      XmppXmppStream* stream);
static void xmpp_xep_muc_module_on_received_message (XmppXepMucModule* self,
                                              XmppXmppStream* stream,
                                              XmppMessageStanza* message);
static void _xmpp_xep_muc_module_on_received_message_xmpp_message_module_received_message (XmppMessageModule* _sender,
                                                                                    XmppXmppStream* stream,
                                                                                    XmppMessageStanza* message,
                                                                                    gpointer self);
static void xmpp_xep_muc_module_on_received_available (XmppXepMucModule* self,
                                                XmppXmppStream* stream,
                                                XmppPresenceStanza* presence);
static void _xmpp_xep_muc_module_on_received_available_xmpp_presence_module_received_available (XmppPresenceModule* _sender,
                                                                                         XmppXmppStream* stream,
                                                                                         XmppPresenceStanza* presence,
                                                                                         gpointer self);
static void xmpp_xep_muc_module_check_for_enter_error (XmppXepMucModule* self,
                                                XmppXmppStream* stream,
                                                XmppPresenceStanza* presence);
static void _xmpp_xep_muc_module_check_for_enter_error_xmpp_presence_module_received_presence (XmppPresenceModule* _sender,
                                                                                        XmppXmppStream* stream,
                                                                                        XmppPresenceStanza* presence,
                                                                                        gpointer self);
static void xmpp_xep_muc_module_on_received_unavailable (XmppXepMucModule* self,
                                                  XmppXmppStream* stream,
                                                  XmppPresenceStanza* presence);
static void _xmpp_xep_muc_module_on_received_unavailable_xmpp_presence_module_received_unavailable (XmppPresenceModule* _sender,
                                                                                             XmppXmppStream* stream,
                                                                                             XmppPresenceStanza* presence,
                                                                                             gpointer self);
static void xmpp_xep_muc_module_real_detach (XmppXmppStreamModule* base,
                                      XmppXmppStream* stream);
static gchar* xmpp_xep_muc_module_real_get_ns (XmppXmppStreamModule* base);
static gchar* xmpp_xep_muc_module_real_get_id (XmppXmppStreamModule* base);
VALA_EXTERN void xmpp_xep_muc_flag_set_muc_subject (XmppXepMucFlag* self,
                                        XmppJid* full_jid,
                                        const gchar* subject);
static GeeArrayList* xmpp_xep_muc_module_get_status_codes (XmppStanzaNode* x_node);
VALA_EXTERN void xmpp_xep_muc_flag_finish_muc_enter (XmppXepMucFlag* self,
                                         XmppJid* jid);
static void xmpp_xep_muc_module_query_affiliation (XmppXepMucModule* self,
                                            XmppXmppStream* stream,
                                            XmppJid* jid,
                                            const gchar* affiliation,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
static GeeList* xmpp_xep_muc_module_query_affiliation_finish (XmppXepMucModule* self,
                                                       GAsyncResult* _res_);
static XmppXepMucAffiliation xmpp_xep_muc_module_parse_affiliation (const gchar* affiliation_str);
static XmppXepMucAffiliation* _xmpp_xep_muc_affiliation_dup (XmppXepMucAffiliation* self);
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_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);
static XmppXepMucRole xmpp_xep_muc_module_parse_role (const gchar* role_str);
VALA_EXTERN void xmpp_xep_muc_flag_set_occupant_role (XmppXepMucFlag* self,
                                          XmppJid* full_jid,
                                          XmppXepMucRole role);
VALA_EXTERN void xmpp_xep_muc_flag_remove_occupant_info (XmppXepMucFlag* self,
                                             XmppJid* jid);
VALA_EXTERN void xmpp_xep_muc_flag_left_muc (XmppXepMucFlag* self,
                                 XmppXmppStream* stream,
                                 XmppJid* muc_jid);
static void xmpp_xep_muc_module_query_room_info_data_free (gpointer _data);
static gboolean xmpp_xep_muc_module_query_room_info_co (XmppXepMucModuleQueryRoomInfoData* _data_);
static void xmpp_xep_muc_module_query_room_info_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_);
VALA_EXTERN void xmpp_xep_muc_flag_set_room_name (XmppXepMucFlag* self,
                                      XmppJid* muc_jid,
                                      const gchar* name);
static XmppXepMucFeature* _xmpp_xep_muc_feature_dup (XmppXepMucFeature* self);
VALA_EXTERN void xmpp_xep_muc_flag_set_room_features (XmppXepMucFlag* self,
                                          XmppJid* muc_jid,
                                          GeeList* features);
static void xmpp_xep_muc_module_query_affiliation_data_free (gpointer _data);
static gboolean xmpp_xep_muc_module_query_affiliation_co (XmppXepMucModuleQueryAffiliationData* _data_);
static void xmpp_xep_muc_module_query_affiliation_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
static gboolean _xmpp_jid_equals_func_gee_equal_data_func (gconstpointer a,
                                                    gconstpointer b,
                                                    gpointer self);
static void g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_POINTER (GClosure * closure,
                                                            GValue * return_value,
                                                            guint n_param_values,
                                                            const GValue * param_values,
                                                            gpointer invocation_hint,
                                                            gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_XMPP_JID (GClosure * closure,
                                                             GValue * return_value,
                                                             guint n_param_values,
                                                             const GValue * param_values,
                                                             gpointer invocation_hint,
                                                             gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_STRING_XMPP_JID (GClosure * closure,
                                                           GValue * return_value,
                                                           guint n_param_values,
                                                           const GValue * param_values,
                                                           gpointer invocation_hint,
                                                           gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING_STRING (GClosure * closure,
                                                                           GValue * return_value,
                                                                           guint n_param_values,
                                                                           const GValue * param_values,
                                                                           gpointer invocation_hint,
                                                                           gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING (GClosure * closure,
                                                                    GValue * return_value,
                                                                    guint n_param_values,
                                                                    const GValue * param_values,
                                                                    gpointer invocation_hint,
                                                                    gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_ENUM (GClosure * closure,
                                                         GValue * return_value,
                                                         guint n_param_values,
                                                         const GValue * param_values,
                                                         gpointer invocation_hint,
                                                         gpointer marshal_data);
static void xmpp_xep_muc_module_finalize (GObject * obj);
static GType xmpp_xep_muc_module_get_type_once (void);
static void xmpp_xep_muc_received_pipeline_listener_real_run_data_free (gpointer _data);
static void xmpp_xep_muc_received_pipeline_listener_real_run (XmppStanzaListener* base,
                                                       XmppXmppStream* stream,
                                                       XmppMessageStanza* message,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_);
static gboolean xmpp_xep_muc_received_pipeline_listener_real_run_co (XmppXepMucReceivedPipelineListenerRunData* _data_);
static void xmpp_xep_muc_received_pipeline_listener_finalize (GObject * obj);
static GType xmpp_xep_muc_received_pipeline_listener_get_type_once (void);
static void _vala_xmpp_xep_muc_received_pipeline_listener_get_property (GObject * object,
                                                                 guint property_id,
                                                                 GValue * value,
                                                                 GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

VALA_EXTERN const XmppXepMucStatusCode XMPP_XEP_MUC_USER_REMOVED_CODES[5];

static GType
xmpp_xep_muc_muc_enter_error_get_type_once (void)
{
	static const GEnumValue values[] = {{XMPP_XEP_MUC_MUC_ENTER_ERROR_PASSWORD_REQUIRED, "XMPP_XEP_MUC_MUC_ENTER_ERROR_PASSWORD_REQUIRED", "password-required"}, {XMPP_XEP_MUC_MUC_ENTER_ERROR_BANNED, "XMPP_XEP_MUC_MUC_ENTER_ERROR_BANNED", "banned"}, {XMPP_XEP_MUC_MUC_ENTER_ERROR_ROOM_DOESNT_EXIST, "XMPP_XEP_MUC_MUC_ENTER_ERROR_ROOM_DOESNT_EXIST", "room-doesnt-exist"}, {XMPP_XEP_MUC_MUC_ENTER_ERROR_CREATION_RESTRICTED, "XMPP_XEP_MUC_MUC_ENTER_ERROR_CREATION_RESTRICTED", "creation-restricted"}, {XMPP_XEP_MUC_MUC_ENTER_ERROR_USE_RESERVED_ROOMNICK, "XMPP_XEP_MUC_MUC_ENTER_ERROR_USE_RESERVED_ROOMNICK", "use-reserved-roomnick"}, {XMPP_XEP_MUC_MUC_ENTER_ERROR_NOT_IN_MEMBER_LIST, "XMPP_XEP_MUC_MUC_ENTER_ERROR_NOT_IN_MEMBER_LIST", "not-in-member-list"}, {XMPP_XEP_MUC_MUC_ENTER_ERROR_NICK_CONFLICT, "XMPP_XEP_MUC_MUC_ENTER_ERROR_NICK_CONFLICT", "nick-conflict"}, {XMPP_XEP_MUC_MUC_ENTER_ERROR_OCCUPANT_LIMIT_REACHED, "XMPP_XEP_MUC_MUC_ENTER_ERROR_OCCUPANT_LIMIT_REACHED", "occupant-limit-reached"}, {0, NULL, NULL}};
	GType xmpp_xep_muc_muc_enter_error_type_id;
	xmpp_xep_muc_muc_enter_error_type_id = g_enum_register_static ("XmppXepMucMucEnterError", values);
	return xmpp_xep_muc_muc_enter_error_type_id;
}

GType
xmpp_xep_muc_muc_enter_error_get_type (void)
{
	static volatile gsize xmpp_xep_muc_muc_enter_error_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muc_muc_enter_error_type_id__once)) {
		GType xmpp_xep_muc_muc_enter_error_type_id;
		xmpp_xep_muc_muc_enter_error_type_id = xmpp_xep_muc_muc_enter_error_get_type_once ();
		g_once_init_leave (&xmpp_xep_muc_muc_enter_error_type_id__once, xmpp_xep_muc_muc_enter_error_type_id);
	}
	return xmpp_xep_muc_muc_enter_error_type_id__once;
}

static GType
xmpp_xep_muc_affiliation_get_type_once (void)
{
	static const GEnumValue values[] = {{XMPP_XEP_MUC_AFFILIATION_NONE, "XMPP_XEP_MUC_AFFILIATION_NONE", "none"}, {XMPP_XEP_MUC_AFFILIATION_ADMIN, "XMPP_XEP_MUC_AFFILIATION_ADMIN", "admin"}, {XMPP_XEP_MUC_AFFILIATION_MEMBER, "XMPP_XEP_MUC_AFFILIATION_MEMBER", "member"}, {XMPP_XEP_MUC_AFFILIATION_OUTCAST, "XMPP_XEP_MUC_AFFILIATION_OUTCAST", "outcast"}, {XMPP_XEP_MUC_AFFILIATION_OWNER, "XMPP_XEP_MUC_AFFILIATION_OWNER", "owner"}, {0, NULL, NULL}};
	GType xmpp_xep_muc_affiliation_type_id;
	xmpp_xep_muc_affiliation_type_id = g_enum_register_static ("XmppXepMucAffiliation", values);
	return xmpp_xep_muc_affiliation_type_id;
}

GType
xmpp_xep_muc_affiliation_get_type (void)
{
	static volatile gsize xmpp_xep_muc_affiliation_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muc_affiliation_type_id__once)) {
		GType xmpp_xep_muc_affiliation_type_id;
		xmpp_xep_muc_affiliation_type_id = xmpp_xep_muc_affiliation_get_type_once ();
		g_once_init_leave (&xmpp_xep_muc_affiliation_type_id__once, xmpp_xep_muc_affiliation_type_id);
	}
	return xmpp_xep_muc_affiliation_type_id__once;
}

static GType
xmpp_xep_muc_role_get_type_once (void)
{
	static const GEnumValue values[] = {{XMPP_XEP_MUC_ROLE_NONE, "XMPP_XEP_MUC_ROLE_NONE", "none"}, {XMPP_XEP_MUC_ROLE_MODERATOR, "XMPP_XEP_MUC_ROLE_MODERATOR", "moderator"}, {XMPP_XEP_MUC_ROLE_PARTICIPANT, "XMPP_XEP_MUC_ROLE_PARTICIPANT", "participant"}, {XMPP_XEP_MUC_ROLE_VISITOR, "XMPP_XEP_MUC_ROLE_VISITOR", "visitor"}, {0, NULL, NULL}};
	GType xmpp_xep_muc_role_type_id;
	xmpp_xep_muc_role_type_id = g_enum_register_static ("XmppXepMucRole", values);
	return xmpp_xep_muc_role_type_id;
}

GType
xmpp_xep_muc_role_get_type (void)
{
	static volatile gsize xmpp_xep_muc_role_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muc_role_type_id__once)) {
		GType xmpp_xep_muc_role_type_id;
		xmpp_xep_muc_role_type_id = xmpp_xep_muc_role_get_type_once ();
		g_once_init_leave (&xmpp_xep_muc_role_type_id__once, xmpp_xep_muc_role_type_id);
	}
	return xmpp_xep_muc_role_type_id__once;
}

static GType
xmpp_xep_muc_feature_get_type_once (void)
{
	static const GEnumValue values[] = {{XMPP_XEP_MUC_FEATURE_REGISTER, "XMPP_XEP_MUC_FEATURE_REGISTER", "register"}, {XMPP_XEP_MUC_FEATURE_ROOMCONFIG, "XMPP_XEP_MUC_FEATURE_ROOMCONFIG", "roomconfig"}, {XMPP_XEP_MUC_FEATURE_ROOMINFO, "XMPP_XEP_MUC_FEATURE_ROOMINFO", "roominfo"}, {XMPP_XEP_MUC_FEATURE_HIDDEN, "XMPP_XEP_MUC_FEATURE_HIDDEN", "hidden"}, {XMPP_XEP_MUC_FEATURE_MEMBERS_ONLY, "XMPP_XEP_MUC_FEATURE_MEMBERS_ONLY", "members-only"}, {XMPP_XEP_MUC_FEATURE_MODERATED, "XMPP_XEP_MUC_FEATURE_MODERATED", "moderated"}, {XMPP_XEP_MUC_FEATURE_NON_ANONYMOUS, "XMPP_XEP_MUC_FEATURE_NON_ANONYMOUS", "non-anonymous"}, {XMPP_XEP_MUC_FEATURE_OPEN, "XMPP_XEP_MUC_FEATURE_OPEN", "open"}, {XMPP_XEP_MUC_FEATURE_PASSWORD_PROTECTED, "XMPP_XEP_MUC_FEATURE_PASSWORD_PROTECTED", "password-protected"}, {XMPP_XEP_MUC_FEATURE_PERSISTENT, "XMPP_XEP_MUC_FEATURE_PERSISTENT", "persistent"}, {XMPP_XEP_MUC_FEATURE_PUBLIC, "XMPP_XEP_MUC_FEATURE_PUBLIC", "public"}, {XMPP_XEP_MUC_FEATURE_ROOMS, "XMPP_XEP_MUC_FEATURE_ROOMS", "rooms"}, {XMPP_XEP_MUC_FEATURE_SEMI_ANONYMOUS, "XMPP_XEP_MUC_FEATURE_SEMI_ANONYMOUS", "semi-anonymous"}, {XMPP_XEP_MUC_FEATURE_STABLE_ID, "XMPP_XEP_MUC_FEATURE_STABLE_ID", "stable-id"}, {XMPP_XEP_MUC_FEATURE_TEMPORARY, "XMPP_XEP_MUC_FEATURE_TEMPORARY", "temporary"}, {XMPP_XEP_MUC_FEATURE_UNMODERATED, "XMPP_XEP_MUC_FEATURE_UNMODERATED", "unmoderated"}, {XMPP_XEP_MUC_FEATURE_UNSECURED, "XMPP_XEP_MUC_FEATURE_UNSECURED", "unsecured"}, {0, NULL, NULL}};
	GType xmpp_xep_muc_feature_type_id;
	xmpp_xep_muc_feature_type_id = g_enum_register_static ("XmppXepMucFeature", values);
	return xmpp_xep_muc_feature_type_id;
}

GType
xmpp_xep_muc_feature_get_type (void)
{
	static volatile gsize xmpp_xep_muc_feature_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muc_feature_type_id__once)) {
		GType xmpp_xep_muc_feature_type_id;
		xmpp_xep_muc_feature_type_id = xmpp_xep_muc_feature_get_type_once ();
		g_once_init_leave (&xmpp_xep_muc_feature_type_id__once, xmpp_xep_muc_feature_type_id);
	}
	return xmpp_xep_muc_feature_type_id__once;
}

void
xmpp_xep_muc_add_muc_pm_message_stanza_x_node (XmppMessageStanza* message_stanza)
{
	XmppStanzaNode* x_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	g_return_if_fail (message_stanza != NULL);
	_tmp0_ = xmpp_stanza_node_new_build ("x", "http://jabber.org/protocol/muc#user", NULL, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = xmpp_stanza_node_add_self_xmlns (_tmp1_);
	_tmp3_ = _tmp2_;
	_xmpp_stanza_entry_unref0 (_tmp1_);
	x_node = _tmp3_;
	_tmp4_ = ((XmppStanza*) message_stanza)->stanza;
	_tmp5_ = xmpp_stanza_node_put_node (_tmp4_, x_node);
	_tmp6_ = _tmp5_;
	_xmpp_stanza_entry_unref0 (_tmp6_);
	_xmpp_stanza_entry_unref0 (x_node);
}

XmppXepMucJoinResult*
xmpp_xep_muc_join_result_construct (GType object_type)
{
	XmppXepMucJoinResult* self = NULL;
	self = (XmppXepMucJoinResult*) g_type_create_instance (object_type);
	return self;
}

XmppXepMucJoinResult*
xmpp_xep_muc_join_result_new (void)
{
	return xmpp_xep_muc_join_result_construct (XMPP_XEP_MUC_TYPE_JOIN_RESULT);
}

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

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

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

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

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

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

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

void
xmpp_xep_muc_value_set_join_result (GValue* value,
                                    gpointer v_object)
{
	XmppXepMucJoinResult * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_MUC_TYPE_JOIN_RESULT));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_MUC_TYPE_JOIN_RESULT));
		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_muc_join_result_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_muc_join_result_unref (old);
	}
}

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

static void
xmpp_xep_muc_join_result_class_init (XmppXepMucJoinResultClass * klass,
                                     gpointer klass_data)
{
	xmpp_xep_muc_join_result_parent_class = g_type_class_peek_parent (klass);
	((XmppXepMucJoinResultClass *) klass)->finalize = xmpp_xep_muc_join_result_finalize;
}

static void
xmpp_xep_muc_join_result_instance_init (XmppXepMucJoinResult * self,
                                        gpointer klass)
{
	self->newly_created = FALSE;
	self->ref_count = 1;
}

static void
xmpp_xep_muc_join_result_finalize (XmppXepMucJoinResult * obj)
{
	XmppXepMucJoinResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_MUC_TYPE_JOIN_RESULT, XmppXepMucJoinResult);
	g_signal_handlers_destroy (self);
	_g_free0 (self->muc_error);
	_g_free0 (self->stanza_error);
	_g_free0 (self->nick);
}

static GType
xmpp_xep_muc_join_result_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_muc_value_join_result_init, xmpp_xep_muc_value_join_result_free_value, xmpp_xep_muc_value_join_result_copy_value, xmpp_xep_muc_value_join_result_peek_pointer, "p", xmpp_xep_muc_value_join_result_collect_value, "p", xmpp_xep_muc_value_join_result_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepMucJoinResultClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_muc_join_result_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepMucJoinResult), 0, (GInstanceInitFunc) xmpp_xep_muc_join_result_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_muc_join_result_type_id;
	xmpp_xep_muc_join_result_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepMucJoinResult", &g_define_type_info, &g_define_type_fundamental_info, 0);
	return xmpp_xep_muc_join_result_type_id;
}

GType
xmpp_xep_muc_join_result_get_type (void)
{
	static volatile gsize xmpp_xep_muc_join_result_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muc_join_result_type_id__once)) {
		GType xmpp_xep_muc_join_result_type_id;
		xmpp_xep_muc_join_result_type_id = xmpp_xep_muc_join_result_get_type_once ();
		g_once_init_leave (&xmpp_xep_muc_join_result_type_id__once, xmpp_xep_muc_join_result_type_id);
	}
	return xmpp_xep_muc_join_result_type_id__once;
}

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

void
xmpp_xep_muc_join_result_unref (gpointer instance)
{
	XmppXepMucJoinResult * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_MUC_JOIN_RESULT_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
xmpp_xep_muc_module_get_instance_private (XmppXepMucModule* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepMucModule_private_offset);
}

XmppXepMucModule*
xmpp_xep_muc_module_construct (GType object_type)
{
	XmppXepMucModule * self = NULL;
	XmppXepMucReceivedPipelineListener* _tmp0_;
	self = (XmppXepMucModule*) xmpp_xmpp_stream_module_construct (object_type);
	_tmp0_ = xmpp_xep_muc_received_pipeline_listener_new (self);
	_g_object_unref0 (self->priv->received_pipeline_listener);
	self->priv->received_pipeline_listener = _tmp0_;
	return self;
}

XmppXepMucModule*
xmpp_xep_muc_module_new (void)
{
	return xmpp_xep_muc_module_construct (XMPP_XEP_MUC_TYPE_MODULE);
}

static void
xmpp_xep_muc_module_enter_data_free (gpointer _data)
{
	XmppXepMucModuleEnterData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->bare_jid);
	_g_free0 (_data_->nick);
	_g_free0 (_data_->password);
	_g_date_time_unref0 (_data_->history_since);
	_xmpp_stanza_entry_unref0 (_data_->additional_node);
	_xmpp_xep_muc_join_result_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepMucModuleEnterData, _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 gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

static gpointer
_xmpp_stanza_entry_ref0 (gpointer self)
{
	return self ? xmpp_stanza_entry_ref (self) : NULL;
}

void
xmpp_xep_muc_module_enter (XmppXepMucModule* self,
                           XmppXmppStream* stream,
                           XmppJid* bare_jid,
                           const gchar* nick,
                           const gchar* password,
                           GDateTime* history_since,
                           gboolean receive_history,
                           XmppStanzaNode* additional_node,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_)
{
	XmppXepMucModuleEnterData* _data_;
	XmppXepMucModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GDateTime* _tmp5_;
	XmppStanzaNode* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (bare_jid != NULL);
	g_return_if_fail (nick != NULL);
	_data_ = g_slice_new0 (XmppXepMucModuleEnterData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_muc_module_enter_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = _xmpp_jid_ref0 (bare_jid);
	_xmpp_jid_unref0 (_data_->bare_jid);
	_data_->bare_jid = _tmp2_;
	_tmp3_ = g_strdup (nick);
	_g_free0 (_data_->nick);
	_data_->nick = _tmp3_;
	_tmp4_ = g_strdup (password);
	_g_free0 (_data_->password);
	_data_->password = _tmp4_;
	_tmp5_ = _g_date_time_ref0 (history_since);
	_g_date_time_unref0 (_data_->history_since);
	_data_->history_since = _tmp5_;
	_data_->receive_history = receive_history;
	_tmp6_ = _xmpp_stanza_entry_ref0 (additional_node);
	_xmpp_stanza_entry_unref0 (_data_->additional_node);
	_data_->additional_node = _tmp6_;
	xmpp_xep_muc_module_enter_co (_data_);
}

XmppXepMucJoinResult*
xmpp_xep_muc_module_enter_finish (XmppXepMucModule* self,
                                  GAsyncResult* _res_)
{
	XmppXepMucJoinResult* result;
	XmppXepMucModuleEnterData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
xmpp_xep_muc_module_enter_ready (GObject* source_object,
                                 GAsyncResult* _res_,
                                 gpointer _user_data_)
{
	XmppXepMucModuleEnterData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_muc_module_enter_co (_data_);
}

static gpointer
_xmpp_xep_muc_join_result_ref0 (gpointer self)
{
	return self ? xmpp_xep_muc_join_result_ref (self) : NULL;
}

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

static gpointer
__xmpp_xep_muc_muc_enter_error_dup0 (gpointer self)
{
	return self ? _xmpp_xep_muc_muc_enter_error_dup (self) : NULL;
}

static gboolean
xmpp_xep_muc_module_enter_co (XmppXepMucModuleEnterData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = xmpp_presence_stanza_new (NULL);
		_data_->presence = _data_->_tmp0_;
		_data_->_tmp2_ = xmpp_jid_with_resource (_data_->bare_jid, _data_->nick, &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp2_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->presence);
			if (_data_->_inner_error0_->domain == XMPP_INVALID_JID_ERROR) {
				goto __catch0_xmpp_invalid_jid_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		xmpp_stanza_set_to ((XmppStanza*) _data_->presence, _data_->_tmp1_);
		_data_->_tmp3_ = xmpp_stanza_node_new_build ("x", XMPP_XEP_MUC_NS_URI, NULL, NULL);
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_tmp5_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp4_);
		_data_->_tmp6_ = _data_->_tmp5_;
		_xmpp_stanza_entry_unref0 (_data_->_tmp4_);
		_data_->x_node = _data_->_tmp6_;
		if (_data_->password != NULL) {
			_data_->_tmp7_ = _data_->x_node;
			_data_->_tmp8_ = xmpp_stanza_node_new_build ("password", XMPP_XEP_MUC_NS_URI, NULL, NULL);
			_data_->_tmp9_ = _data_->_tmp8_;
			_data_->_tmp10_ = xmpp_stanza_node_new_text (_data_->password);
			_data_->_tmp11_ = _data_->_tmp10_;
			_data_->_tmp12_ = xmpp_stanza_node_put_node (_data_->_tmp9_, _data_->_tmp11_);
			_data_->_tmp13_ = _data_->_tmp12_;
			_data_->_tmp14_ = xmpp_stanza_node_put_node (_data_->_tmp7_, _data_->_tmp13_);
			_data_->_tmp15_ = _data_->_tmp14_;
			_xmpp_stanza_entry_unref0 (_data_->_tmp15_);
			_xmpp_stanza_entry_unref0 (_data_->_tmp13_);
			_xmpp_stanza_entry_unref0 (_data_->_tmp11_);
			_xmpp_stanza_entry_unref0 (_data_->_tmp9_);
		}
		if (_data_->history_since != NULL) {
			_data_->_tmp16_ = TRUE;
		} else {
			_data_->_tmp16_ = !_data_->receive_history;
		}
		if (_data_->_tmp16_) {
			_data_->_tmp17_ = xmpp_stanza_node_new_build ("history", XMPP_XEP_MUC_NS_URI, NULL, NULL);
			_data_->history_node = _data_->_tmp17_;
			_data_->_tmp18_ = _data_->x_node;
			_data_->_tmp19_ = _data_->history_node;
			_data_->_tmp20_ = xmpp_stanza_node_put_node (_data_->_tmp18_, _data_->_tmp19_);
			_data_->_tmp21_ = _data_->_tmp20_;
			_xmpp_stanza_entry_unref0 (_data_->_tmp21_);
			if (_data_->history_since != NULL) {
				_data_->_tmp22_ = _data_->history_node;
				_data_->_tmp23_ = xmpp_xep_date_time_profiles_to_datetime (_data_->history_since);
				_data_->_tmp24_ = _data_->_tmp23_;
				xmpp_stanza_node_set_attribute (_data_->_tmp22_, "since", _data_->_tmp24_, NULL);
				_g_free0 (_data_->_tmp24_);
			} else {
				if (!_data_->receive_history) {
					_data_->_tmp25_ = _data_->history_node;
					xmpp_stanza_node_set_attribute (_data_->_tmp25_, "maxchars", "0", NULL);
				}
			}
			_xmpp_stanza_entry_unref0 (_data_->history_node);
		}
		_data_->_tmp26_ = ((XmppStanza*) _data_->presence)->stanza;
		_data_->_tmp27_ = _data_->x_node;
		_data_->_tmp28_ = xmpp_stanza_node_put_node (_data_->_tmp26_, _data_->_tmp27_);
		_data_->_tmp29_ = _data_->_tmp28_;
		_xmpp_stanza_entry_unref0 (_data_->_tmp29_);
		if (_data_->additional_node != NULL) {
			_data_->_tmp30_ = ((XmppStanza*) _data_->presence)->stanza;
			_data_->_tmp31_ = xmpp_stanza_node_put_node (_data_->_tmp30_, _data_->additional_node);
			_data_->_tmp32_ = _data_->_tmp31_;
			_xmpp_stanza_entry_unref0 (_data_->_tmp32_);
		}
		_data_->_tmp33_ = xmpp_xep_muc_flag_IDENTITY;
		_data_->_tmp34_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp33_);
		_data_->_tmp35_ = (XmppXepMucFlag*) _data_->_tmp34_;
		_data_->_tmp36_ = xmpp_stanza_get_id ((XmppStanza*) _data_->presence);
		_data_->_tmp37_ = _data_->_tmp36_;
		xmpp_xep_muc_flag_start_muc_enter (_data_->_tmp35_, _data_->bare_jid, _data_->_tmp37_);
		_g_object_unref0 (_data_->_tmp35_);
		xmpp_xep_muc_module_query_room_info (_data_->self, _data_->stream, _data_->bare_jid, NULL, NULL);
		_data_->_tmp38_ = xmpp_presence_module_IDENTITY;
		_data_->_tmp39_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp38_);
		_data_->_tmp40_ = (XmppPresenceModule*) _data_->_tmp39_;
		xmpp_presence_module_send_presence (_data_->_tmp40_, _data_->stream, _data_->presence);
		_g_object_unref0 (_data_->_tmp40_);
		_data_->_tmp41_ = gee_promise_new (XMPP_XEP_MUC_TYPE_JOIN_RESULT, (GBoxedCopyFunc) xmpp_xep_muc_join_result_ref, (GDestroyNotify) xmpp_xep_muc_join_result_unref);
		_data_->promise = _data_->_tmp41_;
		_data_->_tmp42_ = xmpp_xep_muc_flag_IDENTITY;
		_data_->_tmp43_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp42_);
		_data_->_tmp44_ = (XmppXepMucFlag*) _data_->_tmp43_;
		_data_->_tmp45_ = _data_->_tmp44_->enter_futures;
		_data_->_tmp46_ = _data_->promise;
		gee_abstract_map_set ((GeeAbstractMap*) _data_->_tmp45_, _data_->bare_jid, _data_->_tmp46_);
		_g_object_unref0 (_data_->_tmp44_);
		{
			_data_->_tmp47_ = _data_->promise;
			_data_->_tmp48_ = gee_promise_get_future (_data_->_tmp47_);
			_data_->_tmp49_ = _data_->_tmp48_;
			_data_->_state_ = 1;
			gee_future_wait_async (_data_->_tmp49_, xmpp_xep_muc_module_enter_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp50_ = gee_future_wait_finish (_data_->_tmp49_, _data_->_res_, &_data_->_inner_error0_);
			_data_->_tmp51_ = _xmpp_xep_muc_join_result_ref0 ((XmppXepMucJoinResult*) _data_->_tmp50_);
			_data_->enter_result = _data_->_tmp51_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				if (_data_->_inner_error0_->domain == GEE_FUTURE_ERROR) {
					goto __catch1_gee_future_error;
				}
				_gee_promise_unref0 (_data_->promise);
				_xmpp_stanza_entry_unref0 (_data_->x_node);
				_xmpp_jid_unref0 (_data_->_tmp1_);
				_g_object_unref0 (_data_->presence);
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
				g_clear_error (&_data_->_inner_error0_);
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			_data_->_tmp52_ = xmpp_xep_muc_flag_IDENTITY;
			_data_->_tmp53_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp52_);
			_data_->_tmp54_ = (XmppXepMucFlag*) _data_->_tmp53_;
			_data_->_tmp55_ = _data_->_tmp54_->enter_futures;
			gee_abstract_map_unset ((GeeAbstractMap*) _data_->_tmp55_, _data_->bare_jid, NULL);
			_g_object_unref0 (_data_->_tmp54_);
			_data_->result = _data_->enter_result;
			_gee_promise_unref0 (_data_->promise);
			_xmpp_stanza_entry_unref0 (_data_->x_node);
			_xmpp_jid_unref0 (_data_->_tmp1_);
			_g_object_unref0 (_data_->presence);
			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;
		}
		goto __finally1;
		__catch1_gee_future_error:
		{
			g_clear_error (&_data_->_inner_error0_);
			_data_->result = NULL;
			_gee_promise_unref0 (_data_->promise);
			_xmpp_stanza_entry_unref0 (_data_->x_node);
			_xmpp_jid_unref0 (_data_->_tmp1_);
			_g_object_unref0 (_data_->presence);
			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;
		}
		__finally1:
		_gee_promise_unref0 (_data_->promise);
		_xmpp_stanza_entry_unref0 (_data_->x_node);
		_xmpp_jid_unref0 (_data_->_tmp1_);
		_g_object_unref0 (_data_->presence);
		if (_data_->_inner_error0_->domain == XMPP_INVALID_JID_ERROR) {
			goto __catch0_xmpp_invalid_jid_error;
		}
		g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally0;
	__catch0_xmpp_invalid_jid_error:
	{
		g_clear_error (&_data_->_inner_error0_);
		_data_->_tmp56_ = XMPP_XEP_MUC_MUC_ENTER_ERROR_NICK_CONFLICT;
		_data_->_tmp57_ = __xmpp_xep_muc_muc_enter_error_dup0 (&_data_->_tmp56_);
		_data_->_tmp58_ = NULL;
		_data_->_tmp58_ = xmpp_xep_muc_join_result_new ();
		_g_free0 (_data_->_tmp58_->muc_error);
		_data_->_tmp58_->muc_error = _data_->_tmp57_;
		_data_->result = _data_->_tmp58_;
		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;
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
	g_clear_error (&_data_->_inner_error0_);
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
xmpp_xep_muc_module_exit (XmppXepMucModule* self,
                          XmppXmppStream* stream,
                          XmppJid* jid)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	{
		gchar* nick = NULL;
		XmppFlagIdentity* _tmp0_;
		gpointer _tmp1_;
		XmppXepMucFlag* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		const gchar* _tmp5_;
		XmppPresenceStanza* presence = NULL;
		XmppPresenceStanza* _tmp6_;
		XmppJid* _tmp7_ = NULL;
		const gchar* _tmp8_;
		XmppJid* _tmp9_;
		XmppPresenceStanza* _tmp10_;
		XmppPresenceStanza* _tmp11_;
		XmppModuleIdentity* _tmp12_;
		gpointer _tmp13_;
		XmppPresenceModule* _tmp14_;
		XmppPresenceStanza* _tmp15_;
		_tmp0_ = xmpp_xep_muc_flag_IDENTITY;
		_tmp1_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
		_tmp2_ = (XmppXepMucFlag*) _tmp1_;
		_tmp3_ = xmpp_xep_muc_flag_get_muc_nick (_tmp2_, jid);
		_tmp4_ = _tmp3_;
		_g_object_unref0 (_tmp2_);
		nick = _tmp4_;
		_tmp5_ = nick;
		if (_tmp5_ == NULL) {
			_g_free0 (nick);
			return;
		}
		_tmp6_ = xmpp_presence_stanza_new (NULL);
		presence = _tmp6_;
		_tmp8_ = nick;
		_tmp9_ = xmpp_jid_with_resource (jid, _tmp8_, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (presence);
			_g_free0 (nick);
			if (_inner_error0_->domain == XMPP_INVALID_JID_ERROR) {
				goto __catch0_xmpp_invalid_jid_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		_tmp10_ = presence;
		xmpp_stanza_set_to ((XmppStanza*) _tmp10_, _tmp7_);
		_tmp11_ = presence;
		xmpp_stanza_set_type_ ((XmppStanza*) _tmp11_, XMPP_PRESENCE_STANZA_TYPE_UNAVAILABLE);
		_tmp12_ = xmpp_presence_module_IDENTITY;
		_tmp13_ = xmpp_xmpp_stream_get_module (stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp12_);
		_tmp14_ = (XmppPresenceModule*) _tmp13_;
		_tmp15_ = presence;
		xmpp_presence_module_send_presence (_tmp14_, stream, _tmp15_);
		_g_object_unref0 (_tmp14_);
		_xmpp_jid_unref0 (_tmp7_);
		_g_object_unref0 (presence);
		_g_free0 (nick);
	}
	goto __finally0;
	__catch0_xmpp_invalid_jid_error:
	{
		GError* e = NULL;
		GError* _tmp16_;
		const gchar* _tmp17_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp16_ = e;
		_tmp17_ = _tmp16_->message;
		g_warning ("module.vala:142: Tried to leave room with invalid nick: %s", _tmp17_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

void
xmpp_xep_muc_module_change_subject (XmppXepMucModule* self,
                                    XmppXmppStream* stream,
                                    XmppJid* jid,
                                    const gchar* subject)
{
	XmppMessageStanza* message = NULL;
	XmppMessageStanza* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppModuleIdentity* _tmp10_;
	gpointer _tmp11_;
	XmppMessageModule* _tmp12_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (subject != NULL);
	_tmp0_ = xmpp_message_stanza_new (NULL);
	message = _tmp0_;
	xmpp_stanza_set_to ((XmppStanza*) message, jid);
	xmpp_stanza_set_type_ ((XmppStanza*) message, XMPP_MESSAGE_STANZA_TYPE_GROUPCHAT);
	_tmp1_ = ((XmppStanza*) message)->stanza;
	_tmp2_ = xmpp_stanza_node_new_build ("subject", "jabber:client", NULL, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = xmpp_stanza_node_new_text (subject);
	_tmp5_ = _tmp4_;
	_tmp6_ = xmpp_stanza_node_put_node (_tmp3_, _tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = xmpp_stanza_node_put_node (_tmp1_, _tmp7_);
	_tmp9_ = _tmp8_;
	_xmpp_stanza_entry_unref0 (_tmp9_);
	_xmpp_stanza_entry_unref0 (_tmp7_);
	_xmpp_stanza_entry_unref0 (_tmp5_);
	_xmpp_stanza_entry_unref0 (_tmp3_);
	_tmp10_ = xmpp_message_module_IDENTITY;
	_tmp11_ = xmpp_xmpp_stream_get_module (stream, XMPP_TYPE_MESSAGE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp10_);
	_tmp12_ = (XmppMessageModule*) _tmp11_;
	xmpp_message_module_send_message (_tmp12_, stream, message, NULL, NULL);
	_g_object_unref0 (_tmp12_);
	_g_object_unref0 (message);
}

void
xmpp_xep_muc_module_change_nick (XmppXepMucModule* self,
                                 XmppXmppStream* stream,
                                 XmppJid* jid,
                                 const gchar* new_nick)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (new_nick != NULL);
	{
		XmppPresenceStanza* presence = NULL;
		XmppPresenceStanza* _tmp0_;
		XmppJid* _tmp1_ = NULL;
		XmppJid* _tmp2_;
		XmppModuleIdentity* _tmp3_;
		gpointer _tmp4_;
		XmppPresenceModule* _tmp5_;
		_tmp0_ = xmpp_presence_stanza_new (NULL);
		presence = _tmp0_;
		_tmp2_ = xmpp_jid_with_resource (jid, new_nick, &_inner_error0_);
		_tmp1_ = _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (presence);
			if (_inner_error0_->domain == XMPP_INVALID_JID_ERROR) {
				goto __catch0_xmpp_invalid_jid_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		xmpp_stanza_set_to ((XmppStanza*) presence, _tmp1_);
		_tmp3_ = xmpp_presence_module_IDENTITY;
		_tmp4_ = xmpp_xmpp_stream_get_module (stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp3_);
		_tmp5_ = (XmppPresenceModule*) _tmp4_;
		xmpp_presence_module_send_presence (_tmp5_, stream, presence);
		_g_object_unref0 (_tmp5_);
		_xmpp_jid_unref0 (_tmp1_);
		_g_object_unref0 (presence);
	}
	goto __finally0;
	__catch0_xmpp_invalid_jid_error:
	{
		GError* e = NULL;
		GError* _tmp6_;
		const gchar* _tmp7_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp6_ = e;
		_tmp7_ = _tmp6_->message;
		g_warning ("module.vala:161: Tried to change nick to invalid nick: %s", _tmp7_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

void
xmpp_xep_muc_module_invite (XmppXepMucModule* self,
                            XmppXmppStream* stream,
                            XmppJid* to_muc,
                            XmppJid* jid)
{
	XmppMessageStanza* message = NULL;
	XmppMessageStanza* _tmp0_;
	XmppStanzaNode* invite_node = NULL;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppStanzaNode* _tmp10_;
	XmppStanzaNode* _tmp11_;
	XmppStanzaNode* _tmp12_;
	XmppStanzaNode* _tmp13_;
	XmppStanzaNode* _tmp14_;
	XmppStanzaNode* _tmp15_;
	XmppModuleIdentity* _tmp16_;
	gpointer _tmp17_;
	XmppMessageModule* _tmp18_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (to_muc != NULL);
	g_return_if_fail (jid != NULL);
	_tmp0_ = xmpp_message_stanza_new (NULL);
	message = _tmp0_;
	xmpp_stanza_set_to ((XmppStanza*) message, to_muc);
	_tmp1_ = xmpp_stanza_node_new_build ("x", XMPP_XEP_MUC_NS_URI_USER, NULL, NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = xmpp_stanza_node_add_self_xmlns (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = xmpp_stanza_node_new_build ("invite", XMPP_XEP_MUC_NS_URI_USER, NULL, NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = xmpp_jid_to_string (jid);
	_tmp8_ = _tmp7_;
	_tmp9_ = xmpp_stanza_node_put_attribute (_tmp6_, "to", _tmp8_, NULL);
	_tmp10_ = _tmp9_;
	_tmp11_ = xmpp_stanza_node_put_node (_tmp4_, _tmp10_);
	_tmp12_ = _tmp11_;
	_xmpp_stanza_entry_unref0 (_tmp10_);
	_g_free0 (_tmp8_);
	_xmpp_stanza_entry_unref0 (_tmp6_);
	_xmpp_stanza_entry_unref0 (_tmp4_);
	_xmpp_stanza_entry_unref0 (_tmp2_);
	invite_node = _tmp12_;
	_tmp13_ = ((XmppStanza*) message)->stanza;
	_tmp14_ = xmpp_stanza_node_put_node (_tmp13_, invite_node);
	_tmp15_ = _tmp14_;
	_xmpp_stanza_entry_unref0 (_tmp15_);
	_tmp16_ = xmpp_message_module_IDENTITY;
	_tmp17_ = xmpp_xmpp_stream_get_module (stream, XMPP_TYPE_MESSAGE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp16_);
	_tmp18_ = (XmppMessageModule*) _tmp17_;
	xmpp_message_module_send_message (_tmp18_, stream, message, NULL, NULL);
	_g_object_unref0 (_tmp18_);
	_xmpp_stanza_entry_unref0 (invite_node);
	_g_object_unref0 (message);
}

void
xmpp_xep_muc_module_request_voice (XmppXepMucModule* self,
                                   XmppXmppStream* stream,
                                   XmppJid* to_muc)
{
	XmppMessageStanza* message = NULL;
	XmppJid* _tmp0_;
	XmppMessageStanza* _tmp1_ = NULL;
	XmppXepDataFormsDataForm* submit_node = NULL;
	XmppXepDataFormsDataForm* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppXepDataFormsDataFormField* field_node = NULL;
	gchar* _tmp5_;
	XmppXepDataFormsDataFormField* _tmp6_ = NULL;
	XmppXepDataFormsDataFormListSingleField* single_field = NULL;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	XmppXepDataFormsDataFormListSingleField* _tmp12_ = NULL;
	XmppXepDataFormsDataFormListSingleField* _tmp13_;
	XmppStanzaNode* _tmp14_;
	XmppStanzaNode* _tmp15_;
	XmppStanzaNode* _tmp16_;
	XmppStanzaNode* _tmp17_;
	XmppStanzaNode* _tmp18_;
	XmppModuleIdentity* _tmp19_;
	gpointer _tmp20_;
	XmppMessageModule* _tmp21_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (to_muc != NULL);
	_tmp0_ = _xmpp_jid_ref0 (to_muc);
	_tmp1_ = xmpp_message_stanza_new (NULL);
	xmpp_stanza_set_to ((XmppStanza*) _tmp1_, _tmp0_);
	_xmpp_jid_unref0 (_tmp0_);
	message = _tmp1_;
	_tmp2_ = xmpp_xep_data_forms_data_form_new ();
	submit_node = _tmp2_;
	_tmp3_ = xmpp_xep_data_forms_data_form_get_submit_node (submit_node);
	_tmp4_ = _tmp3_;
	_xmpp_stanza_entry_unref0 (_tmp4_);
	_tmp5_ = g_strdup ("FORM_TYPE");
	_tmp6_ = xmpp_xep_data_forms_data_form_field_new ();
	xmpp_xep_data_forms_data_form_field_set_var (_tmp6_, _tmp5_);
	_g_free0 (_tmp5_);
	field_node = _tmp6_;
	xmpp_xep_data_forms_data_form_field_set_value_string (field_node, XMPP_XEP_MUC_NS_URI_REQUEST);
	_tmp7_ = xmpp_stanza_node_new_build ("field", XMPP_XEP_DATA_FORMS_NS_URI, NULL, NULL);
	_tmp8_ = _tmp7_;
	_tmp9_ = g_strdup ("muc#role");
	_tmp10_ = g_strdup ("Requested role");
	_tmp11_ = g_strdup ("participant");
	_tmp12_ = xmpp_xep_data_forms_data_form_list_single_field_new (_tmp8_);
	xmpp_xep_data_forms_data_form_field_set_var ((XmppXepDataFormsDataFormField*) _tmp12_, _tmp9_);
	_g_free0 (_tmp9_);
	xmpp_xep_data_forms_data_form_field_set_label ((XmppXepDataFormsDataFormField*) _tmp12_, _tmp10_);
	_g_free0 (_tmp10_);
	xmpp_xep_data_forms_data_form_list_single_field_set_value (_tmp12_, _tmp11_);
	_g_free0 (_tmp11_);
	_tmp13_ = _tmp12_;
	_xmpp_stanza_entry_unref0 (_tmp8_);
	single_field = _tmp13_;
	xmpp_xep_data_forms_data_form_add_field (submit_node, field_node);
	xmpp_xep_data_forms_data_form_add_field (submit_node, (XmppXepDataFormsDataFormField*) single_field);
	_tmp14_ = ((XmppStanza*) message)->stanza;
	_tmp15_ = xmpp_xep_data_forms_data_form_get_stanza_node (submit_node);
	_tmp16_ = _tmp15_;
	_tmp17_ = xmpp_stanza_node_put_node (_tmp14_, _tmp16_);
	_tmp18_ = _tmp17_;
	_xmpp_stanza_entry_unref0 (_tmp18_);
	_tmp19_ = xmpp_message_module_IDENTITY;
	_tmp20_ = xmpp_xmpp_stream_get_module (stream, XMPP_TYPE_MESSAGE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp19_);
	_tmp21_ = (XmppMessageModule*) _tmp20_;
	xmpp_message_module_send_message (_tmp21_, stream, message, NULL, NULL);
	_g_object_unref0 (_tmp21_);
	_g_object_unref0 (single_field);
	_g_object_unref0 (field_node);
	_xmpp_xep_data_forms_data_form_unref0 (submit_node);
	_g_object_unref0 (message);
}

void
xmpp_xep_muc_module_kick (XmppXepMucModule* self,
                          XmppXmppStream* stream,
                          XmppJid* jid,
                          const gchar* nick)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (nick != NULL);
	xmpp_xep_muc_module_change_role (self, stream, jid, nick, "none");
}

gboolean
xmpp_xep_muc_module_kick_possible (XmppXepMucModule* self,
                                   XmppXmppStream* stream,
                                   XmppJid* occupant)
{
	gboolean _tmp19_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (stream != NULL, FALSE);
	g_return_val_if_fail (occupant != NULL, FALSE);
	{
		XmppJid* muc_jid = NULL;
		XmppJid* _tmp0_;
		XmppJid* _tmp1_;
		XmppXepMucFlag* flag = NULL;
		XmppFlagIdentity* _tmp2_;
		gpointer _tmp3_;
		gchar* own_nick = NULL;
		XmppXepMucFlag* _tmp4_;
		XmppJid* _tmp5_;
		gchar* _tmp6_;
		XmppJid* _tmp7_ = NULL;
		XmppJid* _tmp8_;
		const gchar* _tmp9_;
		XmppJid* _tmp10_;
		XmppXepMucAffiliation my_affiliation = 0;
		XmppXepMucFlag* _tmp12_;
		XmppJid* _tmp13_;
		XmppXepMucAffiliation other_affiliation = 0;
		XmppXepMucFlag* _tmp14_;
		XmppJid* _tmp15_;
		_tmp0_ = xmpp_jid_get_bare_jid (occupant);
		_tmp1_ = _tmp0_;
		muc_jid = _tmp1_;
		_tmp2_ = xmpp_xep_muc_flag_IDENTITY;
		_tmp3_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp2_);
		flag = (XmppXepMucFlag*) _tmp3_;
		_tmp4_ = flag;
		_tmp5_ = muc_jid;
		_tmp6_ = xmpp_xep_muc_flag_get_muc_nick (_tmp4_, _tmp5_);
		own_nick = _tmp6_;
		_tmp8_ = muc_jid;
		_tmp9_ = own_nick;
		_tmp10_ = xmpp_jid_with_resource (_tmp8_, _tmp9_, &_inner_error0_);
		_tmp7_ = _tmp10_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp11_ = FALSE;
			_g_free0 (own_nick);
			_g_object_unref0 (flag);
			_xmpp_jid_unref0 (muc_jid);
			if (_inner_error0_->domain == XMPP_INVALID_JID_ERROR) {
				goto __catch0_xmpp_invalid_jid_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return _tmp11_;
		}
		_tmp12_ = flag;
		_tmp13_ = muc_jid;
		my_affiliation = xmpp_xep_muc_flag_get_affiliation (_tmp12_, _tmp13_, _tmp7_);
		_tmp14_ = flag;
		_tmp15_ = muc_jid;
		other_affiliation = xmpp_xep_muc_flag_get_affiliation (_tmp14_, _tmp15_, occupant);
		switch (my_affiliation) {
			case XMPP_XEP_MUC_AFFILIATION_MEMBER:
			{
				gboolean _tmp16_ = FALSE;
				if (other_affiliation == XMPP_XEP_MUC_AFFILIATION_ADMIN) {
					_tmp16_ = TRUE;
				} else {
					_tmp16_ = other_affiliation == XMPP_XEP_MUC_AFFILIATION_OWNER;
				}
				if (_tmp16_) {
					result = FALSE;
					_xmpp_jid_unref0 (_tmp7_);
					_g_free0 (own_nick);
					_g_object_unref0 (flag);
					_xmpp_jid_unref0 (muc_jid);
					return result;
				}
				break;
			}
			case XMPP_XEP_MUC_AFFILIATION_ADMIN:
			{
				if (other_affiliation == XMPP_XEP_MUC_AFFILIATION_OWNER) {
					result = FALSE;
					_xmpp_jid_unref0 (_tmp7_);
					_g_free0 (own_nick);
					_g_object_unref0 (flag);
					_xmpp_jid_unref0 (muc_jid);
					return result;
				}
				break;
			}
			case XMPP_XEP_MUC_AFFILIATION_OWNER:
			{
				result = TRUE;
				_xmpp_jid_unref0 (_tmp7_);
				_g_free0 (own_nick);
				_g_object_unref0 (flag);
				_xmpp_jid_unref0 (muc_jid);
				return result;
			}
			default:
			{
				result = FALSE;
				_xmpp_jid_unref0 (_tmp7_);
				_g_free0 (own_nick);
				_g_object_unref0 (flag);
				_xmpp_jid_unref0 (muc_jid);
				return result;
			}
		}
		result = TRUE;
		_xmpp_jid_unref0 (_tmp7_);
		_g_free0 (own_nick);
		_g_object_unref0 (flag);
		_xmpp_jid_unref0 (muc_jid);
		return result;
	}
	goto __finally0;
	__catch0_xmpp_invalid_jid_error:
	{
		GError* e = NULL;
		GError* _tmp17_;
		const gchar* _tmp18_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp17_ = e;
		_tmp18_ = _tmp17_->message;
		g_warning ("module.vala:219: Tried to kick with invalid nick: %s", _tmp18_);
		result = FALSE;
		_g_error_free0 (e);
		return result;
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return _tmp19_;
}

void
xmpp_xep_muc_module_change_role (XmppXepMucModule* self,
                                 XmppXmppStream* stream,
                                 XmppJid* jid,
                                 const gchar* nick,
                                 const gchar* new_role)
{
	XmppStanzaNode* query = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppStanzaNode* _tmp10_;
	XmppStanzaNode* _tmp11_;
	XmppIqStanza* iq = NULL;
	XmppJid* _tmp12_;
	XmppIqStanza* _tmp13_ = NULL;
	XmppModuleIdentity* _tmp14_;
	gpointer _tmp15_;
	XmppIqModule* _tmp16_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (nick != NULL);
	g_return_if_fail (new_role != NULL);
	_tmp0_ = xmpp_stanza_node_new_build ("query", XMPP_XEP_MUC_NS_URI_ADMIN, NULL, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = xmpp_stanza_node_add_self_xmlns (_tmp1_);
	_tmp3_ = _tmp2_;
	_xmpp_stanza_entry_unref0 (_tmp1_);
	query = _tmp3_;
	_tmp4_ = xmpp_stanza_node_new_build ("item", XMPP_XEP_MUC_NS_URI_ADMIN, NULL, NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = xmpp_stanza_node_put_attribute (_tmp5_, "nick", nick, XMPP_XEP_MUC_NS_URI_ADMIN);
	_tmp7_ = _tmp6_;
	_tmp8_ = xmpp_stanza_node_put_attribute (_tmp7_, "role", new_role, XMPP_XEP_MUC_NS_URI_ADMIN);
	_tmp9_ = _tmp8_;
	_tmp10_ = xmpp_stanza_node_put_node (query, _tmp9_);
	_tmp11_ = _tmp10_;
	_xmpp_stanza_entry_unref0 (_tmp11_);
	_xmpp_stanza_entry_unref0 (_tmp9_);
	_xmpp_stanza_entry_unref0 (_tmp7_);
	_xmpp_stanza_entry_unref0 (_tmp5_);
	_tmp12_ = _xmpp_jid_ref0 (jid);
	_tmp13_ = xmpp_iq_stanza_new_set (query, NULL);
	xmpp_stanza_set_to ((XmppStanza*) _tmp13_, _tmp12_);
	_xmpp_jid_unref0 (_tmp12_);
	iq = _tmp13_;
	_tmp14_ = xmpp_iq_module_IDENTITY;
	_tmp15_ = xmpp_xmpp_stream_get_module (stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp14_);
	_tmp16_ = (XmppIqModule*) _tmp15_;
	xmpp_iq_module_send_iq (_tmp16_, stream, iq, NULL, NULL, NULL, G_PRIORITY_DEFAULT);
	_g_object_unref0 (_tmp16_);
	_g_object_unref0 (iq);
	_xmpp_stanza_entry_unref0 (query);
}

static void
xmpp_xep_muc_module_change_affiliation_data_free (gpointer _data)
{
	XmppXepMucModuleChangeAffiliationData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->muc_jid);
	_xmpp_jid_unref0 (_data_->user_jid);
	_g_free0 (_data_->nick);
	_g_free0 (_data_->new_affiliation);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepMucModuleChangeAffiliationData, _data_);
}

void
xmpp_xep_muc_module_change_affiliation (XmppXepMucModule* self,
                                        XmppXmppStream* stream,
                                        XmppJid* muc_jid,
                                        XmppJid* user_jid,
                                        const gchar* nick,
                                        const gchar* new_affiliation,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	XmppXepMucModuleChangeAffiliationData* _data_;
	XmppXepMucModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	XmppJid* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (muc_jid != NULL);
	g_return_if_fail (new_affiliation != NULL);
	_data_ = g_slice_new0 (XmppXepMucModuleChangeAffiliationData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_muc_module_change_affiliation_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = _xmpp_jid_ref0 (muc_jid);
	_xmpp_jid_unref0 (_data_->muc_jid);
	_data_->muc_jid = _tmp2_;
	_tmp3_ = _xmpp_jid_ref0 (user_jid);
	_xmpp_jid_unref0 (_data_->user_jid);
	_data_->user_jid = _tmp3_;
	_tmp4_ = g_strdup (nick);
	_g_free0 (_data_->nick);
	_data_->nick = _tmp4_;
	_tmp5_ = g_strdup (new_affiliation);
	_g_free0 (_data_->new_affiliation);
	_data_->new_affiliation = _tmp5_;
	xmpp_xep_muc_module_change_affiliation_co (_data_);
}

void
xmpp_xep_muc_module_change_affiliation_finish (XmppXepMucModule* self,
                                               GAsyncResult* _res_)
{
	XmppXepMucModuleChangeAffiliationData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
xmpp_xep_muc_module_change_affiliation_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	XmppXepMucModuleChangeAffiliationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_muc_module_change_affiliation_co (_data_);
}

static gboolean
xmpp_xep_muc_module_change_affiliation_co (XmppXepMucModuleChangeAffiliationData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = xmpp_stanza_node_new_build ("item", XMPP_XEP_MUC_NS_URI_ADMIN, NULL, NULL);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = xmpp_stanza_node_put_attribute (_data_->_tmp1_, "affiliation", _data_->new_affiliation, XMPP_XEP_MUC_NS_URI_ADMIN);
	_data_->_tmp3_ = _data_->_tmp2_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp1_);
	_data_->item_node = _data_->_tmp3_;
	if (_data_->user_jid != NULL) {
		_data_->_tmp4_ = _data_->item_node;
		_data_->_tmp5_ = xmpp_jid_get_bare_jid (_data_->user_jid);
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_tmp8_ = xmpp_jid_to_string (_data_->_tmp7_);
		_data_->_tmp9_ = _data_->_tmp8_;
		_data_->_tmp10_ = xmpp_stanza_node_put_attribute (_data_->_tmp4_, "jid", _data_->_tmp9_, XMPP_XEP_MUC_NS_URI_ADMIN);
		_data_->_tmp11_ = _data_->_tmp10_;
		_xmpp_stanza_entry_unref0 (_data_->_tmp11_);
		_g_free0 (_data_->_tmp9_);
		_xmpp_jid_unref0 (_data_->_tmp7_);
	}
	if (_data_->nick != NULL) {
		_data_->_tmp12_ = _data_->item_node;
		_data_->_tmp13_ = xmpp_stanza_node_put_attribute (_data_->_tmp12_, "nick", _data_->nick, XMPP_XEP_MUC_NS_URI_ADMIN);
		_data_->_tmp14_ = _data_->_tmp13_;
		_xmpp_stanza_entry_unref0 (_data_->_tmp14_);
	}
	_data_->_tmp15_ = xmpp_stanza_node_new_build ("query", XMPP_XEP_MUC_NS_URI_ADMIN, NULL, NULL);
	_data_->_tmp16_ = _data_->_tmp15_;
	_data_->_tmp17_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = _data_->item_node;
	_data_->_tmp20_ = xmpp_stanza_node_put_node (_data_->_tmp18_, _data_->_tmp19_);
	_data_->_tmp21_ = _data_->_tmp20_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp18_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp16_);
	_data_->query = _data_->_tmp21_;
	_data_->_tmp22_ = _xmpp_jid_ref0 (_data_->muc_jid);
	_data_->_tmp23_ = NULL;
	_data_->_tmp23_ = xmpp_iq_stanza_new_set (_data_->query, NULL);
	xmpp_stanza_set_to ((XmppStanza*) _data_->_tmp23_, _data_->_tmp22_);
	_xmpp_jid_unref0 (_data_->_tmp22_);
	_data_->iq = _data_->_tmp23_;
	_data_->_tmp24_ = xmpp_iq_module_IDENTITY;
	_data_->_tmp25_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp24_);
	_data_->_tmp26_ = (XmppIqModule*) _data_->_tmp25_;
	_data_->_state_ = 1;
	xmpp_iq_module_send_iq_async (_data_->_tmp26_, _data_->stream, _data_->iq, G_PRIORITY_DEFAULT, NULL, xmpp_xep_muc_module_change_affiliation_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp27_ = xmpp_iq_module_send_iq_finish (_data_->_tmp26_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp28_ = _data_->_tmp27_;
	_g_object_unref0 (_data_->_tmp28_);
	_g_object_unref0 (_data_->_tmp26_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->iq);
		_xmpp_stanza_entry_unref0 (_data_->query);
		_xmpp_stanza_entry_unref0 (_data_->item_node);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->iq);
	_xmpp_stanza_entry_unref0 (_data_->query);
	_xmpp_stanza_entry_unref0 (_data_->item_node);
	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 void
xmpp_xep_muc_module_get_config_form_data_free (gpointer _data)
{
	XmppXepMucModuleGetConfigFormData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->jid);
	_xmpp_xep_data_forms_data_form_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepMucModuleGetConfigFormData, _data_);
}

void
xmpp_xep_muc_module_get_config_form (XmppXepMucModule* self,
                                     XmppXmppStream* stream,
                                     XmppJid* jid,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	XmppXepMucModuleGetConfigFormData* _data_;
	XmppXepMucModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	_data_ = g_slice_new0 (XmppXepMucModuleGetConfigFormData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_muc_module_get_config_form_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = _xmpp_jid_ref0 (jid);
	_xmpp_jid_unref0 (_data_->jid);
	_data_->jid = _tmp2_;
	xmpp_xep_muc_module_get_config_form_co (_data_);
}

XmppXepDataFormsDataForm*
xmpp_xep_muc_module_get_config_form_finish (XmppXepMucModule* self,
                                            GAsyncResult* _res_)
{
	XmppXepDataFormsDataForm* result;
	XmppXepMucModuleGetConfigFormData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
xmpp_xep_muc_module_get_config_form_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_)
{
	XmppXepMucModuleGetConfigFormData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_muc_module_get_config_form_co (_data_);
}

static gboolean
xmpp_xep_muc_module_get_config_form_co (XmppXepMucModuleGetConfigFormData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = xmpp_stanza_node_new_build ("query", XMPP_XEP_MUC_NS_URI_OWNER, NULL, NULL);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = _xmpp_jid_ref0 (_data_->jid);
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = xmpp_iq_stanza_new_get (_data_->_tmp3_, NULL);
	xmpp_stanza_set_to ((XmppStanza*) _data_->_tmp5_, _data_->_tmp4_);
	_xmpp_jid_unref0 (_data_->_tmp4_);
	_data_->_tmp6_ = _data_->_tmp5_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp3_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp1_);
	_data_->get_iq = _data_->_tmp6_;
	_data_->_tmp7_ = xmpp_iq_module_IDENTITY;
	_data_->_tmp8_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp7_);
	_data_->_tmp9_ = (XmppIqModule*) _data_->_tmp8_;
	_data_->_state_ = 1;
	xmpp_iq_module_send_iq_async (_data_->_tmp9_, _data_->stream, _data_->get_iq, G_PRIORITY_DEFAULT, NULL, xmpp_xep_muc_module_get_config_form_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp10_ = xmpp_iq_module_send_iq_finish (_data_->_tmp9_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp11_ = _data_->_tmp10_;
	_g_object_unref0 (_data_->_tmp9_);
	_data_->result_iq = _data_->_tmp11_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->get_iq);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp12_ = ((XmppStanza*) _data_->result_iq)->stanza;
	_data_->_tmp13_ = xmpp_stanza_node_get_deep_subnode (_data_->_tmp12_, XMPP_XEP_MUC_NS_URI_OWNER ":query", XMPP_XEP_DATA_FORMS_NS_URI ":x", NULL);
	_data_->x_node = _data_->_tmp13_;
	_data_->_tmp14_ = _data_->x_node;
	if (_data_->_tmp14_ != NULL) {
		_data_->_tmp15_ = _data_->x_node;
		_data_->_tmp16_ = xmpp_xep_data_forms_data_form_create_from_node (_data_->_tmp15_);
		_data_->data_form = _data_->_tmp16_;
		_data_->result = _data_->data_form;
		_xmpp_stanza_entry_unref0 (_data_->x_node);
		_g_object_unref0 (_data_->result_iq);
		_g_object_unref0 (_data_->get_iq);
		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;
	}
	_data_->result = NULL;
	_xmpp_stanza_entry_unref0 (_data_->x_node);
	_g_object_unref0 (_data_->result_iq);
	_g_object_unref0 (_data_->get_iq);
	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 void
xmpp_xep_muc_module_set_config_form_data_free (gpointer _data)
{
	XmppXepMucModuleSetConfigFormData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->jid);
	_xmpp_xep_data_forms_data_form_unref0 (_data_->data_form);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepMucModuleSetConfigFormData, _data_);
}

static gpointer
_xmpp_xep_data_forms_data_form_ref0 (gpointer self)
{
	return self ? xmpp_xep_data_forms_data_form_ref (self) : NULL;
}

void
xmpp_xep_muc_module_set_config_form (XmppXepMucModule* self,
                                     XmppXmppStream* stream,
                                     XmppJid* jid,
                                     XmppXepDataFormsDataForm* data_form,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	XmppXepMucModuleSetConfigFormData* _data_;
	XmppXepMucModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	XmppXepDataFormsDataForm* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (data_form != NULL);
	_data_ = g_slice_new0 (XmppXepMucModuleSetConfigFormData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_muc_module_set_config_form_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = _xmpp_jid_ref0 (jid);
	_xmpp_jid_unref0 (_data_->jid);
	_data_->jid = _tmp2_;
	_tmp3_ = _xmpp_xep_data_forms_data_form_ref0 (data_form);
	_xmpp_xep_data_forms_data_form_unref0 (_data_->data_form);
	_data_->data_form = _tmp3_;
	xmpp_xep_muc_module_set_config_form_co (_data_);
}

void
xmpp_xep_muc_module_set_config_form_finish (XmppXepMucModule* self,
                                            GAsyncResult* _res_)
{
	XmppXepMucModuleSetConfigFormData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
xmpp_xep_muc_module_set_config_form_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_)
{
	XmppXepMucModuleSetConfigFormData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_muc_module_set_config_form_co (_data_);
}

static gboolean
xmpp_xep_muc_module_set_config_form_co (XmppXepMucModuleSetConfigFormData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = xmpp_stanza_node_new_build ("query", XMPP_XEP_MUC_NS_URI_OWNER, NULL, NULL);
	_data_->stanza_node = _data_->_tmp0_;
	_data_->_tmp1_ = xmpp_stanza_node_add_self_xmlns (_data_->stanza_node);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = xmpp_xep_data_forms_data_form_get_submit_node (_data_->data_form);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = xmpp_stanza_node_put_node (_data_->_tmp2_, _data_->_tmp4_);
	_data_->_tmp6_ = _data_->_tmp5_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp6_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp4_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp2_);
	_data_->_tmp7_ = _xmpp_jid_ref0 (_data_->jid);
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = xmpp_iq_stanza_new_set (_data_->stanza_node, NULL);
	xmpp_stanza_set_to ((XmppStanza*) _data_->_tmp8_, _data_->_tmp7_);
	_xmpp_jid_unref0 (_data_->_tmp7_);
	_data_->set_iq = _data_->_tmp8_;
	_data_->_tmp9_ = xmpp_iq_module_IDENTITY;
	_data_->_tmp10_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp9_);
	_data_->_tmp11_ = (XmppIqModule*) _data_->_tmp10_;
	_data_->_state_ = 1;
	xmpp_iq_module_send_iq_async (_data_->_tmp11_, _data_->stream, _data_->set_iq, G_PRIORITY_DEFAULT, NULL, xmpp_xep_muc_module_set_config_form_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp12_ = xmpp_iq_module_send_iq_finish (_data_->_tmp11_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp13_ = _data_->_tmp12_;
	_g_object_unref0 (_data_->_tmp13_);
	_g_object_unref0 (_data_->_tmp11_);
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->set_iq);
		_xmpp_stanza_entry_unref0 (_data_->stanza_node);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_g_object_unref0 (_data_->set_iq);
	_xmpp_stanza_entry_unref0 (_data_->stanza_node);
	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 void
_xmpp_xep_muc_module_on_received_message_xmpp_message_module_received_message (XmppMessageModule* _sender,
                                                                               XmppXmppStream* stream,
                                                                               XmppMessageStanza* message,
                                                                               gpointer self)
{
	xmpp_xep_muc_module_on_received_message ((XmppXepMucModule*) self, stream, message);
}

static void
_xmpp_xep_muc_module_on_received_available_xmpp_presence_module_received_available (XmppPresenceModule* _sender,
                                                                                    XmppXmppStream* stream,
                                                                                    XmppPresenceStanza* presence,
                                                                                    gpointer self)
{
	xmpp_xep_muc_module_on_received_available ((XmppXepMucModule*) self, stream, presence);
}

static void
_xmpp_xep_muc_module_check_for_enter_error_xmpp_presence_module_received_presence (XmppPresenceModule* _sender,
                                                                                   XmppXmppStream* stream,
                                                                                   XmppPresenceStanza* presence,
                                                                                   gpointer self)
{
	xmpp_xep_muc_module_check_for_enter_error ((XmppXepMucModule*) self, stream, presence);
}

static void
_xmpp_xep_muc_module_on_received_unavailable_xmpp_presence_module_received_unavailable (XmppPresenceModule* _sender,
                                                                                        XmppXmppStream* stream,
                                                                                        XmppPresenceStanza* presence,
                                                                                        gpointer self)
{
	xmpp_xep_muc_module_on_received_unavailable ((XmppXepMucModule*) self, stream, presence);
}

static void
xmpp_xep_muc_module_real_attach (XmppXmppStreamModule* base,
                                 XmppXmppStream* stream)
{
	XmppXepMucModule * self;
	XmppXepMucFlag* _tmp0_;
	XmppXepMucFlag* _tmp1_;
	XmppModuleIdentity* _tmp2_;
	gpointer _tmp3_;
	XmppMessageModule* _tmp4_;
	XmppModuleIdentity* _tmp5_;
	gpointer _tmp6_;
	XmppMessageModule* _tmp7_;
	XmppStanzaListenerHolder* _tmp8_;
	XmppXepMucReceivedPipelineListener* _tmp9_;
	XmppModuleIdentity* _tmp10_;
	gpointer _tmp11_;
	XmppPresenceModule* _tmp12_;
	XmppModuleIdentity* _tmp13_;
	gpointer _tmp14_;
	XmppPresenceModule* _tmp15_;
	XmppModuleIdentity* _tmp16_;
	gpointer _tmp17_;
	XmppPresenceModule* _tmp18_;
	XmppModuleIdentity* _tmp19_;
	gpointer _tmp20_;
	XmppXepServiceDiscoveryModule* _tmp21_;
	self = (XmppXepMucModule*) base;
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmpp_xep_muc_flag_new ();
	_tmp1_ = _tmp0_;
	xmpp_xmpp_stream_add_flag (stream, (XmppXmppStreamFlag*) _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = xmpp_message_module_IDENTITY;
	_tmp3_ = xmpp_xmpp_stream_get_module (stream, XMPP_TYPE_MESSAGE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp2_);
	_tmp4_ = (XmppMessageModule*) _tmp3_;
	g_signal_connect_object (_tmp4_, "received-message", (GCallback) _xmpp_xep_muc_module_on_received_message_xmpp_message_module_received_message, self, 0);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = xmpp_message_module_IDENTITY;
	_tmp6_ = xmpp_xmpp_stream_get_module (stream, XMPP_TYPE_MESSAGE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp5_);
	_tmp7_ = (XmppMessageModule*) _tmp6_;
	_tmp8_ = _tmp7_->received_pipeline;
	_tmp9_ = self->priv->received_pipeline_listener;
	xmpp_listener_holder_connect ((XmppListenerHolder*) _tmp8_, (XmppOrderedListener*) _tmp9_);
	_g_object_unref0 (_tmp7_);
	_tmp10_ = xmpp_presence_module_IDENTITY;
	_tmp11_ = xmpp_xmpp_stream_get_module (stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp10_);
	_tmp12_ = (XmppPresenceModule*) _tmp11_;
	g_signal_connect_object (_tmp12_, "received-available", (GCallback) _xmpp_xep_muc_module_on_received_available_xmpp_presence_module_received_available, self, 0);
	_g_object_unref0 (_tmp12_);
	_tmp13_ = xmpp_presence_module_IDENTITY;
	_tmp14_ = xmpp_xmpp_stream_get_module (stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp13_);
	_tmp15_ = (XmppPresenceModule*) _tmp14_;
	g_signal_connect_object (_tmp15_, "received-presence", (GCallback) _xmpp_xep_muc_module_check_for_enter_error_xmpp_presence_module_received_presence, self, 0);
	_g_object_unref0 (_tmp15_);
	_tmp16_ = xmpp_presence_module_IDENTITY;
	_tmp17_ = xmpp_xmpp_stream_get_module (stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp16_);
	_tmp18_ = (XmppPresenceModule*) _tmp17_;
	g_signal_connect_object (_tmp18_, "received-unavailable", (GCallback) _xmpp_xep_muc_module_on_received_unavailable_xmpp_presence_module_received_unavailable, self, 0);
	_g_object_unref0 (_tmp18_);
	_tmp19_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp20_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp19_);
	_tmp21_ = (XmppXepServiceDiscoveryModule*) _tmp20_;
	xmpp_xep_service_discovery_module_add_feature (_tmp21_, stream, XMPP_XEP_MUC_NS_URI);
	_g_object_unref0 (_tmp21_);
}

static void
xmpp_xep_muc_module_real_detach (XmppXmppStreamModule* base,
                                 XmppXmppStream* stream)
{
	XmppXepMucModule * self;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppMessageModule* _tmp2_;
	guint _tmp3_;
	XmppModuleIdentity* _tmp4_;
	gpointer _tmp5_;
	XmppMessageModule* _tmp6_;
	XmppStanzaListenerHolder* _tmp7_;
	XmppXepMucReceivedPipelineListener* _tmp8_;
	XmppModuleIdentity* _tmp9_;
	gpointer _tmp10_;
	XmppPresenceModule* _tmp11_;
	guint _tmp12_;
	XmppModuleIdentity* _tmp13_;
	gpointer _tmp14_;
	XmppPresenceModule* _tmp15_;
	guint _tmp16_;
	XmppModuleIdentity* _tmp17_;
	gpointer _tmp18_;
	XmppPresenceModule* _tmp19_;
	guint _tmp20_;
	XmppModuleIdentity* _tmp21_;
	gpointer _tmp22_;
	XmppXepServiceDiscoveryModule* _tmp23_;
	self = (XmppXepMucModule*) base;
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmpp_message_module_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_module (stream, XMPP_TYPE_MESSAGE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (XmppMessageModule*) _tmp1_;
	g_signal_parse_name ("received-message", XMPP_TYPE_MESSAGE_MODULE, &_tmp3_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp2_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _xmpp_xep_muc_module_on_received_message_xmpp_message_module_received_message, self);
	_g_object_unref0 (_tmp2_);
	_tmp4_ = xmpp_message_module_IDENTITY;
	_tmp5_ = xmpp_xmpp_stream_get_module (stream, XMPP_TYPE_MESSAGE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp4_);
	_tmp6_ = (XmppMessageModule*) _tmp5_;
	_tmp7_ = _tmp6_->received_pipeline;
	_tmp8_ = self->priv->received_pipeline_listener;
	xmpp_listener_holder_disconnect ((XmppListenerHolder*) _tmp7_, (XmppOrderedListener*) _tmp8_);
	_g_object_unref0 (_tmp6_);
	_tmp9_ = xmpp_presence_module_IDENTITY;
	_tmp10_ = xmpp_xmpp_stream_get_module (stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp9_);
	_tmp11_ = (XmppPresenceModule*) _tmp10_;
	g_signal_parse_name ("received-available", XMPP_PRESENCE_TYPE_MODULE, &_tmp12_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp11_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp12_, 0, NULL, (GCallback) _xmpp_xep_muc_module_on_received_available_xmpp_presence_module_received_available, self);
	_g_object_unref0 (_tmp11_);
	_tmp13_ = xmpp_presence_module_IDENTITY;
	_tmp14_ = xmpp_xmpp_stream_get_module (stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp13_);
	_tmp15_ = (XmppPresenceModule*) _tmp14_;
	g_signal_parse_name ("received-presence", XMPP_PRESENCE_TYPE_MODULE, &_tmp16_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp15_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, 0, NULL, (GCallback) _xmpp_xep_muc_module_check_for_enter_error_xmpp_presence_module_received_presence, self);
	_g_object_unref0 (_tmp15_);
	_tmp17_ = xmpp_presence_module_IDENTITY;
	_tmp18_ = xmpp_xmpp_stream_get_module (stream, XMPP_PRESENCE_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp17_);
	_tmp19_ = (XmppPresenceModule*) _tmp18_;
	g_signal_parse_name ("received-unavailable", XMPP_PRESENCE_TYPE_MODULE, &_tmp20_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp19_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp20_, 0, NULL, (GCallback) _xmpp_xep_muc_module_on_received_unavailable_xmpp_presence_module_received_unavailable, self);
	_g_object_unref0 (_tmp19_);
	_tmp21_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp22_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp21_);
	_tmp23_ = (XmppXepServiceDiscoveryModule*) _tmp22_;
	xmpp_xep_service_discovery_module_remove_feature (_tmp23_, stream, XMPP_XEP_MUC_NS_URI);
	_g_object_unref0 (_tmp23_);
}

static gchar*
xmpp_xep_muc_module_real_get_ns (XmppXmppStreamModule* base)
{
	XmppXepMucModule * self;
	gchar* _tmp0_;
	gchar* result;
	self = (XmppXepMucModule*) base;
	_tmp0_ = g_strdup (XMPP_XEP_MUC_NS_URI);
	result = _tmp0_;
	return result;
}

static gchar*
xmpp_xep_muc_module_real_get_id (XmppXmppStreamModule* base)
{
	XmppXepMucModule * self;
	XmppModuleIdentity* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	self = (XmppXepMucModule*) base;
	_tmp0_ = xmpp_xep_muc_module_IDENTITY;
	_tmp1_ = xmpp_module_identity_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}

static void
xmpp_xep_muc_module_on_received_message (XmppXepMucModule* self,
                                         XmppXmppStream* stream,
                                         XmppMessageStanza* message)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (message != NULL);
	_tmp0_ = xmpp_stanza_get_type_ ((XmppStanza*) message);
	_tmp1_ = _tmp0_;
	if (g_strcmp0 (_tmp1_, XMPP_MESSAGE_STANZA_TYPE_GROUPCHAT) == 0) {
		XmppStanzaNode* subject_node = NULL;
		XmppStanzaNode* _tmp2_;
		XmppStanzaNode* _tmp3_;
		gboolean _tmp4_ = FALSE;
		XmppStanzaNode* _tmp5_;
		XmppStanzaNode* x_node = NULL;
		XmppStanzaNode* _tmp22_;
		XmppStanzaNode* _tmp23_;
		XmppStanzaNode* _tmp24_;
		_tmp2_ = ((XmppStanza*) message)->stanza;
		_tmp3_ = xmpp_stanza_node_get_subnode (_tmp2_, "subject", NULL, FALSE);
		subject_node = _tmp3_;
		_tmp5_ = subject_node;
		if (_tmp5_ != NULL) {
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			_tmp6_ = xmpp_message_stanza_get_body (message);
			_tmp7_ = _tmp6_;
			_tmp4_ = _tmp7_ == NULL;
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			gchar* subject = NULL;
			XmppStanzaNode* _tmp8_;
			const gchar* _tmp9_;
			gchar* _tmp10_;
			XmppFlagIdentity* _tmp11_;
			gpointer _tmp12_;
			XmppXepMucFlag* _tmp13_;
			XmppJid* _tmp14_;
			XmppJid* _tmp15_;
			XmppJid* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			XmppJid* _tmp19_;
			XmppJid* _tmp20_;
			XmppJid* _tmp21_;
			_tmp8_ = subject_node;
			_tmp9_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _tmp8_);
			_tmp10_ = g_strdup (_tmp9_);
			subject = _tmp10_;
			_tmp11_ = xmpp_xep_muc_flag_IDENTITY;
			_tmp12_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp11_);
			_tmp13_ = (XmppXepMucFlag*) _tmp12_;
			_tmp14_ = xmpp_stanza_get_from ((XmppStanza*) message);
			_tmp15_ = _tmp14_;
			_tmp16_ = _tmp15_;
			_tmp17_ = subject;
			xmpp_xep_muc_flag_set_muc_subject (_tmp13_, _tmp16_, _tmp17_);
			_xmpp_jid_unref0 (_tmp16_);
			_g_object_unref0 (_tmp13_);
			_tmp18_ = subject;
			_tmp19_ = xmpp_stanza_get_from ((XmppStanza*) message);
			_tmp20_ = _tmp19_;
			_tmp21_ = _tmp20_;
			g_signal_emit (self, xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_SUBJECT_SET_SIGNAL], 0, stream, _tmp18_, _tmp21_);
			_xmpp_jid_unref0 (_tmp21_);
			_g_free0 (subject);
		}
		_tmp22_ = ((XmppStanza*) message)->stanza;
		_tmp23_ = xmpp_stanza_node_get_subnode (_tmp22_, "x", XMPP_XEP_MUC_NS_URI_USER, FALSE);
		x_node = _tmp23_;
		_tmp24_ = x_node;
		if (_tmp24_ != NULL) {
			GeeList* status_codes = NULL;
			XmppStanzaNode* _tmp25_;
			GeeArrayList* _tmp26_;
			GeeList* _tmp27_;
			gboolean _tmp28_;
			gboolean _tmp29_;
			_tmp25_ = x_node;
			_tmp26_ = xmpp_xep_muc_module_get_status_codes (_tmp25_);
			status_codes = (GeeList*) _tmp26_;
			_tmp27_ = status_codes;
			_tmp28_ = gee_collection_get_is_empty ((GeeCollection*) _tmp27_);
			_tmp29_ = _tmp28_;
			if (!_tmp29_) {
				gboolean _tmp30_ = FALSE;
				gboolean _tmp31_ = FALSE;
				GeeList* _tmp32_;
				_tmp32_ = status_codes;
				if (gee_collection_contains ((GeeCollection*) _tmp32_, (gpointer) ((gintptr) XMPP_XEP_MUC_STATUS_CODE_CONFIG_CHANGE_NON_PRIVACY))) {
					_tmp31_ = TRUE;
				} else {
					GeeList* _tmp33_;
					_tmp33_ = status_codes;
					_tmp31_ = gee_collection_contains ((GeeCollection*) _tmp33_, (gpointer) ((gintptr) XMPP_XEP_MUC_STATUS_CODE_NON_ANONYMOUS));
				}
				if (_tmp31_) {
					_tmp30_ = TRUE;
				} else {
					GeeList* _tmp34_;
					_tmp34_ = status_codes;
					_tmp30_ = gee_collection_contains ((GeeCollection*) _tmp34_, (gpointer) ((gintptr) XMPP_XEP_MUC_STATUS_CODE_SEMI_ANONYMOUS));
				}
				if (_tmp30_) {
					XmppJid* _tmp35_;
					XmppJid* _tmp36_;
					XmppJid* _tmp37_;
					XmppJid* _tmp38_;
					XmppJid* _tmp39_;
					XmppJid* _tmp40_;
					_tmp35_ = xmpp_stanza_get_from ((XmppStanza*) message);
					_tmp36_ = _tmp35_;
					_tmp37_ = _tmp36_;
					_tmp38_ = xmpp_jid_get_bare_jid (_tmp37_);
					_tmp39_ = _tmp38_;
					_tmp40_ = _tmp39_;
					xmpp_xep_muc_module_query_room_info (self, stream, _tmp40_, NULL, NULL);
					_xmpp_jid_unref0 (_tmp40_);
					_xmpp_jid_unref0 (_tmp37_);
				}
			}
			_g_object_unref0 (status_codes);
		}
		_xmpp_stanza_entry_unref0 (x_node);
		_xmpp_stanza_entry_unref0 (subject_node);
	}
}

static void
xmpp_xep_muc_module_check_for_enter_error (XmppXepMucModule* self,
                                           XmppXmppStream* stream,
                                           XmppPresenceStanza* presence)
{
	XmppXepMucFlag* flag = NULL;
	XmppFlagIdentity* _tmp0_;
	gpointer _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (presence != NULL);
	_tmp0_ = xmpp_xep_muc_flag_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	flag = (XmppXepMucFlag*) _tmp1_;
	if (xmpp_stanza_is_error ((XmppStanza*) presence)) {
		XmppXepMucFlag* _tmp4_;
		_tmp4_ = flag;
		_tmp3_ = xmpp_xep_muc_flag_is_muc_enter_outstanding (_tmp4_);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		XmppXepMucFlag* _tmp5_;
		XmppJid* _tmp6_;
		XmppJid* _tmp7_;
		XmppJid* _tmp8_;
		_tmp5_ = flag;
		_tmp6_ = xmpp_stanza_get_from ((XmppStanza*) presence);
		_tmp7_ = _tmp6_;
		_tmp8_ = _tmp7_;
		_tmp2_ = xmpp_xep_muc_flag_is_occupant (_tmp5_, _tmp8_);
		_xmpp_jid_unref0 (_tmp8_);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		XmppJid* bare_jid = NULL;
		XmppJid* _tmp9_;
		XmppJid* _tmp10_;
		XmppJid* _tmp11_;
		XmppJid* _tmp12_;
		XmppJid* _tmp13_;
		XmppJid* _tmp14_;
		XmppErrorStanza* error_stanza = NULL;
		XmppErrorStanza* _tmp15_;
		XmppXepMucFlag* _tmp16_;
		XmppJid* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		gboolean _tmp22_;
		_tmp9_ = xmpp_stanza_get_from ((XmppStanza*) presence);
		_tmp10_ = _tmp9_;
		_tmp11_ = _tmp10_;
		_tmp12_ = xmpp_jid_get_bare_jid (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = _tmp13_;
		_xmpp_jid_unref0 (_tmp11_);
		bare_jid = _tmp14_;
		_tmp15_ = xmpp_stanza_get_error ((XmppStanza*) presence);
		error_stanza = _tmp15_;
		_tmp16_ = flag;
		_tmp17_ = bare_jid;
		_tmp18_ = xmpp_xep_muc_flag_get_enter_id (_tmp16_, _tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = xmpp_stanza_get_id ((XmppStanza*) presence);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_strcmp0 (_tmp19_, _tmp21_) == 0;
		_g_free0 (_tmp19_);
		if (_tmp22_) {
			XmppXepMucMucEnterError* _error_ = NULL;
			XmppErrorStanza* _tmp23_;
			const gchar* _tmp24_;
			const gchar* _tmp25_;
			const gchar* _tmp26_;
			GQuark _tmp28_ = 0U;
			static GQuark _tmp27_label0 = 0;
			static GQuark _tmp27_label1 = 0;
			static GQuark _tmp27_label2 = 0;
			static GQuark _tmp27_label3 = 0;
			static GQuark _tmp27_label4 = 0;
			static GQuark _tmp27_label5 = 0;
			static GQuark _tmp27_label6 = 0;
			static GQuark _tmp27_label7 = 0;
			XmppXepMucMucEnterError* _tmp69_;
			XmppXepMucFlag* _tmp88_;
			XmppJid* _tmp89_;
			_error_ = NULL;
			_tmp23_ = error_stanza;
			_tmp24_ = xmpp_error_stanza_get_condition (_tmp23_);
			_tmp25_ = _tmp24_;
			_tmp26_ = _tmp25_;
			_tmp28_ = (NULL == _tmp26_) ? 0 : g_quark_from_string (_tmp26_);
			if (_tmp28_ == ((0 != _tmp27_label0) ? _tmp27_label0 : (_tmp27_label0 = g_quark_from_static_string (XMPP_ERROR_STANZA_CONDITION_NOT_AUTHORIZED)))) {
				switch (0) {
					default:
					{
						XmppErrorStanza* _tmp29_;
						const gchar* _tmp30_;
						const gchar* _tmp31_;
						_tmp29_ = error_stanza;
						_tmp30_ = xmpp_error_stanza_get_type_ (_tmp29_);
						_tmp31_ = _tmp30_;
						if (g_strcmp0 (XMPP_ERROR_STANZA_TYPE_AUTH, _tmp31_) == 0) {
							XmppXepMucMucEnterError _tmp32_;
							XmppXepMucMucEnterError* _tmp33_;
							_tmp32_ = XMPP_XEP_MUC_MUC_ENTER_ERROR_PASSWORD_REQUIRED;
							_tmp33_ = __xmpp_xep_muc_muc_enter_error_dup0 (&_tmp32_);
							_g_free0 (_error_);
							_error_ = _tmp33_;
						}
						break;
					}
				}
			} else if (_tmp28_ == ((0 != _tmp27_label1) ? _tmp27_label1 : (_tmp27_label1 = g_quark_from_static_string (XMPP_ERROR_STANZA_CONDITION_REGISTRATION_REQUIRED)))) {
				switch (0) {
					default:
					{
						XmppErrorStanza* _tmp34_;
						const gchar* _tmp35_;
						const gchar* _tmp36_;
						_tmp34_ = error_stanza;
						_tmp35_ = xmpp_error_stanza_get_type_ (_tmp34_);
						_tmp36_ = _tmp35_;
						if (g_strcmp0 (XMPP_ERROR_STANZA_TYPE_AUTH, _tmp36_) == 0) {
							XmppXepMucMucEnterError _tmp37_;
							XmppXepMucMucEnterError* _tmp38_;
							_tmp37_ = XMPP_XEP_MUC_MUC_ENTER_ERROR_NOT_IN_MEMBER_LIST;
							_tmp38_ = __xmpp_xep_muc_muc_enter_error_dup0 (&_tmp37_);
							_g_free0 (_error_);
							_error_ = _tmp38_;
						}
						break;
					}
				}
			} else if (_tmp28_ == ((0 != _tmp27_label2) ? _tmp27_label2 : (_tmp27_label2 = g_quark_from_static_string (XMPP_ERROR_STANZA_CONDITION_FORBIDDEN)))) {
				switch (0) {
					default:
					{
						XmppErrorStanza* _tmp39_;
						const gchar* _tmp40_;
						const gchar* _tmp41_;
						_tmp39_ = error_stanza;
						_tmp40_ = xmpp_error_stanza_get_type_ (_tmp39_);
						_tmp41_ = _tmp40_;
						if (g_strcmp0 (XMPP_ERROR_STANZA_TYPE_AUTH, _tmp41_) == 0) {
							XmppXepMucMucEnterError _tmp42_;
							XmppXepMucMucEnterError* _tmp43_;
							_tmp42_ = XMPP_XEP_MUC_MUC_ENTER_ERROR_BANNED;
							_tmp43_ = __xmpp_xep_muc_muc_enter_error_dup0 (&_tmp42_);
							_g_free0 (_error_);
							_error_ = _tmp43_;
						}
						break;
					}
				}
			} else if (_tmp28_ == ((0 != _tmp27_label3) ? _tmp27_label3 : (_tmp27_label3 = g_quark_from_static_string (XMPP_ERROR_STANZA_CONDITION_SERVICE_UNAVAILABLE)))) {
				switch (0) {
					default:
					{
						XmppErrorStanza* _tmp44_;
						const gchar* _tmp45_;
						const gchar* _tmp46_;
						_tmp44_ = error_stanza;
						_tmp45_ = xmpp_error_stanza_get_type_ (_tmp44_);
						_tmp46_ = _tmp45_;
						if (g_strcmp0 (XMPP_ERROR_STANZA_TYPE_WAIT, _tmp46_) == 0) {
							XmppXepMucMucEnterError _tmp47_;
							XmppXepMucMucEnterError* _tmp48_;
							_tmp47_ = XMPP_XEP_MUC_MUC_ENTER_ERROR_OCCUPANT_LIMIT_REACHED;
							_tmp48_ = __xmpp_xep_muc_muc_enter_error_dup0 (&_tmp47_);
							_g_free0 (_error_);
							_error_ = _tmp48_;
						}
						break;
					}
				}
			} else if (_tmp28_ == ((0 != _tmp27_label4) ? _tmp27_label4 : (_tmp27_label4 = g_quark_from_static_string (XMPP_ERROR_STANZA_CONDITION_ITEM_NOT_FOUND)))) {
				switch (0) {
					default:
					{
						XmppErrorStanza* _tmp49_;
						const gchar* _tmp50_;
						const gchar* _tmp51_;
						_tmp49_ = error_stanza;
						_tmp50_ = xmpp_error_stanza_get_type_ (_tmp49_);
						_tmp51_ = _tmp50_;
						if (g_strcmp0 (XMPP_ERROR_STANZA_TYPE_CANCEL, _tmp51_) == 0) {
							XmppXepMucMucEnterError _tmp52_;
							XmppXepMucMucEnterError* _tmp53_;
							_tmp52_ = XMPP_XEP_MUC_MUC_ENTER_ERROR_ROOM_DOESNT_EXIST;
							_tmp53_ = __xmpp_xep_muc_muc_enter_error_dup0 (&_tmp52_);
							_g_free0 (_error_);
							_error_ = _tmp53_;
						}
						break;
					}
				}
			} else if (_tmp28_ == ((0 != _tmp27_label5) ? _tmp27_label5 : (_tmp27_label5 = g_quark_from_static_string (XMPP_ERROR_STANZA_CONDITION_CONFLICT)))) {
				switch (0) {
					default:
					{
						XmppErrorStanza* _tmp54_;
						const gchar* _tmp55_;
						const gchar* _tmp56_;
						_tmp54_ = error_stanza;
						_tmp55_ = xmpp_error_stanza_get_type_ (_tmp54_);
						_tmp56_ = _tmp55_;
						if (g_strcmp0 (XMPP_ERROR_STANZA_TYPE_CANCEL, _tmp56_) == 0) {
							XmppXepMucMucEnterError _tmp57_;
							XmppXepMucMucEnterError* _tmp58_;
							_tmp57_ = XMPP_XEP_MUC_MUC_ENTER_ERROR_NICK_CONFLICT;
							_tmp58_ = __xmpp_xep_muc_muc_enter_error_dup0 (&_tmp57_);
							_g_free0 (_error_);
							_error_ = _tmp58_;
						}
						break;
					}
				}
			} else if (_tmp28_ == ((0 != _tmp27_label6) ? _tmp27_label6 : (_tmp27_label6 = g_quark_from_static_string (XMPP_ERROR_STANZA_CONDITION_NOT_ALLOWED)))) {
				switch (0) {
					default:
					{
						XmppErrorStanza* _tmp59_;
						const gchar* _tmp60_;
						const gchar* _tmp61_;
						_tmp59_ = error_stanza;
						_tmp60_ = xmpp_error_stanza_get_type_ (_tmp59_);
						_tmp61_ = _tmp60_;
						if (g_strcmp0 (XMPP_ERROR_STANZA_TYPE_CANCEL, _tmp61_) == 0) {
							XmppXepMucMucEnterError _tmp62_;
							XmppXepMucMucEnterError* _tmp63_;
							_tmp62_ = XMPP_XEP_MUC_MUC_ENTER_ERROR_CREATION_RESTRICTED;
							_tmp63_ = __xmpp_xep_muc_muc_enter_error_dup0 (&_tmp62_);
							_g_free0 (_error_);
							_error_ = _tmp63_;
						}
						break;
					}
				}
			} else if (_tmp28_ == ((0 != _tmp27_label7) ? _tmp27_label7 : (_tmp27_label7 = g_quark_from_static_string (XMPP_ERROR_STANZA_CONDITION_NOT_ACCEPTABLE)))) {
				switch (0) {
					default:
					{
						XmppErrorStanza* _tmp64_;
						const gchar* _tmp65_;
						const gchar* _tmp66_;
						_tmp64_ = error_stanza;
						_tmp65_ = xmpp_error_stanza_get_type_ (_tmp64_);
						_tmp66_ = _tmp65_;
						if (g_strcmp0 (XMPP_ERROR_STANZA_TYPE_CANCEL, _tmp66_) == 0) {
							XmppXepMucMucEnterError _tmp67_;
							XmppXepMucMucEnterError* _tmp68_;
							_tmp67_ = XMPP_XEP_MUC_MUC_ENTER_ERROR_USE_RESERVED_ROOMNICK;
							_tmp68_ = __xmpp_xep_muc_muc_enter_error_dup0 (&_tmp67_);
							_g_free0 (_error_);
							_error_ = _tmp68_;
						}
						break;
					}
				}
			}
			_tmp69_ = _error_;
			if (_tmp69_ != NULL) {
				XmppXepMucFlag* _tmp70_;
				GeeHashMap* _tmp71_;
				XmppJid* _tmp72_;
				gpointer _tmp73_;
				GeePromise* _tmp74_;
				XmppXepMucMucEnterError* _tmp75_;
				XmppXepMucMucEnterError* _tmp76_;
				XmppXepMucJoinResult* _tmp77_ = NULL;
				_tmp70_ = flag;
				_tmp71_ = _tmp70_->enter_futures;
				_tmp72_ = bare_jid;
				_tmp73_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp71_, _tmp72_);
				_tmp74_ = (GeePromise*) _tmp73_;
				_tmp75_ = _error_;
				_tmp76_ = __xmpp_xep_muc_muc_enter_error_dup0 (_tmp75_);
				_tmp77_ = xmpp_xep_muc_join_result_new ();
				_g_free0 (_tmp77_->muc_error);
				_tmp77_->muc_error = _tmp76_;
				gee_promise_set_value (_tmp74_, _tmp77_);
				_gee_promise_unref0 (_tmp74_);
			} else {
				XmppXepMucFlag* _tmp78_;
				GeeHashMap* _tmp79_;
				XmppJid* _tmp80_;
				gpointer _tmp81_;
				GeePromise* _tmp82_;
				XmppErrorStanza* _tmp83_;
				const gchar* _tmp84_;
				const gchar* _tmp85_;
				gchar* _tmp86_;
				XmppXepMucJoinResult* _tmp87_ = NULL;
				_tmp78_ = flag;
				_tmp79_ = _tmp78_->enter_futures;
				_tmp80_ = bare_jid;
				_tmp81_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp79_, _tmp80_);
				_tmp82_ = (GeePromise*) _tmp81_;
				_tmp83_ = error_stanza;
				_tmp84_ = xmpp_error_stanza_get_condition (_tmp83_);
				_tmp85_ = _tmp84_;
				_tmp86_ = g_strdup (_tmp85_);
				_tmp87_ = xmpp_xep_muc_join_result_new ();
				_g_free0 (_tmp87_->stanza_error);
				_tmp87_->stanza_error = _tmp86_;
				gee_promise_set_value (_tmp82_, _tmp87_);
				_gee_promise_unref0 (_tmp82_);
			}
			_tmp88_ = flag;
			_tmp89_ = bare_jid;
			xmpp_xep_muc_flag_finish_muc_enter (_tmp88_, _tmp89_);
			_g_free0 (_error_);
		}
		_xmpp_error_stanza_unref0 (error_stanza);
		_xmpp_jid_unref0 (bare_jid);
	}
	_g_object_unref0 (flag);
}

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

static gpointer
__xmpp_xep_muc_affiliation_dup0 (gpointer self)
{
	return self ? _xmpp_xep_muc_affiliation_dup (self) : NULL;
}

static void
xmpp_xep_muc_module_on_received_available (XmppXepMucModule* self,
                                           XmppXmppStream* stream,
                                           XmppPresenceStanza* presence)
{
	XmppXepMucFlag* flag = NULL;
	XmppFlagIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepMucFlag* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	XmppJid* _tmp5_;
	gboolean _tmp6_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (presence != NULL);
	_tmp0_ = xmpp_xep_muc_flag_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	flag = (XmppXepMucFlag*) _tmp1_;
	_tmp2_ = flag;
	_tmp3_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = xmpp_xep_muc_flag_is_occupant (_tmp2_, _tmp5_);
	_xmpp_jid_unref0 (_tmp5_);
	if (_tmp6_) {
		XmppStanzaNode* x_node = NULL;
		XmppStanzaNode* _tmp7_;
		XmppStanzaNode* _tmp8_;
		XmppStanzaNode* _tmp9_;
		_tmp7_ = ((XmppStanza*) presence)->stanza;
		_tmp8_ = xmpp_stanza_node_get_subnode (_tmp7_, "x", XMPP_XEP_MUC_NS_URI_USER, FALSE);
		x_node = _tmp8_;
		_tmp9_ = x_node;
		if (_tmp9_ != NULL) {
			GeeArrayList* status_codes = NULL;
			XmppStanzaNode* _tmp10_;
			GeeArrayList* _tmp11_;
			GeeArrayList* _tmp12_;
			gchar* affiliation_str = NULL;
			XmppStanzaNode* _tmp48_;
			const gchar* _tmp49_;
			gchar* _tmp50_;
			XmppXepMucAffiliation* affiliation = NULL;
			const gchar* _tmp51_;
			gchar* jid_ = NULL;
			XmppStanzaNode* _tmp70_;
			const gchar* _tmp71_;
			gchar* _tmp72_;
			const gchar* _tmp73_;
			gchar* role_str = NULL;
			XmppStanzaNode* _tmp96_;
			const gchar* _tmp97_;
			gchar* _tmp98_;
			const gchar* _tmp99_;
			_tmp10_ = x_node;
			_tmp11_ = xmpp_xep_muc_module_get_status_codes (_tmp10_);
			status_codes = _tmp11_;
			_tmp12_ = status_codes;
			if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp12_, (gpointer) ((gintptr) XMPP_XEP_MUC_STATUS_CODE_SELF_PRESENCE))) {
				XmppJid* bare_jid = NULL;
				XmppJid* _tmp13_;
				XmppJid* _tmp14_;
				XmppJid* _tmp15_;
				XmppJid* _tmp16_;
				XmppJid* _tmp17_;
				XmppJid* _tmp18_;
				XmppXepMucFlag* _tmp19_;
				XmppJid* _tmp20_;
				gchar* _tmp21_;
				gchar* _tmp22_;
				gboolean _tmp23_;
				XmppXepMucFlag* _tmp44_;
				XmppJid* _tmp45_;
				XmppJid* _tmp46_;
				XmppJid* _tmp47_;
				_tmp13_ = xmpp_stanza_get_from ((XmppStanza*) presence);
				_tmp14_ = _tmp13_;
				_tmp15_ = _tmp14_;
				_tmp16_ = xmpp_jid_get_bare_jid (_tmp15_);
				_tmp17_ = _tmp16_;
				_tmp18_ = _tmp17_;
				_xmpp_jid_unref0 (_tmp15_);
				bare_jid = _tmp18_;
				_tmp19_ = flag;
				_tmp20_ = bare_jid;
				_tmp21_ = xmpp_xep_muc_flag_get_enter_id (_tmp19_, _tmp20_);
				_tmp22_ = _tmp21_;
				_tmp23_ = _tmp22_ != NULL;
				_g_free0 (_tmp22_);
				if (_tmp23_) {
					XmppJid* _tmp24_;
					XmppJid* _tmp25_;
					XmppJid* _tmp26_;
					XmppXepMucFlag* _tmp27_;
					XmppJid* _tmp28_;
					XmppXepMucJoinResult* join_result = NULL;
					XmppJid* _tmp29_;
					XmppJid* _tmp30_;
					XmppJid* _tmp31_;
					const gchar* _tmp32_;
					gchar* _tmp33_;
					GeeArrayList* _tmp34_;
					XmppXepMucJoinResult* _tmp35_ = NULL;
					XmppXepMucJoinResult* _tmp36_;
					XmppXepMucFlag* _tmp37_;
					GeeHashMap* _tmp38_;
					XmppJid* _tmp39_;
					gpointer _tmp40_;
					GeePromise* _tmp41_;
					XmppXepMucJoinResult* _tmp42_;
					XmppXepMucJoinResult* _tmp43_;
					_tmp24_ = bare_jid;
					xmpp_xep_muc_module_query_affiliation (self, stream, _tmp24_, "member", NULL, NULL);
					_tmp25_ = bare_jid;
					xmpp_xep_muc_module_query_affiliation (self, stream, _tmp25_, "admin", NULL, NULL);
					_tmp26_ = bare_jid;
					xmpp_xep_muc_module_query_affiliation (self, stream, _tmp26_, "owner", NULL, NULL);
					_tmp27_ = flag;
					_tmp28_ = bare_jid;
					xmpp_xep_muc_flag_finish_muc_enter (_tmp27_, _tmp28_);
					_tmp29_ = xmpp_stanza_get_from ((XmppStanza*) presence);
					_tmp30_ = _tmp29_;
					_tmp31_ = _tmp30_;
					_tmp32_ = _tmp31_->resourcepart;
					_tmp33_ = g_strdup (_tmp32_);
					_tmp34_ = status_codes;
					_tmp35_ = xmpp_xep_muc_join_result_new ();
					_g_free0 (_tmp35_->nick);
					_tmp35_->nick = _tmp33_;
					_tmp35_->newly_created = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp34_, (gpointer) ((gintptr) XMPP_XEP_MUC_STATUS_CODE_NEW_ROOM_CREATED));
					_tmp36_ = _tmp35_;
					_xmpp_jid_unref0 (_tmp31_);
					join_result = _tmp36_;
					_tmp37_ = flag;
					_tmp38_ = _tmp37_->enter_futures;
					_tmp39_ = bare_jid;
					_tmp40_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp38_, _tmp39_);
					_tmp41_ = (GeePromise*) _tmp40_;
					_tmp42_ = join_result;
					_tmp43_ = _xmpp_xep_muc_join_result_ref0 (_tmp42_);
					gee_promise_set_value (_tmp41_, _tmp43_);
					_gee_promise_unref0 (_tmp41_);
					_xmpp_xep_muc_join_result_unref0 (join_result);
				}
				_tmp44_ = flag;
				_tmp45_ = xmpp_stanza_get_from ((XmppStanza*) presence);
				_tmp46_ = _tmp45_;
				_tmp47_ = _tmp46_;
				xmpp_xep_muc_flag_set_muc_nick (_tmp44_, _tmp47_);
				_xmpp_jid_unref0 (_tmp47_);
				_xmpp_jid_unref0 (bare_jid);
			}
			_tmp48_ = x_node;
			_tmp49_ = xmpp_stanza_node_get_deep_attribute (_tmp48_, "item", "affiliation", NULL);
			_tmp50_ = g_strdup (_tmp49_);
			affiliation_str = _tmp50_;
			affiliation = NULL;
			_tmp51_ = affiliation_str;
			if (_tmp51_ != NULL) {
				const gchar* _tmp52_;
				XmppXepMucAffiliation _tmp53_;
				XmppXepMucAffiliation* _tmp54_;
				XmppXepMucFlag* _tmp55_;
				XmppJid* _tmp56_;
				XmppJid* _tmp57_;
				XmppJid* _tmp58_;
				XmppJid* _tmp59_;
				XmppJid* _tmp60_;
				XmppJid* _tmp61_;
				XmppJid* _tmp62_;
				XmppJid* _tmp63_;
				XmppJid* _tmp64_;
				XmppXepMucAffiliation* _tmp65_;
				XmppJid* _tmp66_;
				XmppJid* _tmp67_;
				XmppJid* _tmp68_;
				XmppXepMucAffiliation* _tmp69_;
				_tmp52_ = affiliation_str;
				_tmp53_ = xmpp_xep_muc_module_parse_affiliation (_tmp52_);
				_tmp54_ = __xmpp_xep_muc_affiliation_dup0 (&_tmp53_);
				_g_free0 (affiliation);
				affiliation = _tmp54_;
				_tmp55_ = flag;
				_tmp56_ = xmpp_stanza_get_from ((XmppStanza*) presence);
				_tmp57_ = _tmp56_;
				_tmp58_ = _tmp57_;
				_tmp59_ = xmpp_jid_get_bare_jid (_tmp58_);
				_tmp60_ = _tmp59_;
				_tmp61_ = _tmp60_;
				_tmp62_ = xmpp_stanza_get_from ((XmppStanza*) presence);
				_tmp63_ = _tmp62_;
				_tmp64_ = _tmp63_;
				_tmp65_ = affiliation;
				xmpp_xep_muc_flag_set_affiliation (_tmp55_, _tmp61_, _tmp64_, *_tmp65_);
				_xmpp_jid_unref0 (_tmp64_);
				_xmpp_jid_unref0 (_tmp61_);
				_xmpp_jid_unref0 (_tmp58_);
				_tmp66_ = xmpp_stanza_get_from ((XmppStanza*) presence);
				_tmp67_ = _tmp66_;
				_tmp68_ = _tmp67_;
				_tmp69_ = affiliation;
				g_signal_emit (self, xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_RECEIVED_OCCUPANT_AFFILIATION_SIGNAL], 0, stream, _tmp68_, _tmp69_);
				_xmpp_jid_unref0 (_tmp68_);
			}
			_tmp70_ = x_node;
			_tmp71_ = xmpp_stanza_node_get_deep_attribute (_tmp70_, "item", "jid", NULL);
			_tmp72_ = g_strdup (_tmp71_);
			jid_ = _tmp72_;
			_tmp73_ = jid_;
			if (_tmp73_ != NULL) {
				{
					XmppJid* jid = NULL;
					const gchar* _tmp74_;
					XmppJid* _tmp75_;
					XmppXepMucFlag* _tmp76_;
					XmppJid* _tmp77_;
					XmppJid* _tmp78_;
					XmppJid* _tmp79_;
					XmppJid* _tmp80_;
					XmppXepMucAffiliation* _tmp81_;
					XmppJid* _tmp90_;
					XmppJid* _tmp91_;
					XmppJid* _tmp92_;
					XmppJid* _tmp93_;
					_tmp74_ = jid_;
					_tmp75_ = xmpp_jid_new (_tmp74_, &_inner_error0_);
					jid = _tmp75_;
					if (G_UNLIKELY (_inner_error0_ != NULL)) {
						if (_inner_error0_->domain == XMPP_INVALID_JID_ERROR) {
							goto __catch0_xmpp_invalid_jid_error;
						}
						_g_free0 (jid_);
						_g_free0 (affiliation);
						_g_free0 (affiliation_str);
						_g_object_unref0 (status_codes);
						_xmpp_stanza_entry_unref0 (x_node);
						_g_object_unref0 (flag);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
						g_clear_error (&_inner_error0_);
						return;
					}
					_tmp76_ = flag;
					_tmp77_ = xmpp_stanza_get_from ((XmppStanza*) presence);
					_tmp78_ = _tmp77_;
					_tmp79_ = _tmp78_;
					_tmp80_ = jid;
					xmpp_xep_muc_flag_set_real_jid (_tmp76_, _tmp79_, _tmp80_);
					_xmpp_jid_unref0 (_tmp79_);
					_tmp81_ = affiliation;
					if (_tmp81_ != NULL) {
						XmppFlagIdentity* _tmp82_;
						gpointer _tmp83_;
						XmppXepMucFlag* _tmp84_;
						XmppJid* _tmp85_;
						XmppJid* _tmp86_;
						XmppJid* _tmp87_;
						XmppJid* _tmp88_;
						XmppXepMucAffiliation* _tmp89_;
						_tmp82_ = xmpp_xep_muc_flag_IDENTITY;
						_tmp83_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp82_);
						_tmp84_ = (XmppXepMucFlag*) _tmp83_;
						_tmp85_ = xmpp_stanza_get_from ((XmppStanza*) presence);
						_tmp86_ = _tmp85_;
						_tmp87_ = _tmp86_;
						_tmp88_ = jid;
						_tmp89_ = affiliation;
						xmpp_xep_muc_flag_set_offline_member (_tmp84_, _tmp87_, _tmp88_, *_tmp89_);
						_xmpp_jid_unref0 (_tmp87_);
						_g_object_unref0 (_tmp84_);
					}
					_tmp90_ = xmpp_stanza_get_from ((XmppStanza*) presence);
					_tmp91_ = _tmp90_;
					_tmp92_ = _tmp91_;
					_tmp93_ = jid;
					g_signal_emit (self, xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_RECEIVED_OCCUPANT_JID_SIGNAL], 0, stream, _tmp92_, _tmp93_);
					_xmpp_jid_unref0 (_tmp92_);
					_xmpp_jid_unref0 (jid);
				}
				goto __finally0;
				__catch0_xmpp_invalid_jid_error:
				{
					GError* e = NULL;
					GError* _tmp94_;
					const gchar* _tmp95_;
					e = _inner_error0_;
					_inner_error0_ = NULL;
					_tmp94_ = e;
					_tmp95_ = _tmp94_->message;
					g_warning ("module.vala:391: Received invalid occupant jid: %s", _tmp95_);
					_g_error_free0 (e);
				}
				__finally0:
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_free0 (jid_);
					_g_free0 (affiliation);
					_g_free0 (affiliation_str);
					_g_object_unref0 (status_codes);
					_xmpp_stanza_entry_unref0 (x_node);
					_g_object_unref0 (flag);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
					g_clear_error (&_inner_error0_);
					return;
				}
			}
			_tmp96_ = x_node;
			_tmp97_ = xmpp_stanza_node_get_deep_attribute (_tmp96_, "item", "role", NULL);
			_tmp98_ = g_strdup (_tmp97_);
			role_str = _tmp98_;
			_tmp99_ = role_str;
			if (_tmp99_ != NULL) {
				XmppXepMucRole role = 0;
				const gchar* _tmp100_;
				XmppXepMucFlag* _tmp101_;
				XmppJid* _tmp102_;
				XmppJid* _tmp103_;
				XmppJid* _tmp104_;
				XmppJid* _tmp105_;
				XmppJid* _tmp106_;
				XmppJid* _tmp107_;
				_tmp100_ = role_str;
				role = xmpp_xep_muc_module_parse_role (_tmp100_);
				_tmp101_ = flag;
				_tmp102_ = xmpp_stanza_get_from ((XmppStanza*) presence);
				_tmp103_ = _tmp102_;
				_tmp104_ = _tmp103_;
				xmpp_xep_muc_flag_set_occupant_role (_tmp101_, _tmp104_, role);
				_xmpp_jid_unref0 (_tmp104_);
				_tmp105_ = xmpp_stanza_get_from ((XmppStanza*) presence);
				_tmp106_ = _tmp105_;
				_tmp107_ = _tmp106_;
				g_signal_emit (self, xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_RECEIVED_OCCUPANT_ROLE_SIGNAL], 0, stream, _tmp107_, &role);
				_xmpp_jid_unref0 (_tmp107_);
			}
			_g_free0 (role_str);
			_g_free0 (jid_);
			_g_free0 (affiliation);
			_g_free0 (affiliation_str);
			_g_object_unref0 (status_codes);
		}
		_xmpp_stanza_entry_unref0 (x_node);
	}
	_g_object_unref0 (flag);
}

static void
xmpp_xep_muc_module_on_received_unavailable (XmppXepMucModule* self,
                                             XmppXmppStream* stream,
                                             XmppPresenceStanza* presence)
{
	XmppXepMucFlag* flag = NULL;
	XmppFlagIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepMucFlag* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	XmppJid* _tmp5_;
	gboolean _tmp6_;
	XmppStanzaNode* x_node = NULL;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	GeeArrayList* status_codes = NULL;
	XmppStanzaNode* _tmp10_;
	GeeArrayList* _tmp11_;
	GeeArrayList* _tmp12_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (presence != NULL);
	_tmp0_ = xmpp_xep_muc_flag_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	flag = (XmppXepMucFlag*) _tmp1_;
	_tmp2_ = flag;
	_tmp3_ = xmpp_stanza_get_from ((XmppStanza*) presence);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = !xmpp_xep_muc_flag_is_occupant (_tmp2_, _tmp5_);
	_xmpp_jid_unref0 (_tmp5_);
	if (_tmp6_) {
		_g_object_unref0 (flag);
		return;
	}
	_tmp7_ = ((XmppStanza*) presence)->stanza;
	_tmp8_ = xmpp_stanza_node_get_subnode (_tmp7_, "x", XMPP_XEP_MUC_NS_URI_USER, FALSE);
	x_node = _tmp8_;
	_tmp9_ = x_node;
	if (_tmp9_ == NULL) {
		_xmpp_stanza_entry_unref0 (x_node);
		_g_object_unref0 (flag);
		return;
	}
	_tmp10_ = x_node;
	_tmp11_ = xmpp_xep_muc_module_get_status_codes (_tmp10_);
	status_codes = _tmp11_;
	_tmp12_ = status_codes;
	if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp12_, (gpointer) ((gintptr) XMPP_XEP_MUC_STATUS_CODE_SELF_PRESENCE))) {
		XmppXepMucFlag* _tmp13_;
		XmppJid* _tmp14_;
		XmppJid* _tmp15_;
		XmppJid* _tmp16_;
		_tmp13_ = flag;
		_tmp14_ = xmpp_stanza_get_from ((XmppStanza*) presence);
		_tmp15_ = _tmp14_;
		_tmp16_ = _tmp15_;
		xmpp_xep_muc_flag_remove_occupant_info (_tmp13_, _tmp16_);
		_xmpp_jid_unref0 (_tmp16_);
	}
	{
		XmppXepMucStatusCode* code_collection = NULL;
		gint code_collection_length1 = 0;
		gint _code_collection_size_ = 0;
		gint code_it = 0;
		code_collection = XMPP_XEP_MUC_USER_REMOVED_CODES;
		code_collection_length1 = G_N_ELEMENTS (XMPP_XEP_MUC_USER_REMOVED_CODES);
		for (code_it = 0; code_it < code_collection_length1; code_it = code_it + 1) {
			XmppXepMucStatusCode code = 0;
			code = code_collection[code_it];
			{
				GeeArrayList* _tmp17_;
				_tmp17_ = status_codes;
				if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp17_, (gpointer) ((gintptr) code))) {
					GeeArrayList* _tmp18_;
					_tmp18_ = status_codes;
					if (gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp18_, (gpointer) ((gintptr) XMPP_XEP_MUC_STATUS_CODE_SELF_PRESENCE))) {
						XmppXepMucFlag* _tmp19_;
						XmppJid* _tmp20_;
						XmppJid* _tmp21_;
						XmppJid* _tmp22_;
						XmppJid* _tmp23_;
						XmppJid* _tmp24_;
						XmppJid* _tmp25_;
						XmppJid* _tmp26_;
						XmppJid* _tmp27_;
						XmppJid* _tmp28_;
						XmppPresenceFlag* presence_flag = NULL;
						XmppFlagIdentity* _tmp29_;
						gpointer _tmp30_;
						XmppPresenceFlag* _tmp31_;
						XmppJid* _tmp32_;
						XmppJid* _tmp33_;
						XmppJid* _tmp34_;
						XmppJid* _tmp35_;
						XmppJid* _tmp36_;
						XmppJid* _tmp37_;
						_tmp19_ = flag;
						_tmp20_ = xmpp_stanza_get_from ((XmppStanza*) presence);
						_tmp21_ = _tmp20_;
						_tmp22_ = _tmp21_;
						_tmp23_ = xmpp_jid_get_bare_jid (_tmp22_);
						_tmp24_ = _tmp23_;
						_tmp25_ = _tmp24_;
						xmpp_xep_muc_flag_left_muc (_tmp19_, stream, _tmp25_);
						_xmpp_jid_unref0 (_tmp25_);
						_xmpp_jid_unref0 (_tmp22_);
						_tmp26_ = xmpp_stanza_get_from ((XmppStanza*) presence);
						_tmp27_ = _tmp26_;
						_tmp28_ = _tmp27_;
						g_signal_emit (self, xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_SELF_REMOVED_FROM_ROOM_SIGNAL], 0, stream, _tmp28_, code);
						_xmpp_jid_unref0 (_tmp28_);
						_tmp29_ = xmpp_presence_flag_IDENTITY;
						_tmp30_ = xmpp_xmpp_stream_get_flag (stream, XMPP_PRESENCE_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp29_);
						presence_flag = (XmppPresenceFlag*) _tmp30_;
						_tmp31_ = presence_flag;
						_tmp32_ = xmpp_stanza_get_from ((XmppStanza*) presence);
						_tmp33_ = _tmp32_;
						_tmp34_ = _tmp33_;
						_tmp35_ = xmpp_jid_get_bare_jid (_tmp34_);
						_tmp36_ = _tmp35_;
						_tmp37_ = _tmp36_;
						xmpp_presence_flag_remove_presence (_tmp31_, _tmp37_);
						_xmpp_jid_unref0 (_tmp37_);
						_xmpp_jid_unref0 (_tmp34_);
						_g_object_unref0 (presence_flag);
					} else {
						XmppJid* _tmp38_;
						XmppJid* _tmp39_;
						XmppJid* _tmp40_;
						_tmp38_ = xmpp_stanza_get_from ((XmppStanza*) presence);
						_tmp39_ = _tmp38_;
						_tmp40_ = _tmp39_;
						g_signal_emit (self, xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_REMOVED_FROM_ROOM_SIGNAL], 0, stream, _tmp40_, &code);
						_xmpp_jid_unref0 (_tmp40_);
					}
				}
			}
		}
	}
	_g_object_unref0 (status_codes);
	_xmpp_stanza_entry_unref0 (x_node);
	_g_object_unref0 (flag);
}

static void
xmpp_xep_muc_module_query_room_info_data_free (gpointer _data)
{
	XmppXepMucModuleQueryRoomInfoData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->jid);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepMucModuleQueryRoomInfoData, _data_);
}

static void
xmpp_xep_muc_module_query_room_info (XmppXepMucModule* self,
                                     XmppXmppStream* stream,
                                     XmppJid* jid,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	XmppXepMucModuleQueryRoomInfoData* _data_;
	XmppXepMucModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	_data_ = g_slice_new0 (XmppXepMucModuleQueryRoomInfoData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_muc_module_query_room_info_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = _xmpp_jid_ref0 (jid);
	_xmpp_jid_unref0 (_data_->jid);
	_data_->jid = _tmp2_;
	xmpp_xep_muc_module_query_room_info_co (_data_);
}

static void
xmpp_xep_muc_module_query_room_info_finish (XmppXepMucModule* self,
                                            GAsyncResult* _res_)
{
	XmppXepMucModuleQueryRoomInfoData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
xmpp_xep_muc_module_query_room_info_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_)
{
	XmppXepMucModuleQueryRoomInfoData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_muc_module_query_room_info_co (_data_);
}

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

static gpointer
__xmpp_xep_muc_feature_dup0 (gpointer self)
{
	return self ? _xmpp_xep_muc_feature_dup (self) : NULL;
}

static gboolean
xmpp_xep_muc_module_query_room_info_co (XmppXepMucModuleQueryRoomInfoData* _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_request_info (_data_->_tmp2_, _data_->stream, _data_->jid, xmpp_xep_muc_module_query_room_info_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = xmpp_xep_service_discovery_module_request_info_finish (_data_->_tmp2_, _data_->_res_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_g_object_unref0 (_data_->_tmp2_);
	_data_->info_result = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->info_result;
	if (_data_->_tmp5_ == NULL) {
		_xmpp_xep_service_discovery_info_result_unref0 (_data_->info_result);
		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;
	}
	_data_->_tmp6_ = gee_array_list_new (XMPP_XEP_MUC_TYPE_FEATURE, NULL, NULL, NULL, NULL, NULL);
	_data_->features = (GeeList*) _data_->_tmp6_;
	{
		_data_->_tmp7_ = _data_->info_result;
		_data_->_tmp8_ = xmpp_xep_service_discovery_info_result_get_identities (_data_->_tmp7_);
		_data_->_tmp9_ = _data_->_tmp8_;
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_tmp11_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp10_);
		_data_->_tmp12_ = _data_->_tmp11_;
		_g_object_unref0 (_data_->_tmp10_);
		_data_->_identity_it = _data_->_tmp12_;
		while (TRUE) {
			_data_->_tmp13_ = _data_->_identity_it;
			if (!gee_iterator_next (_data_->_tmp13_)) {
				break;
			}
			_data_->_tmp14_ = _data_->_identity_it;
			_data_->_tmp15_ = gee_iterator_get (_data_->_tmp14_);
			_data_->identity = (XmppXepServiceDiscoveryIdentity*) _data_->_tmp15_;
			_data_->_tmp17_ = _data_->identity;
			_data_->_tmp18_ = xmpp_xep_service_discovery_identity_get_category (_data_->_tmp17_);
			_data_->_tmp19_ = _data_->_tmp18_;
			if (g_strcmp0 (_data_->_tmp19_, "conference") == 0) {
				_data_->_tmp20_ = _data_->identity;
				_data_->_tmp21_ = xmpp_xep_service_discovery_identity_get_name (_data_->_tmp20_);
				_data_->_tmp22_ = _data_->_tmp21_;
				_data_->_tmp16_ = _data_->_tmp22_ != NULL;
			} else {
				_data_->_tmp16_ = FALSE;
			}
			if (_data_->_tmp16_) {
				_data_->_tmp23_ = xmpp_xep_muc_flag_IDENTITY;
				_data_->_tmp24_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp23_);
				_data_->_tmp25_ = (XmppXepMucFlag*) _data_->_tmp24_;
				_data_->_tmp26_ = _data_->identity;
				_data_->_tmp27_ = xmpp_xep_service_discovery_identity_get_name (_data_->_tmp26_);
				_data_->_tmp28_ = _data_->_tmp27_;
				xmpp_xep_muc_flag_set_room_name (_data_->_tmp25_, _data_->jid, _data_->_tmp28_);
				_g_object_unref0 (_data_->_tmp25_);
			}
			_xmpp_xep_service_discovery_identity_unref0 (_data_->identity);
		}
		_g_object_unref0 (_data_->_identity_it);
	}
	{
		_data_->_tmp29_ = _data_->info_result;
		_data_->_tmp30_ = xmpp_xep_service_discovery_info_result_get_features (_data_->_tmp29_);
		_data_->_tmp31_ = _data_->_tmp30_;
		_data_->_feature_list = _data_->_tmp31_;
		_data_->_tmp32_ = _data_->_feature_list;
		_data_->_tmp33_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp32_);
		_data_->_tmp34_ = _data_->_tmp33_;
		_data_->_feature_size = _data_->_tmp34_;
		_data_->_feature_index = -1;
		while (TRUE) {
			static GQuark _tmp41_label0 = 0;
			static GQuark _tmp41_label1 = 0;
			static GQuark _tmp41_label2 = 0;
			static GQuark _tmp41_label3 = 0;
			static GQuark _tmp41_label4 = 0;
			static GQuark _tmp41_label5 = 0;
			static GQuark _tmp41_label6 = 0;
			static GQuark _tmp41_label7 = 0;
			static GQuark _tmp41_label8 = 0;
			static GQuark _tmp41_label9 = 0;
			static GQuark _tmp41_label10 = 0;
			static GQuark _tmp41_label11 = 0;
			static GQuark _tmp41_label12 = 0;
			static GQuark _tmp41_label13 = 0;
			static GQuark _tmp41_label14 = 0;
			static GQuark _tmp41_label15 = 0;
			static GQuark _tmp41_label16 = 0;
			_data_->_feature_index = _data_->_feature_index + 1;
			_data_->_tmp35_ = _data_->_feature_index;
			_data_->_tmp36_ = _data_->_feature_size;
			if (!(_data_->_tmp35_ < _data_->_tmp36_)) {
				break;
			}
			_data_->_tmp37_ = _data_->_feature_list;
			_data_->_tmp38_ = gee_list_get (_data_->_tmp37_, _data_->_feature_index);
			_data_->feature = (gchar*) _data_->_tmp38_;
			_data_->parsed = NULL;
			_data_->_tmp39_ = _data_->feature;
			_data_->_tmp42_ = 0U;
			_data_->_tmp40_ = _data_->_tmp39_;
			_data_->_tmp42_ = (NULL == _data_->_tmp40_) ? 0 : g_quark_from_string (_data_->_tmp40_);
			if (_data_->_tmp42_ == ((0 != _tmp41_label0) ? _tmp41_label0 : (_tmp41_label0 = g_quark_from_static_string ("http://jabber.org/protocol/muc#register")))) {
				switch (0) {
					default:
					{
						_data_->_tmp43_ = XMPP_XEP_MUC_FEATURE_REGISTER;
						_data_->_tmp44_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp43_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp44_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label1) ? _tmp41_label1 : (_tmp41_label1 = g_quark_from_static_string ("http://jabber.org/protocol/muc#roomconfig")))) {
				switch (0) {
					default:
					{
						_data_->_tmp45_ = XMPP_XEP_MUC_FEATURE_ROOMCONFIG;
						_data_->_tmp46_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp45_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp46_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label2) ? _tmp41_label2 : (_tmp41_label2 = g_quark_from_static_string ("http://jabber.org/protocol/muc#roominfo")))) {
				switch (0) {
					default:
					{
						_data_->_tmp47_ = XMPP_XEP_MUC_FEATURE_ROOMINFO;
						_data_->_tmp48_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp47_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp48_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label3) ? _tmp41_label3 : (_tmp41_label3 = g_quark_from_static_string ("http://jabber.org/protocol/muc#stable_id")))) {
				switch (0) {
					default:
					{
						_data_->_tmp49_ = XMPP_XEP_MUC_FEATURE_STABLE_ID;
						_data_->_tmp50_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp49_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp50_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label4) ? _tmp41_label4 : (_tmp41_label4 = g_quark_from_static_string ("muc_hidden")))) {
				switch (0) {
					default:
					{
						_data_->_tmp51_ = XMPP_XEP_MUC_FEATURE_HIDDEN;
						_data_->_tmp52_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp51_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp52_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label5) ? _tmp41_label5 : (_tmp41_label5 = g_quark_from_static_string ("muc_membersonly")))) {
				switch (0) {
					default:
					{
						_data_->_tmp53_ = XMPP_XEP_MUC_FEATURE_MEMBERS_ONLY;
						_data_->_tmp54_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp53_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp54_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label6) ? _tmp41_label6 : (_tmp41_label6 = g_quark_from_static_string ("muc_moderated")))) {
				switch (0) {
					default:
					{
						_data_->_tmp55_ = XMPP_XEP_MUC_FEATURE_MODERATED;
						_data_->_tmp56_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp55_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp56_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label7) ? _tmp41_label7 : (_tmp41_label7 = g_quark_from_static_string ("muc_nonanonymous")))) {
				switch (0) {
					default:
					{
						_data_->_tmp57_ = XMPP_XEP_MUC_FEATURE_NON_ANONYMOUS;
						_data_->_tmp58_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp57_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp58_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label8) ? _tmp41_label8 : (_tmp41_label8 = g_quark_from_static_string ("muc_open")))) {
				switch (0) {
					default:
					{
						_data_->_tmp59_ = XMPP_XEP_MUC_FEATURE_OPEN;
						_data_->_tmp60_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp59_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp60_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label9) ? _tmp41_label9 : (_tmp41_label9 = g_quark_from_static_string ("muc_passwordprotected")))) {
				switch (0) {
					default:
					{
						_data_->_tmp61_ = XMPP_XEP_MUC_FEATURE_PASSWORD_PROTECTED;
						_data_->_tmp62_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp61_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp62_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label10) ? _tmp41_label10 : (_tmp41_label10 = g_quark_from_static_string ("muc_persistent")))) {
				switch (0) {
					default:
					{
						_data_->_tmp63_ = XMPP_XEP_MUC_FEATURE_PERSISTENT;
						_data_->_tmp64_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp63_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp64_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label11) ? _tmp41_label11 : (_tmp41_label11 = g_quark_from_static_string ("muc_public")))) {
				switch (0) {
					default:
					{
						_data_->_tmp65_ = XMPP_XEP_MUC_FEATURE_PUBLIC;
						_data_->_tmp66_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp65_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp66_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label12) ? _tmp41_label12 : (_tmp41_label12 = g_quark_from_static_string ("muc_rooms")))) {
				switch (0) {
					default:
					{
						_data_->_tmp67_ = XMPP_XEP_MUC_FEATURE_ROOMS;
						_data_->_tmp68_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp67_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp68_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label13) ? _tmp41_label13 : (_tmp41_label13 = g_quark_from_static_string ("muc_semianonymous")))) {
				switch (0) {
					default:
					{
						_data_->_tmp69_ = XMPP_XEP_MUC_FEATURE_SEMI_ANONYMOUS;
						_data_->_tmp70_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp69_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp70_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label14) ? _tmp41_label14 : (_tmp41_label14 = g_quark_from_static_string ("muc_temporary")))) {
				switch (0) {
					default:
					{
						_data_->_tmp71_ = XMPP_XEP_MUC_FEATURE_TEMPORARY;
						_data_->_tmp72_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp71_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp72_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label15) ? _tmp41_label15 : (_tmp41_label15 = g_quark_from_static_string ("muc_unmoderated")))) {
				switch (0) {
					default:
					{
						_data_->_tmp73_ = XMPP_XEP_MUC_FEATURE_UNMODERATED;
						_data_->_tmp74_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp73_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp74_;
						break;
					}
				}
			} else if (_data_->_tmp42_ == ((0 != _tmp41_label16) ? _tmp41_label16 : (_tmp41_label16 = g_quark_from_static_string ("muc_unsecured")))) {
				switch (0) {
					default:
					{
						_data_->_tmp75_ = XMPP_XEP_MUC_FEATURE_UNSECURED;
						_data_->_tmp76_ = __xmpp_xep_muc_feature_dup0 (&_data_->_tmp75_);
						_g_free0 (_data_->parsed);
						_data_->parsed = _data_->_tmp76_;
						break;
					}
				}
			}
			_data_->_tmp77_ = _data_->parsed;
			if (_data_->_tmp77_ != NULL) {
				_data_->_tmp78_ = _data_->features;
				_data_->_tmp79_ = _data_->parsed;
				gee_collection_add ((GeeCollection*) _data_->_tmp78_, (gpointer) ((gintptr) (*_data_->_tmp79_)));
			}
			_g_free0 (_data_->parsed);
			_g_free0 (_data_->feature);
		}
		_g_object_unref0 (_data_->_feature_list);
	}
	_data_->_tmp80_ = xmpp_xep_muc_flag_IDENTITY;
	_data_->_tmp81_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp80_);
	_data_->_tmp82_ = (XmppXepMucFlag*) _data_->_tmp81_;
	_data_->_tmp83_ = _data_->features;
	xmpp_xep_muc_flag_set_room_features (_data_->_tmp82_, _data_->jid, _data_->_tmp83_);
	_g_object_unref0 (_data_->_tmp82_);
	g_signal_emit (_data_->self, xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_ROOM_INFO_UPDATED_SIGNAL], 0, _data_->stream, _data_->jid);
	_g_object_unref0 (_data_->features);
	_xmpp_xep_service_discovery_info_result_unref0 (_data_->info_result);
	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 void
xmpp_xep_muc_module_query_affiliation_data_free (gpointer _data)
{
	XmppXepMucModuleQueryAffiliationData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->jid);
	_g_free0 (_data_->affiliation);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepMucModuleQueryAffiliationData, _data_);
}

static void
xmpp_xep_muc_module_query_affiliation (XmppXepMucModule* self,
                                       XmppXmppStream* stream,
                                       XmppJid* jid,
                                       const gchar* affiliation,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	XmppXepMucModuleQueryAffiliationData* _data_;
	XmppXepMucModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (affiliation != NULL);
	_data_ = g_slice_new0 (XmppXepMucModuleQueryAffiliationData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_muc_module_query_affiliation_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = _xmpp_jid_ref0 (jid);
	_xmpp_jid_unref0 (_data_->jid);
	_data_->jid = _tmp2_;
	_tmp3_ = g_strdup (affiliation);
	_g_free0 (_data_->affiliation);
	_data_->affiliation = _tmp3_;
	xmpp_xep_muc_module_query_affiliation_co (_data_);
}

static GeeList*
xmpp_xep_muc_module_query_affiliation_finish (XmppXepMucModule* self,
                                              GAsyncResult* _res_)
{
	GeeList* result;
	XmppXepMucModuleQueryAffiliationData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
xmpp_xep_muc_module_query_affiliation_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	XmppXepMucModuleQueryAffiliationData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_muc_module_query_affiliation_co (_data_);
}

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

static gboolean
xmpp_xep_muc_module_query_affiliation_co (XmppXepMucModuleQueryAffiliationData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = xmpp_stanza_node_new_build ("query", XMPP_XEP_MUC_NS_URI_ADMIN, NULL, NULL);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = xmpp_stanza_node_new_build ("item", XMPP_XEP_MUC_NS_URI_ADMIN, NULL, NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = xmpp_stanza_node_put_attribute (_data_->_tmp5_, "affiliation", _data_->affiliation, NULL);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = xmpp_stanza_node_put_node (_data_->_tmp3_, _data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = _xmpp_jid_ref0 (_data_->jid);
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = xmpp_iq_stanza_new_get (_data_->_tmp9_, NULL);
	xmpp_stanza_set_to ((XmppStanza*) _data_->_tmp11_, _data_->_tmp10_);
	_xmpp_jid_unref0 (_data_->_tmp10_);
	_data_->_tmp12_ = _data_->_tmp11_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp9_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp7_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp5_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp3_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp1_);
	_data_->iq = _data_->_tmp12_;
	_data_->_tmp13_ = xmpp_iq_module_IDENTITY;
	_data_->_tmp14_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp13_);
	_data_->_tmp15_ = (XmppIqModule*) _data_->_tmp14_;
	_data_->_tmp16_ = _data_->iq;
	_data_->_state_ = 1;
	xmpp_iq_module_send_iq_async (_data_->_tmp15_, _data_->stream, _data_->_tmp16_, G_PRIORITY_DEFAULT, NULL, xmpp_xep_muc_module_query_affiliation_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp17_ = xmpp_iq_module_send_iq_finish (_data_->_tmp15_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_g_object_unref0 (_data_->_tmp15_);
	_data_->iq_result = _data_->_tmp18_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->iq);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp19_ = _data_->iq_result;
	if (xmpp_stanza_is_error ((XmppStanza*) _data_->_tmp19_)) {
		_data_->result = NULL;
		_g_object_unref0 (_data_->iq_result);
		_g_object_unref0 (_data_->iq);
		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;
	}
	_data_->_tmp20_ = _data_->iq_result;
	_data_->_tmp21_ = ((XmppStanza*) _data_->_tmp20_)->stanza;
	_data_->_tmp22_ = xmpp_stanza_node_get_subnode (_data_->_tmp21_, "query", XMPP_XEP_MUC_NS_URI_ADMIN, FALSE);
	_data_->query_node = _data_->_tmp22_;
	_data_->_tmp23_ = _data_->query_node;
	if (_data_->_tmp23_ == NULL) {
		_data_->result = NULL;
		_xmpp_stanza_entry_unref0 (_data_->query_node);
		_g_object_unref0 (_data_->iq_result);
		_g_object_unref0 (_data_->iq);
		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;
	}
	_data_->_tmp24_ = _data_->query_node;
	_data_->_tmp25_ = xmpp_stanza_node_get_subnodes (_data_->_tmp24_, "item", XMPP_XEP_MUC_NS_URI_ADMIN, FALSE);
	_data_->item_nodes = _data_->_tmp25_;
	_data_->_tmp26_ = 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);
	_data_->ret_jids = (GeeList*) _data_->_tmp26_;
	{
		_data_->_tmp27_ = _data_->item_nodes;
		_data_->_item_list = _data_->_tmp27_;
		_data_->_tmp28_ = _data_->_item_list;
		_data_->_tmp29_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp28_);
		_data_->_tmp30_ = _data_->_tmp29_;
		_data_->_item_size = _data_->_tmp30_;
		_data_->_item_index = -1;
		while (TRUE) {
			_data_->_item_index = _data_->_item_index + 1;
			_data_->_tmp31_ = _data_->_item_index;
			_data_->_tmp32_ = _data_->_item_size;
			if (!(_data_->_tmp31_ < _data_->_tmp32_)) {
				break;
			}
			_data_->_tmp33_ = _data_->_item_list;
			_data_->_tmp34_ = gee_list_get (_data_->_tmp33_, _data_->_item_index);
			_data_->item = (XmppStanzaNode*) _data_->_tmp34_;
			_data_->_tmp35_ = _data_->item;
			_data_->_tmp36_ = xmpp_stanza_node_get_attribute (_data_->_tmp35_, "jid", NULL);
			_data_->_tmp37_ = g_strdup (_data_->_tmp36_);
			_data_->jid__ = _data_->_tmp37_;
			_data_->_tmp38_ = _data_->item;
			_data_->_tmp39_ = xmpp_stanza_node_get_attribute (_data_->_tmp38_, "affiliation", NULL);
			_data_->_tmp40_ = g_strdup (_data_->_tmp39_);
			_data_->affiliation_ = _data_->_tmp40_;
			_data_->_tmp42_ = _data_->jid__;
			if (_data_->_tmp42_ != NULL) {
				_data_->_tmp43_ = _data_->affiliation_;
				_data_->_tmp41_ = _data_->_tmp43_ != NULL;
			} else {
				_data_->_tmp41_ = FALSE;
			}
			if (_data_->_tmp41_) {
				{
					_data_->_tmp44_ = _data_->jid__;
					_data_->_tmp45_ = xmpp_jid_new (_data_->_tmp44_, &_data_->_inner_error0_);
					_data_->jid_ = _data_->_tmp45_;
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						if (_data_->_inner_error0_->domain == XMPP_INVALID_JID_ERROR) {
							goto __catch0_xmpp_invalid_jid_error;
						}
						_g_free0 (_data_->affiliation_);
						_g_free0 (_data_->jid__);
						_xmpp_stanza_entry_unref0 (_data_->item);
						_g_object_unref0 (_data_->ret_jids);
						_g_object_unref0 (_data_->item_nodes);
						_xmpp_stanza_entry_unref0 (_data_->query_node);
						_g_object_unref0 (_data_->iq_result);
						_g_object_unref0 (_data_->iq);
						g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
						g_clear_error (&_data_->_inner_error0_);
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_data_->_tmp46_ = xmpp_xep_muc_flag_IDENTITY;
					_data_->_tmp47_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_MUC_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp46_);
					_data_->_tmp48_ = (XmppXepMucFlag*) _data_->_tmp47_;
					_data_->_tmp49_ = _data_->iq_result;
					_data_->_tmp50_ = xmpp_stanza_get_from ((XmppStanza*) _data_->_tmp49_);
					_data_->_tmp51_ = _data_->_tmp50_;
					_data_->_tmp52_ = _data_->_tmp51_;
					_data_->_tmp53_ = _data_->jid_;
					_data_->_tmp54_ = _data_->affiliation_;
					xmpp_xep_muc_flag_set_offline_member (_data_->_tmp48_, _data_->_tmp52_, _data_->_tmp53_, xmpp_xep_muc_module_parse_affiliation (_data_->_tmp54_));
					_xmpp_jid_unref0 (_data_->_tmp52_);
					_g_object_unref0 (_data_->_tmp48_);
					_data_->_tmp55_ = _data_->ret_jids;
					_data_->_tmp56_ = _data_->jid_;
					gee_collection_add ((GeeCollection*) _data_->_tmp55_, _data_->_tmp56_);
					_data_->_tmp57_ = _data_->iq_result;
					_data_->_tmp58_ = xmpp_stanza_get_from ((XmppStanza*) _data_->_tmp57_);
					_data_->_tmp59_ = _data_->_tmp58_;
					_data_->_tmp60_ = _data_->_tmp59_;
					_data_->_tmp61_ = _data_->jid_;
					g_signal_emit (_data_->self, xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_RECEIVED_OCCUPANT_JID_SIGNAL], 0, _data_->stream, _data_->_tmp60_, _data_->_tmp61_);
					_xmpp_jid_unref0 (_data_->_tmp60_);
					_xmpp_jid_unref0 (_data_->jid_);
				}
				goto __finally0;
				__catch0_xmpp_invalid_jid_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp62_ = _data_->e;
					_data_->_tmp63_ = _data_->_tmp62_->message;
					g_warning ("module.vala:496: Received invalid occupant jid: %s", _data_->_tmp63_);
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_g_free0 (_data_->affiliation_);
					_g_free0 (_data_->jid__);
					_xmpp_stanza_entry_unref0 (_data_->item);
					_g_object_unref0 (_data_->ret_jids);
					_g_object_unref0 (_data_->item_nodes);
					_xmpp_stanza_entry_unref0 (_data_->query_node);
					_g_object_unref0 (_data_->iq_result);
					_g_object_unref0 (_data_->iq);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
					g_clear_error (&_data_->_inner_error0_);
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
			}
			_g_free0 (_data_->affiliation_);
			_g_free0 (_data_->jid__);
			_xmpp_stanza_entry_unref0 (_data_->item);
		}
	}
	_data_->result = _data_->ret_jids;
	_g_object_unref0 (_data_->item_nodes);
	_xmpp_stanza_entry_unref0 (_data_->query_node);
	_g_object_unref0 (_data_->iq_result);
	_g_object_unref0 (_data_->iq);
	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 GeeArrayList*
xmpp_xep_muc_module_get_status_codes (XmppStanzaNode* x_node)
{
	GeeArrayList* ret = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* result;
	g_return_val_if_fail (x_node != NULL, NULL);
	_tmp0_ = gee_array_list_new (G_TYPE_INT, NULL, NULL, NULL, NULL, NULL);
	ret = _tmp0_;
	{
		GeeList* _status_node_list = NULL;
		GeeList* _tmp1_;
		gint _status_node_size = 0;
		GeeList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _status_node_index = 0;
		_tmp1_ = xmpp_stanza_node_get_subnodes (x_node, "status", XMPP_XEP_MUC_NS_URI_USER, FALSE);
		_status_node_list = _tmp1_;
		_tmp2_ = _status_node_list;
		_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_status_node_size = _tmp4_;
		_status_node_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			XmppStanzaNode* status_node = NULL;
			GeeList* _tmp7_;
			gpointer _tmp8_;
			GeeArrayList* _tmp9_;
			XmppStanzaNode* _tmp10_;
			const gchar* _tmp11_;
			_status_node_index = _status_node_index + 1;
			_tmp5_ = _status_node_index;
			_tmp6_ = _status_node_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _status_node_list;
			_tmp8_ = gee_list_get (_tmp7_, _status_node_index);
			status_node = (XmppStanzaNode*) _tmp8_;
			_tmp9_ = ret;
			_tmp10_ = status_node;
			_tmp11_ = xmpp_stanza_node_get_attribute (_tmp10_, "code", NULL);
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, (gpointer) ((gintptr) atoi (_tmp11_)));
			_xmpp_stanza_entry_unref0 (status_node);
		}
		_g_object_unref0 (_status_node_list);
	}
	result = ret;
	return result;
}

static XmppXepMucAffiliation
xmpp_xep_muc_module_parse_affiliation (const gchar* affiliation_str)
{
	XmppXepMucAffiliation affiliation = 0;
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	XmppXepMucAffiliation result;
	g_return_val_if_fail (affiliation_str != NULL, 0);
	_tmp0_ = affiliation_str;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("admin")))) {
		switch (0) {
			default:
			{
				affiliation = XMPP_XEP_MUC_AFFILIATION_ADMIN;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("member")))) {
		switch (0) {
			default:
			{
				affiliation = XMPP_XEP_MUC_AFFILIATION_MEMBER;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("outcast")))) {
		switch (0) {
			default:
			{
				affiliation = XMPP_XEP_MUC_AFFILIATION_OUTCAST;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("owner")))) {
		switch (0) {
			default:
			{
				affiliation = XMPP_XEP_MUC_AFFILIATION_OWNER;
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				affiliation = XMPP_XEP_MUC_AFFILIATION_NONE;
				break;
			}
		}
	}
	result = affiliation;
	return result;
}

static XmppXepMucRole
xmpp_xep_muc_module_parse_role (const gchar* role_str)
{
	XmppXepMucRole role = 0;
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	XmppXepMucRole result;
	g_return_val_if_fail (role_str != NULL, 0);
	_tmp0_ = role_str;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("moderator")))) {
		switch (0) {
			default:
			{
				role = XMPP_XEP_MUC_ROLE_MODERATOR;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("participant")))) {
		switch (0) {
			default:
			{
				role = XMPP_XEP_MUC_ROLE_PARTICIPANT;
				break;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("visitor")))) {
		switch (0) {
			default:
			{
				role = XMPP_XEP_MUC_ROLE_VISITOR;
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				role = XMPP_XEP_MUC_ROLE_NONE;
				break;
			}
		}
	}
	result = role;
	return result;
}

static void
g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_POINTER (GClosure * closure,
                                                       GValue * return_value,
                                                       guint n_param_values,
                                                       const GValue * param_values,
                                                       gpointer invocation_hint,
                                                       gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_XMPP_JID_POINTER) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_XMPP_JID_POINTER callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_XMPP_JID_POINTER) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), xmpp_value_get_jid (param_values + 2), g_value_get_pointer (param_values + 3), data2);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_XMPP_JID (GClosure * closure,
                                                        GValue * return_value,
                                                        guint n_param_values,
                                                        const GValue * param_values,
                                                        gpointer invocation_hint,
                                                        gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_XMPP_JID_XMPP_JID) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_XMPP_JID_XMPP_JID callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_XMPP_JID_XMPP_JID) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), xmpp_value_get_jid (param_values + 2), xmpp_value_get_jid (param_values + 3), data2);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_STRING_XMPP_JID (GClosure * closure,
                                                      GValue * return_value,
                                                      guint n_param_values,
                                                      const GValue * param_values,
                                                      gpointer invocation_hint,
                                                      gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_STRING_XMPP_JID) (gpointer data1, gpointer arg_1, const char* arg_2, gpointer arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_STRING_XMPP_JID callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_STRING_XMPP_JID) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_string (param_values + 2), xmpp_value_get_jid (param_values + 3), data2);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING_STRING (GClosure * closure,
                                                                      GValue * return_value,
                                                                      guint n_param_values,
                                                                      const GValue * param_values,
                                                                      gpointer invocation_hint,
                                                                      gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING_STRING) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer arg_3, const char* arg_4, const char* arg_5, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 6);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), xmpp_value_get_jid (param_values + 2), xmpp_value_get_jid (param_values + 3), g_value_get_string (param_values + 4), g_value_get_string (param_values + 5), data2);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING (GClosure * closure,
                                                               GValue * return_value,
                                                               guint n_param_values,
                                                               const GValue * param_values,
                                                               gpointer invocation_hint,
                                                               gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer arg_3, const char* arg_4, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 5);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), xmpp_value_get_jid (param_values + 2), xmpp_value_get_jid (param_values + 3), g_value_get_string (param_values + 4), data2);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_XMPP_JID) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_XMPP_JID callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_XMPP_JID) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), xmpp_value_get_jid (param_values + 2), data2);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_ENUM (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_XMPP_JID_ENUM) (gpointer data1, gpointer arg_1, gpointer arg_2, gint arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_XMPP_JID_ENUM callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_XMPP_JID_ENUM) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), xmpp_value_get_jid (param_values + 2), g_value_get_enum (param_values + 3), data2);
}

static void
xmpp_xep_muc_module_class_init (XmppXepMucModuleClass * klass,
                                gpointer klass_data)
{
	XmppModuleIdentity* _tmp0_;
	xmpp_xep_muc_module_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &XmppXepMucModule_private_offset);
	((XmppXmppStreamModuleClass *) klass)->attach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xep_muc_module_real_attach;
	((XmppXmppStreamModuleClass *) klass)->detach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xep_muc_module_real_detach;
	((XmppXmppStreamModuleClass *) klass)->get_ns = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xep_muc_module_real_get_ns;
	((XmppXmppStreamModuleClass *) klass)->get_id = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xep_muc_module_real_get_id;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_muc_module_finalize;
	xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_RECEIVED_OCCUPANT_AFFILIATION_SIGNAL] = g_signal_new ("received-occupant-affiliation", XMPP_XEP_MUC_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_POINTER, G_TYPE_NONE, 3, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_JID, G_TYPE_POINTER);
	xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_RECEIVED_OCCUPANT_JID_SIGNAL] = g_signal_new ("received-occupant-jid", XMPP_XEP_MUC_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_XMPP_JID, G_TYPE_NONE, 3, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_JID, XMPP_TYPE_JID);
	xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_RECEIVED_OCCUPANT_ROLE_SIGNAL] = g_signal_new ("received-occupant-role", XMPP_XEP_MUC_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_POINTER, G_TYPE_NONE, 3, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_JID, G_TYPE_POINTER);
	xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_SUBJECT_SET_SIGNAL] = g_signal_new ("subject-set", XMPP_XEP_MUC_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_STRING_XMPP_JID, G_TYPE_NONE, 3, XMPP_TYPE_XMPP_STREAM, G_TYPE_STRING, XMPP_TYPE_JID);
	xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_INVITE_RECEIVED_SIGNAL] = g_signal_new ("invite-received", XMPP_XEP_MUC_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING_STRING, G_TYPE_NONE, 5, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_JID, XMPP_TYPE_JID, G_TYPE_STRING, G_TYPE_STRING);
	xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_VOICE_REQUEST_RECEIVED_SIGNAL] = g_signal_new ("voice-request-received", XMPP_XEP_MUC_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_XMPP_JID_STRING, G_TYPE_NONE, 4, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_JID, XMPP_TYPE_JID, G_TYPE_STRING);
	xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_ROOM_INFO_UPDATED_SIGNAL] = g_signal_new ("room-info-updated", XMPP_XEP_MUC_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID, G_TYPE_NONE, 2, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_JID);
	xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_SELF_REMOVED_FROM_ROOM_SIGNAL] = g_signal_new ("self-removed-from-room", XMPP_XEP_MUC_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_ENUM, G_TYPE_NONE, 3, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_JID, XMPP_XEP_MUC_TYPE_STATUS_CODE);
	xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_REMOVED_FROM_ROOM_SIGNAL] = g_signal_new ("removed-from-room", XMPP_XEP_MUC_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID_POINTER, G_TYPE_NONE, 3, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_JID, G_TYPE_POINTER);
	_tmp0_ = xmpp_module_identity_new (XMPP_XEP_MUC_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, XMPP_XEP_MUC_NS_URI, "0045_muc_module");
	xmpp_xep_muc_module_IDENTITY = _tmp0_;
}

static void
xmpp_xep_muc_module_instance_init (XmppXepMucModule * self,
                                   gpointer klass)
{
	self->priv = xmpp_xep_muc_module_get_instance_private (self);
}

static void
xmpp_xep_muc_module_finalize (GObject * obj)
{
	XmppXepMucModule * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_MUC_TYPE_MODULE, XmppXepMucModule);
	_g_object_unref0 (self->priv->received_pipeline_listener);
	G_OBJECT_CLASS (xmpp_xep_muc_module_parent_class)->finalize (obj);
}

static GType
xmpp_xep_muc_module_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepMucModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_muc_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepMucModule), 0, (GInstanceInitFunc) xmpp_xep_muc_module_instance_init, NULL };
	GType xmpp_xep_muc_module_type_id;
	xmpp_xep_muc_module_type_id = g_type_register_static (XMPP_TYPE_XMPP_STREAM_MODULE, "XmppXepMucModule", &g_define_type_info, 0);
	XmppXepMucModule_private_offset = g_type_add_instance_private (xmpp_xep_muc_module_type_id, sizeof (XmppXepMucModulePrivate));
	return xmpp_xep_muc_module_type_id;
}

GType
xmpp_xep_muc_module_get_type (void)
{
	static volatile gsize xmpp_xep_muc_module_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muc_module_type_id__once)) {
		GType xmpp_xep_muc_module_type_id;
		xmpp_xep_muc_module_type_id = xmpp_xep_muc_module_get_type_once ();
		g_once_init_leave (&xmpp_xep_muc_module_type_id__once, xmpp_xep_muc_module_type_id);
	}
	return xmpp_xep_muc_module_type_id__once;
}

static inline gpointer
xmpp_xep_muc_received_pipeline_listener_get_instance_private (XmppXepMucReceivedPipelineListener* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepMucReceivedPipelineListener_private_offset);
}

XmppXepMucReceivedPipelineListener*
xmpp_xep_muc_received_pipeline_listener_construct (GType object_type,
                                                   XmppXepMucModule* outer)
{
	XmppXepMucReceivedPipelineListener * self = NULL;
	XmppXepMucModule* _tmp0_;
	g_return_val_if_fail (outer != NULL, NULL);
	self = (XmppXepMucReceivedPipelineListener*) xmpp_stanza_listener_construct (object_type, XMPP_TYPE_MESSAGE_STANZA, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref);
	_tmp0_ = _g_object_ref0 (outer);
	_g_object_unref0 (self->priv->outer);
	self->priv->outer = _tmp0_;
	return self;
}

XmppXepMucReceivedPipelineListener*
xmpp_xep_muc_received_pipeline_listener_new (XmppXepMucModule* outer)
{
	return xmpp_xep_muc_received_pipeline_listener_construct (XMPP_XEP_MUC_TYPE_RECEIVED_PIPELINE_LISTENER, outer);
}

static void
xmpp_xep_muc_received_pipeline_listener_real_run_data_free (gpointer _data)
{
	XmppXepMucReceivedPipelineListenerRunData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_g_object_unref0 (_data_->message);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepMucReceivedPipelineListenerRunData, _data_);
}

static void
xmpp_xep_muc_received_pipeline_listener_real_run (XmppStanzaListener* base,
                                                  XmppXmppStream* stream,
                                                  XmppMessageStanza* message,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	XmppXepMucReceivedPipelineListener * self;
	XmppXepMucReceivedPipelineListenerRunData* _data_;
	XmppXepMucReceivedPipelineListener* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppMessageStanza* _tmp2_;
	g_return_if_fail (stream != NULL);
	g_return_if_fail (message != NULL);
	self = (XmppXepMucReceivedPipelineListener*) base;
	_data_ = g_slice_new0 (XmppXepMucReceivedPipelineListenerRunData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_muc_received_pipeline_listener_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = _g_object_ref0 (message);
	_g_object_unref0 (_data_->message);
	_data_->message = _tmp2_;
	xmpp_xep_muc_received_pipeline_listener_real_run_co (_data_);
}

static gboolean
xmpp_xep_muc_received_pipeline_listener_run_finish (XmppStanzaListener* base,
                                                    GAsyncResult* _res_)
{
	gboolean result;
	XmppXepMucReceivedPipelineListenerRunData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
xmpp_xep_muc_received_pipeline_listener_real_run_co (XmppXepMucReceivedPipelineListenerRunData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = xmpp_stanza_get_type_ ((XmppStanza*) _data_->message);
	_data_->_tmp1_ = _data_->_tmp0_;
	if (g_strcmp0 (_data_->_tmp1_, XMPP_MESSAGE_STANZA_TYPE_NORMAL) == 0) {
		_data_->_tmp2_ = ((XmppStanza*) _data_->message)->stanza;
		_data_->_tmp3_ = xmpp_stanza_node_get_subnode (_data_->_tmp2_, "x", XMPP_XEP_MUC_NS_URI_USER, FALSE);
		_data_->x_node = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->x_node;
		if (_data_->_tmp4_ != NULL) {
			_data_->_tmp5_ = _data_->x_node;
			_data_->_tmp6_ = xmpp_stanza_node_get_subnode (_data_->_tmp5_, "invite", XMPP_XEP_MUC_NS_URI_USER, FALSE);
			_data_->invite_node = _data_->_tmp6_;
			_data_->password = NULL;
			_data_->_tmp7_ = _data_->x_node;
			_data_->_tmp8_ = xmpp_stanza_node_get_subnode (_data_->_tmp7_, "password", XMPP_XEP_MUC_NS_URI_USER, FALSE);
			_data_->password_node = _data_->_tmp8_;
			_data_->_tmp9_ = _data_->password_node;
			if (_data_->_tmp9_ != NULL) {
				_data_->_tmp10_ = _data_->password_node;
				_data_->_tmp11_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _data_->_tmp10_);
				_data_->_tmp12_ = g_strdup (_data_->_tmp11_);
				_g_free0 (_data_->password);
				_data_->password = _data_->_tmp12_;
			}
			_data_->_tmp13_ = _data_->invite_node;
			if (_data_->_tmp13_ != NULL) {
				_data_->from_jid = NULL;
				{
					_data_->_tmp14_ = _data_->invite_node;
					_data_->_tmp15_ = xmpp_stanza_node_get_attribute (_data_->_tmp14_, "from", NULL);
					_data_->_tmp16_ = g_strdup (_data_->_tmp15_);
					_data_->from = _data_->_tmp16_;
					_data_->_tmp17_ = _data_->from;
					if (_data_->_tmp17_ != NULL) {
						_data_->_tmp19_ = _data_->from;
						_data_->_tmp20_ = xmpp_jid_new (_data_->_tmp19_, &_data_->_inner_error0_);
						_data_->_tmp18_ = _data_->_tmp20_;
						if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
							_g_free0 (_data_->from);
							if (_data_->_inner_error0_->domain == XMPP_INVALID_JID_ERROR) {
								goto __catch0_xmpp_invalid_jid_error;
							}
							_xmpp_jid_unref0 (_data_->from_jid);
							_xmpp_stanza_entry_unref0 (_data_->password_node);
							_g_free0 (_data_->password);
							_xmpp_stanza_entry_unref0 (_data_->invite_node);
							_xmpp_stanza_entry_unref0 (_data_->x_node);
							g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
							g_clear_error (&_data_->_inner_error0_);
							g_object_unref (_data_->_async_result);
							return FALSE;
						}
						_data_->_tmp21_ = _data_->_tmp18_;
						_data_->_tmp18_ = NULL;
						_xmpp_jid_unref0 (_data_->from_jid);
						_data_->from_jid = _data_->_tmp21_;
						_xmpp_jid_unref0 (_data_->_tmp18_);
					}
					_g_free0 (_data_->from);
				}
				goto __finally0;
				__catch0_xmpp_invalid_jid_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp22_ = _data_->e;
					_data_->_tmp23_ = _data_->_tmp22_->message;
					g_warning ("module.vala:571: Received invite from invalid jid: %s", _data_->_tmp23_);
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					_xmpp_jid_unref0 (_data_->from_jid);
					_xmpp_stanza_entry_unref0 (_data_->password_node);
					_g_free0 (_data_->password);
					_xmpp_stanza_entry_unref0 (_data_->invite_node);
					_xmpp_stanza_entry_unref0 (_data_->x_node);
					g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
					g_clear_error (&_data_->_inner_error0_);
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				_data_->_tmp24_ = _data_->from_jid;
				if (_data_->_tmp24_ != NULL) {
					_data_->_tmp25_ = _data_->invite_node;
					_data_->_tmp26_ = xmpp_stanza_node_get_subnode (_data_->_tmp25_, "reason", XMPP_XEP_MUC_NS_URI_USER, FALSE);
					_data_->reason_node = _data_->_tmp26_;
					_data_->reason = NULL;
					_data_->_tmp27_ = _data_->reason_node;
					if (_data_->_tmp27_ != NULL) {
						_data_->_tmp28_ = _data_->reason_node;
						_data_->_tmp29_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _data_->_tmp28_);
						_data_->_tmp30_ = g_strdup (_data_->_tmp29_);
						_g_free0 (_data_->reason);
						_data_->reason = _data_->_tmp30_;
					}
					_data_->_tmp31_ = xmpp_message_archive_management_message_flag_get_flag (_data_->message);
					_data_->_tmp32_ = _data_->_tmp31_;
					_data_->_tmp33_ = _data_->_tmp32_ != NULL;
					_g_object_unref0 (_data_->_tmp32_);
					_data_->is_mam_message = _data_->_tmp33_;
					if (!_data_->is_mam_message) {
						_data_->_tmp34_ = _data_->self->priv->outer;
						_data_->_tmp35_ = xmpp_stanza_get_from ((XmppStanza*) _data_->message);
						_data_->_tmp36_ = _data_->_tmp35_;
						_data_->_tmp37_ = _data_->_tmp36_;
						_data_->_tmp38_ = _data_->from_jid;
						_data_->_tmp39_ = _data_->password;
						_data_->_tmp40_ = _data_->reason;
						g_signal_emit (_data_->_tmp34_, xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_INVITE_RECEIVED_SIGNAL], 0, _data_->stream, _data_->_tmp37_, _data_->_tmp38_, _data_->_tmp39_, _data_->_tmp40_);
						_xmpp_jid_unref0 (_data_->_tmp37_);
					}
					_data_->result = TRUE;
					_g_free0 (_data_->reason);
					_xmpp_stanza_entry_unref0 (_data_->reason_node);
					_xmpp_jid_unref0 (_data_->from_jid);
					_xmpp_stanza_entry_unref0 (_data_->password_node);
					_g_free0 (_data_->password);
					_xmpp_stanza_entry_unref0 (_data_->invite_node);
					_xmpp_stanza_entry_unref0 (_data_->x_node);
					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;
				}
				_xmpp_jid_unref0 (_data_->from_jid);
			}
			_xmpp_stanza_entry_unref0 (_data_->password_node);
			_g_free0 (_data_->password);
			_xmpp_stanza_entry_unref0 (_data_->invite_node);
		}
		_data_->_tmp41_ = ((XmppStanza*) _data_->message)->stanza;
		_data_->_tmp42_ = xmpp_stanza_node_get_subnode (_data_->_tmp41_, "x", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
		_data_->x_field_node = _data_->_tmp42_;
		_data_->_tmp43_ = _data_->x_field_node;
		if (_data_->_tmp43_ != NULL) {
			_data_->_tmp44_ = _data_->x_field_node;
			_data_->_tmp45_ = xmpp_stanza_node_get_subnodes (_data_->_tmp44_, "field", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
			_data_->fields = _data_->_tmp45_;
			_data_->_vala1_from_jid = NULL;
			_data_->nick = NULL;
			_data_->_tmp46_ = _data_->fields;
			_data_->_tmp47_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp46_);
			_data_->_tmp48_ = _data_->_tmp47_;
			if (_data_->_tmp48_ != 0) {
				{
					_data_->_tmp49_ = _data_->fields;
					_data_->_field_node_list = _data_->_tmp49_;
					_data_->_tmp50_ = _data_->_field_node_list;
					_data_->_tmp51_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp50_);
					_data_->_tmp52_ = _data_->_tmp51_;
					_data_->_field_node_size = _data_->_tmp52_;
					_data_->_field_node_index = -1;
					while (TRUE) {
						_data_->_field_node_index = _data_->_field_node_index + 1;
						_data_->_tmp53_ = _data_->_field_node_index;
						_data_->_tmp54_ = _data_->_field_node_size;
						if (!(_data_->_tmp53_ < _data_->_tmp54_)) {
							break;
						}
						_data_->_tmp55_ = _data_->_field_node_list;
						_data_->_tmp56_ = gee_list_get (_data_->_tmp55_, _data_->_field_node_index);
						_data_->field_node = (XmppStanzaNode*) _data_->_tmp56_;
						_data_->_tmp57_ = _data_->field_node;
						_data_->_tmp58_ = xmpp_stanza_node_get_attribute (_data_->_tmp57_, "var", NULL);
						_data_->_tmp59_ = g_strdup (_data_->_tmp58_);
						_data_->var_ = _data_->_tmp59_;
						_data_->_tmp60_ = _data_->var_;
						if (g_strcmp0 (_data_->_tmp60_, "muc#jid") == 0) {
							_data_->_tmp61_ = _data_->field_node;
							_data_->_tmp62_ = xmpp_stanza_node_get_subnode (_data_->_tmp61_, "value", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
							_data_->value_node = _data_->_tmp62_;
							{
								_data_->_tmp63_ = _data_->value_node;
								if (_data_->_tmp63_ != NULL) {
									_data_->_tmp65_ = _data_->value_node;
									_data_->_tmp66_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _data_->_tmp65_);
									_data_->_tmp67_ = xmpp_jid_new (_data_->_tmp66_, &_data_->_inner_error0_);
									_data_->_tmp64_ = _data_->_tmp67_;
									if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
										if (_data_->_inner_error0_->domain == XMPP_INVALID_JID_ERROR) {
											goto __catch1_xmpp_invalid_jid_error;
										}
										_xmpp_stanza_entry_unref0 (_data_->value_node);
										_g_free0 (_data_->var_);
										_xmpp_stanza_entry_unref0 (_data_->field_node);
										_g_free0 (_data_->nick);
										_xmpp_jid_unref0 (_data_->_vala1_from_jid);
										_g_object_unref0 (_data_->fields);
										_xmpp_stanza_entry_unref0 (_data_->x_field_node);
										_xmpp_stanza_entry_unref0 (_data_->x_node);
										g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
										g_clear_error (&_data_->_inner_error0_);
										g_object_unref (_data_->_async_result);
										return FALSE;
									}
									_data_->_tmp68_ = _data_->_tmp64_;
									_data_->_tmp64_ = NULL;
									_xmpp_jid_unref0 (_data_->_vala1_from_jid);
									_data_->_vala1_from_jid = _data_->_tmp68_;
									_xmpp_jid_unref0 (_data_->_tmp64_);
								}
							}
							goto __finally1;
							__catch1_xmpp_invalid_jid_error:
							{
								g_clear_error (&_data_->_inner_error0_);
								_data_->result = FALSE;
								_xmpp_stanza_entry_unref0 (_data_->value_node);
								_g_free0 (_data_->var_);
								_xmpp_stanza_entry_unref0 (_data_->field_node);
								_g_free0 (_data_->nick);
								_xmpp_jid_unref0 (_data_->_vala1_from_jid);
								_g_object_unref0 (_data_->fields);
								_xmpp_stanza_entry_unref0 (_data_->x_field_node);
								_xmpp_stanza_entry_unref0 (_data_->x_node);
								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;
							}
							__finally1:
							if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
								_xmpp_stanza_entry_unref0 (_data_->value_node);
								_g_free0 (_data_->var_);
								_xmpp_stanza_entry_unref0 (_data_->field_node);
								_g_free0 (_data_->nick);
								_xmpp_jid_unref0 (_data_->_vala1_from_jid);
								_g_object_unref0 (_data_->fields);
								_xmpp_stanza_entry_unref0 (_data_->x_field_node);
								_xmpp_stanza_entry_unref0 (_data_->x_node);
								g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
								g_clear_error (&_data_->_inner_error0_);
								g_object_unref (_data_->_async_result);
								return FALSE;
							}
							_xmpp_stanza_entry_unref0 (_data_->value_node);
						} else {
							_data_->_tmp69_ = _data_->var_;
							if (g_strcmp0 (_data_->_tmp69_, "muc#roomnick") == 0) {
								_data_->_tmp70_ = _data_->field_node;
								_data_->_tmp71_ = xmpp_stanza_node_get_subnode (_data_->_tmp70_, "value", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
								_data_->_vala1_value_node = _data_->_tmp71_;
								_data_->_tmp72_ = _data_->_vala1_value_node;
								if (_data_->_tmp72_ != NULL) {
									_data_->_tmp73_ = _data_->_vala1_value_node;
									_data_->_tmp74_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _data_->_tmp73_);
									_data_->_tmp75_ = g_strdup (_data_->_tmp74_);
									_g_free0 (_data_->nick);
									_data_->nick = _data_->_tmp75_;
								}
								_xmpp_stanza_entry_unref0 (_data_->_vala1_value_node);
							} else {
								_data_->_tmp76_ = _data_->var_;
								if (g_strcmp0 (_data_->_tmp76_, "muc#role") == 0) {
									_data_->_tmp77_ = _data_->field_node;
									_data_->_tmp78_ = xmpp_stanza_node_get_subnode (_data_->_tmp77_, "value", XMPP_XEP_DATA_FORMS_NS_URI, FALSE);
									_data_->_vala2_value_node = _data_->_tmp78_;
									_data_->_tmp79_ = _data_->_vala2_value_node;
									if (_data_->_tmp79_ != NULL) {
										_data_->_tmp80_ = _data_->_vala2_value_node;
										_data_->_tmp81_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _data_->_tmp80_);
										if (g_strcmp0 (_data_->_tmp81_, "participant") != 0) {
											g_warning ("module.vala:609: Voice request with role other than participant");
										}
									}
									_xmpp_stanza_entry_unref0 (_data_->_vala2_value_node);
								}
							}
						}
						_g_free0 (_data_->var_);
						_xmpp_stanza_entry_unref0 (_data_->field_node);
					}
				}
				_data_->_tmp83_ = _data_->_vala1_from_jid;
				if (_data_->_tmp83_ == NULL) {
					_data_->_tmp82_ = TRUE;
				} else {
					_data_->_tmp84_ = _data_->nick;
					_data_->_tmp82_ = _data_->_tmp84_ == NULL;
				}
				if (_data_->_tmp82_) {
					g_warning ("module.vala:615: Voice request without from_jid or nick");
					_data_->result = FALSE;
					_g_free0 (_data_->nick);
					_xmpp_jid_unref0 (_data_->_vala1_from_jid);
					_g_object_unref0 (_data_->fields);
					_xmpp_stanza_entry_unref0 (_data_->x_field_node);
					_xmpp_stanza_entry_unref0 (_data_->x_node);
					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;
				}
				_data_->_tmp85_ = _data_->self->priv->outer;
				_data_->_tmp86_ = xmpp_stanza_get_from ((XmppStanza*) _data_->message);
				_data_->_tmp87_ = _data_->_tmp86_;
				_data_->_tmp88_ = _data_->_tmp87_;
				_data_->_tmp89_ = _data_->_vala1_from_jid;
				_data_->_tmp90_ = _data_->nick;
				g_signal_emit (_data_->_tmp85_, xmpp_xep_muc_module_signals[XMPP_XEP_MUC_MODULE_VOICE_REQUEST_RECEIVED_SIGNAL], 0, _data_->stream, _data_->_tmp88_, _data_->_tmp89_, _data_->_tmp90_);
				_xmpp_jid_unref0 (_data_->_tmp88_);
				_data_->result = TRUE;
				_g_free0 (_data_->nick);
				_xmpp_jid_unref0 (_data_->_vala1_from_jid);
				_g_object_unref0 (_data_->fields);
				_xmpp_stanza_entry_unref0 (_data_->x_field_node);
				_xmpp_stanza_entry_unref0 (_data_->x_node);
				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;
			}
			_g_free0 (_data_->nick);
			_xmpp_jid_unref0 (_data_->_vala1_from_jid);
			_g_object_unref0 (_data_->fields);
		}
		_xmpp_stanza_entry_unref0 (_data_->x_field_node);
		_xmpp_stanza_entry_unref0 (_data_->x_node);
	}
	_data_->result = FALSE;
	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 const gchar*
xmpp_xep_muc_received_pipeline_listener_real_get_action_group (XmppOrderedListener* base)
{
	const gchar* result;
	XmppXepMucReceivedPipelineListener* self;
	self = (XmppXepMucReceivedPipelineListener*) base;
	result = "";
	return result;
}

static gchar**
xmpp_xep_muc_received_pipeline_listener_real_get_after_actions (XmppOrderedListener* base,
                                                                gint* result_length1)
{
	gchar** result;
	XmppXepMucReceivedPipelineListener* self;
	gchar** _tmp0_;
	gint _tmp0__length1;
	gchar** _tmp1_;
	gint _tmp1__length1;
	self = (XmppXepMucReceivedPipelineListener*) base;
	_tmp0_ = self->priv->after_actions_const;
	_tmp0__length1 = self->priv->after_actions_const_length1;
	_tmp1_ = _tmp0_;
	_tmp1__length1 = _tmp0__length1;
	if (result_length1) {
		*result_length1 = _tmp1__length1;
	}
	result = _tmp1_;
	return result;
}

static void
xmpp_xep_muc_received_pipeline_listener_class_init (XmppXepMucReceivedPipelineListenerClass * klass,
                                                    gpointer klass_data)
{
	xmpp_xep_muc_received_pipeline_listener_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &XmppXepMucReceivedPipelineListener_private_offset);
	((XmppStanzaListenerClass *) klass)->run = (void (*) (XmppStanzaListener*, XmppXmppStream*, gconstpointer, GAsyncReadyCallback, gpointer)) xmpp_xep_muc_received_pipeline_listener_real_run;
	((XmppStanzaListenerClass *) klass)->run_finish = (gboolean (*) (XmppStanzaListener*, GAsyncResult*)) xmpp_xep_muc_received_pipeline_listener_run_finish;
	XMPP_ORDERED_LISTENER_CLASS (klass)->get_action_group = (const gchar* (*) (XmppOrderedListener*)) xmpp_xep_muc_received_pipeline_listener_real_get_action_group;
	XMPP_ORDERED_LISTENER_CLASS (klass)->get_after_actions = (gchar** (*) (XmppOrderedListener*, gint*)) xmpp_xep_muc_received_pipeline_listener_real_get_after_actions;
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_muc_received_pipeline_listener_get_property;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_muc_received_pipeline_listener_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_ACTION_GROUP_PROPERTY, xmpp_xep_muc_received_pipeline_listener_properties[XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_ACTION_GROUP_PROPERTY] = g_param_spec_string ("action-group", "action-group", "action-group", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_AFTER_ACTIONS_PROPERTY, xmpp_xep_muc_received_pipeline_listener_properties[XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_AFTER_ACTIONS_PROPERTY] = g_param_spec_boxed ("after-actions", "after-actions", "after-actions", G_TYPE_STRV, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
xmpp_xep_muc_received_pipeline_listener_instance_init (XmppXepMucReceivedPipelineListener * self,
                                                       gpointer klass)
{
	gchar* _tmp0_;
	gchar** _tmp1_;
	self->priv = xmpp_xep_muc_received_pipeline_listener_get_instance_private (self);
	_tmp0_ = g_strdup ("EXTRACT_MESSAGE_2");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	self->priv->after_actions_const = _tmp1_;
	self->priv->after_actions_const_length1 = 1;
	self->priv->_after_actions_const_size_ = self->priv->after_actions_const_length1;
}

static void
xmpp_xep_muc_received_pipeline_listener_finalize (GObject * obj)
{
	XmppXepMucReceivedPipelineListener * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_MUC_TYPE_RECEIVED_PIPELINE_LISTENER, XmppXepMucReceivedPipelineListener);
	self->priv->after_actions_const = (_vala_array_free (self->priv->after_actions_const, self->priv->after_actions_const_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (self->priv->outer);
	G_OBJECT_CLASS (xmpp_xep_muc_received_pipeline_listener_parent_class)->finalize (obj);
}

static GType
xmpp_xep_muc_received_pipeline_listener_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepMucReceivedPipelineListenerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_muc_received_pipeline_listener_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepMucReceivedPipelineListener), 0, (GInstanceInitFunc) xmpp_xep_muc_received_pipeline_listener_instance_init, NULL };
	GType xmpp_xep_muc_received_pipeline_listener_type_id;
	xmpp_xep_muc_received_pipeline_listener_type_id = g_type_register_static (XMPP_TYPE_STANZA_LISTENER, "XmppXepMucReceivedPipelineListener", &g_define_type_info, 0);
	XmppXepMucReceivedPipelineListener_private_offset = g_type_add_instance_private (xmpp_xep_muc_received_pipeline_listener_type_id, sizeof (XmppXepMucReceivedPipelineListenerPrivate));
	return xmpp_xep_muc_received_pipeline_listener_type_id;
}

GType
xmpp_xep_muc_received_pipeline_listener_get_type (void)
{
	static volatile gsize xmpp_xep_muc_received_pipeline_listener_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_muc_received_pipeline_listener_type_id__once)) {
		GType xmpp_xep_muc_received_pipeline_listener_type_id;
		xmpp_xep_muc_received_pipeline_listener_type_id = xmpp_xep_muc_received_pipeline_listener_get_type_once ();
		g_once_init_leave (&xmpp_xep_muc_received_pipeline_listener_type_id__once, xmpp_xep_muc_received_pipeline_listener_type_id);
	}
	return xmpp_xep_muc_received_pipeline_listener_type_id__once;
}

static void
_vala_xmpp_xep_muc_received_pipeline_listener_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec)
{
	XmppXepMucReceivedPipelineListener * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_MUC_TYPE_RECEIVED_PIPELINE_LISTENER, XmppXepMucReceivedPipelineListener);
	switch (property_id) {
		case XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_ACTION_GROUP_PROPERTY:
		g_value_set_string (value, xmpp_ordered_listener_get_action_group ((XmppOrderedListener*) self));
		break;
		case XMPP_XEP_MUC_RECEIVED_PIPELINE_LISTENER_AFTER_ACTIONS_PROPERTY:
		{
			int length;
			g_value_set_boxed (value, xmpp_ordered_listener_get_after_actions ((XmppOrderedListener*) self, &length));
		}
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

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

