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

#include <glib-object.h>
#include "libdino.h"
#include <gtk/gtk.h>
#include <gee.h>
#include "xmpp-vala.h"
#include <glib.h>
#include <gio/gio.h>
#include <gobject/gvaluecollector.h>
#include <stdlib.h>
#include <string.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define DINO_UI_TYPE_CONFERENCE_LIST (dino_ui_conference_list_get_type ())
#define DINO_UI_CONFERENCE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONFERENCE_LIST, DinoUiConferenceList))
#define DINO_UI_CONFERENCE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONFERENCE_LIST, DinoUiConferenceListClass))
#define DINO_UI_IS_CONFERENCE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONFERENCE_LIST))
#define DINO_UI_IS_CONFERENCE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONFERENCE_LIST))
#define DINO_UI_CONFERENCE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONFERENCE_LIST, DinoUiConferenceListClass))

typedef struct _DinoUiConferenceList DinoUiConferenceList;
typedef struct _DinoUiConferenceListClass DinoUiConferenceListClass;
typedef struct _DinoUiConferenceListPrivate DinoUiConferenceListPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block2Data Block2Data;
#define _dino_ui_conference_list_unref0(var) ((var == NULL) ? NULL : (var = (dino_ui_conference_list_unref (var), NULL)))
typedef struct _Block3Data Block3Data;

#define DINO_UI_TYPE_LIST_ROW (dino_ui_list_row_get_type ())
#define DINO_UI_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_LIST_ROW, DinoUiListRow))
#define DINO_UI_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_LIST_ROW, DinoUiListRowClass))
#define DINO_UI_IS_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_LIST_ROW))
#define DINO_UI_IS_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_LIST_ROW))
#define DINO_UI_LIST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_LIST_ROW, DinoUiListRowClass))

typedef struct _DinoUiListRow DinoUiListRow;
typedef struct _DinoUiListRowClass DinoUiListRowClass;

#define DINO_UI_TYPE_CONFERENCE_LIST_ROW (dino_ui_conference_list_row_get_type ())
#define DINO_UI_CONFERENCE_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONFERENCE_LIST_ROW, DinoUiConferenceListRow))
#define DINO_UI_CONFERENCE_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONFERENCE_LIST_ROW, DinoUiConferenceListRowClass))
#define DINO_UI_IS_CONFERENCE_LIST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONFERENCE_LIST_ROW))
#define DINO_UI_IS_CONFERENCE_LIST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONFERENCE_LIST_ROW))
#define DINO_UI_CONFERENCE_LIST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONFERENCE_LIST_ROW, DinoUiConferenceListRowClass))

typedef struct _DinoUiConferenceListRow DinoUiConferenceListRow;
typedef struct _DinoUiConferenceListRowClass DinoUiConferenceListRowClass;
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
typedef struct _DinoUiParamSpecConferenceList DinoUiParamSpecConferenceList;
enum  {
	DINO_UI_CONFERENCE_LIST_CONVERSATION_SELECTED_SIGNAL,
	DINO_UI_CONFERENCE_LIST_NUM_SIGNALS
};
static guint dino_ui_conference_list_signals[DINO_UI_CONFERENCE_LIST_NUM_SIGNALS] = {0};
typedef struct _DinoUiListRowPrivate DinoUiListRowPrivate;

#define DINO_UI_TYPE_AVATAR_PICTURE (dino_ui_avatar_picture_get_type ())
#define DINO_UI_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPicture))
#define DINO_UI_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))
#define DINO_UI_IS_AVATAR_PICTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_IS_AVATAR_PICTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_AVATAR_PICTURE))
#define DINO_UI_AVATAR_PICTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_AVATAR_PICTURE, DinoUiAvatarPictureClass))

typedef struct _DinoUiAvatarPicture DinoUiAvatarPicture;
typedef struct _DinoUiAvatarPictureClass DinoUiAvatarPictureClass;
typedef struct _DinoUiConferenceListRowPrivate DinoUiConferenceListRowPrivate;
enum  {
	DINO_UI_CONFERENCE_LIST_ROW_0_PROPERTY,
	DINO_UI_CONFERENCE_LIST_ROW_NUM_PROPERTIES
};
static GParamSpec* dino_ui_conference_list_row_properties[DINO_UI_CONFERENCE_LIST_ROW_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

#define DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL (dino_ui_view_model_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_AVATAR_PICTURE_MODEL, DinoUiViewModelAvatarPictureModelClass))

typedef struct _DinoUiViewModelAvatarPictureModel DinoUiViewModelAvatarPictureModel;
typedef struct _DinoUiViewModelAvatarPictureModelClass DinoUiViewModelAvatarPictureModelClass;

#define DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL (dino_ui_view_model_compat_avatar_picture_model_get_type ())
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModel))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_IS_COMPAT_AVATAR_PICTURE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL))
#define DINO_UI_VIEW_MODEL_COMPAT_AVATAR_PICTURE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_COMPAT_AVATAR_PICTURE_MODEL, DinoUiViewModelCompatAvatarPictureModelClass))

typedef struct _DinoUiViewModelCompatAvatarPictureModel DinoUiViewModelCompatAvatarPictureModel;
typedef struct _DinoUiViewModelCompatAvatarPictureModelClass DinoUiViewModelCompatAvatarPictureModelClass;

struct _DinoUiConferenceList {
	GTypeInstance parent_instance;
	volatile int ref_count;
	DinoUiConferenceListPrivate * priv;
};

struct _DinoUiConferenceListClass {
	GTypeClass parent_class;
	void (*finalize) (DinoUiConferenceList *self);
};

struct _DinoUiConferenceListPrivate {
	DinoStreamInteractor* stream_interactor;
	GtkListBox* list_box;
	GeeHashMap* lists;
	GeeHashMap* widgets;
	gulong bookmarks_updated_handler_id;
};

