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

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

#define XMPP_XEP_PUBSUB_NS_URI_EVENT XMPP_XEP_PUBSUB_NS_URI "#event"
#define XMPP_XEP_PUBSUB_NS_URI_OWNER XMPP_XEP_PUBSUB_NS_URI "#owner"
#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_PUBSUB_MODULE_0_PROPERTY,
	XMPP_XEP_PUBSUB_MODULE_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_pubsub_module_properties[XMPP_XEP_PUBSUB_MODULE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _xmpp_xep_pubsub_item_listener_delegate_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_pubsub_item_listener_delegate_unref (var), NULL)))
#define _xmpp_xep_pubsub_retract_listener_delegate_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_pubsub_retract_listener_delegate_unref (var), NULL)))
#define _xmpp_xep_pubsub_delete_listener_delegate_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_pubsub_delete_listener_delegate_unref (var), NULL)))
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _xmpp_stanza_entry_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_stanza_entry_unref (var), NULL)))
typedef struct _XmppXepPubsubModuleRequestAllData XmppXepPubsubModuleRequestAllData;
typedef struct _Block7Data Block7Data;
#define _xmpp_xep_pubsub_publish_options_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_pubsub_publish_options_unref (var), NULL)))
#define _xmpp_xep_data_forms_data_form_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_data_forms_data_form_unref (var), NULL)))
#define _xmpp_error_stanza_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_error_stanza_unref (var), NULL)))
typedef struct _XmppXepPubsubModulePublishData XmppXepPubsubModulePublishData;
typedef struct _Block8Data Block8Data;
typedef struct _XmppXepPubsubModuleRetractItemData XmppXepPubsubModuleRetractItemData;
typedef struct _XmppXepPubsubModuleRequestNodeConfigData XmppXepPubsubModuleRequestNodeConfigData;
typedef struct _XmppXepPubsubModuleSubmitNodeConfigData XmppXepPubsubModuleSubmitNodeConfigData;
typedef struct _XmppXepPubsubModuleChangeNodeConfigData XmppXepPubsubModuleChangeNodeConfigData;
typedef struct _XmppXepPubsubParamSpecPublishOptions XmppXepPubsubParamSpecPublishOptions;
typedef struct _XmppXepPubsubParamSpecItemListenerDelegate XmppXepPubsubParamSpecItemListenerDelegate;
typedef struct _XmppXepPubsubParamSpecRetractListenerDelegate XmppXepPubsubParamSpecRetractListenerDelegate;
typedef struct _XmppXepPubsubParamSpecDeleteListenerDelegate XmppXepPubsubParamSpecDeleteListenerDelegate;

struct _XmppXepPubsubModulePrivate {
	GeeHashMap* item_listeners;
	GeeHashMap* retract_listeners;
	GeeHashMap* delete_listeners;
};

struct _XmppXepPubsubModuleRequestAllData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepPubsubModule* self;
	XmppXmppStream* stream;
	XmppJid* jid;
	gchar* node;
	GeeList* result;
	XmppIqStanza* request_iq;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppIqStanza* _tmp10_;
	XmppIqStanza* _tmp11_;
	XmppIqStanza* _tmp12_;
	XmppIqStanza* iq_res;
	XmppModuleIdentity* _tmp13_;
	gpointer _tmp14_;
	XmppIqModule* _tmp15_;
	XmppIqStanza* _tmp16_;
	XmppIqStanza* _tmp17_;
	XmppIqStanza* _tmp18_;
	XmppStanzaNode* event_node;
	XmppIqStanza* _tmp19_;
	XmppStanzaNode* _tmp20_;
	XmppStanzaNode* _tmp21_;
	XmppStanzaNode* _tmp22_;
	XmppStanzaNode* items_node;
	XmppStanzaNode* _tmp23_;
	XmppStanzaNode* _tmp24_;
	XmppStanzaNode* _tmp25_;
	XmppStanzaNode* _tmp26_;
	GeeList* _tmp27_;
	GError* _inner_error0_;
};

struct _Block7Data {
	int _ref_count_;
	XmppXepPubsubModule* self;
	XmppXepPubsubModuleOnResult listener;
	gpointer listener_target;
	GDestroyNotify listener_target_destroy_notify;
};

struct _XmppXepPubsubModulePublishData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepPubsubModule* self;
	XmppXmppStream* stream;
	XmppJid* jid;
	gchar* node_id;
	gchar* item_id;
	XmppStanzaNode* content;
	XmppXepPubsubPublishOptions* publish_options;
	gboolean try_reconfiguring;
	gboolean result;
	XmppStanzaNode* pubsub_node;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* publish_node;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppStanzaNode* _tmp10_;
	XmppStanzaNode* _tmp11_;
	XmppStanzaNode* items_node;
	XmppStanzaNode* _tmp12_;
	XmppStanzaNode* _tmp13_;
	XmppStanzaNode* _tmp14_;
	XmppStanzaNode* _tmp15_;
	XmppStanzaNode* _tmp16_;
	XmppStanzaNode* _tmp17_;
	XmppStanzaNode* _tmp18_;
	XmppStanzaNode* _tmp19_;
	XmppStanzaNode* _tmp20_;
	XmppStanzaNode* _tmp21_;
	XmppStanzaNode* _tmp22_;
	XmppStanzaNode* publish_options_node;
	XmppStanzaNode* _tmp23_;
	XmppStanzaNode* _tmp24_;
	XmppStanzaNode* _tmp25_;
	XmppStanzaNode* _tmp26_;
	XmppStanzaNode* _tmp27_;
	XmppXepDataFormsDataForm* data_form;
	XmppXepDataFormsDataForm* _tmp28_;
	XmppXepDataFormsDataFormHiddenField* form_type_field;
	gchar* _tmp29_;
	XmppXepDataFormsDataFormHiddenField* _tmp30_;
	XmppXepDataFormsDataFormHiddenField* _tmp31_;
	XmppXepDataFormsDataForm* _tmp32_;
	XmppXepDataFormsDataFormHiddenField* _tmp33_;
	GeeIterator* _field_name_it;
	GeeHashMap* _tmp34_;
	GeeSet* _tmp35_;
	GeeSet* _tmp36_;
	GeeSet* _tmp37_;
	GeeIterator* _tmp38_;
	GeeIterator* _tmp39_;
	GeeIterator* _tmp40_;
	gchar* field_name;
	GeeIterator* _tmp41_;
	gpointer _tmp42_;
	XmppXepDataFormsDataFormField* field;
	const gchar* _tmp43_;
	gchar* _tmp44_;
	XmppXepDataFormsDataFormField* _tmp45_;
	XmppXepDataFormsDataFormField* _tmp46_;
	GeeHashMap* _tmp47_;
	const gchar* _tmp48_;
	gpointer _tmp49_;
	gchar* _tmp50_;
	XmppXepDataFormsDataForm* _tmp51_;
	XmppXepDataFormsDataFormField* _tmp52_;
	XmppStanzaNode* _tmp53_;
	XmppXepDataFormsDataForm* _tmp54_;
	XmppStanzaNode* _tmp55_;
	XmppStanzaNode* _tmp56_;
	XmppStanzaNode* _tmp57_;
	XmppStanzaNode* _tmp58_;
	XmppIqStanza* iq;
	XmppStanzaNode* _tmp59_;
	XmppIqStanza* _tmp60_;
	XmppIqStanza* iq_result;
	XmppModuleIdentity* _tmp61_;
	gpointer _tmp62_;
	XmppIqModule* _tmp63_;
	XmppIqStanza* _tmp64_;
	XmppIqStanza* _tmp65_;
	XmppIqStanza* _tmp66_;
	XmppIqStanza* _tmp67_;
	gboolean _tmp68_;
	gboolean precondition_not_met;
	XmppIqStanza* _tmp69_;
	XmppErrorStanza* _tmp70_;
	XmppErrorStanza* _tmp71_;
	XmppStanzaNode* _tmp72_;
	XmppStanzaNode* _tmp73_;
	XmppStanzaNode* _tmp74_;
	gboolean _tmp75_;
	gboolean success;
	GError* _inner_error0_;
};

struct _Block8Data {
	int _ref_count_;
	XmppXepPubsubModule* self;
	gboolean ok;
	gpointer _async_data_;
};

struct _XmppXepPubsubModuleRetractItemData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepPubsubModule* self;
	XmppXmppStream* stream;
	XmppJid* jid;
	gchar* node_id;
	gchar* item_id;
	gboolean result;
	Block8Data* _data8_;
	XmppStanzaNode* pubsub_node;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	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_;
	XmppStanzaNode* _tmp16_;
	XmppStanzaNode* _tmp17_;
	XmppIqStanza* iq;
	XmppIqStanza* _tmp18_;
	XmppModuleIdentity* _tmp19_;
	gpointer _tmp20_;
	XmppIqModule* _tmp21_;
};

struct _XmppXepPubsubModuleRequestNodeConfigData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepPubsubModule* self;
	XmppXmppStream* stream;
	XmppJid* jid;
	gchar* node_id;
	XmppXepDataFormsDataForm* result;
	XmppStanzaNode* pubsub_node;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* publish_node;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppIqStanza* iq;
	XmppIqStanza* _tmp10_;
	XmppIqStanza* result_iq;
	XmppModuleIdentity* _tmp11_;
	gpointer _tmp12_;
	XmppIqModule* _tmp13_;
	XmppIqStanza* _tmp14_;
	XmppIqStanza* _tmp15_;
	XmppStanzaNode* data_form_node;
	XmppStanzaNode* _tmp16_;
	XmppStanzaNode* _tmp17_;
	XmppStanzaNode* _tmp18_;
	XmppStanzaNode* _tmp19_;
	XmppXepDataFormsDataForm* _tmp20_;
	GError* _inner_error0_;
};

struct _XmppXepPubsubModuleSubmitNodeConfigData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepPubsubModule* self;
	XmppXmppStream* stream;
	XmppXepDataFormsDataForm* data_form;
	gchar* node_id;
	gboolean result;
	XmppStanzaNode* submit_node;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* pubsub_node;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* publish_node;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppStanzaNode* _tmp10_;
	XmppStanzaNode* _tmp11_;
	XmppStanzaNode* _tmp12_;
	XmppIqStanza* iq;
	XmppIqStanza* _tmp13_;
	XmppIqStanza* iq_result;
	XmppModuleIdentity* _tmp14_;
	gpointer _tmp15_;
	XmppIqModule* _tmp16_;
	XmppIqStanza* _tmp17_;
	XmppIqStanza* _tmp18_;
	GError* _inner_error0_;
};

struct _XmppXepPubsubModuleChangeNodeConfigData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppXepPubsubModule* self;
	XmppXmppStream* stream;
	XmppJid* jid;
	gchar* node;
	XmppXepPubsubPublishOptions* publish_options;
	gboolean result;
	XmppXepDataFormsDataForm* data_form;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepPubsubModule* _tmp2_;
	XmppXepDataFormsDataForm* _tmp3_;
	XmppXepDataFormsDataForm* _tmp4_;
	XmppXepDataFormsDataForm* _tmp5_;
	GeeList* _field_list;
	XmppXepDataFormsDataForm* _tmp6_;
	GeeList* _tmp7_;
	gint _field_size;
	GeeList* _tmp8_;
	gint _tmp9_;
	gint _tmp10_;
	gint _field_index;
	gint _tmp11_;
	gint _tmp12_;
	XmppXepDataFormsDataFormField* field;
	GeeList* _tmp13_;
	gpointer _tmp14_;
	gboolean _tmp15_;
	GeeHashMap* _tmp16_;
	XmppXepDataFormsDataFormField* _tmp17_;
	const gchar* _tmp18_;
	const gchar* _tmp19_;
	GeeHashMap* _tmp20_;
	XmppXepDataFormsDataFormField* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	gpointer _tmp24_;
	gchar* _tmp25_;
	XmppXepDataFormsDataFormField* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	XmppXepDataFormsDataFormField* _tmp29_;
	GeeHashMap* _tmp30_;
	XmppXepDataFormsDataFormField* _tmp31_;
	const gchar* _tmp32_;
	const gchar* _tmp33_;
	gpointer _tmp34_;
	gchar* _tmp35_;
	XmppModuleIdentity* _tmp36_;
	gpointer _tmp37_;
	XmppXepPubsubModule* _tmp38_;
	XmppXepDataFormsDataForm* _tmp39_;
	gboolean _tmp40_;
};

struct _XmppXepPubsubParamSpecPublishOptions {
	GParamSpec parent_instance;
};

struct _XmppXepPubsubItemListenerDelegatePrivate {
	XmppXepPubsubItemListenerDelegateResultFunc _on_result;
	gpointer _on_result_target;
	GDestroyNotify _on_result_target_destroy_notify;
};

struct _XmppXepPubsubParamSpecItemListenerDelegate {
	GParamSpec parent_instance;
};

struct _XmppXepPubsubRetractListenerDelegatePrivate {
	XmppXepPubsubRetractListenerDelegateResultFunc _on_result;
	gpointer _on_result_target;
	GDestroyNotify _on_result_target_destroy_notify;
};

struct _XmppXepPubsubParamSpecRetractListenerDelegate {
	GParamSpec parent_instance;
};

struct _XmppXepPubsubDeleteListenerDelegatePrivate {
	XmppXepPubsubDeleteListenerDelegateResultFunc _on_result;
	gpointer _on_result_target;
	GDestroyNotify _on_result_target_destroy_notify;
};

struct _XmppXepPubsubParamSpecDeleteListenerDelegate {
	GParamSpec parent_instance;
};

static gint XmppXepPubsubModule_private_offset;
static gpointer xmpp_xep_pubsub_module_parent_class = NULL;
XmppModuleIdentity* xmpp_xep_pubsub_module_IDENTITY = NULL;
static gpointer xmpp_xep_pubsub_publish_options_parent_class = NULL;
static gint XmppXepPubsubItemListenerDelegate_private_offset;
static gpointer xmpp_xep_pubsub_item_listener_delegate_parent_class = NULL;
static gint XmppXepPubsubRetractListenerDelegate_private_offset;
static gpointer xmpp_xep_pubsub_retract_listener_delegate_parent_class = NULL;
static gint XmppXepPubsubDeleteListenerDelegate_private_offset;
static gpointer xmpp_xep_pubsub_delete_listener_delegate_parent_class = NULL;

static void xmpp_xep_pubsub_module_request_all_data_free (gpointer _data);
static gboolean xmpp_xep_pubsub_module_request_all_co (XmppXepPubsubModuleRequestAllData* _data_);
static void xmpp_xep_pubsub_module_request_all_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_);
static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
static void __lambda14_ (Block7Data* _data7_,
                  XmppXmppStream* stream,
                  XmppIqStanza* iq);
static void ___lambda14__xmpp_iq_module_on_result (XmppXmppStream* stream,
                                            XmppIqStanza* iq,
                                            gpointer self);
