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

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

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

#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block22Data Block22Data;
#define _dino_module_manager_unref0(var) ((var == NULL) ? NULL : (var = (dino_module_manager_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
typedef struct _DinoParamSpecModuleManager DinoParamSpecModuleManager;
enum  {
	DINO_MODULE_MANAGER_INITIALIZE_ACCOUNT_MODULES_SIGNAL,
	DINO_MODULE_MANAGER_NUM_SIGNALS
};
static guint dino_module_manager_signals[DINO_MODULE_MANAGER_NUM_SIGNALS] = {0};

struct _DinoModuleManagerPrivate {
	GeeHashMap* module_map;
	GRecMutex __lock_module_map;
};

struct _Block22Data {
	int _ref_count_;
	DinoModuleManager* self;
	GType t_type;
	GBoxedCopyFunc t_dup_func;
	GDestroyNotify t_destroy_func;
	XmppModuleIdentity* identity;
};

struct _DinoParamSpecModuleManager {
	GParamSpec parent_instance;
};

static gint DinoModuleManager_private_offset;
static gpointer dino_module_manager_parent_class = NULL;

static guint _dino_entities_account_hash_func_gee_hash_data_func (gconstpointer v,
                                                           gpointer self);
static gboolean _dino_entities_account_equals_func_gee_equal_data_func (gconstpointer a,
                                                                 gconstpointer b,
                                                                 gpointer self);
static Block22Data* block22_data_ref (Block22Data* _data22_);
static void block22_data_unref (void * _userdata_);
static gboolean ___lambda4_ (Block22Data* _data22_,
                      XmppXmppStreamModule* module);
static gboolean ____lambda4__gee_predicate (gconstpointer g,
                                     gpointer self);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void dino_module_manager_finalize (DinoModuleManager * obj);
static GType dino_module_manager_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_module_manager_get_instance_private (DinoModuleManager* self)
{
	return G_STRUCT_MEMBER_P (self, DinoModuleManager_private_offset);
}

static guint
_dino_entities_account_hash_func_gee_hash_data_func (gconstpointer v,
                                                     gpointer self)
{
	guint result;
	result = dino_entities_account_hash_func ((DinoEntitiesAccount*) v);
	return result;
}

static gboolean
_dino_entities_account_equals_func_gee_equal_data_func (gconstpointer a,
                                                        gconstpointer b,
                                                        gpointer self)
{
	gboolean result;
	result = dino_entities_account_equals_func ((DinoEntitiesAccount*) a, (DinoEntitiesAccount*) b);
	return result;
}

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

static Block22Data*
block22_data_ref (Block22Data* _data22_)
{
	g_atomic_int_inc (&_data22_->_ref_count_);
	return _data22_;
}

static void
block22_data_unref (void * _userdata_)
{
	Block22Data* _data22_;
	_data22_ = (Block22Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data22_->_ref_count_)) {
		DinoModuleManager* self;
		GType t_type;
		GBoxedCopyFunc t_dup_func;
		GDestroyNotify t_destroy_func;
		self = _data22_->self;
		t_type = _data22_->t_type;
		t_dup_func = _data22_->t_dup_func;
		t_destroy_func = _data22_->t_destroy_func;
		_g_object_unref0 (_data22_->identity);
		_dino_module_manager_unref0 (self);
		g_slice_free (Block22Data, _data22_);
	}
}

static gboolean
___lambda4_ (Block22Data* _data22_,
             XmppXmppStreamModule* module)
{
	DinoModuleManager* self;
	GType t_type;
	GBoxedCopyFunc t_dup_func;
	GDestroyNotify t_destroy_func;
	gboolean result;
	self = _data22_->self;
	t_type = _data22_->t_type;
	t_dup_func = _data22_->t_dup_func;
	t_destroy_func = _data22_->t_destroy_func;
	g_return_val_if_fail (module != NULL, FALSE);
	result = xmpp_module_identity_matches (_data22_->identity, module);
	return result;
}

static gboolean
____lambda4__gee_predicate (gconstpointer g,
                            gpointer self)
{
	gboolean result;
	result = ___lambda4_ (self, (XmppXmppStreamModule*) g);
	return result;
}

