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

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

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

enum  {
	XMPP_XEP_BLOCKING_COMMAND_MODULE_0_PROPERTY,
	XMPP_XEP_BLOCKING_COMMAND_MODULE_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_blocking_command_module_properties[XMPP_XEP_BLOCKING_COMMAND_MODULE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _xmpp_stanza_entry_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_stanza_entry_unref (var), NULL)))
typedef struct _XmppXepBlockingCommandModuleOnIqSetData XmppXepBlockingCommandModuleOnIqSetData;
typedef struct _XmppXepBlockingCommandModuleOnStreamNegotiatedData XmppXepBlockingCommandModuleOnStreamNegotiatedData;
typedef struct _XmppXepBlockingCommandModuleGetBlocklistData XmppXepBlockingCommandModuleGetBlocklistData;
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	XMPP_XEP_BLOCKING_COMMAND_MODULE_BLOCK_PUSH_RECEIVED_SIGNAL,
	XMPP_XEP_BLOCKING_COMMAND_MODULE_UNBLOCK_PUSH_RECEIVED_SIGNAL,
	XMPP_XEP_BLOCKING_COMMAND_MODULE_UNBLOCK_ALL_RECEIVED_SIGNAL,
	XMPP_XEP_BLOCKING_COMMAND_MODULE_NUM_SIGNALS
};
static guint xmpp_xep_blocking_command_module_signals[XMPP_XEP_BLOCKING_COMMAND_MODULE_NUM_SIGNALS] = {0};
enum  {
	XMPP_XEP_BLOCKING_COMMAND_FLAG_0_PROPERTY,
	XMPP_XEP_BLOCKING_COMMAND_FLAG_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_blocking_command_flag_properties[XMPP_XEP_BLOCKING_COMMAND_FLAG_NUM_PROPERTIES];

struct _XmppXepBlockingCommandModuleOnIqSetData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepBlockingCommandModule* self;
	XmppXmppStream* stream;
	XmppIqStanza* iq;
	XmppStanzaNode* block_node;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* unblock_node;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	GeeList* jids;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	GeeList* _tmp6_;
	XmppFlagIdentity* _tmp7_;
	gpointer _tmp8_;
	XmppXepBlockingCommandFlag* _tmp9_;
	GeeList* _tmp10_;
	GeeList* _tmp11_;
	GeeList* _tmp12_;
	XmppStanzaNode* _tmp13_;
	XmppStanzaNode* _tmp14_;
	GeeList* _tmp15_;
	GeeList* _tmp16_;
	gint _tmp17_;
	gint _tmp18_;
	XmppFlagIdentity* _tmp19_;
	gpointer _tmp20_;
	XmppXepBlockingCommandFlag* _tmp21_;
	GeeList* _tmp22_;
	GeeList* _tmp23_;
	GeeList* _tmp24_;
	XmppFlagIdentity* _tmp25_;
	gpointer _tmp26_;
	XmppXepBlockingCommandFlag* _tmp27_;
	GeeList* _tmp28_;
};

struct _XmppXepBlockingCommandModuleOnStreamNegotiatedData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepBlockingCommandModule* self;
	XmppXmppStream* stream;
	gboolean has_feature;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepServiceDiscoveryModule* _tmp2_;
	XmppJid* _tmp3_;
	gboolean _tmp4_;
	XmppXepBlockingCommandFlag* _tmp5_;
	XmppXepBlockingCommandFlag* _tmp6_;
	XmppFlagIdentity* _tmp7_;
	gpointer _tmp8_;
	XmppXepBlockingCommandFlag* _tmp9_;
	GeeList* _tmp10_;
};

struct _XmppXepBlockingCommandModuleGetBlocklistData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepBlockingCommandModule* self;
	XmppXmppStream* stream;
	GeeList* result;
	XmppStanzaNode* blocklist_node;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppIqStanza* iq;
	XmppIqStanza* _tmp4_;
	XmppIqStanza* result_iq;
	XmppModuleIdentity* _tmp5_;
	gpointer _tmp6_;
	XmppIqModule* _tmp7_;
	XmppIqStanza* _tmp8_;
	XmppIqStanza* _tmp9_;
	XmppStanzaNode* node;
	XmppStanzaNode* _tmp10_;
	XmppStanzaNode* _tmp11_;
	XmppStanzaNode* _tmp12_;
	XmppStanzaNode* _tmp13_;
	GeeList* _tmp14_;
	GeeArrayList* _tmp15_;
	GError* _inner_error0_;
};

static gpointer xmpp_xep_blocking_command_module_parent_class = NULL;
XmppModuleIdentity* xmpp_xep_blocking_command_module_IDENTITY = NULL;
static XmppIqHandlerIface * xmpp_xep_blocking_command_module_xmpp_iq_handler_parent_iface = NULL;
static gpointer xmpp_xep_blocking_command_flag_parent_class = NULL;
XmppFlagIdentity* xmpp_xep_blocking_command_flag_IDENTITY = NULL;

static void xmpp_xep_blocking_command_module_fill_node_with_items (XmppXepBlockingCommandModule* self,
                                                            XmppStanzaNode* node,
                                                            gchar** jids,
                                                            gint jids_length1);