static void xmpp_xep_pubsub_module_publish_data_free (gpointer _data);
static gboolean xmpp_xep_pubsub_module_publish_co (XmppXepPubsubModulePublishData* _data_);
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_pubsub_module_publish_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_);
static void xmpp_xep_pubsub_module_change_node_config (XmppXepPubsubModule* self,
                                                XmppXmppStream* stream,
                                                XmppJid* jid,
                                                const gchar* node,
                                                XmppXepPubsubPublishOptions* publish_options,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
static gboolean xmpp_xep_pubsub_module_change_node_config_finish (XmppXepPubsubModule* self,
                                                           GAsyncResult* _res_);
static void xmpp_xep_pubsub_module_retract_item_data_free (gpointer _data);
static gboolean xmpp_xep_pubsub_module_retract_item_co (XmppXepPubsubModuleRetractItemData* _data_);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
static void __lambda15_ (Block8Data* _data8_,
                  XmppXmppStream* stream,
                  XmppIqStanza* result_iq);
static gboolean _xmpp_xep_pubsub_module_retract_item_co_gsource_func (gpointer self);
static void ___lambda15__xmpp_iq_module_on_result (XmppXmppStream* stream,
                                            XmppIqStanza* iq,
                                            gpointer self);
static void xmpp_xep_pubsub_module_request_node_config_data_free (gpointer _data);
static gboolean xmpp_xep_pubsub_module_request_node_config_co (XmppXepPubsubModuleRequestNodeConfigData* _data_);
static void xmpp_xep_pubsub_module_request_node_config_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_);
static void xmpp_xep_pubsub_module_submit_node_config_data_free (gpointer _data);
static gboolean xmpp_xep_pubsub_module_submit_node_config_co (XmppXepPubsubModuleSubmitNodeConfigData* _data_);
static void xmpp_xep_pubsub_module_submit_node_config_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
static void xmpp_xep_pubsub_module_real_attach (XmppXmppStreamModule* base,
                                         XmppXmppStream* stream);
static void xmpp_xep_pubsub_module_on_received_message (XmppXepPubsubModule* self,
                                                 XmppXmppStream* stream,
                                                 XmppMessageStanza* message);
static void _xmpp_xep_pubsub_module_on_received_message_xmpp_message_module_received_message (XmppMessageModule* _sender,
                                                                                       XmppXmppStream* stream,
                                                                                       XmppMessageStanza* message,
                                                                                       gpointer self);
static void xmpp_xep_pubsub_module_real_detach (XmppXmppStreamModule* base,
                                         XmppXmppStream* stream);
static gchar* xmpp_xep_pubsub_module_real_get_ns (XmppXmppStreamModule* base);
static gchar* xmpp_xep_pubsub_module_real_get_id (XmppXmppStreamModule* base);
static void xmpp_xep_pubsub_module_change_node_config_data_free (gpointer _data);
static gboolean xmpp_xep_pubsub_module_change_node_config_co (XmppXepPubsubModuleChangeNodeConfigData* _data_);
static void xmpp_xep_pubsub_module_change_node_config_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
static void xmpp_xep_pubsub_module_finalize (GObject * obj);
static GType xmpp_xep_pubsub_module_get_type_once (void);
static void xmpp_xep_pubsub_publish_options_finalize (XmppXepPubsubPublishOptions * obj);
static GType xmpp_xep_pubsub_publish_options_get_type_once (void);
static void xmpp_xep_pubsub_item_listener_delegate_set_on_result (XmppXepPubsubItemListenerDelegate* self,
                                                           XmppXepPubsubItemListenerDelegateResultFunc value,
                                                           gpointer value_target,
                                                           GDestroyNotify value_target_destroy_notify);
static void xmpp_xep_pubsub_item_listener_delegate_finalize (XmppXepPubsubItemListenerDelegate * obj);
static GType xmpp_xep_pubsub_item_listener_delegate_get_type_once (void);
static void xmpp_xep_pubsub_retract_listener_delegate_set_on_result (XmppXepPubsubRetractListenerDelegate* self,
                                                              XmppXepPubsubRetractListenerDelegateResultFunc value,
                                                              gpointer value_target,
                                                              GDestroyNotify value_target_destroy_notify);
static void xmpp_xep_pubsub_retract_listener_delegate_finalize (XmppXepPubsubRetractListenerDelegate * obj);
static GType xmpp_xep_pubsub_retract_listener_delegate_get_type_once (void);
static void xmpp_xep_pubsub_delete_listener_delegate_set_on_result (XmppXepPubsubDeleteListenerDelegate* self,
                                                             XmppXepPubsubDeleteListenerDelegateResultFunc value,
                                                             gpointer value_target,
                                                             GDestroyNotify value_target_destroy_notify);
static void xmpp_xep_pubsub_delete_listener_delegate_finalize (XmppXepPubsubDeleteListenerDelegate * obj);
static GType xmpp_xep_pubsub_delete_listener_delegate_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
xmpp_xep_pubsub_module_get_instance_private (XmppXepPubsubModule* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepPubsubModule_private_offset);
}

void
xmpp_xep_pubsub_module_add_filtered_notification (XmppXepPubsubModule* self,
                                                  XmppXmppStream* stream,
                                                  const gchar* node,
                                                  XmppXepPubsubItemListenerDelegateResultFunc item_listener,
                                                  gpointer item_listener_target,
                                                  GDestroyNotify item_listener_target_destroy_notify,
                                                  XmppXepPubsubRetractListenerDelegateResultFunc retract_listener,
                                                  gpointer retract_listener_target,
                                                  GDestroyNotify retract_listener_target_destroy_notify,
                                                  XmppXepPubsubDeleteListenerDelegateResultFunc delete_listener,
                                                  gpointer delete_listener_target,
                                                  GDestroyNotify delete_listener_target_destroy_notify)
{
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepServiceDiscoveryModule* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (XmppXepServiceDiscoveryModule*) _tmp1_;
	xmpp_xep_service_discovery_module_add_feature_notify (_tmp2_, stream, node);
	_g_object_unref0 (_tmp2_);
	if (item_listener != NULL) {
		GeeHashMap* _tmp3_;
		XmppXepPubsubItemListenerDelegateResultFunc _tmp4_;
		gpointer _tmp4__target;
		GDestroyNotify _tmp4__target_destroy_notify;
		XmppXepPubsubItemListenerDelegate* _tmp5_;
		XmppXepPubsubItemListenerDelegate* _tmp6_;
		_tmp3_ = self->priv->item_listeners;
		_tmp4_ = item_listener;
		_tmp4__target = item_listener_target;
		_tmp4__target_destroy_notify = item_listener_target_destroy_notify;
		item_listener = NULL;
		item_listener_target = NULL;
		item_listener_target_destroy_notify = NULL;
		_tmp5_ = xmpp_xep_pubsub_item_listener_delegate_new (_tmp4_, _tmp4__target, _tmp4__target_destroy_notify);
		_tmp6_ = _tmp5_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, node, _tmp6_);
		_xmpp_xep_pubsub_item_listener_delegate_unref0 (_tmp6_);
	}
	if (retract_listener != NULL) {
		GeeHashMap* _tmp7_;
		XmppXepPubsubRetractListenerDelegateResultFunc _tmp8_;
		gpointer _tmp8__target;
		GDestroyNotify _tmp8__target_destroy_notify;
		XmppXepPubsubRetractListenerDelegate* _tmp9_;
		XmppXepPubsubRetractListenerDelegate* _tmp10_;
		_tmp7_ = self->priv->retract_listeners;
		_tmp8_ = retract_listener;
		_tmp8__target = retract_listener_target;
		_tmp8__target_destroy_notify = retract_listener_target_destroy_notify;
		retract_listener = NULL;
		retract_listener_target = NULL;
		retract_listener_target_destroy_notify = NULL;
		_tmp9_ = xmpp_xep_pubsub_retract_listener_delegate_new (_tmp8_, _tmp8__target, _tmp8__target_destroy_notify);
		_tmp10_ = _tmp9_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, node, _tmp10_);
		_xmpp_xep_pubsub_retract_listener_delegate_unref0 (_tmp10_);
	}
	if (delete_listener != NULL) {
		GeeHashMap* _tmp11_;
		XmppXepPubsubDeleteListenerDelegateResultFunc _tmp12_;
		gpointer _tmp12__target;
		GDestroyNotify _tmp12__target_destroy_notify;
		XmppXepPubsubDeleteListenerDelegate* _tmp13_;
		XmppXepPubsubDeleteListenerDelegate* _tmp14_;
		_tmp11_ = self->priv->delete_listeners;
		_tmp12_ = delete_listener;
		_tmp12__target = delete_listener_target;
		_tmp12__target_destroy_notify = delete_listener_target_destroy_notify;
		delete_listener = NULL;
		delete_listener_target = NULL;
		delete_listener_target_destroy_notify = NULL;
		_tmp13_ = xmpp_xep_pubsub_delete_listener_delegate_new (_tmp12_, _tmp12__target, _tmp12__target_destroy_notify);
		_tmp14_ = _tmp13_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp11_, node, _tmp14_);
		_xmpp_xep_pubsub_delete_listener_delegate_unref0 (_tmp14_);
	}
	(item_listener_target_destroy_notify == NULL) ? NULL : (item_listener_target_destroy_notify (item_listener_target), NULL);
	item_listener = NULL;
	item_listener_target = NULL;
	item_listener_target_destroy_notify = NULL;
	(retract_listener_target_destroy_notify == NULL) ? NULL : (retract_listener_target_destroy_notify (retract_listener_target), NULL);
	retract_listener = NULL;
	retract_listener_target = NULL;
	retract_listener_target_destroy_notify = NULL;
	(delete_listener_target_destroy_notify == NULL) ? NULL : (delete_listener_target_destroy_notify (delete_listener_target), NULL);
	delete_listener = NULL;
	delete_listener_target = NULL;
	delete_listener_target_destroy_notify = NULL;
}

void
xmpp_xep_pubsub_module_remove_filtered_notification (XmppXepPubsubModule* self,
                                                     XmppXmppStream* stream,
                                                     const gchar* node)
{
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppXepServiceDiscoveryModule* _tmp2_;
	GeeHashMap* _tmp3_;
	GeeHashMap* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = xmpp_xep_service_discovery_module_IDENTITY;
	_tmp1_ = xmpp_xmpp_stream_get_module (stream, XMPP_XEP_SERVICE_DISCOVERY_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (XmppXepServiceDiscoveryModule*) _tmp1_;
	xmpp_xep_service_discovery_module_remove_feature_notify (_tmp2_, stream, node);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = self->priv->item_listeners;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp3_, node, NULL);
	_tmp4_ = self->priv->retract_listeners;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp4_, node, NULL);
}

static void
xmpp_xep_pubsub_module_request_all_data_free (gpointer _data)
{
	XmppXepPubsubModuleRequestAllData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->jid);
	_g_free0 (_data_->node);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepPubsubModuleRequestAllData, _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;
}