struct _Block2Data {
	int _ref_count_;
	DinoUiConferenceList* self;
	DinoStreamInteractor* stream_interactor;
};

struct _Block3Data {
	int _ref_count_;
	Block2Data * _data2_;
	DinoEntitiesAccount* account;
};

struct _DinoUiParamSpecConferenceList {
	GParamSpec parent_instance;
};

struct _DinoUiListRow {
	GtkWidget parent_instance;
	DinoUiListRowPrivate * priv;
	GtkBox* outer_box;
	DinoUiAvatarPicture* picture;
	GtkLabel* name_label;
	GtkImage* status_dot;
	GtkLabel* via_label;
	DinoStreamInteractor* stream_interactor;
	XmppJid* jid;
	DinoEntitiesAccount* account;
};

struct _DinoUiListRowClass {
	GtkWidgetClass parent_class;
};

struct _DinoUiConferenceListRow {
	DinoUiListRow parent_instance;
	DinoUiConferenceListRowPrivate * priv;
	XmppConference* bookmark;
};

struct _DinoUiConferenceListRowClass {
	DinoUiListRowClass parent_class;
};

static gint DinoUiConferenceList_private_offset;
static gpointer dino_ui_conference_list_parent_class = NULL;
static gpointer dino_ui_conference_list_row_parent_class = NULL;

VALA_EXTERN gpointer dino_ui_conference_list_ref (gpointer instance);
VALA_EXTERN void dino_ui_conference_list_unref (gpointer instance);
VALA_EXTERN GParamSpec* dino_ui_param_spec_conference_list (const gchar* name,
                                                const gchar* nick,
                                                const gchar* blurb,
                                                GType object_type,
                                                GParamFlags flags);
VALA_EXTERN void dino_ui_value_set_conference_list (GValue* value,
                                        gpointer v_object);
VALA_EXTERN void dino_ui_value_take_conference_list (GValue* value,
                                         gpointer v_object);
VALA_EXTERN gpointer dino_ui_value_get_conference_list (const GValue* value);
VALA_EXTERN GType dino_ui_conference_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConferenceList, dino_ui_conference_list_unref)
static void dino_ui_conference_list_add_conference (DinoUiConferenceList* self,
                                             DinoEntitiesAccount* account,
                                             XmppConference* conference);
static void _dino_ui_conference_list_add_conference_dino_muc_manager_conference_added (DinoMucManager* _sender,
                                                                                DinoEntitiesAccount* account,
                                                                                XmppConference* conference,
                                                                                gpointer self);
static void dino_ui_conference_list_remove_conference (DinoUiConferenceList* self,
                                                DinoEntitiesAccount* account,
                                                XmppJid* jid);
static void _dino_ui_conference_list_remove_conference_dino_muc_manager_conference_removed (DinoMucManager* _sender,
                                                                                     DinoEntitiesAccount* account,
                                                                                     XmppJid* jid,
                                                                                     gpointer self);
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);
VALA_EXTERN DinoUiConferenceList* dino_ui_conference_list_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConferenceList* dino_ui_conference_list_construct (GType object_type,
                                                         DinoStreamInteractor* stream_interactor);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void __lambda300_ (DinoUiConferenceList* self,
                   DinoEntitiesAccount* account,
                   GeeSet* conferences);
VALA_EXTERN void dino_ui_conference_list_refresh_conferences (DinoUiConferenceList* self);
static void ___lambda300__dino_muc_manager_bookmarks_updated (DinoMucManager* _sender,
                                                       DinoEntitiesAccount* account,
                                                       GeeSet* conferences,
                                                       gpointer self);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static void ____lambda301_ (Block3Data* _data3_,
                     GObject* _,
                     GAsyncResult* res);
static void dino_ui_conference_list_set_bookmarks (DinoUiConferenceList* self,
                                            DinoEntitiesAccount* account,
                                            GeeSet* conferences);
static void _____lambda301__gasync_ready_callback (GObject* source_object,
                                            GAsyncResult* res,
                                            gpointer self);
static guint _xmpp_jid_hash_func_gee_hash_data_func (gconstpointer v,
                                              gpointer self);
static gboolean _xmpp_jid_equals_func_gee_equal_data_func (gconstpointer a,
                                                    gconstpointer b,
                                                    gpointer self);
VALA_EXTERN GType dino_ui_list_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiListRow, g_object_unref)
VALA_EXTERN GType dino_ui_conference_list_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConferenceListRow, g_object_unref)
VALA_EXTERN DinoUiConferenceListRow* dino_ui_conference_list_row_new (DinoStreamInteractor* stream_interactor,
                                                          XmppConference* bookmark,
                                                          DinoEntitiesAccount* account);
VALA_EXTERN DinoUiConferenceListRow* dino_ui_conference_list_row_construct (GType object_type,
                                                                DinoStreamInteractor* stream_interactor,
                                                                XmppConference* bookmark,
                                                                DinoEntitiesAccount* account);
VALA_EXTERN GtkListBox* dino_ui_conference_list_get_list_box (DinoUiConferenceList* self);
static void dino_ui_conference_list_finalize (DinoUiConferenceList * obj);
static GType dino_ui_conference_list_get_type_once (void);
VALA_EXTERN GType dino_ui_avatar_picture_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAvatarPicture, g_object_unref)
VALA_EXTERN DinoUiListRow* dino_ui_list_row_new (void);
VALA_EXTERN DinoUiListRow* dino_ui_list_row_construct (GType object_type);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_construct (GType object_type,
                                                                                                   DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_view_model_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelAvatarPictureModel, g_object_unref)
VALA_EXTERN GType dino_ui_view_model_compat_avatar_picture_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelCompatAvatarPictureModel, g_object_unref)
VALA_EXTERN DinoUiViewModelCompatAvatarPictureModel* dino_ui_view_model_compat_avatar_picture_model_set_conversation (DinoUiViewModelCompatAvatarPictureModel* self,
                                                                                                          DinoEntitiesConversation* conversation);