gpointer
dino_module_manager_get_module (DinoModuleManager* self,
                                GType t_type,
                                GBoxedCopyFunc t_dup_func,
                                GDestroyNotify t_destroy_func,
                                DinoEntitiesAccount* account,
                                XmppModuleIdentity* identity)
{
	Block22Data* _data22_;
	XmppModuleIdentity* _tmp0_;
	GError* _inner_error0_ = NULL;
	gpointer result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (account != NULL, NULL);
	g_return_val_if_fail (identity != NULL, NULL);
	_data22_ = g_slice_new0 (Block22Data);
	_data22_->_ref_count_ = 1;
	_data22_->self = dino_module_manager_ref (self);
	_data22_->t_type = t_type;
	_data22_->t_dup_func = t_dup_func;
	_data22_->t_destroy_func = t_destroy_func;
	_tmp0_ = _g_object_ref0 (identity);
	_g_object_unref0 (_data22_->identity);
	_data22_->identity = _tmp0_;
	if (_data22_->identity == NULL) {
		result = NULL;
		block22_data_unref (_data22_);
		_data22_ = NULL;
		return result;
	}
	{
		GeeHashMap* _tmp1_;
		_tmp1_ = self->priv->module_map;
		g_rec_mutex_lock (&self->priv->__lock_module_map);
		{
			GeeHashMap* _tmp2_;
			GeeIterator* res = NULL;
			GeeHashMap* _tmp3_;
			gpointer _tmp4_;
			GeeArrayList* _tmp5_;
			GeeIterator* _tmp6_;
			GeeIterator* _tmp7_;
			gboolean _tmp8_ = FALSE;
			GeeIterator* _tmp9_;
			_tmp2_ = self->priv->module_map;
			if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, account)) {
				dino_module_manager_initialize (self, account);
			}
			_tmp3_ = self->priv->module_map;
			_tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, account);
			_tmp5_ = (GeeArrayList*) _tmp4_;
			_tmp6_ = gee_traversable_filter ((GeeTraversable*) _tmp5_, ____lambda4__gee_predicate, block22_data_ref (_data22_), block22_data_unref);
			_tmp7_ = _tmp6_;
			_g_object_unref0 (_tmp5_);
			res = _tmp7_;
			_tmp9_ = res;
			if (_tmp9_ != NULL) {
				GeeIterator* _tmp10_;
				_tmp10_ = res;
				_tmp8_ = gee_iterator_next (_tmp10_);
			} else {
				_tmp8_ = FALSE;
			}
			if (_tmp8_) {
				GeeIterator* _tmp11_;
				gpointer _tmp12_;
				XmppXmppStreamModule* _tmp13_;
				gpointer _tmp14_;
				gpointer _tmp15_;
				_tmp11_ = res;
				_tmp12_ = gee_iterator_get (_tmp11_);
				_tmp13_ = (XmppXmppStreamModule*) _tmp12_;
				_tmp14_ = xmpp_module_identity_cast (_data22_->identity, _tmp13_);
				_tmp15_ = _tmp14_;
				_g_object_unref0 (_tmp13_);
				result = _tmp15_;
				_g_object_unref0 (res);
				{
					GeeHashMap* _tmp16_;
					_tmp16_ = self->priv->module_map;
					g_rec_mutex_unlock (&self->priv->__lock_module_map);
				}
				block22_data_unref (_data22_);
				_data22_ = NULL;
				return result;
			}
			_g_object_unref0 (res);
		}
		__finally0:
		{
			GeeHashMap* _tmp17_;
			_tmp17_ = self->priv->module_map;
			g_rec_mutex_unlock (&self->priv->__lock_module_map);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			block22_data_unref (_data22_);
			_data22_ = NULL;
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	result = NULL;
	block22_data_unref (_data22_);
	_data22_ = NULL;
	return result;
}

GeeArrayList*
dino_module_manager_get_modules (DinoModuleManager* self,
                                 DinoEntitiesAccount* account)
{
	GeeArrayList* modules = NULL;
	GeeArrayList* _tmp0_;
	GError* _inner_error0_ = NULL;
	GeeArrayList* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (account != NULL, NULL);
	_tmp0_ = gee_array_list_new (XMPP_TYPE_XMPP_STREAM_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	modules = _tmp0_;
	{
		GeeHashMap* _tmp1_;
		_tmp1_ = self->priv->module_map;
		g_rec_mutex_lock (&self->priv->__lock_module_map);
		{
			GeeHashMap* _tmp2_;
			_tmp2_ = self->priv->module_map;
			if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp2_, account)) {
				dino_module_manager_initialize (self, account);
			}
			{
				GeeArrayList* _module_list = NULL;
				GeeHashMap* _tmp3_;
				gpointer _tmp4_;
				gint _module_size = 0;
				GeeArrayList* _tmp5_;
				gint _tmp6_;
				gint _tmp7_;
				gint _module_index = 0;
				_tmp3_ = self->priv->module_map;
				_tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, account);
				_module_list = (GeeArrayList*) _tmp4_;
				_tmp5_ = _module_list;
				_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_);
				_tmp7_ = _tmp6_;
				_module_size = _tmp7_;
				_module_index = -1;
				while (TRUE) {
					gint _tmp8_;
					gint _tmp9_;
					XmppXmppStreamModule* module = NULL;
					GeeArrayList* _tmp10_;
					gpointer _tmp11_;
					GeeArrayList* _tmp12_;
					XmppXmppStreamModule* _tmp13_;
					_module_index = _module_index + 1;
					_tmp8_ = _module_index;
					_tmp9_ = _module_size;
					if (!(_tmp8_ < _tmp9_)) {
						break;
					}
					_tmp10_ = _module_list;
					_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _module_index);
					module = (XmppXmppStreamModule*) _tmp11_;
					_tmp12_ = modules;
					_tmp13_ = module;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp12_, _tmp13_);
					_g_object_unref0 (module);
				}
				_g_object_unref0 (_module_list);
			}
		}
		__finally0:
		{
			GeeHashMap* _tmp14_;
			_tmp14_ = self->priv->module_map;
			g_rec_mutex_unlock (&self->priv->__lock_module_map);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (modules);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
	}
	{
		GeeArrayList* _module_list = NULL;
		GeeHashMap* _tmp15_;
		gpointer _tmp16_;
		gint _module_size = 0;
		GeeArrayList* _tmp17_;
		gint _tmp18_;
		gint _tmp19_;
		gint _module_index = 0;
		_tmp15_ = self->priv->module_map;
		_tmp16_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp15_, account);
		_module_list = (GeeArrayList*) _tmp16_;
		_tmp17_ = _module_list;
		_tmp18_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp17_);
		_tmp19_ = _tmp18_;
		_module_size = _tmp19_;
		_module_index = -1;
		while (TRUE) {
			gint _tmp20_;
			gint _tmp21_;
			XmppXmppStreamModule* module = NULL;
			GeeArrayList* _tmp22_;
			gpointer _tmp23_;
			XmppXmppStreamModule* _tmp24_;
			gchar* _tmp25_;
			gchar* _tmp26_;
			XmppModuleIdentity* _tmp27_;
			const gchar* _tmp28_;
			const gchar* _tmp29_;
			gboolean _tmp30_;
			_module_index = _module_index + 1;
			_tmp20_ = _module_index;
			_tmp21_ = _module_size;
			if (!(_tmp20_ < _tmp21_)) {
				break;
			}
			_tmp22_ = _module_list;
			_tmp23_ = gee_abstract_list_get ((GeeAbstractList*) _tmp22_, _module_index);
			module = (XmppXmppStreamModule*) _tmp23_;
			_tmp24_ = module;
			_tmp25_ = xmpp_xmpp_stream_module_get_id (_tmp24_);
			_tmp26_ = _tmp25_;
			_tmp27_ = xmpp_bind_module_IDENTITY;
			_tmp28_ = xmpp_module_identity_get_id (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = g_strcmp0 (_tmp26_, _tmp29_) == 0;
			_g_free0 (_tmp26_);
			if (_tmp30_) {
				XmppXmppStreamModule* _tmp31_;
				const gchar* _tmp32_;
				const gchar* _tmp33_;
				_tmp31_ = module;
				_tmp32_ = dino_entities_account_get_resourcepart (account);
				_tmp33_ = _tmp32_;
				xmpp_bind_module_set_requested_resource (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, XMPP_BIND_TYPE_MODULE, XmppBindModule), _tmp33_);
			} else {
				XmppXmppStreamModule* _tmp34_;
				gchar* _tmp35_;
				gchar* _tmp36_;
				XmppModuleIdentity* _tmp37_;
				const gchar* _tmp38_;
				const gchar* _tmp39_;
				gboolean _tmp40_;
				_tmp34_ = module;
				_tmp35_ = xmpp_xmpp_stream_module_get_id (_tmp34_);
				_tmp36_ = _tmp35_;
				_tmp37_ = xmpp_sasl_module_IDENTITY;
				_tmp38_ = xmpp_module_identity_get_id (_tmp37_);
				_tmp39_ = _tmp38_;
				_tmp40_ = g_strcmp0 (_tmp36_, _tmp39_) == 0;
				_g_free0 (_tmp36_);
				if (_tmp40_) {
					XmppXmppStreamModule* _tmp41_;
					const gchar* _tmp42_;
					const gchar* _tmp43_;
					_tmp41_ = module;
					_tmp42_ = dino_entities_account_get_password (account);
					_tmp43_ = _tmp42_;
					xmpp_sasl_module_set_password (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, XMPP_SASL_TYPE_MODULE, XmppSaslModule), _tmp43_);
				}
			}
			_g_object_unref0 (module);
		}
		_g_object_unref0 (_module_list);
	}
	result = modules;
	return result;
}