void
xmpp_xep_pubsub_module_request_all (XmppXepPubsubModule* self,
                                    XmppXmppStream* stream,
                                    XmppJid* jid,
                                    const gchar* node,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	XmppXepPubsubModuleRequestAllData* _data_;
	XmppXepPubsubModule* _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 (node != NULL);
	_data_ = g_slice_new0 (XmppXepPubsubModuleRequestAllData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_pubsub_module_request_all_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 (node);
	_g_free0 (_data_->node);
	_data_->node = _tmp3_;
	xmpp_xep_pubsub_module_request_all_co (_data_);
}

GeeList*
xmpp_xep_pubsub_module_request_all_finish (XmppXepPubsubModule* self,
                                           GAsyncResult* _res_)
{
	GeeList* result;
	XmppXepPubsubModuleRequestAllData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
xmpp_xep_pubsub_module_request_all_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_)
{
	XmppXepPubsubModuleRequestAllData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_pubsub_module_request_all_co (_data_);
}

static gboolean
xmpp_xep_pubsub_module_request_all_co (XmppXepPubsubModuleRequestAllData* _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 ("pubsub", XMPP_XEP_PUBSUB_NS_URI, 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 ("items", XMPP_XEP_PUBSUB_NS_URI, NULL, NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = xmpp_stanza_node_put_attribute (_data_->_tmp5_, "node", _data_->node, NULL);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = xmpp_stanza_node_put_node (_data_->_tmp3_, _data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = xmpp_iq_stanza_new_get (_data_->_tmp9_, NULL);
	_data_->_tmp11_ = _data_->_tmp10_;
	_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_->request_iq = _data_->_tmp11_;
	_data_->_tmp12_ = _data_->request_iq;
	xmpp_stanza_set_to ((XmppStanza*) _data_->_tmp12_, _data_->jid);
	_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_->request_iq;
	_data_->_state_ = 1;
	xmpp_iq_module_send_iq_async (_data_->_tmp15_, _data_->stream, _data_->_tmp16_, G_PRIORITY_DEFAULT, NULL, xmpp_xep_pubsub_module_request_all_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_res = _data_->_tmp18_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->request_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_res;
	_data_->_tmp20_ = ((XmppStanza*) _data_->_tmp19_)->stanza;
	_data_->_tmp21_ = xmpp_stanza_node_get_subnode (_data_->_tmp20_, "pubsub", XMPP_XEP_PUBSUB_NS_URI, FALSE);
	_data_->event_node = _data_->_tmp21_;
	_data_->_tmp22_ = _data_->event_node;
	if (_data_->_tmp22_ == NULL) {
		_data_->result = NULL;
		_xmpp_stanza_entry_unref0 (_data_->event_node);
		_g_object_unref0 (_data_->iq_res);
		_g_object_unref0 (_data_->request_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_->_tmp23_ = _data_->event_node;
	_data_->_tmp24_ = xmpp_stanza_node_get_subnode (_data_->_tmp23_, "items", XMPP_XEP_PUBSUB_NS_URI, FALSE);
	_data_->items_node = _data_->_tmp24_;
	_data_->_tmp25_ = _data_->items_node;
	if (_data_->_tmp25_ == NULL) {
		_data_->result = NULL;
		_xmpp_stanza_entry_unref0 (_data_->items_node);
		_xmpp_stanza_entry_unref0 (_data_->event_node);
		_g_object_unref0 (_data_->iq_res);
		_g_object_unref0 (_data_->request_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_->_tmp26_ = _data_->items_node;
	_data_->_tmp27_ = xmpp_stanza_node_get_subnodes (_data_->_tmp26_, "item", XMPP_XEP_PUBSUB_NS_URI, FALSE);
	_data_->result = _data_->_tmp27_;
	_xmpp_stanza_entry_unref0 (_data_->items_node);
	_xmpp_stanza_entry_unref0 (_data_->event_node);
	_g_object_unref0 (_data_->iq_res);
	_g_object_unref0 (_data_->request_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 Block7Data*
block7_data_ref (Block7Data* _data7_)
{
	g_atomic_int_inc (&_data7_->_ref_count_);
	return _data7_;
}

static void
block7_data_unref (void * _userdata_)
{
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		XmppXepPubsubModule* self;
		self = _data7_->self;
		(_data7_->listener_target_destroy_notify == NULL) ? NULL : (_data7_->listener_target_destroy_notify (_data7_->listener_target), NULL);
		_data7_->listener = NULL;
		_data7_->listener_target = NULL;
		_data7_->listener_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block7Data, _data7_);
	}
}

static void
__lambda14_ (Block7Data* _data7_,
             XmppXmppStream* stream,
             XmppIqStanza* iq)
{
	XmppXepPubsubModule* self;
	XmppStanzaNode* event_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_ = NULL;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* items_node = NULL;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_ = NULL;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* item_node = NULL;
	XmppStanzaNode* _tmp11_;
	const gchar* _tmp12_ = NULL;
	XmppStanzaNode* _tmp13_;
	gchar* id = NULL;
	gchar* _tmp16_;
	XmppStanzaNode* _tmp17_ = NULL;
	XmppStanzaNode* _tmp18_;
	XmppJid* _tmp22_;
	XmppJid* _tmp23_;
	XmppJid* _tmp24_;
	const gchar* _tmp25_;
	self = _data7_->self;
	g_return_if_fail (stream != NULL);
	g_return_if_fail (iq != NULL);
	_tmp0_ = ((XmppStanza*) iq)->stanza;
	_tmp1_ = xmpp_stanza_node_get_subnode (_tmp0_, "pubsub", XMPP_XEP_PUBSUB_NS_URI, FALSE);
	event_node = _tmp1_;
	_tmp3_ = event_node;
	if (_tmp3_ != NULL) {
		XmppStanzaNode* _tmp4_;
		XmppStanzaNode* _tmp5_;
		_tmp4_ = event_node;
		_tmp5_ = xmpp_stanza_node_get_subnode (_tmp4_, "items", XMPP_XEP_PUBSUB_NS_URI, FALSE);
		_xmpp_stanza_entry_unref0 (_tmp2_);
		_tmp2_ = _tmp5_;
	} else {
		_xmpp_stanza_entry_unref0 (_tmp2_);
		_tmp2_ = NULL;
	}
	_tmp6_ = _tmp2_;
	_tmp2_ = NULL;
	items_node = _tmp6_;
	_tmp8_ = items_node;
	if (_tmp8_ != NULL) {
		XmppStanzaNode* _tmp9_;
		XmppStanzaNode* _tmp10_;
		_tmp9_ = items_node;
		_tmp10_ = xmpp_stanza_node_get_subnode (_tmp9_, "item", XMPP_XEP_PUBSUB_NS_URI, FALSE);
		_xmpp_stanza_entry_unref0 (_tmp7_);
		_tmp7_ = _tmp10_;
	} else {
		_xmpp_stanza_entry_unref0 (_tmp7_);
		_tmp7_ = NULL;
	}
	_tmp11_ = _tmp7_;
	_tmp7_ = NULL;
	item_node = _tmp11_;
	_tmp13_ = item_node;
	if (_tmp13_ != NULL) {
		XmppStanzaNode* _tmp14_;
		const gchar* _tmp15_;
		_tmp14_ = item_node;
		_tmp15_ = xmpp_stanza_node_get_attribute (_tmp14_, "id", XMPP_XEP_PUBSUB_NS_URI);
		_tmp12_ = _tmp15_;
	} else {
		_tmp12_ = NULL;
	}
	_tmp16_ = g_strdup (_tmp12_);
	id = _tmp16_;
	_tmp18_ = item_node;
	if (_tmp18_ != NULL) {
		XmppStanzaNode* _tmp19_;
		GeeList* _tmp20_;
		gpointer _tmp21_;
		_tmp19_ = item_node;
		_tmp20_ = _tmp19_->sub_nodes;
		_tmp21_ = gee_list_get (_tmp20_, 0);
		_xmpp_stanza_entry_unref0 (_tmp17_);
		_tmp17_ = (XmppStanzaNode*) _tmp21_;
	} else {
		_xmpp_stanza_entry_unref0 (_tmp17_);
		_tmp17_ = NULL;
	}
	_tmp22_ = xmpp_stanza_get_from ((XmppStanza*) iq);
	_tmp23_ = _tmp22_;
	_tmp24_ = _tmp23_;
	_tmp25_ = id;
	_data7_->listener (stream, _tmp24_, _tmp25_, _tmp17_, _data7_->listener_target);
	_xmpp_jid_unref0 (_tmp24_);
	_xmpp_stanza_entry_unref0 (_tmp17_);
	_g_free0 (id);
	_xmpp_stanza_entry_unref0 (item_node);
	_xmpp_stanza_entry_unref0 (_tmp7_);
	_xmpp_stanza_entry_unref0 (items_node);
	_xmpp_stanza_entry_unref0 (_tmp2_);
	_xmpp_stanza_entry_unref0 (event_node);
}

static void
___lambda14__xmpp_iq_module_on_result (XmppXmppStream* stream,
                                       XmppIqStanza* iq,
                                       gpointer self)
{
	__lambda14_ (self, stream, iq);
}

void
xmpp_xep_pubsub_module_request (XmppXepPubsubModule* self,
                                XmppXmppStream* stream,
                                XmppJid* jid,
                                const gchar* node,
                                XmppXepPubsubModuleOnResult listener,
                                gpointer listener_target,
                                GDestroyNotify listener_target_destroy_notify)
{
	Block7Data* _data7_;
	XmppIqStanza* request_iq = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppIqStanza* _tmp10_;
	XmppIqStanza* _tmp11_;
	XmppModuleIdentity* _tmp12_;
	gpointer _tmp13_;
	XmppIqModule* _tmp14_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (node != NULL);
	_data7_ = g_slice_new0 (Block7Data);
	_data7_->_ref_count_ = 1;
	_data7_->self = g_object_ref (self);
	(_data7_->listener_target_destroy_notify == NULL) ? NULL : (_data7_->listener_target_destroy_notify (_data7_->listener_target), NULL);
	_data7_->listener = NULL;
	_data7_->listener_target = NULL;
	_data7_->listener_target_destroy_notify = NULL;
	_data7_->listener = listener;
	_data7_->listener_target = listener_target;
	_data7_->listener_target_destroy_notify = listener_target_destroy_notify;
	_tmp0_ = xmpp_stanza_node_new_build ("pubsub", XMPP_XEP_PUBSUB_NS_URI, NULL, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = xmpp_stanza_node_add_self_xmlns (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = xmpp_stanza_node_new_build ("items", XMPP_XEP_PUBSUB_NS_URI, NULL, NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = xmpp_stanza_node_put_attribute (_tmp5_, "node", node, NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = xmpp_stanza_node_put_node (_tmp3_, _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = xmpp_iq_stanza_new_get (_tmp9_, NULL);
	_tmp11_ = _tmp10_;
	_xmpp_stanza_entry_unref0 (_tmp9_);
	_xmpp_stanza_entry_unref0 (_tmp7_);
	_xmpp_stanza_entry_unref0 (_tmp5_);
	_xmpp_stanza_entry_unref0 (_tmp3_);
	_xmpp_stanza_entry_unref0 (_tmp1_);
	request_iq = _tmp11_;
	xmpp_stanza_set_to ((XmppStanza*) request_iq, jid);
	_tmp12_ = xmpp_iq_module_IDENTITY;
	_tmp13_ = xmpp_xmpp_stream_get_module (stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp12_);
	_tmp14_ = (XmppIqModule*) _tmp13_;
	xmpp_iq_module_send_iq (_tmp14_, stream, request_iq, ___lambda14__xmpp_iq_module_on_result, block7_data_ref (_data7_), block7_data_unref, G_PRIORITY_DEFAULT);
	_g_object_unref0 (_tmp14_);
	_g_object_unref0 (request_iq);
	block7_data_unref (_data7_);
	_data7_ = NULL;
}

static void
xmpp_xep_pubsub_module_publish_data_free (gpointer _data)
{
	XmppXepPubsubModulePublishData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->jid);
	_g_free0 (_data_->node_id);
	_g_free0 (_data_->item_id);
	_xmpp_stanza_entry_unref0 (_data_->content);
	_xmpp_xep_pubsub_publish_options_unref0 (_data_->publish_options);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepPubsubModulePublishData, _data_);
}

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

static gpointer
_xmpp_xep_pubsub_publish_options_ref0 (gpointer self)
{
	return self ? xmpp_xep_pubsub_publish_options_ref (self) : NULL;
}

void
xmpp_xep_pubsub_module_publish (XmppXepPubsubModule* self,
                                XmppXmppStream* stream,
                                XmppJid* jid,
                                const gchar* node_id,
                                const gchar* item_id,
                                XmppStanzaNode* content,
                                XmppXepPubsubPublishOptions* publish_options,
                                gboolean try_reconfiguring,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_)
{
	XmppXepPubsubModulePublishData* _data_;
	XmppXepPubsubModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppXepPubsubPublishOptions* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (node_id != NULL);
	g_return_if_fail (content != NULL);
	_data_ = g_slice_new0 (XmppXepPubsubModulePublishData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_pubsub_module_publish_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 (node_id);
	_g_free0 (_data_->node_id);
	_data_->node_id = _tmp3_;
	_tmp4_ = g_strdup (item_id);
	_g_free0 (_data_->item_id);
	_data_->item_id = _tmp4_;
	_tmp5_ = _xmpp_stanza_entry_ref0 (content);
	_xmpp_stanza_entry_unref0 (_data_->content);
	_data_->content = _tmp5_;
	_tmp6_ = _xmpp_xep_pubsub_publish_options_ref0 (publish_options);
	_xmpp_xep_pubsub_publish_options_unref0 (_data_->publish_options);
	_data_->publish_options = _tmp6_;
	_data_->try_reconfiguring = try_reconfiguring;
	xmpp_xep_pubsub_module_publish_co (_data_);
}

gboolean
xmpp_xep_pubsub_module_publish_finish (XmppXepPubsubModule* self,
                                       GAsyncResult* _res_)
{
	gboolean result;
	XmppXepPubsubModulePublishData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
xmpp_xep_pubsub_module_publish_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_)
{
	XmppXepPubsubModulePublishData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_pubsub_module_publish_co (_data_);
}

static gboolean
xmpp_xep_pubsub_module_publish_co (XmppXepPubsubModulePublishData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = xmpp_stanza_node_new_build ("pubsub", XMPP_XEP_PUBSUB_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_->pubsub_node = _data_->_tmp3_;
	_data_->_tmp4_ = xmpp_stanza_node_new_build ("publish", XMPP_XEP_PUBSUB_NS_URI, NULL, NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = xmpp_stanza_node_put_attribute (_data_->_tmp5_, "node", _data_->node_id, NULL);
	_data_->_tmp7_ = _data_->_tmp6_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp5_);
	_data_->publish_node = _data_->_tmp7_;
	_data_->_tmp8_ = _data_->pubsub_node;
	_data_->_tmp9_ = _data_->publish_node;
	_data_->_tmp10_ = xmpp_stanza_node_put_node (_data_->_tmp8_, _data_->_tmp9_);
	_data_->_tmp11_ = _data_->_tmp10_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp11_);
	_data_->_tmp12_ = xmpp_stanza_node_new_build ("item", XMPP_XEP_PUBSUB_NS_URI, NULL, NULL);
	_data_->items_node = _data_->_tmp12_;
	if (_data_->item_id != NULL) {
		_data_->_tmp13_ = _data_->items_node;
		_data_->_tmp14_ = xmpp_stanza_node_put_attribute (_data_->_tmp13_, "id", _data_->item_id, NULL);
		_data_->_tmp15_ = _data_->_tmp14_;
		_xmpp_stanza_entry_unref0 (_data_->_tmp15_);
	}
	_data_->_tmp16_ = _data_->items_node;
	_data_->_tmp17_ = xmpp_stanza_node_put_node (_data_->_tmp16_, _data_->content);
	_data_->_tmp18_ = _data_->_tmp17_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp18_);
	_data_->_tmp19_ = _data_->publish_node;
	_data_->_tmp20_ = _data_->items_node;
	_data_->_tmp21_ = xmpp_stanza_node_put_node (_data_->_tmp19_, _data_->_tmp20_);
	_data_->_tmp22_ = _data_->_tmp21_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp22_);
	if (_data_->publish_options != NULL) {
		_data_->_tmp23_ = xmpp_stanza_node_new_build ("publish-options", XMPP_XEP_PUBSUB_NS_URI, NULL, NULL);
		_data_->publish_options_node = _data_->_tmp23_;
		_data_->_tmp24_ = _data_->pubsub_node;
		_data_->_tmp25_ = _data_->publish_options_node;
		_data_->_tmp26_ = xmpp_stanza_node_put_node (_data_->_tmp24_, _data_->_tmp25_);
		_data_->_tmp27_ = _data_->_tmp26_;
		_xmpp_stanza_entry_unref0 (_data_->_tmp27_);
		_data_->_tmp28_ = xmpp_xep_data_forms_data_form_new ();
		_data_->data_form = _data_->_tmp28_;
		_data_->_tmp29_ = g_strdup ("FORM_TYPE");
		_data_->_tmp30_ = NULL;
		_data_->_tmp30_ = xmpp_xep_data_forms_data_form_hidden_field_new ();
		xmpp_xep_data_forms_data_form_field_set_var ((XmppXepDataFormsDataFormField*) _data_->_tmp30_, _data_->_tmp29_);
		_g_free0 (_data_->_tmp29_);
		_data_->form_type_field = _data_->_tmp30_;
		_data_->_tmp31_ = _data_->form_type_field;
		xmpp_xep_data_forms_data_form_field_set_value_string ((XmppXepDataFormsDataFormField*) _data_->_tmp31_, XMPP_XEP_PUBSUB_NS_URI "#publish-options");
		_data_->_tmp32_ = _data_->data_form;
		_data_->_tmp33_ = _data_->form_type_field;
		xmpp_xep_data_forms_data_form_add_field (_data_->_tmp32_, (XmppXepDataFormsDataFormField*) _data_->_tmp33_);
		{
			_data_->_tmp34_ = _data_->publish_options->settings;
			_data_->_tmp35_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _data_->_tmp34_);
			_data_->_tmp36_ = _data_->_tmp35_;
			_data_->_tmp37_ = _data_->_tmp36_;
			_data_->_tmp38_ = gee_iterable_iterator ((GeeIterable*) _data_->_tmp37_);
			_data_->_tmp39_ = _data_->_tmp38_;
			_g_object_unref0 (_data_->_tmp37_);
			_data_->_field_name_it = _data_->_tmp39_;
			while (TRUE) {
				_data_->_tmp40_ = _data_->_field_name_it;
				if (!gee_iterator_next (_data_->_tmp40_)) {
					break;
				}
				_data_->_tmp41_ = _data_->_field_name_it;
				_data_->_tmp42_ = gee_iterator_get (_data_->_tmp41_);
				_data_->field_name = (gchar*) _data_->_tmp42_;
				_data_->_tmp43_ = _data_->field_name;
				_data_->_tmp44_ = g_strdup (_data_->_tmp43_);
				_data_->_tmp45_ = NULL;
				_data_->_tmp45_ = xmpp_xep_data_forms_data_form_field_new ();
				xmpp_xep_data_forms_data_form_field_set_var (_data_->_tmp45_, _data_->_tmp44_);
				_g_free0 (_data_->_tmp44_);
				_data_->field = _data_->_tmp45_;
				_data_->_tmp46_ = _data_->field;
				_data_->_tmp47_ = _data_->publish_options->settings;
				_data_->_tmp48_ = _data_->field_name;
				_data_->_tmp49_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp47_, _data_->_tmp48_);
				_data_->_tmp50_ = (gchar*) _data_->_tmp49_;
				xmpp_xep_data_forms_data_form_field_set_value_string (_data_->_tmp46_, _data_->_tmp50_);
				_g_free0 (_data_->_tmp50_);
				_data_->_tmp51_ = _data_->data_form;
				_data_->_tmp52_ = _data_->field;
				xmpp_xep_data_forms_data_form_add_field (_data_->_tmp51_, _data_->_tmp52_);
				_g_object_unref0 (_data_->field);
				_g_free0 (_data_->field_name);
			}
			_g_object_unref0 (_data_->_field_name_it);
		}
		_data_->_tmp53_ = _data_->publish_options_node;
		_data_->_tmp54_ = _data_->data_form;
		_data_->_tmp55_ = xmpp_xep_data_forms_data_form_get_submit_node (_data_->_tmp54_);
		_data_->_tmp56_ = _data_->_tmp55_;
		_data_->_tmp57_ = xmpp_stanza_node_put_node (_data_->_tmp53_, _data_->_tmp56_);
		_data_->_tmp58_ = _data_->_tmp57_;
		_xmpp_stanza_entry_unref0 (_data_->_tmp58_);
		_xmpp_stanza_entry_unref0 (_data_->_tmp56_);
		_g_object_unref0 (_data_->form_type_field);
		_xmpp_xep_data_forms_data_form_unref0 (_data_->data_form);
		_xmpp_stanza_entry_unref0 (_data_->publish_options_node);
	}
	_data_->_tmp59_ = _data_->pubsub_node;
	_data_->_tmp60_ = xmpp_iq_stanza_new_set (_data_->_tmp59_, NULL);
	_data_->iq = _data_->_tmp60_;
	_data_->_tmp61_ = xmpp_iq_module_IDENTITY;
	_data_->_tmp62_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp61_);
	_data_->_tmp63_ = (XmppIqModule*) _data_->_tmp62_;
	_data_->_tmp64_ = _data_->iq;
	_data_->_state_ = 1;
	xmpp_iq_module_send_iq_async (_data_->_tmp63_, _data_->stream, _data_->_tmp64_, G_PRIORITY_DEFAULT, NULL, xmpp_xep_pubsub_module_publish_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp65_ = xmpp_iq_module_send_iq_finish (_data_->_tmp63_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp66_ = _data_->_tmp65_;
	_g_object_unref0 (_data_->_tmp63_);
	_data_->iq_result = _data_->_tmp66_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->iq);
		_xmpp_stanza_entry_unref0 (_data_->items_node);
		_xmpp_stanza_entry_unref0 (_data_->publish_node);
		_xmpp_stanza_entry_unref0 (_data_->pubsub_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_->_tmp67_ = _data_->iq_result;
	if (xmpp_stanza_is_error ((XmppStanza*) _data_->_tmp67_)) {
		if (_data_->publish_options == NULL) {
			_data_->_tmp68_ = TRUE;
		} else {
			_data_->_tmp68_ = !_data_->try_reconfiguring;
		}
		if (_data_->_tmp68_) {
			_data_->result = FALSE;
			_g_object_unref0 (_data_->iq_result);
			_g_object_unref0 (_data_->iq);
			_xmpp_stanza_entry_unref0 (_data_->items_node);
			_xmpp_stanza_entry_unref0 (_data_->publish_node);
			_xmpp_stanza_entry_unref0 (_data_->pubsub_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_->_tmp69_ = _data_->iq_result;
		_data_->_tmp70_ = xmpp_stanza_get_error ((XmppStanza*) _data_->_tmp69_);
		_data_->_tmp71_ = _data_->_tmp70_;
		_data_->_tmp72_ = _data_->_tmp71_->error_node;
		_data_->_tmp73_ = xmpp_stanza_node_get_subnode (_data_->_tmp72_, "precondition-not-met", XMPP_XEP_PUBSUB_NS_URI_ERROR, FALSE);
		_data_->_tmp74_ = _data_->_tmp73_;
		_data_->_tmp75_ = _data_->_tmp74_ != NULL;
		_xmpp_stanza_entry_unref0 (_data_->_tmp74_);
		_xmpp_error_stanza_unref0 (_data_->_tmp71_);
		_data_->precondition_not_met = _data_->_tmp75_;
		if (_data_->precondition_not_met) {
			_data_->_state_ = 2;
			xmpp_xep_pubsub_module_change_node_config (_data_->self, _data_->stream, _data_->jid, _data_->node_id, _data_->publish_options, xmpp_xep_pubsub_module_publish_ready, _data_);
			return FALSE;
			_state_2:
			_data_->success = xmpp_xep_pubsub_module_change_node_config_finish (_data_->self, _data_->_res_);
			if (!_data_->success) {
				_data_->result = FALSE;
				_g_object_unref0 (_data_->iq_result);
				_g_object_unref0 (_data_->iq);
				_xmpp_stanza_entry_unref0 (_data_->items_node);
				_xmpp_stanza_entry_unref0 (_data_->publish_node);
				_xmpp_stanza_entry_unref0 (_data_->pubsub_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_->_state_ = 3;
			xmpp_xep_pubsub_module_publish (_data_->self, _data_->stream, _data_->jid, _data_->node_id, _data_->item_id, _data_->content, _data_->publish_options, FALSE, xmpp_xep_pubsub_module_publish_ready, _data_);
			return FALSE;
			_state_3:
			_data_->result = xmpp_xep_pubsub_module_publish_finish (_data_->self, _data_->_res_);
			_g_object_unref0 (_data_->iq_result);
			_g_object_unref0 (_data_->iq);
			_xmpp_stanza_entry_unref0 (_data_->items_node);
			_xmpp_stanza_entry_unref0 (_data_->publish_node);
			_xmpp_stanza_entry_unref0 (_data_->pubsub_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_->result = TRUE;
	_g_object_unref0 (_data_->iq_result);
	_g_object_unref0 (_data_->iq);
	_xmpp_stanza_entry_unref0 (_data_->items_node);
	_xmpp_stanza_entry_unref0 (_data_->publish_node);
	_xmpp_stanza_entry_unref0 (_data_->pubsub_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_pubsub_module_retract_item_data_free (gpointer _data)
{
	XmppXepPubsubModuleRetractItemData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->jid);
	_g_free0 (_data_->node_id);
	_g_free0 (_data_->item_id);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepPubsubModuleRetractItemData, _data_);
}

void
xmpp_xep_pubsub_module_retract_item (XmppXepPubsubModule* self,
                                     XmppXmppStream* stream,
                                     XmppJid* jid,
                                     const gchar* node_id,
                                     const gchar* item_id,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	XmppXepPubsubModuleRetractItemData* _data_;
	XmppXepPubsubModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (node_id != NULL);
	g_return_if_fail (item_id != NULL);
	_data_ = g_slice_new0 (XmppXepPubsubModuleRetractItemData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_pubsub_module_retract_item_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 (node_id);
	_g_free0 (_data_->node_id);
	_data_->node_id = _tmp3_;
	_tmp4_ = g_strdup (item_id);
	_g_free0 (_data_->item_id);
	_data_->item_id = _tmp4_;
	xmpp_xep_pubsub_module_retract_item_co (_data_);
}

gboolean
xmpp_xep_pubsub_module_retract_item_finish (XmppXepPubsubModule* self,
                                            GAsyncResult* _res_)
{
	gboolean result;
	XmppXepPubsubModuleRetractItemData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static Block8Data*
block8_data_ref (Block8Data* _data8_)
{
	g_atomic_int_inc (&_data8_->_ref_count_);
	return _data8_;
}

static void
block8_data_unref (void * _userdata_)
{
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		XmppXepPubsubModule* self;
		self = _data8_->self;
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}

static gboolean
_xmpp_xep_pubsub_module_retract_item_co_gsource_func (gpointer self)
{
	gboolean result;
	result = xmpp_xep_pubsub_module_retract_item_co (self);
	return result;
}

static void
__lambda15_ (Block8Data* _data8_,
             XmppXmppStream* stream,
             XmppIqStanza* result_iq)
{
	XmppXepPubsubModule* self;
	self = _data8_->self;
	g_return_if_fail (stream != NULL);
	g_return_if_fail (result_iq != NULL);
	_data8_->ok = !xmpp_stanza_is_error ((XmppStanza*) result_iq);
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _xmpp_xep_pubsub_module_retract_item_co_gsource_func, _data8_->_async_data_, NULL);
}

static void
___lambda15__xmpp_iq_module_on_result (XmppXmppStream* stream,
                                       XmppIqStanza* iq,
                                       gpointer self)
{
	__lambda15_ (self, stream, iq);
}

static gboolean
xmpp_xep_pubsub_module_retract_item_co (XmppXepPubsubModuleRetractItemData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data8_ = g_slice_new0 (Block8Data);
	_data_->_data8_->_ref_count_ = 1;
	_data_->_data8_->self = g_object_ref (_data_->self);
	_data_->_data8_->_async_data_ = _data_;
	_data_->_tmp0_ = xmpp_stanza_node_new_build ("pubsub", XMPP_XEP_PUBSUB_NS_URI, 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 ("retract", XMPP_XEP_PUBSUB_NS_URI, NULL, NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = xmpp_stanza_node_put_attribute (_data_->_tmp5_, "node", _data_->node_id, NULL);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = xmpp_stanza_node_put_attribute (_data_->_tmp7_, "notify", "true", NULL);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = xmpp_stanza_node_new_build ("item", XMPP_XEP_PUBSUB_NS_URI, NULL, NULL);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = xmpp_stanza_node_put_attribute (_data_->_tmp11_, "id", _data_->item_id, NULL);
	_data_->_tmp13_ = _data_->_tmp12_;
	_data_->_tmp14_ = xmpp_stanza_node_put_node (_data_->_tmp9_, _data_->_tmp13_);
	_data_->_tmp15_ = _data_->_tmp14_;
	_data_->_tmp16_ = xmpp_stanza_node_put_node (_data_->_tmp3_, _data_->_tmp15_);
	_data_->_tmp17_ = _data_->_tmp16_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp15_);
	_xmpp_stanza_entry_unref0 (_data_->_tmp13_);
	_xmpp_stanza_entry_unref0 (_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_->pubsub_node = _data_->_tmp17_;
	_data_->_tmp18_ = xmpp_iq_stanza_new_set (_data_->pubsub_node, NULL);
	_data_->iq = _data_->_tmp18_;
	_data_->_data8_->ok = TRUE;
	_data_->_tmp19_ = xmpp_iq_module_IDENTITY;
	_data_->_tmp20_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp19_);
	_data_->_tmp21_ = (XmppIqModule*) _data_->_tmp20_;
	xmpp_iq_module_send_iq (_data_->_tmp21_, _data_->stream, _data_->iq, ___lambda15__xmpp_iq_module_on_result, block8_data_ref (_data_->_data8_), block8_data_unref, G_PRIORITY_DEFAULT);
	_g_object_unref0 (_data_->_tmp21_);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->result = _data_->_data8_->ok;
	_g_object_unref0 (_data_->iq);
	_xmpp_stanza_entry_unref0 (_data_->pubsub_node);
	block8_data_unref (_data_->_data8_);
	_data_->_data8_ = NULL;
	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;
}

void
xmpp_xep_pubsub_module_delete_node (XmppXepPubsubModule* self,
                                    XmppXmppStream* stream,
                                    XmppJid* jid,
                                    const gchar* node_id)
{
	XmppStanzaNode* pubsub_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppStanzaNode* _tmp3_;
	XmppStanzaNode* publish_node = NULL;
	XmppStanzaNode* _tmp4_;
	XmppStanzaNode* _tmp5_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp7_;
	XmppStanzaNode* _tmp8_;
	XmppStanzaNode* _tmp9_;
	XmppIqStanza* iq = NULL;
	XmppIqStanza* _tmp10_;
	XmppModuleIdentity* _tmp11_;
	gpointer _tmp12_;
	XmppIqModule* _tmp13_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (node_id != NULL);
	_tmp0_ = xmpp_stanza_node_new_build ("pubsub", XMPP_XEP_PUBSUB_NS_URI_OWNER, NULL, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = xmpp_stanza_node_add_self_xmlns (_tmp1_);
	_tmp3_ = _tmp2_;
	_xmpp_stanza_entry_unref0 (_tmp1_);
	pubsub_node = _tmp3_;
	_tmp4_ = xmpp_stanza_node_new_build ("delete", XMPP_XEP_PUBSUB_NS_URI_OWNER, NULL, NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = xmpp_stanza_node_put_attribute (_tmp5_, "node", node_id, NULL);
	_tmp7_ = _tmp6_;
	_xmpp_stanza_entry_unref0 (_tmp5_);
	publish_node = _tmp7_;
	_tmp8_ = xmpp_stanza_node_put_node (pubsub_node, publish_node);
	_tmp9_ = _tmp8_;
	_xmpp_stanza_entry_unref0 (_tmp9_);
	_tmp10_ = xmpp_iq_stanza_new_set (pubsub_node, NULL);
	iq = _tmp10_;
	_tmp11_ = xmpp_iq_module_IDENTITY;
	_tmp12_ = xmpp_xmpp_stream_get_module (stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp11_);
	_tmp13_ = (XmppIqModule*) _tmp12_;
	xmpp_iq_module_send_iq (_tmp13_, stream, iq, NULL, NULL, NULL, G_PRIORITY_DEFAULT);
	_g_object_unref0 (_tmp13_);
	_g_object_unref0 (iq);
	_xmpp_stanza_entry_unref0 (publish_node);
	_xmpp_stanza_entry_unref0 (pubsub_node);
}

static void
xmpp_xep_pubsub_module_request_node_config_data_free (gpointer _data)
{
	XmppXepPubsubModuleRequestNodeConfigData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->jid);
	_g_free0 (_data_->node_id);
	_xmpp_xep_data_forms_data_form_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepPubsubModuleRequestNodeConfigData, _data_);
}

void
xmpp_xep_pubsub_module_request_node_config (XmppXepPubsubModule* self,
                                            XmppXmppStream* stream,
                                            XmppJid* jid,
                                            const gchar* node_id,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	XmppXepPubsubModuleRequestNodeConfigData* _data_;
	XmppXepPubsubModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (node_id != NULL);
	_data_ = g_slice_new0 (XmppXepPubsubModuleRequestNodeConfigData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_pubsub_module_request_node_config_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 (node_id);
	_g_free0 (_data_->node_id);
	_data_->node_id = _tmp3_;
	xmpp_xep_pubsub_module_request_node_config_co (_data_);
}

XmppXepDataFormsDataForm*
xmpp_xep_pubsub_module_request_node_config_finish (XmppXepPubsubModule* self,
                                                   GAsyncResult* _res_)
{
	XmppXepDataFormsDataForm* result;
	XmppXepPubsubModuleRequestNodeConfigData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
xmpp_xep_pubsub_module_request_node_config_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_)
{
	XmppXepPubsubModuleRequestNodeConfigData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_pubsub_module_request_node_config_co (_data_);
}

static gboolean
xmpp_xep_pubsub_module_request_node_config_co (XmppXepPubsubModuleRequestNodeConfigData* _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 ("pubsub", XMPP_XEP_PUBSUB_NS_URI_OWNER, 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_->pubsub_node = _data_->_tmp3_;
	_data_->_tmp4_ = xmpp_stanza_node_new_build ("configure", XMPP_XEP_PUBSUB_NS_URI_OWNER, NULL, NULL);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = xmpp_stanza_node_put_attribute (_data_->_tmp5_, "node", _data_->node_id, NULL);
	_data_->_tmp7_ = _data_->_tmp6_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp5_);
	_data_->publish_node = _data_->_tmp7_;
	_data_->_tmp8_ = xmpp_stanza_node_put_node (_data_->pubsub_node, _data_->publish_node);
	_data_->_tmp9_ = _data_->_tmp8_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp9_);
	_data_->_tmp10_ = xmpp_iq_stanza_new_get (_data_->pubsub_node, NULL);
	_data_->iq = _data_->_tmp10_;
	_data_->_tmp11_ = xmpp_iq_module_IDENTITY;
	_data_->_tmp12_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp11_);
	_data_->_tmp13_ = (XmppIqModule*) _data_->_tmp12_;
	_data_->_state_ = 1;
	xmpp_iq_module_send_iq_async (_data_->_tmp13_, _data_->stream, _data_->iq, G_PRIORITY_DEFAULT, NULL, xmpp_xep_pubsub_module_request_node_config_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp14_ = xmpp_iq_module_send_iq_finish (_data_->_tmp13_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp15_ = _data_->_tmp14_;
	_g_object_unref0 (_data_->_tmp13_);
	_data_->result_iq = _data_->_tmp15_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->iq);
		_xmpp_stanza_entry_unref0 (_data_->publish_node);
		_xmpp_stanza_entry_unref0 (_data_->pubsub_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_->_tmp16_ = ((XmppStanza*) _data_->result_iq)->stanza;
	_data_->_tmp17_ = xmpp_stanza_node_get_deep_subnode (_data_->_tmp16_, XMPP_XEP_PUBSUB_NS_URI_OWNER ":pubsub", XMPP_XEP_PUBSUB_NS_URI_OWNER ":configure", "jabber:x:data:x", NULL);
	_data_->data_form_node = _data_->_tmp17_;
	_data_->_tmp18_ = _data_->data_form_node;
	if (_data_->_tmp18_ == NULL) {
		_data_->result = NULL;
		_xmpp_stanza_entry_unref0 (_data_->data_form_node);
		_g_object_unref0 (_data_->result_iq);
		_g_object_unref0 (_data_->iq);
		_xmpp_stanza_entry_unref0 (_data_->publish_node);
		_xmpp_stanza_entry_unref0 (_data_->pubsub_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_->_tmp19_ = _data_->data_form_node;
	_data_->_tmp20_ = xmpp_xep_data_forms_data_form_create_from_node (_data_->_tmp19_);
	_data_->result = _data_->_tmp20_;
	_xmpp_stanza_entry_unref0 (_data_->data_form_node);
	_g_object_unref0 (_data_->result_iq);
	_g_object_unref0 (_data_->iq);
	_xmpp_stanza_entry_unref0 (_data_->publish_node);
	_xmpp_stanza_entry_unref0 (_data_->pubsub_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_pubsub_module_submit_node_config_data_free (gpointer _data)
{
	XmppXepPubsubModuleSubmitNodeConfigData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_xep_data_forms_data_form_unref0 (_data_->data_form);
	_g_free0 (_data_->node_id);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepPubsubModuleSubmitNodeConfigData, _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_pubsub_module_submit_node_config (XmppXepPubsubModule* self,
                                           XmppXmppStream* stream,
                                           XmppXepDataFormsDataForm* data_form,
                                           const gchar* node_id,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	XmppXepPubsubModuleSubmitNodeConfigData* _data_;
	XmppXepPubsubModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppXepDataFormsDataForm* _tmp2_;
	gchar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (data_form != NULL);
	g_return_if_fail (node_id != NULL);
	_data_ = g_slice_new0 (XmppXepPubsubModuleSubmitNodeConfigData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_pubsub_module_submit_node_config_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_xep_data_forms_data_form_ref0 (data_form);
	_xmpp_xep_data_forms_data_form_unref0 (_data_->data_form);
	_data_->data_form = _tmp2_;
	_tmp3_ = g_strdup (node_id);
	_g_free0 (_data_->node_id);
	_data_->node_id = _tmp3_;
	xmpp_xep_pubsub_module_submit_node_config_co (_data_);
}

gboolean
xmpp_xep_pubsub_module_submit_node_config_finish (XmppXepPubsubModule* self,
                                                  GAsyncResult* _res_)
{
	gboolean result;
	XmppXepPubsubModuleSubmitNodeConfigData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
xmpp_xep_pubsub_module_submit_node_config_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	XmppXepPubsubModuleSubmitNodeConfigData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_pubsub_module_submit_node_config_co (_data_);
}

static gboolean
xmpp_xep_pubsub_module_submit_node_config_co (XmppXepPubsubModuleSubmitNodeConfigData* _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_data_forms_data_form_get_submit_node (_data_->data_form);
	_data_->submit_node = _data_->_tmp0_;
	_data_->_tmp1_ = xmpp_stanza_node_new_build ("pubsub", XMPP_XEP_PUBSUB_NS_URI_OWNER, NULL, NULL);
	_data_->_tmp2_ = _data_->_tmp1_;
	_data_->_tmp3_ = xmpp_stanza_node_add_self_xmlns (_data_->_tmp2_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp2_);
	_data_->pubsub_node = _data_->_tmp4_;
	_data_->_tmp5_ = xmpp_stanza_node_new_build ("configure", XMPP_XEP_PUBSUB_NS_URI_OWNER, NULL, NULL);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = xmpp_stanza_node_put_attribute (_data_->_tmp6_, "node", _data_->node_id, NULL);
	_data_->_tmp8_ = _data_->_tmp7_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp6_);
	_data_->publish_node = _data_->_tmp8_;
	_data_->_tmp9_ = xmpp_stanza_node_put_node (_data_->pubsub_node, _data_->publish_node);
	_data_->_tmp10_ = _data_->_tmp9_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp10_);
	_data_->_tmp11_ = xmpp_stanza_node_put_node (_data_->publish_node, _data_->submit_node);
	_data_->_tmp12_ = _data_->_tmp11_;
	_xmpp_stanza_entry_unref0 (_data_->_tmp12_);
	_data_->_tmp13_ = xmpp_iq_stanza_new_set (_data_->pubsub_node, NULL);
	_data_->iq = _data_->_tmp13_;
	_data_->_tmp14_ = xmpp_iq_module_IDENTITY;
	_data_->_tmp15_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_IQ_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp14_);
	_data_->_tmp16_ = (XmppIqModule*) _data_->_tmp15_;
	_data_->_state_ = 1;
	xmpp_iq_module_send_iq_async (_data_->_tmp16_, _data_->stream, _data_->iq, G_PRIORITY_DEFAULT, NULL, xmpp_xep_pubsub_module_submit_node_config_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp17_ = xmpp_iq_module_send_iq_finish (_data_->_tmp16_, _data_->_res_, &_data_->_inner_error0_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_g_object_unref0 (_data_->_tmp16_);
	_data_->iq_result = _data_->_tmp18_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->iq);
		_xmpp_stanza_entry_unref0 (_data_->publish_node);
		_xmpp_stanza_entry_unref0 (_data_->pubsub_node);
		_xmpp_stanza_entry_unref0 (_data_->submit_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_->result = !xmpp_stanza_is_error ((XmppStanza*) _data_->iq_result);
	_g_object_unref0 (_data_->iq_result);
	_g_object_unref0 (_data_->iq);
	_xmpp_stanza_entry_unref0 (_data_->publish_node);
	_xmpp_stanza_entry_unref0 (_data_->pubsub_node);
	_xmpp_stanza_entry_unref0 (_data_->submit_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_pubsub_module_on_received_message_xmpp_message_module_received_message (XmppMessageModule* _sender,
                                                                                  XmppXmppStream* stream,
                                                                                  XmppMessageStanza* message,
                                                                                  gpointer self)
{
	xmpp_xep_pubsub_module_on_received_message ((XmppXepPubsubModule*) self, stream, message);
}

static void
xmpp_xep_pubsub_module_real_attach (XmppXmppStreamModule* base,
                                    XmppXmppStream* stream)
{
	XmppXepPubsubModule * self;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppMessageModule* _tmp2_;
	self = (XmppXepPubsubModule*) 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_connect_object (_tmp2_, "received-message", (GCallback) _xmpp_xep_pubsub_module_on_received_message_xmpp_message_module_received_message, self, 0);
	_g_object_unref0 (_tmp2_);
}

static void
xmpp_xep_pubsub_module_real_detach (XmppXmppStreamModule* base,
                                    XmppXmppStream* stream)
{
	XmppXepPubsubModule * self;
	XmppModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	XmppMessageModule* _tmp2_;
	guint _tmp3_;
	self = (XmppXepPubsubModule*) 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_pubsub_module_on_received_message_xmpp_message_module_received_message, self);
	_g_object_unref0 (_tmp2_);
}

static gchar*
xmpp_xep_pubsub_module_real_get_ns (XmppXmppStreamModule* base)
{
	XmppXepPubsubModule * self;
	gchar* _tmp0_;
	gchar* result;
	self = (XmppXepPubsubModule*) base;
	_tmp0_ = g_strdup (XMPP_XEP_PUBSUB_NS_URI);
	result = _tmp0_;
	return result;
}

static gchar*
xmpp_xep_pubsub_module_real_get_id (XmppXmppStreamModule* base)
{
	XmppXepPubsubModule * self;
	XmppModuleIdentity* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* result;
	self = (XmppXepPubsubModule*) base;
	_tmp0_ = xmpp_xep_pubsub_module_IDENTITY;
	_tmp1_ = xmpp_module_identity_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}

static void
xmpp_xep_pubsub_module_on_received_message (XmppXepPubsubModule* self,
                                            XmppXmppStream* stream,
                                            XmppMessageStanza* message)
{
	XmppStanzaNode* event_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	XmppJid* _tmp5_;
	gboolean _tmp6_;
	XmppStanzaNode* items_node = NULL;
	XmppStanzaNode* _tmp12_;
	XmppStanzaNode* _tmp13_;
	XmppStanzaNode* _tmp14_;
	XmppStanzaNode* delete_node = NULL;
	XmppStanzaNode* _tmp58_;
	XmppStanzaNode* _tmp59_;
	XmppStanzaNode* _tmp60_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (message != NULL);
	_tmp0_ = ((XmppStanza*) message)->stanza;
	_tmp1_ = xmpp_stanza_node_get_subnode (_tmp0_, "event", XMPP_XEP_PUBSUB_NS_URI_EVENT, FALSE);
	event_node = _tmp1_;
	_tmp2_ = event_node;
	if (_tmp2_ == NULL) {
		_xmpp_stanza_entry_unref0 (event_node);
		return;
	}
	_tmp3_ = xmpp_stanza_get_from ((XmppStanza*) message);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = !xmpp_jid_is_bare (_tmp5_);
	_xmpp_jid_unref0 (_tmp5_);
	if (_tmp6_) {
		XmppJid* _tmp7_;
		XmppJid* _tmp8_;
		XmppJid* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp7_ = xmpp_stanza_get_from ((XmppStanza*) message);
		_tmp8_ = _tmp7_;
		_tmp9_ = _tmp8_;
		_tmp10_ = xmpp_jid_to_string (_tmp9_);
		_tmp11_ = _tmp10_;
		g_warning ("0060_pubsub.vala:187: Got a PEP message from a full JID (%s), ignoring" \
".", _tmp11_);
		_g_free0 (_tmp11_);
		_xmpp_jid_unref0 (_tmp9_);
		_xmpp_stanza_entry_unref0 (event_node);
		return;
	}
	_tmp12_ = event_node;
	_tmp13_ = xmpp_stanza_node_get_subnode (_tmp12_, "items", XMPP_XEP_PUBSUB_NS_URI_EVENT, FALSE);
	items_node = _tmp13_;
	_tmp14_ = items_node;
	if (_tmp14_ != NULL) {
		gchar* node = NULL;
		XmppStanzaNode* _tmp15_;
		const gchar* _tmp16_;
		gchar* _tmp17_;
		XmppStanzaNode* item_node = NULL;
		XmppStanzaNode* _tmp18_;
		XmppStanzaNode* _tmp19_;
		XmppStanzaNode* _tmp20_;
		XmppStanzaNode* retract_node = NULL;
		XmppStanzaNode* _tmp40_;
		XmppStanzaNode* _tmp41_;
		XmppStanzaNode* _tmp42_;
		_tmp15_ = items_node;
		_tmp16_ = xmpp_stanza_node_get_attribute (_tmp15_, "node", XMPP_XEP_PUBSUB_NS_URI_EVENT);
		_tmp17_ = g_strdup (_tmp16_);
		node = _tmp17_;
		_tmp18_ = items_node;
		_tmp19_ = xmpp_stanza_node_get_subnode (_tmp18_, "item", XMPP_XEP_PUBSUB_NS_URI_EVENT, FALSE);
		item_node = _tmp19_;
		_tmp20_ = item_node;
		if (_tmp20_ != NULL) {
			gchar* id = NULL;
			XmppStanzaNode* _tmp21_;
			const gchar* _tmp22_;
			gchar* _tmp23_;
			GeeHashMap* _tmp24_;
			const gchar* _tmp25_;
			_tmp21_ = item_node;
			_tmp22_ = xmpp_stanza_node_get_attribute (_tmp21_, "id", XMPP_XEP_PUBSUB_NS_URI_EVENT);
			_tmp23_ = g_strdup (_tmp22_);
			id = _tmp23_;
			_tmp24_ = self->priv->item_listeners;
			_tmp25_ = node;
			if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp24_, _tmp25_)) {
				GeeHashMap* _tmp26_;
				const gchar* _tmp27_;
				gpointer _tmp28_;
				XmppXepPubsubItemListenerDelegate* _tmp29_;
				XmppXepPubsubItemListenerDelegateResultFunc _tmp30_ = NULL;
				gpointer _tmp30__target = NULL;
				XmppXepPubsubItemListenerDelegateResultFunc _tmp31_;
				gpointer _tmp31__target;
				XmppJid* _tmp32_;
				XmppJid* _tmp33_;
				XmppJid* _tmp34_;
				const gchar* _tmp35_;
				XmppStanzaNode* _tmp36_;
				GeeList* _tmp37_;
				gpointer _tmp38_;
				XmppStanzaNode* _tmp39_;
				_tmp26_ = self->priv->item_listeners;
				_tmp27_ = node;
				_tmp28_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp26_, _tmp27_);
				_tmp29_ = (XmppXepPubsubItemListenerDelegate*) _tmp28_;
				_tmp30_ = xmpp_xep_pubsub_item_listener_delegate_get_on_result (_tmp29_, &_tmp30__target);
				_tmp31_ = _tmp30_;
				_tmp31__target = _tmp30__target;
				_tmp32_ = xmpp_stanza_get_from ((XmppStanza*) message);
				_tmp33_ = _tmp32_;
				_tmp34_ = _tmp33_;
				_tmp35_ = id;
				_tmp36_ = item_node;
				_tmp37_ = _tmp36_->sub_nodes;
				_tmp38_ = gee_list_get (_tmp37_, 0);
				_tmp39_ = (XmppStanzaNode*) _tmp38_;
				_tmp31_ (stream, _tmp34_, _tmp35_, _tmp39_, _tmp31__target);
				_xmpp_stanza_entry_unref0 (_tmp39_);
				_xmpp_jid_unref0 (_tmp34_);
				_xmpp_xep_pubsub_item_listener_delegate_unref0 (_tmp29_);
			}
			_g_free0 (id);
		}
		_tmp40_ = items_node;
		_tmp41_ = xmpp_stanza_node_get_subnode (_tmp40_, "retract", XMPP_XEP_PUBSUB_NS_URI_EVENT, FALSE);
		retract_node = _tmp41_;
		_tmp42_ = retract_node;
		if (_tmp42_ != NULL) {
			gchar* id = NULL;
			XmppStanzaNode* _tmp43_;
			const gchar* _tmp44_;
			gchar* _tmp45_;
			GeeHashMap* _tmp46_;
			const gchar* _tmp47_;
			_tmp43_ = retract_node;
			_tmp44_ = xmpp_stanza_node_get_attribute (_tmp43_, "id", XMPP_XEP_PUBSUB_NS_URI_EVENT);
			_tmp45_ = g_strdup (_tmp44_);
			id = _tmp45_;
			_tmp46_ = self->priv->retract_listeners;
			_tmp47_ = node;
			if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp46_, _tmp47_)) {
				GeeHashMap* _tmp48_;
				const gchar* _tmp49_;
				gpointer _tmp50_;
				XmppXepPubsubRetractListenerDelegate* _tmp51_;
				XmppXepPubsubRetractListenerDelegateResultFunc _tmp52_ = NULL;
				gpointer _tmp52__target = NULL;
				XmppXepPubsubRetractListenerDelegateResultFunc _tmp53_;
				gpointer _tmp53__target;
				XmppJid* _tmp54_;
				XmppJid* _tmp55_;
				XmppJid* _tmp56_;
				const gchar* _tmp57_;
				_tmp48_ = self->priv->retract_listeners;
				_tmp49_ = node;
				_tmp50_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp48_, _tmp49_);
				_tmp51_ = (XmppXepPubsubRetractListenerDelegate*) _tmp50_;
				_tmp52_ = xmpp_xep_pubsub_retract_listener_delegate_get_on_result (_tmp51_, &_tmp52__target);
				_tmp53_ = _tmp52_;
				_tmp53__target = _tmp52__target;
				_tmp54_ = xmpp_stanza_get_from ((XmppStanza*) message);
				_tmp55_ = _tmp54_;
				_tmp56_ = _tmp55_;
				_tmp57_ = id;
				_tmp53_ (stream, _tmp56_, _tmp57_, _tmp53__target);
				_xmpp_jid_unref0 (_tmp56_);
				_xmpp_xep_pubsub_retract_listener_delegate_unref0 (_tmp51_);
			}
			_g_free0 (id);
		}
		_xmpp_stanza_entry_unref0 (retract_node);
		_xmpp_stanza_entry_unref0 (item_node);
		_g_free0 (node);
	}
	_tmp58_ = event_node;
	_tmp59_ = xmpp_stanza_node_get_subnode (_tmp58_, "delete", XMPP_XEP_PUBSUB_NS_URI_EVENT, FALSE);
	delete_node = _tmp59_;
	_tmp60_ = delete_node;
	if (_tmp60_ != NULL) {
		gchar* node = NULL;
		XmppStanzaNode* _tmp61_;
		const gchar* _tmp62_;
		gchar* _tmp63_;
		GeeHashMap* _tmp64_;
		const gchar* _tmp65_;
		_tmp61_ = delete_node;
		_tmp62_ = xmpp_stanza_node_get_attribute (_tmp61_, "node", XMPP_XEP_PUBSUB_NS_URI_EVENT);
		_tmp63_ = g_strdup (_tmp62_);
		node = _tmp63_;
		_tmp64_ = self->priv->delete_listeners;
		_tmp65_ = node;
		if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp64_, _tmp65_)) {
			GeeHashMap* _tmp66_;
			const gchar* _tmp67_;
			gpointer _tmp68_;
			XmppXepPubsubDeleteListenerDelegate* _tmp69_;
			XmppXepPubsubDeleteListenerDelegateResultFunc _tmp70_ = NULL;
			gpointer _tmp70__target = NULL;
			XmppXepPubsubDeleteListenerDelegateResultFunc _tmp71_;
			gpointer _tmp71__target;
			XmppJid* _tmp72_;
			XmppJid* _tmp73_;
			XmppJid* _tmp74_;
			_tmp66_ = self->priv->delete_listeners;
			_tmp67_ = node;
			_tmp68_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp66_, _tmp67_);
			_tmp69_ = (XmppXepPubsubDeleteListenerDelegate*) _tmp68_;
			_tmp70_ = xmpp_xep_pubsub_delete_listener_delegate_get_on_result (_tmp69_, &_tmp70__target);
			_tmp71_ = _tmp70_;
			_tmp71__target = _tmp70__target;
			_tmp72_ = xmpp_stanza_get_from ((XmppStanza*) message);
			_tmp73_ = _tmp72_;
			_tmp74_ = _tmp73_;
			_tmp71_ (stream, _tmp74_, _tmp71__target);
			_xmpp_jid_unref0 (_tmp74_);
			_xmpp_xep_pubsub_delete_listener_delegate_unref0 (_tmp69_);
		}
		_g_free0 (node);
	}
	_xmpp_stanza_entry_unref0 (delete_node);
	_xmpp_stanza_entry_unref0 (items_node);
	_xmpp_stanza_entry_unref0 (event_node);
}

static void
xmpp_xep_pubsub_module_change_node_config_data_free (gpointer _data)
{
	XmppXepPubsubModuleChangeNodeConfigData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_xmpp_jid_unref0 (_data_->jid);
	_g_free0 (_data_->node);
	_xmpp_xep_pubsub_publish_options_unref0 (_data_->publish_options);
	_g_object_unref0 (_data_->self);
	g_slice_free (XmppXepPubsubModuleChangeNodeConfigData, _data_);
}

static void
xmpp_xep_pubsub_module_change_node_config (XmppXepPubsubModule* self,
                                           XmppXmppStream* stream,
                                           XmppJid* jid,
                                           const gchar* node,
                                           XmppXepPubsubPublishOptions* publish_options,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	XmppXepPubsubModuleChangeNodeConfigData* _data_;
	XmppXepPubsubModule* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppJid* _tmp2_;
	gchar* _tmp3_;
	XmppXepPubsubPublishOptions* _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (jid != NULL);
	g_return_if_fail (node != NULL);
	g_return_if_fail (publish_options != NULL);
	_data_ = g_slice_new0 (XmppXepPubsubModuleChangeNodeConfigData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, xmpp_xep_pubsub_module_change_node_config_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 (node);
	_g_free0 (_data_->node);
	_data_->node = _tmp3_;
	_tmp4_ = _xmpp_xep_pubsub_publish_options_ref0 (publish_options);
	_xmpp_xep_pubsub_publish_options_unref0 (_data_->publish_options);
	_data_->publish_options = _tmp4_;
	xmpp_xep_pubsub_module_change_node_config_co (_data_);
}

static gboolean
xmpp_xep_pubsub_module_change_node_config_finish (XmppXepPubsubModule* self,
                                                  GAsyncResult* _res_)
{
	gboolean result;
	XmppXepPubsubModuleChangeNodeConfigData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
xmpp_xep_pubsub_module_change_node_config_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	XmppXepPubsubModuleChangeNodeConfigData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	xmpp_xep_pubsub_module_change_node_config_co (_data_);
}

static gboolean
xmpp_xep_pubsub_module_change_node_config_co (XmppXepPubsubModuleChangeNodeConfigData* _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_pubsub_module_IDENTITY;
	_data_->_tmp1_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_XEP_PUBSUB_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp0_);
	_data_->_tmp2_ = (XmppXepPubsubModule*) _data_->_tmp1_;
	_data_->_state_ = 1;
	xmpp_xep_pubsub_module_request_node_config (_data_->_tmp2_, _data_->stream, NULL, _data_->node, xmpp_xep_pubsub_module_change_node_config_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = xmpp_xep_pubsub_module_request_node_config_finish (_data_->_tmp2_, _data_->_res_);
	_data_->_tmp4_ = _data_->_tmp3_;
	_g_object_unref0 (_data_->_tmp2_);
	_data_->data_form = _data_->_tmp4_;
	_data_->_tmp5_ = _data_->data_form;
	if (_data_->_tmp5_ == NULL) {
		_data_->result = FALSE;
		_xmpp_xep_data_forms_data_form_unref0 (_data_->data_form);
		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_ = _data_->data_form;
		_data_->_tmp7_ = _data_->_tmp6_->fields;
		_data_->_field_list = _data_->_tmp7_;
		_data_->_tmp8_ = _data_->_field_list;
		_data_->_tmp9_ = gee_collection_get_size ((GeeCollection*) _data_->_tmp8_);
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_field_size = _data_->_tmp10_;
		_data_->_field_index = -1;
		while (TRUE) {
			_data_->_field_index = _data_->_field_index + 1;
			_data_->_tmp11_ = _data_->_field_index;
			_data_->_tmp12_ = _data_->_field_size;
			if (!(_data_->_tmp11_ < _data_->_tmp12_)) {
				break;
			}
			_data_->_tmp13_ = _data_->_field_list;
			_data_->_tmp14_ = gee_list_get (_data_->_tmp13_, _data_->_field_index);
			_data_->field = (XmppXepDataFormsDataFormField*) _data_->_tmp14_;
			_data_->_tmp16_ = _data_->publish_options->settings;
			_data_->_tmp17_ = _data_->field;
			_data_->_tmp18_ = xmpp_xep_data_forms_data_form_field_get_var (_data_->_tmp17_);
			_data_->_tmp19_ = _data_->_tmp18_;
			if (gee_abstract_map_has_key ((GeeAbstractMap*) _data_->_tmp16_, _data_->_tmp19_)) {
				_data_->_tmp20_ = _data_->publish_options->settings;
				_data_->_tmp21_ = _data_->field;
				_data_->_tmp22_ = xmpp_xep_data_forms_data_form_field_get_var (_data_->_tmp21_);
				_data_->_tmp23_ = _data_->_tmp22_;
				_data_->_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp20_, _data_->_tmp23_);
				_data_->_tmp25_ = (gchar*) _data_->_tmp24_;
				_data_->_tmp26_ = _data_->field;
				_data_->_tmp27_ = xmpp_xep_data_forms_data_form_field_get_value_string (_data_->_tmp26_);
				_data_->_tmp28_ = _data_->_tmp27_;
				_data_->_tmp15_ = g_strcmp0 (_data_->_tmp25_, _data_->_tmp28_) != 0;
				_g_free0 (_data_->_tmp28_);
				_g_free0 (_data_->_tmp25_);
			} else {
				_data_->_tmp15_ = FALSE;
			}
			if (_data_->_tmp15_) {
				_data_->_tmp29_ = _data_->field;
				_data_->_tmp30_ = _data_->publish_options->settings;
				_data_->_tmp31_ = _data_->field;
				_data_->_tmp32_ = xmpp_xep_data_forms_data_form_field_get_var (_data_->_tmp31_);
				_data_->_tmp33_ = _data_->_tmp32_;
				_data_->_tmp34_ = gee_abstract_map_get ((GeeAbstractMap*) _data_->_tmp30_, _data_->_tmp33_);
				_data_->_tmp35_ = (gchar*) _data_->_tmp34_;
				xmpp_xep_data_forms_data_form_field_set_value_string (_data_->_tmp29_, _data_->_tmp35_);
				_g_free0 (_data_->_tmp35_);
			}
			_g_object_unref0 (_data_->field);
		}
	}
	_data_->_tmp36_ = xmpp_xep_pubsub_module_IDENTITY;
	_data_->_tmp37_ = xmpp_xmpp_stream_get_module (_data_->stream, XMPP_XEP_PUBSUB_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp36_);
	_data_->_tmp38_ = (XmppXepPubsubModule*) _data_->_tmp37_;
	_data_->_tmp39_ = _data_->data_form;
	_data_->_state_ = 2;
	xmpp_xep_pubsub_module_submit_node_config (_data_->_tmp38_, _data_->stream, _data_->_tmp39_, _data_->node, xmpp_xep_pubsub_module_change_node_config_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp40_ = xmpp_xep_pubsub_module_submit_node_config_finish (_data_->_tmp38_, _data_->_res_);
	_g_object_unref0 (_data_->_tmp38_);
	_data_->result = _data_->_tmp40_;
	_xmpp_xep_data_forms_data_form_unref0 (_data_->data_form);
	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;
}

XmppXepPubsubModule*
xmpp_xep_pubsub_module_construct (GType object_type)
{
	XmppXepPubsubModule * self = NULL;
	self = (XmppXepPubsubModule*) xmpp_xmpp_stream_module_construct (object_type);
	return self;
}

XmppXepPubsubModule*
xmpp_xep_pubsub_module_new (void)
{
	return xmpp_xep_pubsub_module_construct (XMPP_XEP_PUBSUB_TYPE_MODULE);
}

static void
xmpp_xep_pubsub_module_class_init (XmppXepPubsubModuleClass * klass,
                                   gpointer klass_data)
{
	XmppModuleIdentity* _tmp0_;
	xmpp_xep_pubsub_module_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &XmppXepPubsubModule_private_offset);
	((XmppXmppStreamModuleClass *) klass)->attach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xep_pubsub_module_real_attach;
	((XmppXmppStreamModuleClass *) klass)->detach = (void (*) (XmppXmppStreamModule*, XmppXmppStream*)) xmpp_xep_pubsub_module_real_detach;
	((XmppXmppStreamModuleClass *) klass)->get_ns = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xep_pubsub_module_real_get_ns;
	((XmppXmppStreamModuleClass *) klass)->get_id = (gchar* (*) (XmppXmppStreamModule*)) xmpp_xep_pubsub_module_real_get_id;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_pubsub_module_finalize;
	_tmp0_ = xmpp_module_identity_new (XMPP_XEP_PUBSUB_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, XMPP_XEP_PUBSUB_NS_URI, "0060_pubsub_module");
	xmpp_xep_pubsub_module_IDENTITY = _tmp0_;
}

static void
xmpp_xep_pubsub_module_instance_init (XmppXepPubsubModule * self,
                                      gpointer klass)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp2_;
	self->priv = xmpp_xep_pubsub_module_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, XMPP_XEP_PUBSUB_TYPE_ITEM_LISTENER_DELEGATE, (GBoxedCopyFunc) xmpp_xep_pubsub_item_listener_delegate_ref, (GDestroyNotify) xmpp_xep_pubsub_item_listener_delegate_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->item_listeners = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, XMPP_XEP_PUBSUB_TYPE_RETRACT_LISTENER_DELEGATE, (GBoxedCopyFunc) xmpp_xep_pubsub_retract_listener_delegate_ref, (GDestroyNotify) xmpp_xep_pubsub_retract_listener_delegate_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->retract_listeners = _tmp1_;
	_tmp2_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, XMPP_XEP_PUBSUB_TYPE_DELETE_LISTENER_DELEGATE, (GBoxedCopyFunc) xmpp_xep_pubsub_delete_listener_delegate_ref, (GDestroyNotify) xmpp_xep_pubsub_delete_listener_delegate_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->delete_listeners = _tmp2_;
}

static void
xmpp_xep_pubsub_module_finalize (GObject * obj)
{
	XmppXepPubsubModule * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_PUBSUB_TYPE_MODULE, XmppXepPubsubModule);
	_g_object_unref0 (self->priv->item_listeners);
	_g_object_unref0 (self->priv->retract_listeners);
	_g_object_unref0 (self->priv->delete_listeners);
	G_OBJECT_CLASS (xmpp_xep_pubsub_module_parent_class)->finalize (obj);
}

static GType
xmpp_xep_pubsub_module_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepPubsubModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_pubsub_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepPubsubModule), 0, (GInstanceInitFunc) xmpp_xep_pubsub_module_instance_init, NULL };
	GType xmpp_xep_pubsub_module_type_id;
	xmpp_xep_pubsub_module_type_id = g_type_register_static (XMPP_TYPE_XMPP_STREAM_MODULE, "XmppXepPubsubModule", &g_define_type_info, 0);
	XmppXepPubsubModule_private_offset = g_type_add_instance_private (xmpp_xep_pubsub_module_type_id, sizeof (XmppXepPubsubModulePrivate));
	return xmpp_xep_pubsub_module_type_id;
}

GType
xmpp_xep_pubsub_module_get_type (void)
{
	static volatile gsize xmpp_xep_pubsub_module_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_pubsub_module_type_id__once)) {
		GType xmpp_xep_pubsub_module_type_id;
		xmpp_xep_pubsub_module_type_id = xmpp_xep_pubsub_module_get_type_once ();
		g_once_init_leave (&xmpp_xep_pubsub_module_type_id__once, xmpp_xep_pubsub_module_type_id);
	}
	return xmpp_xep_pubsub_module_type_id__once;
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

XmppXepPubsubPublishOptions*
xmpp_xep_pubsub_publish_options_set_persist_items (XmppXepPubsubPublishOptions* self,
                                                   gboolean persist)
{
	GeeHashMap* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	XmppXepPubsubPublishOptions* _tmp3_;
	XmppXepPubsubPublishOptions* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->settings;
	_tmp1_ = bool_to_string (persist);
	_tmp2_ = _tmp1_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, "pubsub#persist_items", _tmp2_);
	_g_free0 (_tmp2_);
	_tmp3_ = _xmpp_xep_pubsub_publish_options_ref0 (self);
	result = _tmp3_;
	return result;
}

XmppXepPubsubPublishOptions*
xmpp_xep_pubsub_publish_options_set_max_items (XmppXepPubsubPublishOptions* self,
                                               const gchar* max)
{
	GeeHashMap* _tmp0_;
	XmppXepPubsubPublishOptions* _tmp1_;
	XmppXepPubsubPublishOptions* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (max != NULL, NULL);
	_tmp0_ = self->settings;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, "pubsub#max_items", max);
	_tmp1_ = _xmpp_xep_pubsub_publish_options_ref0 (self);
	result = _tmp1_;
	return result;
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

XmppXepPubsubPublishOptions*
xmpp_xep_pubsub_publish_options_set_send_last_published_item (XmppXepPubsubPublishOptions* self,
                                                              const gchar* send)
{
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	XmppXepPubsubPublishOptions* _tmp2_;
	XmppXepPubsubPublishOptions* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (send != NULL, NULL);
	_tmp0_ = self->settings;
	_tmp1_ = string_to_string (send);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, "pubsub#send_last_published_item", _tmp1_);
	_tmp2_ = _xmpp_xep_pubsub_publish_options_ref0 (self);
	result = _tmp2_;
	return result;
}

XmppXepPubsubPublishOptions*
xmpp_xep_pubsub_publish_options_set_access_model (XmppXepPubsubPublishOptions* self,
                                                  const gchar* model)
{
	GeeHashMap* _tmp0_;
	XmppXepPubsubPublishOptions* _tmp1_;
	XmppXepPubsubPublishOptions* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (model != NULL, NULL);
	_tmp0_ = self->settings;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, "pubsub#access_model", model);
	_tmp1_ = _xmpp_xep_pubsub_publish_options_ref0 (self);
	result = _tmp1_;
	return result;
}

XmppXepPubsubPublishOptions*
xmpp_xep_pubsub_publish_options_construct (GType object_type)
{
	XmppXepPubsubPublishOptions* self = NULL;
	self = (XmppXepPubsubPublishOptions*) g_type_create_instance (object_type);
	return self;
}

XmppXepPubsubPublishOptions*
xmpp_xep_pubsub_publish_options_new (void)
{
	return xmpp_xep_pubsub_publish_options_construct (XMPP_XEP_PUBSUB_TYPE_PUBLISH_OPTIONS);
}

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

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

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

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

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

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

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

void
xmpp_xep_pubsub_value_set_publish_options (GValue* value,
                                           gpointer v_object)
{
	XmppXepPubsubPublishOptions * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_PUBSUB_TYPE_PUBLISH_OPTIONS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_PUBSUB_TYPE_PUBLISH_OPTIONS));
		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_pubsub_publish_options_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_pubsub_publish_options_unref (old);
	}
}

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

static void
xmpp_xep_pubsub_publish_options_class_init (XmppXepPubsubPublishOptionsClass * klass,
                                            gpointer klass_data)
{
	xmpp_xep_pubsub_publish_options_parent_class = g_type_class_peek_parent (klass);
	((XmppXepPubsubPublishOptionsClass *) klass)->finalize = xmpp_xep_pubsub_publish_options_finalize;
}

static void
xmpp_xep_pubsub_publish_options_instance_init (XmppXepPubsubPublishOptions * self,
                                               gpointer klass)
{
	GeeHashMap* _tmp0_;
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->settings = _tmp0_;
	self->ref_count = 1;
}

static void
xmpp_xep_pubsub_publish_options_finalize (XmppXepPubsubPublishOptions * obj)
{
	XmppXepPubsubPublishOptions * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_PUBSUB_TYPE_PUBLISH_OPTIONS, XmppXepPubsubPublishOptions);
	g_signal_handlers_destroy (self);
	_g_object_unref0 (self->settings);
}

static GType
xmpp_xep_pubsub_publish_options_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_pubsub_value_publish_options_init, xmpp_xep_pubsub_value_publish_options_free_value, xmpp_xep_pubsub_value_publish_options_copy_value, xmpp_xep_pubsub_value_publish_options_peek_pointer, "p", xmpp_xep_pubsub_value_publish_options_collect_value, "p", xmpp_xep_pubsub_value_publish_options_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepPubsubPublishOptionsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_pubsub_publish_options_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepPubsubPublishOptions), 0, (GInstanceInitFunc) xmpp_xep_pubsub_publish_options_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_pubsub_publish_options_type_id;
	xmpp_xep_pubsub_publish_options_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepPubsubPublishOptions", &g_define_type_info, &g_define_type_fundamental_info, 0);
	return xmpp_xep_pubsub_publish_options_type_id;
}

GType
xmpp_xep_pubsub_publish_options_get_type (void)
{
	static volatile gsize xmpp_xep_pubsub_publish_options_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_pubsub_publish_options_type_id__once)) {
		GType xmpp_xep_pubsub_publish_options_type_id;
		xmpp_xep_pubsub_publish_options_type_id = xmpp_xep_pubsub_publish_options_get_type_once ();
		g_once_init_leave (&xmpp_xep_pubsub_publish_options_type_id__once, xmpp_xep_pubsub_publish_options_type_id);
	}
	return xmpp_xep_pubsub_publish_options_type_id__once;
}

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