VALA_EXTERN void dino_ui_avatar_picture_set_model (DinoUiAvatarPicture* self,
                                       DinoUiViewModelAvatarPictureModel* value);
static void dino_ui_conference_list_row_finalize (GObject * obj);
static GType dino_ui_conference_list_row_get_type_once (void);

static inline gpointer
dino_ui_conference_list_get_instance_private (DinoUiConferenceList* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiConferenceList_private_offset);
}

static void
_dino_ui_conference_list_add_conference_dino_muc_manager_conference_added (DinoMucManager* _sender,
                                                                           DinoEntitiesAccount* account,
                                                                           XmppConference* conference,
                                                                           gpointer self)
{
	dino_ui_conference_list_add_conference ((DinoUiConferenceList*) self, account, conference);
}

static void
_dino_ui_conference_list_remove_conference_dino_muc_manager_conference_removed (DinoMucManager* _sender,
                                                                                DinoEntitiesAccount* account,
                                                                                XmppJid* jid,
                                                                                gpointer self)
{
	dino_ui_conference_list_remove_conference ((DinoUiConferenceList*) self, account, jid);
}

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 Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		DinoUiConferenceList* self;
		self = _data2_->self;
		_g_object_unref0 (_data2_->stream_interactor);
		_dino_ui_conference_list_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}

static void
__lambda300_ (DinoUiConferenceList* self,
              DinoEntitiesAccount* account,
              GeeSet* conferences)
{
	GeeHashMap* _tmp0_;
	g_return_if_fail (account != NULL);
	g_return_if_fail (conferences != NULL);
	_tmp0_ = self->priv->lists;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp0_, account, conferences);
	dino_ui_conference_list_refresh_conferences (self);
}

static void
___lambda300__dino_muc_manager_bookmarks_updated (DinoMucManager* _sender,
                                                  DinoEntitiesAccount* account,
                                                  GeeSet* conferences,
                                                  gpointer self)
{
	__lambda300_ ((DinoUiConferenceList*) self, account, conferences);
}

static Block3Data*
block3_data_ref (Block3Data* _data3_)
{
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}

static void
block3_data_unref (void * _userdata_)
{
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		DinoUiConferenceList* self;
		self = _data3_->_data2_->self;
		_g_object_unref0 (_data3_->account);
		block2_data_unref (_data3_->_data2_);
		_data3_->_data2_ = NULL;
		g_slice_free (Block3Data, _data3_);
	}
}

static void
____lambda301_ (Block3Data* _data3_,
                GObject* _,
                GAsyncResult* res)
{
	Block2Data* _data2_;
	DinoUiConferenceList* self;
	GeeSet* conferences = NULL;
	DinoModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	DinoMucManager* _tmp2_;
	GeeSet* _tmp3_;
	GeeSet* _tmp4_;
	DinoEntitiesAccount* _tmp5_;
	_data2_ = _data3_->_data2_;
	self = _data2_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = dino_muc_manager_IDENTITY;
	_tmp1_ = dino_stream_interactor_get_module (_data2_->stream_interactor, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (DinoMucManager*) _tmp1_;
	_tmp3_ = dino_muc_manager_get_bookmarks_finish (_tmp2_, res);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp2_);
	conferences = _tmp4_;
	_tmp5_ = _data3_->account;
	dino_ui_conference_list_set_bookmarks (self, _tmp5_, conferences);
	_g_object_unref0 (conferences);
}

static void
_____lambda301__gasync_ready_callback (GObject* source_object,
                                       GAsyncResult* res,
                                       gpointer self)
{
	____lambda301_ (self, source_object, res);
	block3_data_unref (self);
}