void
dino_module_manager_initialize (DinoModuleManager* self,
                                DinoEntitiesAccount* account)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (account != NULL);
	{
		GeeHashMap* _tmp0_;
		_tmp0_ = self->priv->module_map;
		g_rec_mutex_lock (&self->priv->__lock_module_map);
		{
			GeeHashMap* _tmp1_;
			GeeArrayList* _tmp2_;
			GeeArrayList* _tmp3_;
			GeeHashMap* _tmp4_;
			gpointer _tmp5_;
			GeeArrayList* _tmp6_;
			XmppIqModule* _tmp7_;
			XmppIqModule* _tmp8_;
			GeeHashMap* _tmp9_;
			gpointer _tmp10_;
			GeeArrayList* _tmp11_;
			XmppJid* _tmp12_;
			XmppJid* _tmp13_;
			XmppJid* _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			XmppSaslModule* _tmp19_;
			XmppSaslModule* _tmp20_;
			GeeHashMap* _tmp21_;
			gpointer _tmp22_;
			GeeArrayList* _tmp23_;
			XmppXepStreamManagementModule* _tmp24_;
			XmppXepStreamManagementModule* _tmp25_;
			GeeHashMap* _tmp26_;
			gpointer _tmp27_;
			GeeArrayList* _tmp28_;
			const gchar* _tmp29_;
			const gchar* _tmp30_;
			XmppBindModule* _tmp31_;
			XmppBindModule* _tmp32_;
			GeeHashMap* _tmp33_;
			gpointer _tmp34_;
			GeeArrayList* _tmp35_;
			XmppSessionModule* _tmp36_;
			XmppSessionModule* _tmp37_;
			GeeHashMap* _tmp38_;
			gpointer _tmp39_;
			GeeArrayList* _tmp40_;
			XmppRosterModule* _tmp41_;
			XmppRosterModule* _tmp42_;
			GeeHashMap* _tmp43_;
			gpointer _tmp44_;
			GeeArrayList* _tmp45_;
			XmppXepServiceDiscoveryModule* _tmp46_;
			XmppXepServiceDiscoveryModule* _tmp47_;
			GeeHashMap* _tmp48_;
			gpointer _tmp49_;
			GeeArrayList* _tmp50_;
			XmppXepPrivateXmlStorageModule* _tmp51_;
			XmppXepPrivateXmlStorageModule* _tmp52_;
			GeeHashMap* _tmp53_;
			gpointer _tmp54_;
			GeeArrayList* _tmp55_;
			XmppXepBookmarksModule* _tmp56_;
			XmppXepBookmarksModule* _tmp57_;
			GeeHashMap* _tmp58_;
			gpointer _tmp59_;
			GeeArrayList* _tmp60_;
			XmppXepBookmarks2Module* _tmp61_;
			XmppXepBookmarks2Module* _tmp62_;
			GeeHashMap* _tmp63_;
			gpointer _tmp64_;
			GeeArrayList* _tmp65_;
			XmppPresenceModule* _tmp66_;
			XmppPresenceModule* _tmp67_;
			GeeHashMap* _tmp68_;
			gpointer _tmp69_;
			GeeArrayList* _tmp70_;
			XmppMessageModule* _tmp71_;
			XmppMessageModule* _tmp72_;
			GeeHashMap* _tmp73_;
			gpointer _tmp74_;
			GeeArrayList* _tmp75_;
			XmppMessageArchiveManagementModule* _tmp76_;
			XmppMessageArchiveManagementModule* _tmp77_;
			GeeHashMap* _tmp78_;
			gpointer _tmp79_;
			GeeArrayList* _tmp80_;
			XmppXepMessageCarbonsModule* _tmp81_;
			XmppXepMessageCarbonsModule* _tmp82_;
			GeeHashMap* _tmp83_;
			gpointer _tmp84_;
			GeeArrayList* _tmp85_;
			XmppXepMucModule* _tmp86_;
			XmppXepMucModule* _tmp87_;
			GeeHashMap* _tmp88_;
			gpointer _tmp89_;
			GeeArrayList* _tmp90_;
			XmppXepPubsubModule* _tmp91_;
			XmppXepPubsubModule* _tmp92_;
			GeeHashMap* _tmp93_;
			gpointer _tmp94_;
			GeeArrayList* _tmp95_;
			XmppXepMessageDeliveryReceiptsModule* _tmp96_;
			XmppXepMessageDeliveryReceiptsModule* _tmp97_;
			GeeHashMap* _tmp98_;
			gpointer _tmp99_;
			GeeArrayList* _tmp100_;
			XmppXepBlockingCommandModule* _tmp101_;
			XmppXepBlockingCommandModule* _tmp102_;
			GeeHashMap* _tmp103_;
			gpointer _tmp104_;
			GeeArrayList* _tmp105_;
			XmppXepChatStateNotificationsModule* _tmp106_;
			XmppXepChatStateNotificationsModule* _tmp107_;
			GeeHashMap* _tmp108_;
			gpointer _tmp109_;
			GeeArrayList* _tmp110_;
			XmppXepChatMarkersModule* _tmp111_;
			XmppXepChatMarkersModule* _tmp112_;
			GeeHashMap* _tmp113_;
			gpointer _tmp114_;
			GeeArrayList* _tmp115_;
			XmppXepPingModule* _tmp116_;
			XmppXepPingModule* _tmp117_;
			GeeHashMap* _tmp118_;
			gpointer _tmp119_;
			GeeArrayList* _tmp120_;
			XmppXepDelayedDeliveryModule* _tmp121_;
			XmppXepDelayedDeliveryModule* _tmp122_;
			GeeHashMap* _tmp123_;
			gpointer _tmp124_;
			GeeArrayList* _tmp125_;
			XmppStreamErrorModule* _tmp126_;
			XmppStreamErrorModule* _tmp127_;
			GeeHashMap* _tmp128_;
			gpointer _tmp129_;
			GeeArrayList* _tmp130_;
			XmppXepInBandRegistrationModule* _tmp131_;
			XmppXepInBandRegistrationModule* _tmp132_;
			GeeHashMap* _tmp133_;
			gpointer _tmp134_;
			GeeArrayList* _tmp135_;
			XmppXepHttpFileUploadModule* _tmp136_;
			XmppXepHttpFileUploadModule* _tmp137_;
			GeeHashMap* _tmp138_;
			gpointer _tmp139_;
			GeeArrayList* _tmp140_;
			XmppXepReactionsModule* _tmp141_;
			XmppXepReactionsModule* _tmp142_;
			GeeHashMap* _tmp143_;
			gpointer _tmp144_;
			GeeArrayList* _tmp145_;
			XmppXepSocks5BytestreamsModule* _tmp146_;
			XmppXepSocks5BytestreamsModule* _tmp147_;
			GeeHashMap* _tmp148_;
			gpointer _tmp149_;
			GeeArrayList* _tmp150_;
			XmppXepInBandBytestreamsModule* _tmp151_;
			XmppXepInBandBytestreamsModule* _tmp152_;
			GeeHashMap* _tmp153_;
			gpointer _tmp154_;
			GeeArrayList* _tmp155_;
			XmppXepJingleModule* _tmp156_;
			XmppXepJingleModule* _tmp157_;
			GeeHashMap* _tmp158_;
			gpointer _tmp159_;
			GeeArrayList* _tmp160_;
			XmppXepJingleSocks5BytestreamsModule* _tmp161_;
			XmppXepJingleSocks5BytestreamsModule* _tmp162_;
			GeeHashMap* _tmp163_;
			gpointer _tmp164_;
			GeeArrayList* _tmp165_;
			XmppXepJingleInBandBytestreamsModule* _tmp166_;
			XmppXepJingleInBandBytestreamsModule* _tmp167_;
			GeeHashMap* _tmp168_;
			gpointer _tmp169_;
			GeeArrayList* _tmp170_;
			XmppXepJingleFileTransferModule* _tmp171_;
			XmppXepJingleFileTransferModule* _tmp172_;
			GeeHashMap* _tmp173_;
			gpointer _tmp174_;
			GeeArrayList* _tmp175_;
			XmppXepJetModule* _tmp176_;
			XmppXepJetModule* _tmp177_;
			GeeHashMap* _tmp178_;
			gpointer _tmp179_;
			GeeArrayList* _tmp180_;
			XmppXepLastMessageCorrectionModule* _tmp181_;
			XmppXepLastMessageCorrectionModule* _tmp182_;
			GeeHashMap* _tmp183_;
			gpointer _tmp184_;
			GeeArrayList* _tmp185_;
			XmppXepDirectMucInvitationsModule* _tmp186_;
			XmppXepDirectMucInvitationsModule* _tmp187_;
			GeeHashMap* _tmp188_;
			gpointer _tmp189_;
			GeeArrayList* _tmp190_;
			XmppXepJingleMessageInitiationModule* _tmp191_;
			XmppXepJingleMessageInitiationModule* _tmp192_;
			GeeHashMap* _tmp193_;
			gpointer _tmp194_;
			GeeArrayList* _tmp195_;
			XmppXepOccupantIdsModule* _tmp196_;
			XmppXepOccupantIdsModule* _tmp197_;
			GeeHashMap* _tmp198_;
			gpointer _tmp199_;
			GeeArrayList* _tmp200_;
			XmppXepJingleRawUdpModule* _tmp201_;
			XmppXepJingleRawUdpModule* _tmp202_;
			GeeHashMap* _tmp203_;
			gpointer _tmp204_;
			GeeArrayList* _tmp205_;
			XmppXepMujiModule* _tmp206_;
			XmppXepMujiModule* _tmp207_;
			GeeHashMap* _tmp208_;
			gpointer _tmp209_;
			GeeArrayList* _tmp210_;
			XmppXepCallInvitesModule* _tmp211_;
			XmppXepCallInvitesModule* _tmp212_;
			GeeHashMap* _tmp213_;
			gpointer _tmp214_;
			GeeArrayList* _tmp215_;
			XmppXepCoinModule* _tmp216_;
			XmppXepCoinModule* _tmp217_;
			GeeHashMap* _tmp218_;
			gpointer _tmp219_;
			GeeArrayList* _tmp220_;
			_tmp1_ = self->priv->module_map;
			_tmp2_ = gee_array_list_new (XMPP_TYPE_XMPP_STREAM_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
			_tmp3_ = _tmp2_;
			gee_abstract_map_set ((GeeAbstractMap*) _tmp1_, account, _tmp3_);
			_g_object_unref0 (_tmp3_);
			_tmp4_ = self->priv->module_map;
			_tmp5_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, account);
			_tmp6_ = (GeeArrayList*) _tmp5_;
			_tmp7_ = xmpp_iq_module_new ();
			_tmp8_ = _tmp7_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp6_, (XmppXmppStreamModule*) _tmp8_);
			_g_object_unref0 (_tmp8_);
			_g_object_unref0 (_tmp6_);
			_tmp9_ = self->priv->module_map;
			_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp9_, account);
			_tmp11_ = (GeeArrayList*) _tmp10_;
			_tmp12_ = dino_entities_account_get_bare_jid (account);
			_tmp13_ = _tmp12_;
			_tmp14_ = _tmp13_;
			_tmp15_ = xmpp_jid_to_string (_tmp14_);
			_tmp16_ = _tmp15_;
			_tmp17_ = dino_entities_account_get_password (account);
			_tmp18_ = _tmp17_;
			_tmp19_ = xmpp_sasl_module_new (_tmp16_, _tmp18_);
			_tmp20_ = _tmp19_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp11_, (XmppXmppStreamModule*) _tmp20_);
			_g_object_unref0 (_tmp20_);
			_g_free0 (_tmp16_);
			_xmpp_jid_unref0 (_tmp14_);
			_g_object_unref0 (_tmp11_);
			_tmp21_ = self->priv->module_map;
			_tmp22_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp21_, account);
			_tmp23_ = (GeeArrayList*) _tmp22_;
			_tmp24_ = xmpp_xep_stream_management_module_new ();
			_tmp25_ = _tmp24_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp23_, (XmppXmppStreamModule*) _tmp25_);
			_g_object_unref0 (_tmp25_);
			_g_object_unref0 (_tmp23_);
			_tmp26_ = self->priv->module_map;
			_tmp27_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp26_, account);
			_tmp28_ = (GeeArrayList*) _tmp27_;
			_tmp29_ = dino_entities_account_get_resourcepart (account);
			_tmp30_ = _tmp29_;
			_tmp31_ = xmpp_bind_module_new (_tmp30_);
			_tmp32_ = _tmp31_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp28_, (XmppXmppStreamModule*) _tmp32_);
			_g_object_unref0 (_tmp32_);
			_g_object_unref0 (_tmp28_);
			_tmp33_ = self->priv->module_map;
			_tmp34_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp33_, account);
			_tmp35_ = (GeeArrayList*) _tmp34_;
			_tmp36_ = xmpp_session_module_new ();
			_tmp37_ = _tmp36_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp35_, (XmppXmppStreamModule*) _tmp37_);
			_g_object_unref0 (_tmp37_);
			_g_object_unref0 (_tmp35_);
			_tmp38_ = self->priv->module_map;
			_tmp39_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp38_, account);
			_tmp40_ = (GeeArrayList*) _tmp39_;
			_tmp41_ = xmpp_roster_module_new ();
			_tmp42_ = _tmp41_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp40_, (XmppXmppStreamModule*) _tmp42_);
			_g_object_unref0 (_tmp42_);
			_g_object_unref0 (_tmp40_);
			_tmp43_ = self->priv->module_map;
			_tmp44_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp43_, account);
			_tmp45_ = (GeeArrayList*) _tmp44_;
			_tmp46_ = xmpp_xep_service_discovery_module_new_with_identity ("client", "pc", "Dino");
			_tmp47_ = _tmp46_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp45_, (XmppXmppStreamModule*) _tmp47_);
			_g_object_unref0 (_tmp47_);
			_g_object_unref0 (_tmp45_);
			_tmp48_ = self->priv->module_map;
			_tmp49_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp48_, account);
			_tmp50_ = (GeeArrayList*) _tmp49_;
			_tmp51_ = xmpp_xep_private_xml_storage_module_new ();
			_tmp52_ = _tmp51_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp50_, (XmppXmppStreamModule*) _tmp52_);
			_g_object_unref0 (_tmp52_);
			_g_object_unref0 (_tmp50_);
			_tmp53_ = self->priv->module_map;
			_tmp54_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp53_, account);
			_tmp55_ = (GeeArrayList*) _tmp54_;
			_tmp56_ = xmpp_xep_bookmarks_module_new ();
			_tmp57_ = _tmp56_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp55_, (XmppXmppStreamModule*) _tmp57_);
			_g_object_unref0 (_tmp57_);
			_g_object_unref0 (_tmp55_);
			_tmp58_ = self->priv->module_map;
			_tmp59_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp58_, account);
			_tmp60_ = (GeeArrayList*) _tmp59_;
			_tmp61_ = xmpp_xep_bookmarks2_module_new ();
			_tmp62_ = _tmp61_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp60_, (XmppXmppStreamModule*) _tmp62_);
			_g_object_unref0 (_tmp62_);
			_g_object_unref0 (_tmp60_);
			_tmp63_ = self->priv->module_map;
			_tmp64_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp63_, account);
			_tmp65_ = (GeeArrayList*) _tmp64_;
			_tmp66_ = xmpp_presence_module_new ();
			_tmp67_ = _tmp66_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp65_, (XmppXmppStreamModule*) _tmp67_);
			_g_object_unref0 (_tmp67_);
			_g_object_unref0 (_tmp65_);
			_tmp68_ = self->priv->module_map;
			_tmp69_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp68_, account);
			_tmp70_ = (GeeArrayList*) _tmp69_;
			_tmp71_ = xmpp_message_module_new ();
			_tmp72_ = _tmp71_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp70_, (XmppXmppStreamModule*) _tmp72_);
			_g_object_unref0 (_tmp72_);
			_g_object_unref0 (_tmp70_);
			_tmp73_ = self->priv->module_map;
			_tmp74_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp73_, account);
			_tmp75_ = (GeeArrayList*) _tmp74_;
			_tmp76_ = xmpp_message_archive_management_module_new ();
			_tmp77_ = _tmp76_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp75_, (XmppXmppStreamModule*) _tmp77_);
			_g_object_unref0 (_tmp77_);
			_g_object_unref0 (_tmp75_);
			_tmp78_ = self->priv->module_map;
			_tmp79_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp78_, account);
			_tmp80_ = (GeeArrayList*) _tmp79_;
			_tmp81_ = xmpp_xep_message_carbons_module_new ();
			_tmp82_ = _tmp81_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp80_, (XmppXmppStreamModule*) _tmp82_);
			_g_object_unref0 (_tmp82_);
			_g_object_unref0 (_tmp80_);
			_tmp83_ = self->priv->module_map;
			_tmp84_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp83_, account);
			_tmp85_ = (GeeArrayList*) _tmp84_;
			_tmp86_ = xmpp_xep_muc_module_new ();
			_tmp87_ = _tmp86_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp85_, (XmppXmppStreamModule*) _tmp87_);
			_g_object_unref0 (_tmp87_);
			_g_object_unref0 (_tmp85_);
			_tmp88_ = self->priv->module_map;
			_tmp89_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp88_, account);
			_tmp90_ = (GeeArrayList*) _tmp89_;
			_tmp91_ = xmpp_xep_pubsub_module_new ();
			_tmp92_ = _tmp91_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp90_, (XmppXmppStreamModule*) _tmp92_);
			_g_object_unref0 (_tmp92_);
			_g_object_unref0 (_tmp90_);
			_tmp93_ = self->priv->module_map;
			_tmp94_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp93_, account);
			_tmp95_ = (GeeArrayList*) _tmp94_;
			_tmp96_ = xmpp_xep_message_delivery_receipts_module_new ();
			_tmp97_ = _tmp96_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp95_, (XmppXmppStreamModule*) _tmp97_);
			_g_object_unref0 (_tmp97_);
			_g_object_unref0 (_tmp95_);
			_tmp98_ = self->priv->module_map;
			_tmp99_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp98_, account);
			_tmp100_ = (GeeArrayList*) _tmp99_;
			_tmp101_ = xmpp_xep_blocking_command_module_new ();
			_tmp102_ = _tmp101_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp100_, (XmppXmppStreamModule*) _tmp102_);
			_g_object_unref0 (_tmp102_);
			_g_object_unref0 (_tmp100_);
			_tmp103_ = self->priv->module_map;
			_tmp104_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp103_, account);
			_tmp105_ = (GeeArrayList*) _tmp104_;
			_tmp106_ = xmpp_xep_chat_state_notifications_module_new ();
			_tmp107_ = _tmp106_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp105_, (XmppXmppStreamModule*) _tmp107_);
			_g_object_unref0 (_tmp107_);
			_g_object_unref0 (_tmp105_);
			_tmp108_ = self->priv->module_map;
			_tmp109_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp108_, account);
			_tmp110_ = (GeeArrayList*) _tmp109_;
			_tmp111_ = xmpp_xep_chat_markers_module_new ();
			_tmp112_ = _tmp111_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp110_, (XmppXmppStreamModule*) _tmp112_);
			_g_object_unref0 (_tmp112_);
			_g_object_unref0 (_tmp110_);
			_tmp113_ = self->priv->module_map;
			_tmp114_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp113_, account);
			_tmp115_ = (GeeArrayList*) _tmp114_;
			_tmp116_ = xmpp_xep_ping_module_new ();
			_tmp117_ = _tmp116_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp115_, (XmppXmppStreamModule*) _tmp117_);
			_g_object_unref0 (_tmp117_);
			_g_object_unref0 (_tmp115_);
			_tmp118_ = self->priv->module_map;
			_tmp119_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp118_, account);
			_tmp120_ = (GeeArrayList*) _tmp119_;
			_tmp121_ = xmpp_xep_delayed_delivery_module_new ();
			_tmp122_ = _tmp121_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp120_, (XmppXmppStreamModule*) _tmp122_);
			_g_object_unref0 (_tmp122_);
			_g_object_unref0 (_tmp120_);
			_tmp123_ = self->priv->module_map;
			_tmp124_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp123_, account);
			_tmp125_ = (GeeArrayList*) _tmp124_;
			_tmp126_ = xmpp_stream_error_module_new ();
			_tmp127_ = _tmp126_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp125_, (XmppXmppStreamModule*) _tmp127_);
			_g_object_unref0 (_tmp127_);
			_g_object_unref0 (_tmp125_);
			_tmp128_ = self->priv->module_map;
			_tmp129_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp128_, account);
			_tmp130_ = (GeeArrayList*) _tmp129_;
			_tmp131_ = xmpp_xep_in_band_registration_module_new ();
			_tmp132_ = _tmp131_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp130_, (XmppXmppStreamModule*) _tmp132_);
			_g_object_unref0 (_tmp132_);
			_g_object_unref0 (_tmp130_);
			_tmp133_ = self->priv->module_map;
			_tmp134_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp133_, account);
			_tmp135_ = (GeeArrayList*) _tmp134_;
			_tmp136_ = xmpp_xep_http_file_upload_module_new ();
			_tmp137_ = _tmp136_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp135_, (XmppXmppStreamModule*) _tmp137_);
			_g_object_unref0 (_tmp137_);
			_g_object_unref0 (_tmp135_);
			_tmp138_ = self->priv->module_map;
			_tmp139_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp138_, account);
			_tmp140_ = (GeeArrayList*) _tmp139_;
			_tmp141_ = xmpp_xep_reactions_module_new ();
			_tmp142_ = _tmp141_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp140_, (XmppXmppStreamModule*) _tmp142_);
			_g_object_unref0 (_tmp142_);
			_g_object_unref0 (_tmp140_);
			_tmp143_ = self->priv->module_map;
			_tmp144_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp143_, account);
			_tmp145_ = (GeeArrayList*) _tmp144_;
			_tmp146_ = xmpp_xep_socks5_bytestreams_module_new ();
			_tmp147_ = _tmp146_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp145_, (XmppXmppStreamModule*) _tmp147_);
			_g_object_unref0 (_tmp147_);
			_g_object_unref0 (_tmp145_);
			_tmp148_ = self->priv->module_map;
			_tmp149_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp148_, account);
			_tmp150_ = (GeeArrayList*) _tmp149_;
			_tmp151_ = xmpp_xep_in_band_bytestreams_module_new ();
			_tmp152_ = _tmp151_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp150_, (XmppXmppStreamModule*) _tmp152_);
			_g_object_unref0 (_tmp152_);
			_g_object_unref0 (_tmp150_);
			_tmp153_ = self->priv->module_map;
			_tmp154_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp153_, account);
			_tmp155_ = (GeeArrayList*) _tmp154_;
			_tmp156_ = xmpp_xep_jingle_module_new ();
			_tmp157_ = _tmp156_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp155_, (XmppXmppStreamModule*) _tmp157_);
			_g_object_unref0 (_tmp157_);
			_g_object_unref0 (_tmp155_);
			_tmp158_ = self->priv->module_map;
			_tmp159_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp158_, account);
			_tmp160_ = (GeeArrayList*) _tmp159_;
			_tmp161_ = xmpp_xep_jingle_socks5_bytestreams_module_new ();
			_tmp162_ = _tmp161_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp160_, (XmppXmppStreamModule*) _tmp162_);
			_g_object_unref0 (_tmp162_);
			_g_object_unref0 (_tmp160_);
			_tmp163_ = self->priv->module_map;
			_tmp164_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp163_, account);
			_tmp165_ = (GeeArrayList*) _tmp164_;
			_tmp166_ = xmpp_xep_jingle_in_band_bytestreams_module_new ();
			_tmp167_ = _tmp166_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp165_, (XmppXmppStreamModule*) _tmp167_);
			_g_object_unref0 (_tmp167_);
			_g_object_unref0 (_tmp165_);
			_tmp168_ = self->priv->module_map;
			_tmp169_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp168_, account);
			_tmp170_ = (GeeArrayList*) _tmp169_;
			_tmp171_ = xmpp_xep_jingle_file_transfer_module_new ();
			_tmp172_ = _tmp171_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp170_, (XmppXmppStreamModule*) _tmp172_);
			_g_object_unref0 (_tmp172_);
			_g_object_unref0 (_tmp170_);
			_tmp173_ = self->priv->module_map;
			_tmp174_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp173_, account);
			_tmp175_ = (GeeArrayList*) _tmp174_;
			_tmp176_ = xmpp_xep_jet_module_new ();
			_tmp177_ = _tmp176_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp175_, (XmppXmppStreamModule*) _tmp177_);
			_g_object_unref0 (_tmp177_);
			_g_object_unref0 (_tmp175_);
			_tmp178_ = self->priv->module_map;
			_tmp179_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp178_, account);
			_tmp180_ = (GeeArrayList*) _tmp179_;
			_tmp181_ = xmpp_xep_last_message_correction_module_new ();
			_tmp182_ = _tmp181_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp180_, (XmppXmppStreamModule*) _tmp182_);
			_g_object_unref0 (_tmp182_);
			_g_object_unref0 (_tmp180_);
			_tmp183_ = self->priv->module_map;
			_tmp184_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp183_, account);
			_tmp185_ = (GeeArrayList*) _tmp184_;
			_tmp186_ = xmpp_xep_direct_muc_invitations_module_new ();
			_tmp187_ = _tmp186_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp185_, (XmppXmppStreamModule*) _tmp187_);
			_g_object_unref0 (_tmp187_);
			_g_object_unref0 (_tmp185_);
			_tmp188_ = self->priv->module_map;
			_tmp189_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp188_, account);
			_tmp190_ = (GeeArrayList*) _tmp189_;
			_tmp191_ = xmpp_xep_jingle_message_initiation_module_new ();
			_tmp192_ = _tmp191_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp190_, (XmppXmppStreamModule*) _tmp192_);
			_g_object_unref0 (_tmp192_);
			_g_object_unref0 (_tmp190_);
			_tmp193_ = self->priv->module_map;
			_tmp194_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp193_, account);
			_tmp195_ = (GeeArrayList*) _tmp194_;
			_tmp196_ = xmpp_xep_occupant_ids_module_new ();
			_tmp197_ = _tmp196_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp195_, (XmppXmppStreamModule*) _tmp197_);
			_g_object_unref0 (_tmp197_);
			_g_object_unref0 (_tmp195_);
			_tmp198_ = self->priv->module_map;
			_tmp199_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp198_, account);
			_tmp200_ = (GeeArrayList*) _tmp199_;
			_tmp201_ = xmpp_xep_jingle_raw_udp_module_new ();
			_tmp202_ = _tmp201_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp200_, (XmppXmppStreamModule*) _tmp202_);
			_g_object_unref0 (_tmp202_);
			_g_object_unref0 (_tmp200_);
			_tmp203_ = self->priv->module_map;
			_tmp204_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp203_, account);
			_tmp205_ = (GeeArrayList*) _tmp204_;
			_tmp206_ = xmpp_xep_muji_module_new ();
			_tmp207_ = _tmp206_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp205_, (XmppXmppStreamModule*) _tmp207_);
			_g_object_unref0 (_tmp207_);
			_g_object_unref0 (_tmp205_);
			_tmp208_ = self->priv->module_map;
			_tmp209_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp208_, account);
			_tmp210_ = (GeeArrayList*) _tmp209_;
			_tmp211_ = xmpp_xep_call_invites_module_new ();
			_tmp212_ = _tmp211_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp210_, (XmppXmppStreamModule*) _tmp212_);
			_g_object_unref0 (_tmp212_);
			_g_object_unref0 (_tmp210_);
			_tmp213_ = self->priv->module_map;
			_tmp214_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp213_, account);
			_tmp215_ = (GeeArrayList*) _tmp214_;
			_tmp216_ = xmpp_xep_coin_module_new ();
			_tmp217_ = _tmp216_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp215_, (XmppXmppStreamModule*) _tmp217_);
			_g_object_unref0 (_tmp217_);
			_g_object_unref0 (_tmp215_);
			_tmp218_ = self->priv->module_map;
			_tmp219_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp218_, account);
			_tmp220_ = (GeeArrayList*) _tmp219_;
			g_signal_emit (self, dino_module_manager_signals[DINO_MODULE_MANAGER_INITIALIZE_ACCOUNT_MODULES_SIGNAL], 0, account, _tmp220_);
			_g_object_unref0 (_tmp220_);
		}
		__finally0:
		{
			GeeHashMap* _tmp221_;
			_tmp221_ = self->priv->module_map;
			g_rec_mutex_unlock (&self->priv->__lock_module_map);
		}
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