void
xmpp_xep_pubsub_publish_options_unref (gpointer instance)
{
	XmppXepPubsubPublishOptions * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_PUBSUB_PUBLISH_OPTIONS_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
xmpp_xep_pubsub_item_listener_delegate_get_instance_private (XmppXepPubsubItemListenerDelegate* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepPubsubItemListenerDelegate_private_offset);
}

XmppXepPubsubItemListenerDelegate*
xmpp_xep_pubsub_item_listener_delegate_construct (GType object_type,
                                                  XmppXepPubsubItemListenerDelegateResultFunc on_result,
                                                  gpointer on_result_target,
                                                  GDestroyNotify on_result_target_destroy_notify)
{
	XmppXepPubsubItemListenerDelegate* self = NULL;
	XmppXepPubsubItemListenerDelegateResultFunc _tmp0_;
	gpointer _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	self = (XmppXepPubsubItemListenerDelegate*) g_type_create_instance (object_type);
	_tmp0_ = on_result;
	_tmp0__target = on_result_target;
	_tmp0__target_destroy_notify = on_result_target_destroy_notify;
	on_result = NULL;
	on_result_target = NULL;
	on_result_target_destroy_notify = NULL;
	xmpp_xep_pubsub_item_listener_delegate_set_on_result (self, _tmp0_, _tmp0__target, _tmp0__target_destroy_notify);
	(on_result_target_destroy_notify == NULL) ? NULL : (on_result_target_destroy_notify (on_result_target), NULL);
	on_result = NULL;
	on_result_target = NULL;
	on_result_target_destroy_notify = NULL;
	return self;
}