DinoUiConferenceList*
dino_ui_conference_list_construct (GType object_type,
                                   DinoStreamInteractor* stream_interactor)
{
	DinoUiConferenceList* self = NULL;
	Block2Data* _data2_;
	DinoStreamInteractor* _tmp0_;
	DinoStreamInteractor* _tmp1_;
	DinoModuleIdentity* _tmp2_;
	gpointer _tmp3_;
	DinoMucManager* _tmp4_;
	gulong _tmp5_;
	DinoModuleIdentity* _tmp18_;
	gpointer _tmp19_;
	DinoMucManager* _tmp20_;
	DinoModuleIdentity* _tmp21_;
	gpointer _tmp22_;
	DinoMucManager* _tmp23_;
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	self = (DinoUiConferenceList*) g_type_create_instance (object_type);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = dino_ui_conference_list_ref (self);
	_tmp0_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (_data2_->stream_interactor);
	_data2_->stream_interactor = _tmp0_;
	_tmp1_ = _g_object_ref0 (_data2_->stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp1_;
	_tmp2_ = dino_muc_manager_IDENTITY;
	_tmp3_ = dino_stream_interactor_get_module (_data2_->stream_interactor, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp2_);
	_tmp4_ = (DinoMucManager*) _tmp3_;
	_tmp5_ = g_signal_connect (_tmp4_, "bookmarks-updated", (GCallback) ___lambda300__dino_muc_manager_bookmarks_updated, self);
	self->priv->bookmarks_updated_handler_id = _tmp5_;
	_g_object_unref0 (_tmp4_);
	{
		GeeArrayList* _account_list = NULL;
		GeeArrayList* _tmp6_;
		gint _account_size = 0;
		GeeArrayList* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _account_index = 0;
		_tmp6_ = dino_stream_interactor_get_accounts (_data2_->stream_interactor);
		_account_list = _tmp6_;
		_tmp7_ = _account_list;
		_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp7_);
		_tmp9_ = _tmp8_;
		_account_size = _tmp9_;
		_account_index = -1;
		while (TRUE) {
			Block3Data* _data3_;
			gint _tmp10_;
			gint _tmp11_;
			GeeArrayList* _tmp12_;
			gpointer _tmp13_;
			DinoModuleIdentity* _tmp14_;
			gpointer _tmp15_;
			DinoMucManager* _tmp16_;
			DinoEntitiesAccount* _tmp17_;
			_data3_ = g_slice_new0 (Block3Data);
			_data3_->_ref_count_ = 1;
			_data3_->_data2_ = block2_data_ref (_data2_);
			_account_index = _account_index + 1;
			_tmp10_ = _account_index;
			_tmp11_ = _account_size;
			if (!(_tmp10_ < _tmp11_)) {
				block3_data_unref (_data3_);
				_data3_ = NULL;
				break;
			}
			_tmp12_ = _account_list;
			_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp12_, _account_index);
			_data3_->account = (DinoEntitiesAccount*) _tmp13_;
			_tmp14_ = dino_muc_manager_IDENTITY;
			_tmp15_ = dino_stream_interactor_get_module (_data2_->stream_interactor, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp14_);
			_tmp16_ = (DinoMucManager*) _tmp15_;
			_tmp17_ = _data3_->account;
			dino_muc_manager_get_bookmarks (_tmp16_, _tmp17_, _____lambda301__gasync_ready_callback, block3_data_ref (_data3_));
			_g_object_unref0 (_tmp16_);
			block3_data_unref (_data3_);
			_data3_ = NULL;
		}
		_g_object_unref0 (_account_list);
	}
	_tmp18_ = dino_muc_manager_IDENTITY;
	_tmp19_ = dino_stream_interactor_get_module (_data2_->stream_interactor, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp18_);
	_tmp20_ = (DinoMucManager*) _tmp19_;
	g_signal_connect (_tmp20_, "conference-added", (GCallback) _dino_ui_conference_list_add_conference_dino_muc_manager_conference_added, self);
	_g_object_unref0 (_tmp20_);
	_tmp21_ = dino_muc_manager_IDENTITY;
	_tmp22_ = dino_stream_interactor_get_module (_data2_->stream_interactor, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp21_);
	_tmp23_ = (DinoMucManager*) _tmp22_;
	g_signal_connect (_tmp23_, "conference-removed", (GCallback) _dino_ui_conference_list_remove_conference_dino_muc_manager_conference_removed, self);
	_g_object_unref0 (_tmp23_);
	block2_data_unref (_data2_);
	_data2_ = NULL;
	return self;
}

DinoUiConferenceList*
dino_ui_conference_list_new (DinoStreamInteractor* stream_interactor)
{
	return dino_ui_conference_list_construct (DINO_UI_TYPE_CONFERENCE_LIST, stream_interactor);
}

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

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

static void
dino_ui_conference_list_add_conference (DinoUiConferenceList* self,
                                        DinoEntitiesAccount* account,
                                        XmppConference* conference)
{
	GeeHashMap* _tmp0_;
	DinoUiConferenceListRow* widget = NULL;
	DinoStreamInteractor* _tmp4_;
	DinoUiConferenceListRow* _tmp5_;
	GtkListBoxRow* list_box_row = NULL;
	GtkListBoxRow* _tmp6_;
	GeeHashMap* _tmp7_;
	gpointer _tmp8_;
	GeeHashMap* _tmp9_;
	XmppJid* _tmp10_;
	XmppJid* _tmp11_;
	GtkListBox* _tmp12_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (account != NULL);
	g_return_if_fail (conference != NULL);
	_tmp0_ = self->priv->widgets;
	if (!gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, account)) {
		GeeHashMap* _tmp1_;
		GeeHashMap* _tmp2_;
		GeeHashMap* _tmp3_;
		_tmp1_ = self->priv->widgets;
		_tmp2_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, gtk_list_box_row_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _xmpp_jid_hash_func_gee_hash_data_func, NULL, NULL, _xmpp_jid_equals_func_gee_equal_data_func, NULL, NULL, NULL, NULL, NULL);
		_tmp3_ = _tmp2_;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp1_, account, _tmp3_);
		_g_object_unref0 (_tmp3_);
	}
	_tmp4_ = self->priv->stream_interactor;
	_tmp5_ = dino_ui_conference_list_row_new (_tmp4_, conference, account);
	g_object_ref_sink (_tmp5_);
	widget = _tmp5_;
	_tmp6_ = (GtkListBoxRow*) gtk_list_box_row_new ();
	g_object_ref_sink (_tmp6_);
	list_box_row = _tmp6_;
	gtk_list_box_row_set_child (list_box_row, (GtkWidget*) widget);
	_tmp7_ = self->priv->widgets;
	_tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp7_, account);
	_tmp9_ = (GeeHashMap*) _tmp8_;
	_tmp10_ = xmpp_conference_get_jid (conference);
	_tmp11_ = _tmp10_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, _tmp11_, list_box_row);
	_g_object_unref0 (_tmp9_);
	_tmp12_ = self->priv->list_box;
	gtk_list_box_append (_tmp12_, (GtkWidget*) list_box_row);
	_g_object_unref0 (list_box_row);
	_g_object_unref0 (widget);
}