DinoModuleManager*
dino_module_manager_construct (GType object_type)
{
	DinoModuleManager* self = NULL;
	self = (DinoModuleManager*) g_type_create_instance (object_type);
	return self;
}

DinoModuleManager*
dino_module_manager_new (void)
{
	return dino_module_manager_construct (DINO_TYPE_MODULE_MANAGER);
}

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

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

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

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

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

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

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

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

void
dino_value_set_module_manager (GValue* value,
                               gpointer v_object)
{
	DinoModuleManager * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DINO_TYPE_MODULE_MANAGER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DINO_TYPE_MODULE_MANAGER));
		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;
		dino_module_manager_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		dino_module_manager_unref (old);
	}
}

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

static void
dino_module_manager_class_init (DinoModuleManagerClass * klass,
                                gpointer klass_data)
{
	dino_module_manager_parent_class = g_type_class_peek_parent (klass);
	((DinoModuleManagerClass *) klass)->finalize = dino_module_manager_finalize;
	g_type_class_adjust_private_offset (klass, &DinoModuleManager_private_offset);
	dino_module_manager_signals[DINO_MODULE_MANAGER_INITIALIZE_ACCOUNT_MODULES_SIGNAL] = g_signal_new ("initialize-account-modules", DINO_TYPE_MODULE_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, DINO_ENTITIES_TYPE_ACCOUNT, GEE_TYPE_ARRAY_LIST);
}