XmppXepPubsubItemListenerDelegate*
xmpp_xep_pubsub_item_listener_delegate_new (XmppXepPubsubItemListenerDelegateResultFunc on_result,
                                            gpointer on_result_target,
                                            GDestroyNotify on_result_target_destroy_notify)
{
	return xmpp_xep_pubsub_item_listener_delegate_construct (XMPP_XEP_PUBSUB_TYPE_ITEM_LISTENER_DELEGATE, on_result, on_result_target, on_result_target_destroy_notify);
}

XmppXepPubsubItemListenerDelegateResultFunc
xmpp_xep_pubsub_item_listener_delegate_get_on_result (XmppXepPubsubItemListenerDelegate* self,
                                                      gpointer* result_target)
{
	XmppXepPubsubItemListenerDelegateResultFunc result;
	XmppXepPubsubItemListenerDelegateResultFunc _tmp0_;
	gpointer _tmp0__target;
	XmppXepPubsubItemListenerDelegateResultFunc _tmp1_;
	gpointer _tmp1__target;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_on_result;
	_tmp0__target = self->priv->_on_result_target;
	_tmp1_ = _tmp0_;
	_tmp1__target = _tmp0__target;
	*result_target = _tmp1__target;
	result = _tmp1_;
	return result;
}

static void
xmpp_xep_pubsub_item_listener_delegate_set_on_result (XmppXepPubsubItemListenerDelegate* self,
                                                      XmppXepPubsubItemListenerDelegateResultFunc value,
                                                      gpointer value_target,
                                                      GDestroyNotify value_target_destroy_notify)
{
	XmppXepPubsubItemListenerDelegateResultFunc _tmp0_;
	gpointer _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp0__target = value_target;
	_tmp0__target_destroy_notify = value_target_destroy_notify;
	value = NULL;
	value_target = NULL;
	value_target_destroy_notify = NULL;
	(self->priv->_on_result_target_destroy_notify == NULL) ? NULL : (self->priv->_on_result_target_destroy_notify (self->priv->_on_result_target), NULL);
	self->priv->_on_result = NULL;
	self->priv->_on_result_target = NULL;
	self->priv->_on_result_target_destroy_notify = NULL;
	self->priv->_on_result = _tmp0_;
	self->priv->_on_result_target = _tmp0__target;
	self->priv->_on_result_target_destroy_notify = _tmp0__target_destroy_notify;
	(value_target_destroy_notify == NULL) ? NULL : (value_target_destroy_notify (value_target), NULL);
	value = NULL;
	value_target = NULL;
	value_target_destroy_notify = NULL;
}

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

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

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

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

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

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

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