static void
dino_ui_conference_list_remove_conference (DinoUiConferenceList* self,
                                           DinoEntitiesAccount* account,
                                           XmppJid* jid)
{
	gboolean _tmp0_ = FALSE;
	GeeHashMap* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (account != NULL);
	g_return_if_fail (jid != NULL);
	_tmp1_ = self->priv->widgets;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, account)) {
		GeeHashMap* _tmp2_;
		gpointer _tmp3_;
		GeeHashMap* _tmp4_;
		_tmp2_ = self->priv->widgets;
		_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp2_, account);
		_tmp4_ = (GeeHashMap*) _tmp3_;
		_tmp0_ = gee_abstract_map_has_key ((GeeAbstractMap*) _tmp4_, jid);
		_g_object_unref0 (_tmp4_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkListBox* _tmp5_;
		GeeHashMap* _tmp6_;
		gpointer _tmp7_;
		GeeHashMap* _tmp8_;
		gpointer _tmp9_;
		GtkListBoxRow* _tmp10_;
		GeeHashMap* _tmp11_;
		gpointer _tmp12_;
		GeeHashMap* _tmp13_;
		_tmp5_ = self->priv->list_box;
		_tmp6_ = self->priv->widgets;
		_tmp7_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, account);
		_tmp8_ = (GeeHashMap*) _tmp7_;
		_tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, jid);
		_tmp10_ = (GtkListBoxRow*) _tmp9_;
		gtk_list_box_remove (_tmp5_, (GtkWidget*) _tmp10_);
		_g_object_unref0 (_tmp10_);
		_g_object_unref0 (_tmp8_);
		_tmp11_ = self->priv->widgets;
		_tmp12_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, account);
		_tmp13_ = (GeeHashMap*) _tmp12_;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp13_, jid, NULL);
		_g_object_unref0 (_tmp13_);
	}
}

void
dino_ui_conference_list_refresh_conferences (DinoUiConferenceList* self)
{
	g_return_if_fail (self != NULL);
	{
		GeeIterator* _account_it = NULL;
		GeeHashMap* _tmp0_;
		GeeSet* _tmp1_;
		GeeSet* _tmp2_;
		GeeSet* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->widgets;
		_tmp1_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_account_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			DinoEntitiesAccount* account = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			GeeHashMap* account_widgets_cpy = NULL;
			GeeHashMap* _tmp9_;
			GeeHashMap* _tmp10_;
			GeeHashMap* _tmp11_;
			DinoEntitiesAccount* _tmp12_;
			gpointer _tmp13_;
			GeeHashMap* _tmp14_;
			_tmp6_ = _account_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _account_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			account = (DinoEntitiesAccount*) _tmp8_;
			_tmp9_ = gee_hash_map_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, gtk_list_box_row_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
			account_widgets_cpy = _tmp9_;
			_tmp10_ = account_widgets_cpy;
			_tmp11_ = self->priv->widgets;
			_tmp12_ = account;
			_tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp12_);
			_tmp14_ = (GeeHashMap*) _tmp13_;
			gee_map_set_all ((GeeMap*) _tmp10_, (GeeMap*) _tmp14_);
			_g_object_unref0 (_tmp14_);
			{
				GeeIterator* _jid_it = NULL;
				GeeHashMap* _tmp15_;
				GeeSet* _tmp16_;
				GeeSet* _tmp17_;
				GeeSet* _tmp18_;
				GeeIterator* _tmp19_;
				GeeIterator* _tmp20_;
				_tmp15_ = account_widgets_cpy;
				_tmp16_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _tmp15_);
				_tmp17_ = _tmp16_;
				_tmp18_ = _tmp17_;
				_tmp19_ = gee_iterable_iterator ((GeeIterable*) _tmp18_);
				_tmp20_ = _tmp19_;
				_g_object_unref0 (_tmp18_);
				_jid_it = _tmp20_;
				while (TRUE) {
					GeeIterator* _tmp21_;
					XmppJid* jid = NULL;
					GeeIterator* _tmp22_;
					gpointer _tmp23_;
					GtkListBox* _tmp24_;
					GeeHashMap* _tmp25_;
					DinoEntitiesAccount* _tmp26_;
					gpointer _tmp27_;
					GeeHashMap* _tmp28_;
					XmppJid* _tmp29_;
					gpointer _tmp30_;
					GtkListBoxRow* _tmp31_;
					_tmp21_ = _jid_it;
					if (!gee_iterator_next (_tmp21_)) {
						break;
					}
					_tmp22_ = _jid_it;
					_tmp23_ = gee_iterator_get (_tmp22_);
					jid = (XmppJid*) _tmp23_;
					_tmp24_ = self->priv->list_box;
					_tmp25_ = self->priv->widgets;
					_tmp26_ = account;
					_tmp27_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp25_, _tmp26_);
					_tmp28_ = (GeeHashMap*) _tmp27_;
					_tmp29_ = jid;
					_tmp30_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp28_, _tmp29_);
					_tmp31_ = (GtkListBoxRow*) _tmp30_;
					gtk_list_box_remove (_tmp24_, (GtkWidget*) _tmp31_);
					_g_object_unref0 (_tmp31_);
					_g_object_unref0 (_tmp28_);
					_xmpp_jid_unref0 (jid);
				}
				_g_object_unref0 (_jid_it);
			}
			_g_object_unref0 (account_widgets_cpy);
			_g_object_unref0 (account);
		}
		_g_object_unref0 (_account_it);
	}
	{
		GeeIterator* _account_it = NULL;
		GeeHashMap* _tmp32_;
		GeeSet* _tmp33_;
		GeeSet* _tmp34_;
		GeeSet* _tmp35_;
		GeeIterator* _tmp36_;
		GeeIterator* _tmp37_;
		_tmp32_ = self->priv->lists;
		_tmp33_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _tmp32_);
		_tmp34_ = _tmp33_;
		_tmp35_ = _tmp34_;
		_tmp36_ = gee_iterable_iterator ((GeeIterable*) _tmp35_);
		_tmp37_ = _tmp36_;
		_g_object_unref0 (_tmp35_);
		_account_it = _tmp37_;
		while (TRUE) {
			GeeIterator* _tmp38_;
			DinoEntitiesAccount* account = NULL;
			GeeIterator* _tmp39_;
			gpointer _tmp40_;
			_tmp38_ = _account_it;
			if (!gee_iterator_next (_tmp38_)) {
				break;
			}
			_tmp39_ = _account_it;
			_tmp40_ = gee_iterator_get (_tmp39_);
			account = (DinoEntitiesAccount*) _tmp40_;
			{
				GeeIterator* _conference_it = NULL;
				GeeHashMap* _tmp41_;
				DinoEntitiesAccount* _tmp42_;
				gpointer _tmp43_;
				GeeSet* _tmp44_;
				GeeIterator* _tmp45_;
				GeeIterator* _tmp46_;
				_tmp41_ = self->priv->lists;
				_tmp42_ = account;
				_tmp43_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp41_, _tmp42_);
				_tmp44_ = (GeeSet*) _tmp43_;
				_tmp45_ = gee_iterable_iterator ((GeeIterable*) _tmp44_);
				_tmp46_ = _tmp45_;
				_g_object_unref0 (_tmp44_);
				_conference_it = _tmp46_;
				while (TRUE) {
					GeeIterator* _tmp47_;
					XmppConference* conference = NULL;
					GeeIterator* _tmp48_;
					gpointer _tmp49_;
					DinoEntitiesAccount* _tmp50_;
					XmppConference* _tmp51_;
					_tmp47_ = _conference_it;
					if (!gee_iterator_next (_tmp47_)) {
						break;
					}
					_tmp48_ = _conference_it;
					_tmp49_ = gee_iterator_get (_tmp48_);
					conference = (XmppConference*) _tmp49_;
					_tmp50_ = account;
					_tmp51_ = conference;
					dino_ui_conference_list_add_conference (self, _tmp50_, _tmp51_);
					_g_object_unref0 (conference);
				}
				_g_object_unref0 (_conference_it);
			}
			_g_object_unref0 (account);
		}
		_g_object_unref0 (_account_it);
	}
}