static void
dino_module_manager_instance_init (DinoModuleManager * self,
                                   gpointer klass)
{
	GeeHashMap* _tmp0_;
	self->priv = dino_module_manager_get_instance_private (self);
	g_rec_mutex_init (&self->priv->__lock_module_map);
	_tmp0_ = gee_hash_map_new (DINO_ENTITIES_TYPE_ACCOUNT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, GEE_TYPE_ARRAY_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _dino_entities_account_hash_func_gee_hash_data_func, NULL, NULL, _dino_entities_account_equals_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
	self->priv->module_map = _tmp0_;
	self->ref_count = 1;
}

static void
dino_module_manager_finalize (DinoModuleManager * obj)
{
	DinoModuleManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_TYPE_MODULE_MANAGER, DinoModuleManager);
	g_signal_handlers_destroy (self);
	g_rec_mutex_clear (&self->priv->__lock_module_map);
	_g_object_unref0 (self->priv->module_map);
}

static GType
dino_module_manager_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { dino_value_module_manager_init, dino_value_module_manager_free_value, dino_value_module_manager_copy_value, dino_value_module_manager_peek_pointer, "p", dino_value_module_manager_collect_value, "p", dino_value_module_manager_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (DinoModuleManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_module_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoModuleManager), 0, (GInstanceInitFunc) dino_module_manager_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 dino_module_manager_type_id;
	dino_module_manager_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DinoModuleManager", &g_define_type_info, &g_define_type_fundamental_info, 0);
	DinoModuleManager_private_offset = g_type_add_instance_private (dino_module_manager_type_id, sizeof (DinoModuleManagerPrivate));
	return dino_module_manager_type_id;
}

GType
dino_module_manager_get_type (void)
{
	static volatile gsize dino_module_manager_type_id__once = 0;
	if (g_once_init_enter (&dino_module_manager_type_id__once)) {
		GType dino_module_manager_type_id;
		dino_module_manager_type_id = dino_module_manager_get_type_once ();
		g_once_init_leave (&dino_module_manager_type_id__once, dino_module_manager_type_id);
	}
	return dino_module_manager_type_id__once;
}

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

void
dino_module_manager_unref (gpointer instance)
{
	DinoModuleManager * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		DINO_MODULE_MANAGER_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;
}