void
xmpp_xep_pubsub_value_set_item_listener_delegate (GValue* value,
                                                  gpointer v_object)
{
	XmppXepPubsubItemListenerDelegate * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_PUBSUB_TYPE_ITEM_LISTENER_DELEGATE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_PUBSUB_TYPE_ITEM_LISTENER_DELEGATE));
		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_pubsub_item_listener_delegate_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_pubsub_item_listener_delegate_unref (old);
	}
}

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

static void
xmpp_xep_pubsub_item_listener_delegate_class_init (XmppXepPubsubItemListenerDelegateClass * klass,
                                                   gpointer klass_data)
{
	xmpp_xep_pubsub_item_listener_delegate_parent_class = g_type_class_peek_parent (klass);
	((XmppXepPubsubItemListenerDelegateClass *) klass)->finalize = xmpp_xep_pubsub_item_listener_delegate_finalize;
	g_type_class_adjust_private_offset (klass, &XmppXepPubsubItemListenerDelegate_private_offset);
}

static void
xmpp_xep_pubsub_item_listener_delegate_instance_init (XmppXepPubsubItemListenerDelegate * self,
                                                      gpointer klass)
{
	self->priv = xmpp_xep_pubsub_item_listener_delegate_get_instance_private (self);
	self->ref_count = 1;
}