static void
dino_ui_conference_list_set_bookmarks (DinoUiConferenceList* self,
                                       DinoEntitiesAccount* account,
                                       GeeSet* conferences)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (account != NULL);
	if (conferences == NULL) {
		GeeHashMap* _tmp0_;
		_tmp0_ = self->priv->lists;
		gee_abstract_map_unset ((GeeAbstractMap*) _tmp0_, account, NULL);
	} else {
		GeeHashMap* _tmp1_;
		_tmp1_ = self->priv->lists;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp1_, account, conferences);
	}
	dino_ui_conference_list_refresh_conferences (self);
}

GtkListBox*
dino_ui_conference_list_get_list_box (DinoUiConferenceList* self)
{
	GtkListBox* _tmp0_;
	GtkListBox* _tmp1_;
	GtkListBox* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->list_box;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

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

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

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

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

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

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

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

void
dino_ui_value_set_conference_list (GValue* value,
                                   gpointer v_object)
{
	DinoUiConferenceList * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DINO_UI_TYPE_CONFERENCE_LIST));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DINO_UI_TYPE_CONFERENCE_LIST));
		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_ui_conference_list_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		dino_ui_conference_list_unref (old);
	}
}

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

static void
dino_ui_conference_list_class_init (DinoUiConferenceListClass * klass,
                                    gpointer klass_data)
{
	dino_ui_conference_list_parent_class = g_type_class_peek_parent (klass);
	((DinoUiConferenceListClass *) klass)->finalize = dino_ui_conference_list_finalize;
	g_type_class_adjust_private_offset (klass, &DinoUiConferenceList_private_offset);
	dino_ui_conference_list_signals[DINO_UI_CONFERENCE_LIST_CONVERSATION_SELECTED_SIGNAL] = g_signal_new ("conversation-selected", DINO_UI_TYPE_CONFERENCE_LIST, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, DINO_ENTITIES_TYPE_CONVERSATION);
}