static void xmpp_xep_blocking_command_module_real_on_iq_set_data_free (gpointer _data);
static void xmpp_xep_blocking_command_module_real_on_iq_set (XmppIqHandler* base,
                                                      XmppXmppStream* stream,
                                                      XmppIqStanza* iq,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
static gboolean xmpp_xep_blocking_command_module_real_on_iq_set_co (XmppXepBlockingCommandModuleOnIqSetData* _data_);
static GeeList* xmpp_xep_blocking_command_module_get_jids_from_items (XmppXepBlockingCommandModule* self,
                                                               XmppStanzaNode* node);
static void xmpp_xep_blocking_command_module_real_attach (XmppXmppStreamModule* base,
                                                   XmppXmppStream* stream);
static void xmpp_xep_blocking_command_module_on_stream_negotiated (XmppXepBlockingCommandModule* self,
                                                            XmppXmppStream* stream,
                                                            GAsyncReadyCallback _callback_,
                                                            gpointer _user_data_);
static void xmpp_xep_blocking_command_module_on_stream_negotiated_finish (XmppXepBlockingCommandModule* self,
                                                                   GAsyncResult* _res_);
static void _xmpp_xep_blocking_command_module_on_stream_negotiated_xmpp_xmpp_stream_stream_negotiated (XmppXmppStream* _sender,
                                                                                                XmppXmppStream* stream,
                                                                                                gpointer self);
static void xmpp_xep_blocking_command_module_real_detach (XmppXmppStreamModule* base,
                                                   XmppXmppStream* stream);
static gchar* xmpp_xep_blocking_command_module_real_get_ns (XmppXmppStreamModule* base);
static gchar* xmpp_xep_blocking_command_module_real_get_id (XmppXmppStreamModule* base);
static void xmpp_xep_blocking_command_module_on_stream_negotiated_data_free (gpointer _data);
static gboolean xmpp_xep_blocking_command_module_on_stream_negotiated_co (XmppXepBlockingCommandModuleOnStreamNegotiatedData* _data_);
static void xmpp_xep_blocking_command_module_on_stream_negotiated_ready (GObject* source_object,
                                                                  GAsyncResult* _res_,
                                                                  gpointer _user_data_);
static void xmpp_xep_blocking_command_module_get_blocklist (XmppXepBlockingCommandModule* self,
                                                     XmppXmppStream* stream,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
static GeeList* xmpp_xep_blocking_command_module_get_blocklist_finish (XmppXepBlockingCommandModule* self,
                                                                GAsyncResult* _res_);
static void xmpp_xep_blocking_command_module_get_blocklist_data_free (gpointer _data);
static gboolean xmpp_xep_blocking_command_module_get_blocklist_co (XmppXepBlockingCommandModuleGetBlocklistData* _data_);
static void xmpp_xep_blocking_command_module_get_blocklist_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void xmpp_xep_blocking_command_module_finalize (GObject * obj);
static GType xmpp_xep_blocking_command_module_get_type_once (void);
static gchar* xmpp_xep_blocking_command_flag_real_get_ns (XmppXmppStreamFlag* base);
static gchar* xmpp_xep_blocking_command_flag_real_get_id (XmppXmppStreamFlag* base);
static void xmpp_xep_blocking_command_flag_finalize (GObject * obj);
static GType xmpp_xep_blocking_command_flag_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

gboolean
xmpp_xep_blocking_command_module_is_blocked (XmppXepBlockingCommandModule* self,
                                             XmppXmppStream* stream,
                                             const gchar* jid)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (stream != NULL, FALSE);
	g_return_val_if_fail (jid != NULL, FALSE);
	if (xmpp_xep_blocking_command_module_is_supported (self, stream)) {
		XmppFlagIdentity* _tmp0_;
		gpointer _tmp1_;
		XmppXepBlockingCommandFlag* _tmp2_;
		GeeList* _tmp3_;
		gboolean _tmp4_;
		_tmp0_ = xmpp_xep_blocking_command_flag_IDENTITY;
		_tmp1_ = xmpp_xmpp_stream_get_flag (stream, XMPP_XEP_BLOCKING_COMMAND_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
		_tmp2_ = (XmppXepBlockingCommandFlag*) _tmp1_;
		_tmp3_ = _tmp2_->blocklist;
		_tmp4_ = gee_collection_contains ((GeeCollection*) _tmp3_, jid);
		_g_object_unref0 (_tmp2_);
		result = _tmp4_;
		return result;
	} else {
		result = FALSE;
		return result;
	}
}

gboolean
xmpp_xep_blocking_command_module_block (XmppXepBlockingCommandModule* self,
                                        XmppXmppStream* stream,
                                        gchar** jids,
                                        gint jids_length1)
{
	XmppStanzaNode* block_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppIqStanza* iq = NULL;
	XmppStanzaNode* _tmp5_;
	XmppIqStanza* _tmp6_;
	XmppModuleIdentity* _tmp7_;
	gpointer _tmp8_;
	XmppIqModule* _tmp9_;
	XmppIqStanza* _tmp10_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (stream != NULL, FALSE);
	if (jids_length1 == 0) {
		result = FALSE;
		return result;
	}
	_tmp0_ = xmpp_stanza_node_new_build ("block", XMPP_XEP_BLOCKING_COMMAND_NS_URI, NULL, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = xmpp_stanza_node_add_self_xmlns (_tmp1_);
	_tmp3_ = _tmp2_;
	_xmpp_stanza_entry_unref0 (_tmp1_);
	block_node = _tmp3_;
	_tmp4_ = block_node;
	xmpp_xep_blocking_command_module_fill_node_with_items (self, _tmp4_, jids, (gint) jids_length1);
	_tmp5_ = block_node;
	_tmp6_ = xmpp_iq_stanza_new_set (_tmp5_, NULL);
	iq = _tmp6_;
	_tmp7_ = xmpp_iq_module_IDENTITY;
	_tmp8_ = xmpp_xmpp_stream_get_module (stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp7_);
	_tmp9_ = (XmppIqModule*) _tmp8_;
	_tmp10_ = iq;
	xmpp_iq_module_send_iq (_tmp9_, stream, _tmp10_, NULL, NULL, NULL, G_PRIORITY_DEFAULT);
	_g_object_unref0 (_tmp9_);
	result = TRUE;
	_g_object_unref0 (iq);
	_xmpp_stanza_entry_unref0 (block_node);
	return result;
}

gboolean
xmpp_xep_blocking_command_module_unblock (XmppXepBlockingCommandModule* self,
                                          XmppXmppStream* stream,
                                          gchar** jids,
                                          gint jids_length1)
{
	XmppStanzaNode* unblock_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppIqStanza* iq = NULL;
	XmppStanzaNode* _tmp5_;
	XmppIqStanza* _tmp6_;
	XmppModuleIdentity* _tmp7_;
	gpointer _tmp8_;
	XmppIqModule* _tmp9_;
	XmppIqStanza* _tmp10_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (stream != NULL, FALSE);
	if (jids_length1 == 0) {
		result = FALSE;
		return result;
	}
	_tmp0_ = xmpp_stanza_node_new_build ("unblock", XMPP_XEP_BLOCKING_COMMAND_NS_URI, NULL, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = xmpp_stanza_node_add_self_xmlns (_tmp1_);
	_tmp3_ = _tmp2_;
	_xmpp_stanza_entry_unref0 (_tmp1_);
	unblock_node = _tmp3_;
	_tmp4_ = unblock_node;
	xmpp_xep_blocking_command_module_fill_node_with_items (self, _tmp4_, jids, (gint) jids_length1);
	_tmp5_ = unblock_node;
	_tmp6_ = xmpp_iq_stanza_new_set (_tmp5_, NULL);
	iq = _tmp6_;
	_tmp7_ = xmpp_iq_module_IDENTITY;
	_tmp8_ = xmpp_xmpp_stream_get_module (stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp7_);
	_tmp9_ = (XmppIqModule*) _tmp8_;
	_tmp10_ = iq;
	xmpp_iq_module_send_iq (_tmp9_, stream, _tmp10_, NULL, NULL, NULL, G_PRIORITY_DEFAULT);
	_g_object_unref0 (_tmp9_);
	result = TRUE;
	_g_object_unref0 (iq);
	_xmpp_stanza_entry_unref0 (unblock_node);
	return result;
}

void
xmpp_xep_blocking_command_module_unblock_all (XmppXepBlockingCommandModule* self,
                                              XmppXmppStream* stream)
{
	XmppStanzaNode* unblock_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppIqStanza* iq = NULL;
	XmppIqStanza* _tmp4_;
	XmppModuleIdentity* _tmp5_;
	gpointer _tmp6_;
	XmppIqModule* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmpp_stanza_node_new_build ("unblock", XMPP_XEP_BLOCKING_COMMAND_NS_URI, NULL, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = xmpp_stanza_node_add_self_xmlns (_tmp1_);
	_tmp3_ = _tmp2_;
	_xmpp_stanza_entry_unref0 (_tmp1_);
	unblock_node = _tmp3_;
	_tmp4_ = xmpp_iq_stanza_new_set (unblock_node, NULL);
	iq = _tmp4_;
	_tmp5_ = xmpp_iq_module_IDENTITY;
	_tmp6_ = xmpp_xmpp_stream_get_module (stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp5_);
	_tmp7_ = (XmppIqModule*) _tmp6_;
	xmpp_iq_module_send_iq (_tmp7_, stream, iq, NULL, NULL, NULL, G_PRIORITY_DEFAULT);
	_g_object_unref0 (_tmp7_);
	_g_object_unref0 (iq);
	_xmpp_stanza_entry_unref0 (unblock_node);
}

gboolean
xmpp_xep_blocking_command_module_is_supported (XmppXepBlockingCommandModule* self,
                                               XmppXmppStream* stream)
{
	XmppFlagIdentity* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (stream != NULL, FALSE);
	_tmp0_ = xmpp_xep_blocking_command_flag_IDENTITY;
	result = xmpp_xmpp_stream_has_flag (stream, XMPP_XEP_BLOCKING_COMMAND_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	return result;
}

static void
xmpp_xep_blocking_command_module_real_on_iq_set_data_free (gpointer _data)
{
	XmppXepBlockingCommandModuleOnIqSetData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_g_object_unref0 (_data_->iq);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepBlockingCommandModuleOnIqSetData, _data_);
}

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

static void
xmpp_xep_blocking_command_module_real_on_iq_set (XmppIqHandler* base,
                                                 XmppXmppStream* stream,
                                                 XmppIqStanza* iq,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	XmppXepBlockingCommandModule * self;
	XmppXepBlockingCommandModuleOnIqSetData* _data_;
	XmppXepBlockingCommandModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppIqStanza* _tmp2_;
	g_return_if_fail (stream != NULL);
	g_return_if_fail (iq != NULL);
	self = (XmppXepBlockingCommandModule*) base;
	_data_ = g_slice_new0 (XmppXepBlockingCommandModuleOnIqSetData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_blocking_command_module_real_on_iq_set_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 (iq);
	_g_object_unref0 (_data_->iq);
	_data_->iq = _tmp2_;
	xmpp_xep_blocking_command_module_real_on_iq_set_co (_data_);
}

static void
xmpp_xep_blocking_command_module_on_iq_set_finish (XmppIqHandler* base,
                                                   GAsyncResult* _res_)
{
	XmppXepBlockingCommandModuleOnIqSetData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
xmpp_xep_blocking_command_module_real_on_iq_set_co (XmppXepBlockingCommandModuleOnIqSetData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((XmppStanza*) _data_->iq)->stanza;
	_data_->_tmp1_ = xmpp_stanza_node_get_subnode (_data_->_tmp0_, "block", XMPP_XEP_BLOCKING_COMMAND_NS_URI, FALSE);
	_data_->block_node = _data_->_tmp1_;
	_data_->_tmp2_ = ((XmppStanza*) _data_->iq)->stanza;
	_data_->_tmp3_ = xmpp_stanza_node_get_subnode (_data_->_tmp2_, "unblock", XMPP_XEP_BLOCKING_COMMAND_NS_URI, FALSE);
	_data_->unblock_node = _data_->_tmp3_;
	_data_->_tmp4_ = _data_->block_node;
	if (_data_->_tmp4_ != NULL) {
		_data_->_tmp5_ = _data_->block_node;
		_data_->_tmp6_ = xmpp_xep_blocking_command_module_get_jids_from_items (_data_->self, _data_->_tmp5_);
		_g_object_unref0 (_data_->jids);
		_data_->jids = _data_->_tmp6_;
		_data_->_tmp7_ = xmpp_xep_blocking_command_flag_IDENTITY;
		_data_->_tmp8_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_BLOCKING_COMMAND_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp7_);
		_data_->_tmp9_ = (XmppXepBlockingCommandFlag*) _data_->_tmp8_;
		_data_->_tmp10_ = _data_->_tmp9_->blocklist;
		_data_->_tmp11_ = _data_->jids;
		gee_collection_add_all ((GeeCollection*) _data_->_tmp10_, (GeeCollection*) _data_->_tmp11_);
		_g_object_unref0 (_data_->_tmp9_);
		_data_->_tmp12_ = _data_->jids;
		g_signal_emit (_data_->self, xmpp_xep_blocking_command_module_signals[XMPP_XEP_BLOCKING_COMMAND_MODULE_BLOCK_PUSH_RECEIVED_SIGNAL], 0, _data_->stream, _data_->_tmp12_);
	} else {
		_data_->_tmp13_ = _data_->unblock_node;
		if (_data_->_tmp13_ != NULL) {
			_data_->_tmp14_ = _data_->unblock_node;
			_data_->_tmp15_ = xmpp_xep_blocking_command_module_get_jids_from_items (_data_->self, _data_->_tmp14_);
			_g_object_unref0 (_data_->jids);
			_data_->jids = _data_->_tmp15_;
			_data_->_tmp16_ = _data_->jids;
			_data_->_tmp17_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp16_);
			_data_->_tmp18_ = _data_->_tmp17_;
			if (_data_->_tmp18_ > 0) {
				_data_->_tmp19_ = xmpp_xep_blocking_command_flag_IDENTITY;
				_data_->_tmp20_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_BLOCKING_COMMAND_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp19_);
				_data_->_tmp21_ = (XmppXepBlockingCommandFlag*) _data_->_tmp20_;
				_data_->_tmp22_ = _data_->_tmp21_->blocklist;
				_data_->_tmp23_ = _data_->jids;
				gee_collection_remove_all ((GeeCollection*) _data_->_tmp22_, (GeeCollection*) _data_->_tmp23_);
				_g_object_unref0 (_data_->_tmp21_);
				_data_->_tmp24_ = _data_->jids;
				g_signal_emit (_data_->self, xmpp_xep_blocking_command_module_signals[XMPP_XEP_BLOCKING_COMMAND_MODULE_UNBLOCK_PUSH_RECEIVED_SIGNAL], 0, _data_->stream, _data_->_tmp24_);
			} else {
				_data_->_tmp25_ = xmpp_xep_blocking_command_flag_IDENTITY;
				_data_->_tmp26_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_BLOCKING_COMMAND_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp25_);
				_data_->_tmp27_ = (XmppXepBlockingCommandFlag*) _data_->_tmp26_;
				_data_->_tmp28_ = _data_->_tmp27_->blocklist;
				gee_collection_clear ((GeeCollection*) _data_->_tmp28_);
				_g_object_unref0 (_data_->_tmp27_);
				g_signal_emit (_data_->self, xmpp_xep_blocking_command_module_signals[XMPP_XEP_BLOCKING_COMMAND_MODULE_UNBLOCK_ALL_RECEIVED_SIGNAL], 0, _data_->stream);
			}
		}
	}
	_g_object_unref0 (_data_->jids);
	_xmpp_stanza_entry_unref0 (_data_->unblock_node);
	_xmpp_stanza_entry_unref0 (_data_->block_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_blocking_command_module_on_stream_negotiated_xmpp_xmpp_stream_stream_negotiated (XmppXmppStream* _sender,
                                                                                           XmppXmppStream* stream,
                                                                                           gpointer self)
{
	xmpp_xep_blocking_command_module_on_stream_negotiated ((XmppXepBlockingCommandModule*) self, stream, NULL, NULL);
}

static void
xmpp_xep_blocking_command_module_real_attach (XmppXmppStreamModule* base,
                                              XmppXmppStream* stream)
{
	XmppXepBlockingCommandModule * self;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppIqModule* _tmp2_;
	XmppModuleIdentity* _tmp3_;
	gpointer _tmp4_;
	XmppXepServiceDiscoveryModule* _tmp5_;
	self = (XmppXepBlockingCommandModule*) base;
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmpp_iq_module_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_module (stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (XmppIqModule*) _tmp1_;
	xmpp_iq_module_register_for_namespace (_tmp2_, XMPP_XEP_BLOCKING_COMMAND_NS_URI, (XmppIqHandler*) self);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp4_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp3_);
	_tmp5_ = (XmppXepServiceDiscoveryModule*) _tmp4_;
	xmpp_xep_service_discovery_module_add_feature (_tmp5_, stream, XMPP_XEP_BLOCKING_COMMAND_NS_URI);
	_g_object_unref0 (_tmp5_);
	g_signal_connect_object (stream, "stream-negotiated", (GCallback) _xmpp_xep_blocking_command_module_on_stream_negotiated_xmpp_xmpp_stream_stream_negotiated, self, 0);
}

static void
xmpp_xep_blocking_command_module_real_detach (XmppXmppStreamModule* base,
                                              XmppXmppStream* stream)
{
	XmppXepBlockingCommandModule * self;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppIqModule* _tmp2_;
	XmppModuleIdentity* _tmp3_;
	gpointer _tmp4_;
	XmppXepServiceDiscoveryModule* _tmp5_;
	guint _tmp6_;
	self = (XmppXepBlockingCommandModule*) base;
	g_return_if_fail (stream != NULL);
	_tmp0_ = xmpp_iq_module_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_module (stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (XmppIqModule*) _tmp1_;
	xmpp_iq_module_unregister_from_namespace (_tmp2_, XMPP_XEP_BLOCKING_COMMAND_NS_URI, (XmppIqHandler*) self);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp4_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp3_);
	_tmp5_ = (XmppXepServiceDiscoveryModule*) _tmp4_;
	xmpp_xep_service_discovery_module_remove_feature (_tmp5_, stream, XMPP_XEP_BLOCKING_COMMAND_NS_URI);
	_g_object_unref0 (_tmp5_);
	g_signal_parse_name ("stream-negotiated", XMPP_TYPE_XMPP_STREAM, &_tmp6_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (stream, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _xmpp_xep_blocking_command_module_on_stream_negotiated_xmpp_xmpp_stream_stream_negotiated, self);
}

static gchar*
xmpp_xep_blocking_command_module_real_get_ns (XmppXmppStreamModule* base)
{
	XmppXepBlockingCommandModule * self;
	gchar* _tmp0_;
	gchar* result;
	self = (XmppXepBlockingCommandModule*) base;
	_tmp0_ = g_strdup (XMPP_XEP_BLOCKING_COMMAND_NS_URI);
	result = _tmp0_;
	return result;
}

static gchar*
xmpp_xep_blocking_command_module_real_get_id (XmppXmppStreamModule* base)
{
	XmppXepBlockingCommandModule * self;
	XmppModuleIdentity* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	self = (XmppXepBlockingCommandModule*) base;
	_tmp0_ = xmpp_xep_blocking_command_module_IDENTITY;
	_tmp1_ = xmpp_module_identity_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}

static void
xmpp_xep_blocking_command_module_on_stream_negotiated_data_free (gpointer _data)
{
	XmppXepBlockingCommandModuleOnStreamNegotiatedData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepBlockingCommandModuleOnStreamNegotiatedData, _data_);
}

static void
xmpp_xep_blocking_command_module_on_stream_negotiated (XmppXepBlockingCommandModule* self,
                                                       XmppXmppStream* stream,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_)
{
	XmppXepBlockingCommandModuleOnStreamNegotiatedData* _data_;
	XmppXepBlockingCommandModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	_data_ = g_slice_new0 (XmppXepBlockingCommandModuleOnStreamNegotiatedData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_blocking_command_module_on_stream_negotiated_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	xmpp_xep_blocking_command_module_on_stream_negotiated_co (_data_);
}

static void
xmpp_xep_blocking_command_module_on_stream_negotiated_finish (XmppXepBlockingCommandModule* self,
                                                              GAsyncResult* _res_)
{
	XmppXepBlockingCommandModuleOnStreamNegotiatedData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
xmpp_xep_blocking_command_module_on_stream_negotiated_ready (GObject* source_object,
                                                             GAsyncResult* _res_,
                                                             gpointer _user_data_)
{
	XmppXepBlockingCommandModuleOnStreamNegotiatedData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_blocking_command_module_on_stream_negotiated_co (_data_);
}

static gboolean
xmpp_xep_blocking_command_module_on_stream_negotiated_co (XmppXepBlockingCommandModuleOnStreamNegotiatedData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		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_->_tmp3_ = _data_->stream->remote_name;
	_data_->_state_ = 1;
	xmpp_xep_service_discovery_module_has_entity_feature (_data_->_tmp2_, _data_->stream, _data_->_tmp3_, XMPP_XEP_BLOCKING_COMMAND_NS_URI, xmpp_xep_blocking_command_module_on_stream_negotiated_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp4_ = xmpp_xep_service_discovery_module_has_entity_feature_finish (_data_->_tmp2_, _data_->_res_);
	_g_object_unref0 (_data_->_tmp2_);
	_data_->has_feature = _data_->_tmp4_;
	if (_data_->has_feature) {
		_data_->_tmp5_ = xmpp_xep_blocking_command_flag_new ();
		_data_->_tmp6_ = _data_->_tmp5_;
		xmpp_xmpp_stream_add_flag (_data_->stream, (XmppXmppStreamFlag*) _data_->_tmp6_);
		_g_object_unref0 (_data_->_tmp6_);
		_data_->_tmp7_ = xmpp_xep_blocking_command_flag_IDENTITY;
		_data_->_tmp8_ = xmpp_xmpp_stream_get_flag (_data_->stream, XMPP_XEP_BLOCKING_COMMAND_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp7_);
		_data_->_tmp9_ = (XmppXepBlockingCommandFlag*) _data_->_tmp8_;
		_data_->_state_ = 2;
		xmpp_xep_blocking_command_module_get_blocklist (_data_->self, _data_->stream, xmpp_xep_blocking_command_module_on_stream_negotiated_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp10_ = xmpp_xep_blocking_command_module_get_blocklist_finish (_data_->self, _data_->_res_);
		_g_object_unref0 (_data_->_tmp9_->blocklist);
		_data_->_tmp9_->blocklist = _data_->_tmp10_;
		_g_object_unref0 (_data_->_tmp9_);
	}
	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_blocking_command_module_get_blocklist_data_free (gpointer _data)
{
	XmppXepBlockingCommandModuleGetBlocklistData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepBlockingCommandModuleGetBlocklistData, _data_);
}

static void
xmpp_xep_blocking_command_module_get_blocklist (XmppXepBlockingCommandModule* self,
                                                XmppXmppStream* stream,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	XmppXepBlockingCommandModuleGetBlocklistData* _data_;
	XmppXepBlockingCommandModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	_data_ = g_slice_new0 (XmppXepBlockingCommandModuleGetBlocklistData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_blocking_command_module_get_blocklist_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	xmpp_xep_blocking_command_module_get_blocklist_co (_data_);
}

static GeeList*
xmpp_xep_blocking_command_module_get_blocklist_finish (XmppXepBlockingCommandModule* self,
                                                       GAsyncResult* _res_)
{
	GeeList* result;
	XmppXepBlockingCommandModuleGetBlocklistData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
xmpp_xep_blocking_command_module_get_blocklist_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_)
{
	XmppXepBlockingCommandModuleGetBlocklistData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_blocking_command_module_get_blocklist_co (_data_);
}

static gboolean
xmpp_xep_blocking_command_module_get_blocklist_co (XmppXepBlockingCommandModuleGetBlocklistData* _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 ("blocklist", XMPP_XEP_BLOCKING_COMMAND_NS_URI, NULL, NULL);
	_data_->_tmp1_ = _data_->_tmp0_;
	_data_->_tmp2_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp1_);
	_data_->blocklist_node = _data_->_tmp3_;
	_data_->_tmp4_ = xmpp_iq_stanza_new_get (_data_->blocklist_node, NULL);
	_data_->iq = _data_->_tmp4_;
	_data_->_tmp5_ = xmpp_iq_module_IDENTITY;
	_data_->_tmp6_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp5_);
	_data_->_tmp7_ = (XmppIqModule*) _data_->_tmp6_;
	_data_->_state_ = 1;
	xmpp_iq_module_send_iq_async (_data_->_tmp7_, _data_->stream, _data_->iq, G_PRIORITY_DEFAULT, NULL, xmpp_xep_blocking_command_module_get_blocklist_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp8_ = xmpp_iq_module_send_iq_finish (_data_->_tmp7_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp9_ = _data_->_tmp8_;
	_g_object_unref0 (_data_->_tmp7_);
	_data_->result_iq = _data_->_tmp9_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->iq);
		_xmpp_stanza_entry_unref0 (_data_->blocklist_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_->_tmp10_ = ((XmppStanza*) _data_->result_iq)->stanza;
	_data_->_tmp11_ = xmpp_stanza_node_get_subnode (_data_->_tmp10_, "blocklist", XMPP_XEP_BLOCKING_COMMAND_NS_URI, FALSE);
	_data_->node = _data_->_tmp11_;
	_data_->_tmp12_ = _data_->node;
	if (_data_->_tmp12_ != NULL) {
		_data_->_tmp13_ = _data_->node;
		_data_->_tmp14_ = xmpp_xep_blocking_command_module_get_jids_from_items (_data_->self, _data_->_tmp13_);
		_data_->result = _data_->_tmp14_;
		_xmpp_stanza_entry_unref0 (_data_->node);
		_g_object_unref0 (_data_->result_iq);
		_g_object_unref0 (_data_->iq);
		_xmpp_stanza_entry_unref0 (_data_->blocklist_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_->_tmp15_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	_data_->result = (GeeList*) _data_->_tmp15_;
	_xmpp_stanza_entry_unref0 (_data_->node);
	_g_object_unref0 (_data_->result_iq);
	_g_object_unref0 (_data_->iq);
	_xmpp_stanza_entry_unref0 (_data_->blocklist_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 GeeList*
xmpp_xep_blocking_command_module_get_jids_from_items (XmppXepBlockingCommandModule* self,
                                                      XmppStanzaNode* node)
{
	GeeList* item_nodes = NULL;
	GeeList* _tmp0_;
	GeeList* jids = NULL;
	GeeArrayList* _tmp1_;
	GeeList* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (node != NULL, NULL);
	_tmp0_ = xmpp_stanza_node_get_subnodes (node, "item", XMPP_XEP_BLOCKING_COMMAND_NS_URI, FALSE);
	item_nodes = _tmp0_;
	_tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	jids = (GeeList*) _tmp1_;
	{
		GeeList* _item_node_list = NULL;
		GeeList* _tmp2_;
		gint _item_node_size = 0;
		GeeList* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		gint _item_node_index = 0;
		_tmp2_ = item_nodes;
		_item_node_list = _tmp2_;
		_tmp3_ = _item_node_list;
		_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
		_tmp5_ = _tmp4_;
		_item_node_size = _tmp5_;
		_item_node_index = -1;
		while (TRUE) {
			gint _tmp6_;
			gint _tmp7_;
			XmppStanzaNode* item_node = NULL;
			GeeList* _tmp8_;
			gpointer _tmp9_;
			gchar* jid = NULL;
			XmppStanzaNode* _tmp10_;
			const gchar* _tmp11_;
			gchar* _tmp12_;
			const gchar* _tmp13_;
			_item_node_index = _item_node_index + 1;
			_tmp6_ = _item_node_index;
			_tmp7_ = _item_node_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _item_node_list;
			_tmp9_ = gee_list_get (_tmp8_, _item_node_index);
			item_node = (XmppStanzaNode*) _tmp9_;
			_tmp10_ = item_node;
			_tmp11_ = xmpp_stanza_node_get_attribute (_tmp10_, "jid", XMPP_XEP_BLOCKING_COMMAND_NS_URI);
			_tmp12_ = g_strdup (_tmp11_);
			jid = _tmp12_;
			_tmp13_ = jid;
			if (_tmp13_ != NULL) {
				GeeList* _tmp14_;
				const gchar* _tmp15_;
				_tmp14_ = jids;
				_tmp15_ = jid;
				gee_collection_add ((GeeCollection*) _tmp14_, _tmp15_);
			}
			_g_free0 (jid);
			_xmpp_stanza_entry_unref0 (item_node);
		}
	}
	result = jids;
	_g_object_unref0 (item_nodes);
	return result;
}

static void
xmpp_xep_blocking_command_module_fill_node_with_items (XmppXepBlockingCommandModule* self,
                                                       XmppStanzaNode* node,
                                                       gchar** jids,
                                                       gint jids_length1)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (node != NULL);
	{
		gchar** jid_collection = NULL;
		gint jid_collection_length1 = 0;
		gint _jid_collection_size_ = 0;
		gint jid_it = 0;
		jid_collection = jids;
		jid_collection_length1 = jids_length1;
		for (jid_it = 0; jid_it < jid_collection_length1; jid_it = jid_it + 1) {
			gchar* _tmp0_;
			gchar* jid = NULL;
			_tmp0_ = g_strdup (jid_collection[jid_it]);
			jid = _tmp0_;
			{
				XmppStanzaNode* item_node = NULL;
				XmppStanzaNode* _tmp1_;
				XmppStanzaNode* _tmp2_;
				XmppStanzaNode* _tmp3_;
				XmppStanzaNode* _tmp4_;
				XmppStanzaNode* _tmp5_;
				const gchar* _tmp6_;
				XmppStanzaNode* _tmp7_;
				XmppStanzaNode* _tmp8_;
				XmppStanzaNode* _tmp9_;
				_tmp1_ = xmpp_stanza_node_new_build ("item", XMPP_XEP_BLOCKING_COMMAND_NS_URI, NULL, NULL);
				_tmp2_ = _tmp1_;
				_tmp3_ = xmpp_stanza_node_add_self_xmlns (_tmp2_);
				_tmp4_ = _tmp3_;
				_xmpp_stanza_entry_unref0 (_tmp2_);
				item_node = _tmp4_;
				_tmp5_ = item_node;
				_tmp6_ = jid;
				xmpp_stanza_node_set_attribute (_tmp5_, "jid", _tmp6_, XMPP_XEP_BLOCKING_COMMAND_NS_URI);
				_tmp7_ = item_node;
				_tmp8_ = xmpp_stanza_node_put_node (node, _tmp7_);
				_tmp9_ = _tmp8_;
				_xmpp_stanza_entry_unref0 (_tmp9_);
				_xmpp_stanza_entry_unref0 (item_node);
				_g_free0 (jid);
			}
		}
	}
}

XmppXepBlockingCommandModule*
xmpp_xep_blocking_command_module_construct (GType object_type)
{
	XmppXepBlockingCommandModule * self = NULL;
	self = (XmppXepBlockingCommandModule*) xmpp_xmpp_stream_module_construct (object_type);
	return self;
}

XmppXepBlockingCommandModule*
xmpp_xep_blocking_command_module_new (void)
{
	return xmpp_xep_blocking_command_module_construct (XMPP_XEP_BLOCKING_COMMAND_TYPE_MODULE);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT 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_OBJECT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
}

static void
xmpp_xep_blocking_command_module_class_init (XmppXepBlockingCommandModuleClass * klass,
                                             gpointer klass_data)
{
	XmppModuleIdentity* _tmp0_;
	xmpp_xep_blocking_command_module_parent_class = g_type_class_peek_parent (klass);
	((XmppXmppStreamModuleClass *) klass)->attach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xep_blocking_command_module_real_attach;
	((XmppXmppStreamModuleClass *) klass)->detach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xep_blocking_command_module_real_detach;
	((XmppXmppStreamModuleClass *) klass)->get_ns = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xep_blocking_command_module_real_get_ns;
	((XmppXmppStreamModuleClass *) klass)->get_id = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xep_blocking_command_module_real_get_id;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_blocking_command_module_finalize;
	xmpp_xep_blocking_command_module_signals[XMPP_XEP_BLOCKING_COMMAND_MODULE_BLOCK_PUSH_RECEIVED_SIGNAL] = g_signal_new ("block-push-received", XMPP_XEP_BLOCKING_COMMAND_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, XMPP_TYPE_XMPP_STREAM, GEE_TYPE_LIST);
	xmpp_xep_blocking_command_module_signals[XMPP_XEP_BLOCKING_COMMAND_MODULE_UNBLOCK_PUSH_RECEIVED_SIGNAL] = g_signal_new ("unblock-push-received", XMPP_XEP_BLOCKING_COMMAND_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, XMPP_TYPE_XMPP_STREAM, GEE_TYPE_LIST);
	xmpp_xep_blocking_command_module_signals[XMPP_XEP_BLOCKING_COMMAND_MODULE_UNBLOCK_ALL_RECEIVED_SIGNAL] = g_signal_new ("unblock-all-received", XMPP_XEP_BLOCKING_COMMAND_TYPE_MODULE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, XMPP_TYPE_XMPP_STREAM);
	_tmp0_ = xmpp_module_identity_new (XMPP_XEP_BLOCKING_COMMAND_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, XMPP_XEP_BLOCKING_COMMAND_NS_URI, "0191_blocking_command");
	xmpp_xep_blocking_command_module_IDENTITY = _tmp0_;
}

static void
xmpp_xep_blocking_command_module_xmpp_iq_handler_interface_init (XmppIqHandlerIface * iface,
                                                                 gpointer iface_data)
{
	xmpp_xep_blocking_command_module_xmpp_iq_handler_parent_iface = g_type_interface_peek_parent (iface);
	iface->on_iq_set = (void (*) (XmppIqHandler*, XmppXmppStream*, XmppIqStanza*, GAsyncReadyCallback, gpointer)) xmpp_xep_blocking_command_module_real_on_iq_set;
	iface->on_iq_set_finish = (void (*) (XmppIqHandler*, GAsyncResult*)) xmpp_xep_blocking_command_module_on_iq_set_finish;
}

static void
xmpp_xep_blocking_command_module_instance_init (XmppXepBlockingCommandModule * self,
                                                gpointer klass)
{
}

static void
xmpp_xep_blocking_command_module_finalize (GObject * obj)
{
	XmppXepBlockingCommandModule * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_BLOCKING_COMMAND_TYPE_MODULE, XmppXepBlockingCommandModule);
	G_OBJECT_CLASS (xmpp_xep_blocking_command_module_parent_class)->finalize (obj);
}

static GType
xmpp_xep_blocking_command_module_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepBlockingCommandModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_blocking_command_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepBlockingCommandModule), 0, (GInstanceInitFunc) xmpp_xep_blocking_command_module_instance_init, NULL };
	static const GInterfaceInfo xmpp_iq_handler_info = { (GInterfaceInitFunc) xmpp_xep_blocking_command_module_xmpp_iq_handler_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType xmpp_xep_blocking_command_module_type_id;
	xmpp_xep_blocking_command_module_type_id = g_type_register_static (XMPP_TYPE_XMPP_STREAM_MODULE, "XmppXepBlockingCommandModule", &g_define_type_info, 0);
	g_type_add_interface_static (xmpp_xep_blocking_command_module_type_id, XMPP_IQ_TYPE_HANDLER, &xmpp_iq_handler_info);
	return xmpp_xep_blocking_command_module_type_id;
}

GType
xmpp_xep_blocking_command_module_get_type (void)
{
	static volatile gsize xmpp_xep_blocking_command_module_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_blocking_command_module_type_id__once)) {
		GType xmpp_xep_blocking_command_module_type_id;
		xmpp_xep_blocking_command_module_type_id = xmpp_xep_blocking_command_module_get_type_once ();
		g_once_init_leave (&xmpp_xep_blocking_command_module_type_id__once, xmpp_xep_blocking_command_module_type_id);
	}
	return xmpp_xep_blocking_command_module_type_id__once;
}

static gchar*
xmpp_xep_blocking_command_flag_real_get_ns (XmppXmppStreamFlag* base)
{
	XmppXepBlockingCommandFlag * self;
	gchar* _tmp0_;
	gchar* result;
	self = (XmppXepBlockingCommandFlag*) base;
	_tmp0_ = g_strdup (XMPP_XEP_BLOCKING_COMMAND_NS_URI);
	result = _tmp0_;
	return result;
}

static gchar*
xmpp_xep_blocking_command_flag_real_get_id (XmppXmppStreamFlag* base)
{
	XmppXepBlockingCommandFlag * self;
	XmppFlagIdentity* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	self = (XmppXepBlockingCommandFlag*) base;
	_tmp0_ = xmpp_xep_blocking_command_flag_IDENTITY;
	_tmp1_ = xmpp_flag_identity_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}

XmppXepBlockingCommandFlag*
xmpp_xep_blocking_command_flag_construct (GType object_type)
{
	XmppXepBlockingCommandFlag * self = NULL;
	self = (XmppXepBlockingCommandFlag*) xmpp_xmpp_stream_flag_construct (object_type);
	return self;
}

XmppXepBlockingCommandFlag*
xmpp_xep_blocking_command_flag_new (void)
{
	return xmpp_xep_blocking_command_flag_construct (XMPP_XEP_BLOCKING_COMMAND_TYPE_FLAG);
}

static void
xmpp_xep_blocking_command_flag_class_init (XmppXepBlockingCommandFlagClass * klass,
                                           gpointer klass_data)
{
	XmppFlagIdentity* _tmp0_;
	xmpp_xep_blocking_command_flag_parent_class = g_type_class_peek_parent (klass);
	((XmppXmppStreamFlagClass *) klass)->get_ns = (gchar* (*) (XmppXmppStreamFlag*)) xmpp_xep_blocking_command_flag_real_get_ns;
	((XmppXmppStreamFlagClass *) klass)->get_id = (gchar* (*) (XmppXmppStreamFlag*)) xmpp_xep_blocking_command_flag_real_get_id;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_blocking_command_flag_finalize;
	_tmp0_ = xmpp_flag_identity_new (XMPP_XEP_BLOCKING_COMMAND_TYPE_FLAG, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, XMPP_XEP_BLOCKING_COMMAND_NS_URI, "blocking_command");
	xmpp_xep_blocking_command_flag_IDENTITY = _tmp0_;
}

static void
xmpp_xep_blocking_command_flag_instance_init (XmppXepBlockingCommandFlag * self,
                                              gpointer klass)
{
}

static void
xmpp_xep_blocking_command_flag_finalize (GObject * obj)
{
	XmppXepBlockingCommandFlag * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_BLOCKING_COMMAND_TYPE_FLAG, XmppXepBlockingCommandFlag);
	_g_object_unref0 (self->blocklist);
	G_OBJECT_CLASS (xmpp_xep_blocking_command_flag_parent_class)->finalize (obj);
}

static GType
xmpp_xep_blocking_command_flag_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepBlockingCommandFlagClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_blocking_command_flag_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepBlockingCommandFlag), 0, (GInstanceInitFunc) xmpp_xep_blocking_command_flag_instance_init, NULL };
	GType xmpp_xep_blocking_command_flag_type_id;
	xmpp_xep_blocking_command_flag_type_id = g_type_register_static (XMPP_TYPE_XMPP_STREAM_FLAG, "XmppXepBlockingCommandFlag", &g_define_type_info, 0);
	return xmpp_xep_blocking_command_flag_type_id;
}

GType
xmpp_xep_blocking_command_flag_get_type (void)
{
	static volatile gsize xmpp_xep_blocking_command_flag_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_blocking_command_flag_type_id__once)) {
		GType xmpp_xep_blocking_command_flag_type_id;
		xmpp_xep_blocking_command_flag_type_id = xmpp_xep_blocking_command_flag_get_type_once ();
		g_once_init_leave (&xmpp_xep_blocking_command_flag_type_id__once, xmpp_xep_blocking_command_flag_type_id);
	}
	return xmpp_xep_blocking_command_flag_type_id__once;
}

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