static void
xmpp_xep_pubsub_item_listener_delegate_finalize (XmppXepPubsubItemListenerDelegate * obj)
{
	XmppXepPubsubItemListenerDelegate * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_PUBSUB_TYPE_ITEM_LISTENER_DELEGATE, XmppXepPubsubItemListenerDelegate);
	g_signal_handlers_destroy (self);
	(self->priv->_on_result_target_destroy_notify == NULL) ? NULL : (self->priv->_on_result_target_destroy_notify (self->priv->_on_result_target), NULL);
	self->priv->_on_result = NULL;
	self->priv->_on_result_target = NULL;
	self->priv->_on_result_target_destroy_notify = NULL;
}

static GType
xmpp_xep_pubsub_item_listener_delegate_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_pubsub_value_item_listener_delegate_init, xmpp_xep_pubsub_value_item_listener_delegate_free_value, xmpp_xep_pubsub_value_item_listener_delegate_copy_value, xmpp_xep_pubsub_value_item_listener_delegate_peek_pointer, "p", xmpp_xep_pubsub_value_item_listener_delegate_collect_value, "p", xmpp_xep_pubsub_value_item_listener_delegate_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepPubsubItemListenerDelegateClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_pubsub_item_listener_delegate_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepPubsubItemListenerDelegate), 0, (GInstanceInitFunc) xmpp_xep_pubsub_item_listener_delegate_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_pubsub_item_listener_delegate_type_id;
	xmpp_xep_pubsub_item_listener_delegate_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepPubsubItemListenerDelegate", &g_define_type_info, &g_define_type_fundamental_info, 0);
	XmppXepPubsubItemListenerDelegate_private_offset = g_type_add_instance_private (xmpp_xep_pubsub_item_listener_delegate_type_id, sizeof (XmppXepPubsubItemListenerDelegatePrivate));
	return xmpp_xep_pubsub_item_listener_delegate_type_id;
}

GType
xmpp_xep_pubsub_item_listener_delegate_get_type (void)
{
	static volatile gsize xmpp_xep_pubsub_item_listener_delegate_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_pubsub_item_listener_delegate_type_id__once)) {
		GType xmpp_xep_pubsub_item_listener_delegate_type_id;
		xmpp_xep_pubsub_item_listener_delegate_type_id = xmpp_xep_pubsub_item_listener_delegate_get_type_once ();
		g_once_init_leave (&xmpp_xep_pubsub_item_listener_delegate_type_id__once, xmpp_xep_pubsub_item_listener_delegate_type_id);
	}
	return xmpp_xep_pubsub_item_listener_delegate_type_id__once;
}

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

void
xmpp_xep_pubsub_item_listener_delegate_unref (gpointer instance)
{
	XmppXepPubsubItemListenerDelegate * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_PUBSUB_ITEM_LISTENER_DELEGATE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
xmpp_xep_pubsub_retract_listener_delegate_get_instance_private (XmppXepPubsubRetractListenerDelegate* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepPubsubRetractListenerDelegate_private_offset);
}

XmppXepPubsubRetractListenerDelegate*
xmpp_xep_pubsub_retract_listener_delegate_construct (GType object_type,
                                                     XmppXepPubsubRetractListenerDelegateResultFunc on_result,
                                                     gpointer on_result_target,
                                                     GDestroyNotify on_result_target_destroy_notify)
{
	XmppXepPubsubRetractListenerDelegate* self = NULL;
	XmppXepPubsubRetractListenerDelegateResultFunc _tmp0_;
	gpointer _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	self = (XmppXepPubsubRetractListenerDelegate*) g_type_create_instance (object_type);
	_tmp0_ = on_result;
	_tmp0__target = on_result_target;
	_tmp0__target_destroy_notify = on_result_target_destroy_notify;
	on_result = NULL;
	on_result_target = NULL;
	on_result_target_destroy_notify = NULL;
	xmpp_xep_pubsub_retract_listener_delegate_set_on_result (self, _tmp0_, _tmp0__target, _tmp0__target_destroy_notify);
	(on_result_target_destroy_notify == NULL) ? NULL : (on_result_target_destroy_notify (on_result_target), NULL);
	on_result = NULL;
	on_result_target = NULL;
	on_result_target_destroy_notify = NULL;
	return self;
}