static void
dino_ui_conference_list_instance_init (DinoUiConferenceList * self,
                                       gpointer klass)
{
	GtkListBox* _tmp0_;
	GeeHashMap* _tmp1_;
	GeeHashMap* _tmp2_;
	self->priv = dino_ui_conference_list_get_instance_private (self);
	_tmp0_ = (GtkListBox*) gtk_list_box_new ();
	g_object_ref_sink (_tmp0_);
	self->priv->list_box = _tmp0_;
	_tmp1_ = gee_hash_map_new (DINO_ENTITIES_TYPE_ACCOUNT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, GEE_TYPE_SET, (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->lists = _tmp1_;
	_tmp2_ = gee_hash_map_new (DINO_ENTITIES_TYPE_ACCOUNT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, GEE_TYPE_HASH_MAP, (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->widgets = _tmp2_;
	self->priv->bookmarks_updated_handler_id = (gulong) -1;
	self->ref_count = 1;
}

static void
dino_ui_conference_list_finalize (DinoUiConferenceList * obj)
{
	DinoUiConferenceList * self;
	DinoStreamInteractor* _tmp0_;
	DinoModuleIdentity* _tmp1_;
	gpointer _tmp2_;
	DinoMucManager* _tmp3_;
	DinoStreamInteractor* _tmp4_;
	DinoModuleIdentity* _tmp5_;
	gpointer _tmp6_;
	DinoMucManager* _tmp7_;
	guint _tmp8_;
	DinoStreamInteractor* _tmp9_;
	DinoModuleIdentity* _tmp10_;
	gpointer _tmp11_;
	DinoMucManager* _tmp12_;
	guint _tmp13_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_CONFERENCE_LIST, DinoUiConferenceList);
	g_signal_handlers_destroy (self);
	_tmp0_ = self->priv->stream_interactor;
	_tmp1_ = dino_muc_manager_IDENTITY;
	_tmp2_ = dino_stream_interactor_get_module (_tmp0_, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp1_);
	_tmp3_ = (DinoMucManager*) _tmp2_;
	g_signal_handler_disconnect ((GObject*) _tmp3_, self->priv->bookmarks_updated_handler_id);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = self->priv->stream_interactor;
	_tmp5_ = dino_muc_manager_IDENTITY;
	_tmp6_ = dino_stream_interactor_get_module (_tmp4_, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp5_);
	_tmp7_ = (DinoMucManager*) _tmp6_;
	g_signal_parse_name ("conference-added", DINO_TYPE_MUC_MANAGER, &_tmp8_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp7_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _dino_ui_conference_list_add_conference_dino_muc_manager_conference_added, self);
	_g_object_unref0 (_tmp7_);
	_tmp9_ = self->priv->stream_interactor;
	_tmp10_ = dino_muc_manager_IDENTITY;
	_tmp11_ = dino_stream_interactor_get_module (_tmp9_, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp10_);
	_tmp12_ = (DinoMucManager*) _tmp11_;
	g_signal_parse_name ("conference-removed", DINO_TYPE_MUC_MANAGER, &_tmp13_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp12_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp13_, 0, NULL, (GCallback) _dino_ui_conference_list_remove_conference_dino_muc_manager_conference_removed, self);
	_g_object_unref0 (_tmp12_);
	_g_object_unref0 (self->priv->stream_interactor);
	_g_object_unref0 (self->priv->list_box);
	_g_object_unref0 (self->priv->lists);
	_g_object_unref0 (self->priv->widgets);
}

static GType
dino_ui_conference_list_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { dino_ui_value_conference_list_init, dino_ui_value_conference_list_free_value, dino_ui_value_conference_list_copy_value, dino_ui_value_conference_list_peek_pointer, "p", dino_ui_value_conference_list_collect_value, "p", dino_ui_value_conference_list_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiConferenceListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_conference_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiConferenceList), 0, (GInstanceInitFunc) dino_ui_conference_list_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_ui_conference_list_type_id;
	dino_ui_conference_list_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DinoUiConferenceList", &g_define_type_info, &g_define_type_fundamental_info, 0);
	DinoUiConferenceList_private_offset = g_type_add_instance_private (dino_ui_conference_list_type_id, sizeof (DinoUiConferenceListPrivate));
	return dino_ui_conference_list_type_id;
}

GType
dino_ui_conference_list_get_type (void)
{
	static volatile gsize dino_ui_conference_list_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_conference_list_type_id__once)) {
		GType dino_ui_conference_list_type_id;
		dino_ui_conference_list_type_id = dino_ui_conference_list_get_type_once ();
		g_once_init_leave (&dino_ui_conference_list_type_id__once, dino_ui_conference_list_type_id);
	}
	return dino_ui_conference_list_type_id__once;
}

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

void
dino_ui_conference_list_unref (gpointer instance)
{
	DinoUiConferenceList * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		DINO_UI_CONFERENCE_LIST_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

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

DinoUiConferenceListRow*
dino_ui_conference_list_row_construct (GType object_type,
                                       DinoStreamInteractor* stream_interactor,
                                       XmppConference* bookmark,
                                       DinoEntitiesAccount* account)
{
	DinoUiConferenceListRow * self = NULL;
	XmppJid* _tmp0_;
	XmppJid* _tmp1_;
	XmppJid* _tmp2_;
	DinoEntitiesAccount* _tmp3_;
	XmppConference* _tmp4_;
	GtkImage* _tmp5_;
	gchar* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	GtkLabel* _tmp18_;
	GeeArrayList* _tmp19_;
	GeeArrayList* _tmp20_;
	gint _tmp21_;
	gint _tmp22_;
	gboolean _tmp23_;
	DinoUiAvatarPicture* _tmp47_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp48_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp49_;
	XmppJid* _tmp50_;
	DinoEntitiesConversation* _tmp51_;
	DinoEntitiesConversation* _tmp52_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp53_;
	DinoUiViewModelCompatAvatarPictureModel* _tmp54_;
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	g_return_val_if_fail (bookmark != NULL, NULL);
	g_return_val_if_fail (account != NULL, NULL);
	self = (DinoUiConferenceListRow*) dino_ui_list_row_construct (object_type);
	_tmp0_ = xmpp_conference_get_jid (bookmark);
	_tmp1_ = _tmp0_;
	_tmp2_ = _xmpp_jid_ref0 (_tmp1_);
	_xmpp_jid_unref0 (((DinoUiListRow*) self)->jid);
	((DinoUiListRow*) self)->jid = _tmp2_;
	_tmp3_ = _g_object_ref0 (account);
	_g_object_unref0 (((DinoUiListRow*) self)->account);
	((DinoUiListRow*) self)->account = _tmp3_;
	_tmp4_ = _g_object_ref0 (bookmark);
	_g_object_unref0 (self->bookmark);
	self->bookmark = _tmp4_;
	_tmp5_ = ((DinoUiListRow*) self)->status_dot;
	gtk_widget_set_visible ((GtkWidget*) _tmp5_, FALSE);
	_tmp8_ = xmpp_conference_get_name (bookmark);
	_tmp9_ = _tmp8_;
	if (_tmp9_ != NULL) {
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp10_ = xmpp_conference_get_name (bookmark);
		_tmp11_ = _tmp10_;
		_tmp7_ = g_strcmp0 (_tmp11_, "") != 0;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp12_ = xmpp_conference_get_name (bookmark);
		_tmp13_ = _tmp12_;
		_tmp14_ = g_strdup (_tmp13_);
		_g_free0 (_tmp6_);
		_tmp6_ = _tmp14_;
	} else {
		XmppJid* _tmp15_;
		XmppJid* _tmp16_;
		gchar* _tmp17_;
		_tmp15_ = xmpp_conference_get_jid (bookmark);
		_tmp16_ = _tmp15_;
		_tmp17_ = xmpp_jid_to_string (_tmp16_);
		_g_free0 (_tmp6_);
		_tmp6_ = _tmp17_;
	}
	_tmp18_ = ((DinoUiListRow*) self)->name_label;
	gtk_label_set_label (_tmp18_, _tmp6_);
	_tmp19_ = dino_stream_interactor_get_accounts (stream_interactor);
	_tmp20_ = _tmp19_;
	_tmp21_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = _tmp22_ > 1;
	_g_object_unref0 (_tmp20_);
	if (_tmp23_) {
		GtkLabel* _tmp24_;
		XmppJid* _tmp25_;
		XmppJid* _tmp26_;
		XmppJid* _tmp27_;
		gchar* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		_tmp24_ = ((DinoUiListRow*) self)->via_label;
		_tmp25_ = dino_entities_account_get_bare_jid (account);
		_tmp26_ = _tmp25_;
		_tmp27_ = _tmp26_;
		_tmp28_ = xmpp_jid_to_string (_tmp27_);
		_tmp29_ = _tmp28_;
		_tmp30_ = g_strconcat ("via ", _tmp29_, NULL);
		_tmp31_ = _tmp30_;
		gtk_label_set_label (_tmp24_, _tmp31_);
		_g_free0 (_tmp31_);
		_g_free0 (_tmp29_);
		_xmpp_jid_unref0 (_tmp27_);
	} else {
		gboolean _tmp32_ = FALSE;
		const gchar* _tmp33_;
		const gchar* _tmp34_;
		_tmp33_ = xmpp_conference_get_name (bookmark);
		_tmp34_ = _tmp33_;
		if (_tmp34_ != NULL) {
			const gchar* _tmp35_;
			const gchar* _tmp36_;
			XmppJid* _tmp37_;
			XmppJid* _tmp38_;
			gchar* _tmp39_;
			gchar* _tmp40_;
			_tmp35_ = xmpp_conference_get_name (bookmark);
			_tmp36_ = _tmp35_;
			_tmp37_ = xmpp_conference_get_jid (bookmark);
			_tmp38_ = _tmp37_;
			_tmp39_ = xmpp_jid_to_string (_tmp38_);
			_tmp40_ = _tmp39_;
			_tmp32_ = g_strcmp0 (_tmp36_, _tmp40_) != 0;
			_g_free0 (_tmp40_);
		} else {
			_tmp32_ = FALSE;
		}
		if (_tmp32_) {
			GtkLabel* _tmp41_;
			XmppJid* _tmp42_;
			XmppJid* _tmp43_;
			gchar* _tmp44_;
			gchar* _tmp45_;
			_tmp41_ = ((DinoUiListRow*) self)->via_label;
			_tmp42_ = xmpp_conference_get_jid (bookmark);
			_tmp43_ = _tmp42_;
			_tmp44_ = xmpp_jid_to_string (_tmp43_);
			_tmp45_ = _tmp44_;
			gtk_label_set_label (_tmp41_, _tmp45_);
			_g_free0 (_tmp45_);
		} else {
			GtkLabel* _tmp46_;
			_tmp46_ = ((DinoUiListRow*) self)->via_label;
			gtk_widget_set_visible ((GtkWidget*) _tmp46_, FALSE);
		}
	}
	_tmp47_ = ((DinoUiListRow*) self)->picture;
	_tmp48_ = dino_ui_view_model_compat_avatar_picture_model_new (stream_interactor);
	_tmp49_ = _tmp48_;
	_tmp50_ = ((DinoUiListRow*) self)->jid;
	_tmp51_ = dino_entities_conversation_new (_tmp50_, account, DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT);
	_tmp52_ = _tmp51_;
	_tmp53_ = dino_ui_view_model_compat_avatar_picture_model_set_conversation (_tmp49_, _tmp52_);
	_tmp54_ = _tmp53_;
	dino_ui_avatar_picture_set_model (_tmp47_, (DinoUiViewModelAvatarPictureModel*) _tmp54_);
	_g_object_unref0 (_tmp54_);
	_g_object_unref0 (_tmp52_);
	_g_object_unref0 (_tmp49_);
	_g_free0 (_tmp6_);
	return self;
}

DinoUiConferenceListRow*
dino_ui_conference_list_row_new (DinoStreamInteractor* stream_interactor,
                                 XmppConference* bookmark,
                                 DinoEntitiesAccount* account)
{
	return dino_ui_conference_list_row_construct (DINO_UI_TYPE_CONFERENCE_LIST_ROW, stream_interactor, bookmark, account);
}

static void
dino_ui_conference_list_row_class_init (DinoUiConferenceListRowClass * klass,
                                        gpointer klass_data)
{
	dino_ui_conference_list_row_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = dino_ui_conference_list_row_finalize;
}

static void
dino_ui_conference_list_row_instance_init (DinoUiConferenceListRow * self,
                                           gpointer klass)
{
}

static void
dino_ui_conference_list_row_finalize (GObject * obj)
{
	DinoUiConferenceListRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_CONFERENCE_LIST_ROW, DinoUiConferenceListRow);
	_g_object_unref0 (self->bookmark);
	G_OBJECT_CLASS (dino_ui_conference_list_row_parent_class)->finalize (obj);
}

static GType
dino_ui_conference_list_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiConferenceListRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_conference_list_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiConferenceListRow), 0, (GInstanceInitFunc) dino_ui_conference_list_row_instance_init, NULL };
	GType dino_ui_conference_list_row_type_id;
	dino_ui_conference_list_row_type_id = g_type_register_static (DINO_UI_TYPE_LIST_ROW, "DinoUiConferenceListRow", &g_define_type_info, 0);
	return dino_ui_conference_list_row_type_id;
}

GType
dino_ui_conference_list_row_get_type (void)
{
	static volatile gsize dino_ui_conference_list_row_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_conference_list_row_type_id__once)) {
		GType dino_ui_conference_list_row_type_id;
		dino_ui_conference_list_row_type_id = dino_ui_conference_list_row_get_type_once ();
		g_once_init_leave (&dino_ui_conference_list_row_type_id__once, dino_ui_conference_list_row_type_id);
	}
	return dino_ui_conference_list_row_type_id__once;
}