XmppXepPubsubRetractListenerDelegate*
xmpp_xep_pubsub_retract_listener_delegate_new (XmppXepPubsubRetractListenerDelegateResultFunc on_result,
                                               gpointer on_result_target,
                                               GDestroyNotify on_result_target_destroy_notify)
{
	return xmpp_xep_pubsub_retract_listener_delegate_construct (XMPP_XEP_PUBSUB_TYPE_RETRACT_LISTENER_DELEGATE, on_result, on_result_target, on_result_target_destroy_notify);
}

XmppXepPubsubRetractListenerDelegateResultFunc
xmpp_xep_pubsub_retract_listener_delegate_get_on_result (XmppXepPubsubRetractListenerDelegate* self,
                                                         gpointer* result_target)
{
	XmppXepPubsubRetractListenerDelegateResultFunc result;
	XmppXepPubsubRetractListenerDelegateResultFunc _tmp0_;
	gpointer _tmp0__target;
	XmppXepPubsubRetractListenerDelegateResultFunc _tmp1_;
	gpointer _tmp1__target;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_on_result;
	_tmp0__target = self->priv->_on_result_target;
	_tmp1_ = _tmp0_;
	_tmp1__target = _tmp0__target;
	*result_target = _tmp1__target;
	result = _tmp1_;
	return result;
}

static void
xmpp_xep_pubsub_retract_listener_delegate_set_on_result (XmppXepPubsubRetractListenerDelegate* self,
                                                         XmppXepPubsubRetractListenerDelegateResultFunc value,
                                                         gpointer value_target,
                                                         GDestroyNotify value_target_destroy_notify)
{
	XmppXepPubsubRetractListenerDelegateResultFunc _tmp0_;
	gpointer _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp0__target = value_target;
	_tmp0__target_destroy_notify = value_target_destroy_notify;
	value = NULL;
	value_target = NULL;
	value_target_destroy_notify = NULL;
	(self->priv->_on_result_target_destroy_notify == NULL) ? NULL : (self->priv->_on_result_target_destroy_notify (self->priv->_on_result_target), NULL);
	self->priv->_on_result = NULL;
	self->priv->_on_result_target = NULL;
	self->priv->_on_result_target_destroy_notify = NULL;
	self->priv->_on_result = _tmp0_;
	self->priv->_on_result_target = _tmp0__target;
	self->priv->_on_result_target_destroy_notify = _tmp0__target_destroy_notify;
	(value_target_destroy_notify == NULL) ? NULL : (value_target_destroy_notify (value_target), NULL);
	value = NULL;
	value_target = NULL;
	value_target_destroy_notify = NULL;
}

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

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

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

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

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

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

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

void
xmpp_xep_pubsub_value_set_retract_listener_delegate (GValue* value,
                                                     gpointer v_object)
{
	XmppXepPubsubRetractListenerDelegate * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_PUBSUB_TYPE_RETRACT_LISTENER_DELEGATE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_PUBSUB_TYPE_RETRACT_LISTENER_DELEGATE));
		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_pubsub_retract_listener_delegate_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_pubsub_retract_listener_delegate_unref (old);
	}
}

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

static void
xmpp_xep_pubsub_retract_listener_delegate_class_init (XmppXepPubsubRetractListenerDelegateClass * klass,
                                                      gpointer klass_data)
{
	xmpp_xep_pubsub_retract_listener_delegate_parent_class = g_type_class_peek_parent (klass);
	((XmppXepPubsubRetractListenerDelegateClass *) klass)->finalize = xmpp_xep_pubsub_retract_listener_delegate_finalize;
	g_type_class_adjust_private_offset (klass, &XmppXepPubsubRetractListenerDelegate_private_offset);
}

static void
xmpp_xep_pubsub_retract_listener_delegate_instance_init (XmppXepPubsubRetractListenerDelegate * self,
                                                         gpointer klass)
{
	self->priv = xmpp_xep_pubsub_retract_listener_delegate_get_instance_private (self);
	self->ref_count = 1;
}

static void
xmpp_xep_pubsub_retract_listener_delegate_finalize (XmppXepPubsubRetractListenerDelegate * obj)
{
	XmppXepPubsubRetractListenerDelegate * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_PUBSUB_TYPE_RETRACT_LISTENER_DELEGATE, XmppXepPubsubRetractListenerDelegate);
	g_signal_handlers_destroy (self);
	(self->priv->_on_result_target_destroy_notify == NULL) ? NULL : (self->priv->_on_result_target_destroy_notify (self->priv->_on_result_target), NULL);
	self->priv->_on_result = NULL;
	self->priv->_on_result_target = NULL;
	self->priv->_on_result_target_destroy_notify = NULL;
}

static GType
xmpp_xep_pubsub_retract_listener_delegate_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_pubsub_value_retract_listener_delegate_init, xmpp_xep_pubsub_value_retract_listener_delegate_free_value, xmpp_xep_pubsub_value_retract_listener_delegate_copy_value, xmpp_xep_pubsub_value_retract_listener_delegate_peek_pointer, "p", xmpp_xep_pubsub_value_retract_listener_delegate_collect_value, "p", xmpp_xep_pubsub_value_retract_listener_delegate_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepPubsubRetractListenerDelegateClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_pubsub_retract_listener_delegate_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepPubsubRetractListenerDelegate), 0, (GInstanceInitFunc) xmpp_xep_pubsub_retract_listener_delegate_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_pubsub_retract_listener_delegate_type_id;
	xmpp_xep_pubsub_retract_listener_delegate_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepPubsubRetractListenerDelegate", &g_define_type_info, &g_define_type_fundamental_info, 0);
	XmppXepPubsubRetractListenerDelegate_private_offset = g_type_add_instance_private (xmpp_xep_pubsub_retract_listener_delegate_type_id, sizeof (XmppXepPubsubRetractListenerDelegatePrivate));
	return xmpp_xep_pubsub_retract_listener_delegate_type_id;
}

GType
xmpp_xep_pubsub_retract_listener_delegate_get_type (void)
{
	static volatile gsize xmpp_xep_pubsub_retract_listener_delegate_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_pubsub_retract_listener_delegate_type_id__once)) {
		GType xmpp_xep_pubsub_retract_listener_delegate_type_id;
		xmpp_xep_pubsub_retract_listener_delegate_type_id = xmpp_xep_pubsub_retract_listener_delegate_get_type_once ();
		g_once_init_leave (&xmpp_xep_pubsub_retract_listener_delegate_type_id__once, xmpp_xep_pubsub_retract_listener_delegate_type_id);
	}
	return xmpp_xep_pubsub_retract_listener_delegate_type_id__once;
}

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

void
xmpp_xep_pubsub_retract_listener_delegate_unref (gpointer instance)
{
	XmppXepPubsubRetractListenerDelegate * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_PUBSUB_RETRACT_LISTENER_DELEGATE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
xmpp_xep_pubsub_delete_listener_delegate_get_instance_private (XmppXepPubsubDeleteListenerDelegate* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepPubsubDeleteListenerDelegate_private_offset);
}

XmppXepPubsubDeleteListenerDelegate*
xmpp_xep_pubsub_delete_listener_delegate_construct (GType object_type,
                                                    XmppXepPubsubDeleteListenerDelegateResultFunc on_result,
                                                    gpointer on_result_target,
                                                    GDestroyNotify on_result_target_destroy_notify)
{
	XmppXepPubsubDeleteListenerDelegate* self = NULL;
	XmppXepPubsubDeleteListenerDelegateResultFunc _tmp0_;
	gpointer _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	self = (XmppXepPubsubDeleteListenerDelegate*) g_type_create_instance (object_type);
	_tmp0_ = on_result;
	_tmp0__target = on_result_target;
	_tmp0__target_destroy_notify = on_result_target_destroy_notify;
	on_result = NULL;
	on_result_target = NULL;
	on_result_target_destroy_notify = NULL;
	xmpp_xep_pubsub_delete_listener_delegate_set_on_result (self, _tmp0_, _tmp0__target, _tmp0__target_destroy_notify);
	(on_result_target_destroy_notify == NULL) ? NULL : (on_result_target_destroy_notify (on_result_target), NULL);
	on_result = NULL;
	on_result_target = NULL;
	on_result_target_destroy_notify = NULL;
	return self;
}

XmppXepPubsubDeleteListenerDelegate*
xmpp_xep_pubsub_delete_listener_delegate_new (XmppXepPubsubDeleteListenerDelegateResultFunc on_result,
                                              gpointer on_result_target,
                                              GDestroyNotify on_result_target_destroy_notify)
{
	return xmpp_xep_pubsub_delete_listener_delegate_construct (XMPP_XEP_PUBSUB_TYPE_DELETE_LISTENER_DELEGATE, on_result, on_result_target, on_result_target_destroy_notify);
}

XmppXepPubsubDeleteListenerDelegateResultFunc
xmpp_xep_pubsub_delete_listener_delegate_get_on_result (XmppXepPubsubDeleteListenerDelegate* self,
                                                        gpointer* result_target)
{
	XmppXepPubsubDeleteListenerDelegateResultFunc result;
	XmppXepPubsubDeleteListenerDelegateResultFunc _tmp0_;
	gpointer _tmp0__target;
	XmppXepPubsubDeleteListenerDelegateResultFunc _tmp1_;
	gpointer _tmp1__target;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_on_result;
	_tmp0__target = self->priv->_on_result_target;
	_tmp1_ = _tmp0_;
	_tmp1__target = _tmp0__target;
	*result_target = _tmp1__target;
	result = _tmp1_;
	return result;
}

static void
xmpp_xep_pubsub_delete_listener_delegate_set_on_result (XmppXepPubsubDeleteListenerDelegate* self,
                                                        XmppXepPubsubDeleteListenerDelegateResultFunc value,
                                                        gpointer value_target,
                                                        GDestroyNotify value_target_destroy_notify)
{
	XmppXepPubsubDeleteListenerDelegateResultFunc _tmp0_;
	gpointer _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp0__target = value_target;
	_tmp0__target_destroy_notify = value_target_destroy_notify;
	value = NULL;
	value_target = NULL;
	value_target_destroy_notify = NULL;
	(self->priv->_on_result_target_destroy_notify == NULL) ? NULL : (self->priv->_on_result_target_destroy_notify (self->priv->_on_result_target), NULL);
	self->priv->_on_result = NULL;
	self->priv->_on_result_target = NULL;
	self->priv->_on_result_target_destroy_notify = NULL;
	self->priv->_on_result = _tmp0_;
	self->priv->_on_result_target = _tmp0__target;
	self->priv->_on_result_target_destroy_notify = _tmp0__target_destroy_notify;
	(value_target_destroy_notify == NULL) ? NULL : (value_target_destroy_notify (value_target), NULL);
	value = NULL;
	value_target = NULL;
	value_target_destroy_notify = NULL;
}

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

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

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

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

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

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

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

void
xmpp_xep_pubsub_value_set_delete_listener_delegate (GValue* value,
                                                    gpointer v_object)
{
	XmppXepPubsubDeleteListenerDelegate * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, XMPP_XEP_PUBSUB_TYPE_DELETE_LISTENER_DELEGATE));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, XMPP_XEP_PUBSUB_TYPE_DELETE_LISTENER_DELEGATE));
		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_pubsub_delete_listener_delegate_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		xmpp_xep_pubsub_delete_listener_delegate_unref (old);
	}
}

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

static void
xmpp_xep_pubsub_delete_listener_delegate_class_init (XmppXepPubsubDeleteListenerDelegateClass * klass,
                                                     gpointer klass_data)
{
	xmpp_xep_pubsub_delete_listener_delegate_parent_class = g_type_class_peek_parent (klass);
	((XmppXepPubsubDeleteListenerDelegateClass *) klass)->finalize = xmpp_xep_pubsub_delete_listener_delegate_finalize;
	g_type_class_adjust_private_offset (klass, &XmppXepPubsubDeleteListenerDelegate_private_offset);
}

static void
xmpp_xep_pubsub_delete_listener_delegate_instance_init (XmppXepPubsubDeleteListenerDelegate * self,
                                                        gpointer klass)
{
	self->priv = xmpp_xep_pubsub_delete_listener_delegate_get_instance_private (self);
	self->ref_count = 1;
}

static void
xmpp_xep_pubsub_delete_listener_delegate_finalize (XmppXepPubsubDeleteListenerDelegate * obj)
{
	XmppXepPubsubDeleteListenerDelegate * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_PUBSUB_TYPE_DELETE_LISTENER_DELEGATE, XmppXepPubsubDeleteListenerDelegate);
	g_signal_handlers_destroy (self);
	(self->priv->_on_result_target_destroy_notify == NULL) ? NULL : (self->priv->_on_result_target_destroy_notify (self->priv->_on_result_target), NULL);
	self->priv->_on_result = NULL;
	self->priv->_on_result_target = NULL;
	self->priv->_on_result_target_destroy_notify = NULL;
}

static GType
xmpp_xep_pubsub_delete_listener_delegate_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { xmpp_xep_pubsub_value_delete_listener_delegate_init, xmpp_xep_pubsub_value_delete_listener_delegate_free_value, xmpp_xep_pubsub_value_delete_listener_delegate_copy_value, xmpp_xep_pubsub_value_delete_listener_delegate_peek_pointer, "p", xmpp_xep_pubsub_value_delete_listener_delegate_collect_value, "p", xmpp_xep_pubsub_value_delete_listener_delegate_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepPubsubDeleteListenerDelegateClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_pubsub_delete_listener_delegate_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepPubsubDeleteListenerDelegate), 0, (GInstanceInitFunc) xmpp_xep_pubsub_delete_listener_delegate_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_pubsub_delete_listener_delegate_type_id;
	xmpp_xep_pubsub_delete_listener_delegate_type_id = g_type_register_fundamental (g_type_fundamental_next (), "XmppXepPubsubDeleteListenerDelegate", &g_define_type_info, &g_define_type_fundamental_info, 0);
	XmppXepPubsubDeleteListenerDelegate_private_offset = g_type_add_instance_private (xmpp_xep_pubsub_delete_listener_delegate_type_id, sizeof (XmppXepPubsubDeleteListenerDelegatePrivate));
	return xmpp_xep_pubsub_delete_listener_delegate_type_id;
}

GType
xmpp_xep_pubsub_delete_listener_delegate_get_type (void)
{
	static volatile gsize xmpp_xep_pubsub_delete_listener_delegate_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_pubsub_delete_listener_delegate_type_id__once)) {
		GType xmpp_xep_pubsub_delete_listener_delegate_type_id;
		xmpp_xep_pubsub_delete_listener_delegate_type_id = xmpp_xep_pubsub_delete_listener_delegate_get_type_once ();
		g_once_init_leave (&xmpp_xep_pubsub_delete_listener_delegate_type_id__once, xmpp_xep_pubsub_delete_listener_delegate_type_id);
	}
	return xmpp_xep_pubsub_delete_listener_delegate_type_id__once;
}

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

void
xmpp_xep_pubsub_delete_listener_delegate_unref (gpointer instance)
{
	XmppXepPubsubDeleteListenerDelegate * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		XMPP_XEP_PUBSUB_DELETE_LISTENER_DELEGATE_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

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

