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

#include <glib-object.h>
#include <gtk/gtk.h>
#include "libdino.h"
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <adwaita.h>
#include "xmpp-vala.h"
#include <gio/gio.h>
#include "dino_i18n.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_CALL_WINDOW_CONTROLLER (dino_ui_call_window_controller_get_type ())
#define DINO_UI_CALL_WINDOW_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CALL_WINDOW_CONTROLLER, DinoUiCallWindowController))
#define DINO_UI_CALL_WINDOW_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CALL_WINDOW_CONTROLLER, DinoUiCallWindowControllerClass))
#define DINO_UI_IS_CALL_WINDOW_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CALL_WINDOW_CONTROLLER))
#define DINO_UI_IS_CALL_WINDOW_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CALL_WINDOW_CONTROLLER))
#define DINO_UI_CALL_WINDOW_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CALL_WINDOW_CONTROLLER, DinoUiCallWindowControllerClass))

typedef struct _DinoUiCallWindowController DinoUiCallWindowController;
typedef struct _DinoUiCallWindowControllerClass DinoUiCallWindowControllerClass;
typedef struct _DinoUiCallWindowControllerPrivate DinoUiCallWindowControllerPrivate;

#define DINO_UI_TYPE_CALL_WINDOW (dino_ui_call_window_get_type ())
#define DINO_UI_CALL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CALL_WINDOW, DinoUiCallWindow))
#define DINO_UI_CALL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CALL_WINDOW, DinoUiCallWindowClass))
#define DINO_UI_IS_CALL_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CALL_WINDOW))
#define DINO_UI_IS_CALL_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CALL_WINDOW))
#define DINO_UI_CALL_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CALL_WINDOW, DinoUiCallWindowClass))

typedef struct _DinoUiCallWindow DinoUiCallWindow;
typedef struct _DinoUiCallWindowClass DinoUiCallWindowClass;

#define DINO_UI_TYPE_PARTICIPANT_WIDGET (dino_ui_participant_widget_get_type ())
#define DINO_UI_PARTICIPANT_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_PARTICIPANT_WIDGET, DinoUiParticipantWidget))
#define DINO_UI_PARTICIPANT_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_PARTICIPANT_WIDGET, DinoUiParticipantWidgetClass))
#define DINO_UI_IS_PARTICIPANT_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_PARTICIPANT_WIDGET))
#define DINO_UI_IS_PARTICIPANT_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_PARTICIPANT_WIDGET))
#define DINO_UI_PARTICIPANT_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_PARTICIPANT_WIDGET, DinoUiParticipantWidgetClass))

typedef struct _DinoUiParticipantWidget DinoUiParticipantWidget;
typedef struct _DinoUiParticipantWidgetClass DinoUiParticipantWidgetClass;
enum  {
	DINO_UI_CALL_WINDOW_CONTROLLER_0_PROPERTY,
	DINO_UI_CALL_WINDOW_CONTROLLER_NUM_PROPERTIES
};
static GParamSpec* dino_ui_call_window_controller_properties[DINO_UI_CALL_WINDOW_CONTROLLER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define DINO_UI_TYPE_APPLICATION (dino_ui_application_get_type ())
#define DINO_UI_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_APPLICATION, DinoUiApplication))
#define DINO_UI_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_APPLICATION, DinoUiApplicationClass))
#define DINO_UI_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_APPLICATION))
#define DINO_UI_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_APPLICATION))
#define DINO_UI_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_APPLICATION, DinoUiApplicationClass))

typedef struct _DinoUiApplication DinoUiApplication;
typedef struct _DinoUiApplicationClass DinoUiApplicationClass;
typedef struct _Block14Data Block14Data;
typedef struct _DinoUiCallWindowPrivate DinoUiCallWindowPrivate;

#define DINO_UI_TYPE_CALL_BOTTOM_BAR (dino_ui_call_bottom_bar_get_type ())
#define DINO_UI_CALL_BOTTOM_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CALL_BOTTOM_BAR, DinoUiCallBottomBar))
#define DINO_UI_CALL_BOTTOM_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CALL_BOTTOM_BAR, DinoUiCallBottomBarClass))
#define DINO_UI_IS_CALL_BOTTOM_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CALL_BOTTOM_BAR))
#define DINO_UI_IS_CALL_BOTTOM_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CALL_BOTTOM_BAR))
#define DINO_UI_CALL_BOTTOM_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CALL_BOTTOM_BAR, DinoUiCallBottomBarClass))

typedef struct _DinoUiCallBottomBar DinoUiCallBottomBar;
typedef struct _DinoUiCallBottomBarClass DinoUiCallBottomBarClass;
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define DINO_UI_TYPE_SELECT_CONTACT_DIALOG (dino_ui_select_contact_dialog_get_type ())
#define DINO_UI_SELECT_CONTACT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_SELECT_CONTACT_DIALOG, DinoUiSelectContactDialog))
#define DINO_UI_SELECT_CONTACT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_SELECT_CONTACT_DIALOG, DinoUiSelectContactDialogClass))
#define DINO_UI_IS_SELECT_CONTACT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_SELECT_CONTACT_DIALOG))
#define DINO_UI_IS_SELECT_CONTACT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_SELECT_CONTACT_DIALOG))
#define DINO_UI_SELECT_CONTACT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_SELECT_CONTACT_DIALOG, DinoUiSelectContactDialogClass))

typedef struct _DinoUiSelectContactDialog DinoUiSelectContactDialog;
typedef struct _DinoUiSelectContactDialogClass DinoUiSelectContactDialogClass;
typedef struct _DinoUiSelectContactDialogPrivate DinoUiSelectContactDialogPrivate;
typedef struct _Block15Data Block15Data;

#define DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER (dino_ui_call_encryption_button_controller_get_type ())
#define DINO_UI_CALL_ENCRYPTION_BUTTON_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER, DinoUiCallEncryptionButtonController))
#define DINO_UI_CALL_ENCRYPTION_BUTTON_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER, DinoUiCallEncryptionButtonControllerClass))
#define DINO_UI_IS_CALL_ENCRYPTION_BUTTON_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER))
#define DINO_UI_IS_CALL_ENCRYPTION_BUTTON_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER))
#define DINO_UI_CALL_ENCRYPTION_BUTTON_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CALL_ENCRYPTION_BUTTON_CONTROLLER, DinoUiCallEncryptionButtonControllerClass))

typedef struct _DinoUiCallEncryptionButtonController DinoUiCallEncryptionButtonController;
typedef struct _DinoUiCallEncryptionButtonControllerClass DinoUiCallEncryptionButtonControllerClass;
typedef struct _DinoUiParticipantWidgetPrivate DinoUiParticipantWidgetPrivate;
#define _dino_plugins_registry_unref0(var) ((var == NULL) ? NULL : (var = (dino_plugins_registry_unref (var), NULL)))
typedef struct _Block16Data Block16Data;

#define DINO_UI_TYPE_CALL_CONNECTION_DETAILS_WINDOW (dino_ui_call_connection_details_window_get_type ())
#define DINO_UI_CALL_CONNECTION_DETAILS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CALL_CONNECTION_DETAILS_WINDOW, DinoUiCallConnectionDetailsWindow))
#define DINO_UI_CALL_CONNECTION_DETAILS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CALL_CONNECTION_DETAILS_WINDOW, DinoUiCallConnectionDetailsWindowClass))
#define DINO_UI_IS_CALL_CONNECTION_DETAILS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CALL_CONNECTION_DETAILS_WINDOW))
#define DINO_UI_IS_CALL_CONNECTION_DETAILS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CALL_CONNECTION_DETAILS_WINDOW))
#define DINO_UI_CALL_CONNECTION_DETAILS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CALL_CONNECTION_DETAILS_WINDOW, DinoUiCallConnectionDetailsWindowClass))

typedef struct _DinoUiCallConnectionDetailsWindow DinoUiCallConnectionDetailsWindow;
typedef struct _DinoUiCallConnectionDetailsWindowClass DinoUiCallConnectionDetailsWindowClass;
typedef struct _Block17Data Block17Data;
#define _dino_peer_info_unref0(var) ((var == NULL) ? NULL : (var = (dino_peer_info_unref (var), NULL)))

#define DINO_UI_TYPE_AUDIO_SETTINGS_POPOVER (dino_ui_audio_settings_popover_get_type ())
#define DINO_UI_AUDIO_SETTINGS_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_AUDIO_SETTINGS_POPOVER, DinoUiAudioSettingsPopover))
#define DINO_UI_AUDIO_SETTINGS_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_AUDIO_SETTINGS_POPOVER, DinoUiAudioSettingsPopoverClass))
#define DINO_UI_IS_AUDIO_SETTINGS_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_AUDIO_SETTINGS_POPOVER))
#define DINO_UI_IS_AUDIO_SETTINGS_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_AUDIO_SETTINGS_POPOVER))
#define DINO_UI_AUDIO_SETTINGS_POPOVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_AUDIO_SETTINGS_POPOVER, DinoUiAudioSettingsPopoverClass))

typedef struct _DinoUiAudioSettingsPopover DinoUiAudioSettingsPopover;
typedef struct _DinoUiAudioSettingsPopoverClass DinoUiAudioSettingsPopoverClass;
typedef struct _Block18Data Block18Data;

#define DINO_UI_TYPE_VIDEO_SETTINGS_POPOVER (dino_ui_video_settings_popover_get_type ())
#define DINO_UI_VIDEO_SETTINGS_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_VIDEO_SETTINGS_POPOVER, DinoUiVideoSettingsPopover))
#define DINO_UI_VIDEO_SETTINGS_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_VIDEO_SETTINGS_POPOVER, DinoUiVideoSettingsPopoverClass))
#define DINO_UI_IS_VIDEO_SETTINGS_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_VIDEO_SETTINGS_POPOVER))
#define DINO_UI_IS_VIDEO_SETTINGS_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_VIDEO_SETTINGS_POPOVER))
#define DINO_UI_VIDEO_SETTINGS_POPOVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_VIDEO_SETTINGS_POPOVER, DinoUiVideoSettingsPopoverClass))

typedef struct _DinoUiVideoSettingsPopover DinoUiVideoSettingsPopover;
typedef struct _DinoUiVideoSettingsPopoverClass DinoUiVideoSettingsPopoverClass;
typedef struct _Block19Data Block19Data;

struct _DinoUiCallWindowController {
	GObject parent_instance;
	DinoUiCallWindowControllerPrivate * priv;
};

struct _DinoUiCallWindowControllerClass {
	GObjectClass parent_class;
};

struct _DinoUiCallWindowControllerPrivate {
	DinoUiCallWindow* call_window;
	DinoEntitiesCall* call;
	DinoCallState* call_state;
	DinoStreamInteractor* stream_interactor;
	DinoCalls* calls;
	DinoPluginsVideoCallPlugin* call_plugin;
	DinoPluginsVideoCallWidget* own_video;
	GeeHashMap* participant_videos;
	GeeHashMap* participant_widgets;
	GeeHashMap* peer_states;
	GeeHashMap* invite_handler_ids;
	gint window_height;
	gint window_width;
	gboolean window_size_changed;
	gulong* call_window_handler_ids;
	gint call_window_handler_ids_length1;
	gint _call_window_handler_ids_size_;
	gulong* bottom_bar_handler_ids;
	gint bottom_bar_handler_ids_length1;
	gint _bottom_bar_handler_ids_size_;
	guint inhibit_cookie;
};

struct _Block14Data {
	int _ref_count_;
	DinoUiCallWindowController* self;
	DinoUiApplication* app;
	DinoUiCallWindow* call_window;
	DinoCallState* call_state;
	DinoStreamInteractor* stream_interactor;
};

struct _DinoUiCallWindow {
	GtkWindow parent_instance;
	DinoUiCallWindowPrivate * priv;
	DinoUiCallWindowController* controller;
	GtkOverlay* overlay;
	GtkGrid* grid;
	DinoUiCallBottomBar* bottom_bar;
	GtkRevealer* bottom_bar_revealer;
	GtkHeaderBar* header_bar;
	GtkRevealer* header_bar_revealer;
	GtkBox* own_video_box;
};

struct _DinoUiCallWindowClass {
	GtkWindowClass parent_class;
};

struct _DinoUiSelectContactDialog {
	GtkDialog parent_instance;
	DinoUiSelectContactDialogPrivate * priv;
	GtkButton* ok_button;
};

struct _DinoUiSelectContactDialogClass {
	GtkDialogClass parent_class;
};

struct _Block15Data {
	int _ref_count_;
	DinoUiCallWindowController* self;
	gchar* peer_id;
	XmppJid* peer_jid;
	DinoPeerState* peer_state;
};

struct _DinoUiParticipantWidget {
	GtkBox parent_instance;
	DinoUiParticipantWidgetPrivate * priv;
	GtkOverlay* overlay;
	GtkWidget* main_widget;
	GtkHeaderBar* header_bar;
	GtkLabel* title_label;
	GtkLabel* subtitle_label;
	GtkBox* inner_box;
	GtkBox* title_box;
	GtkMenuButton* encryption_button;
	DinoUiCallEncryptionButtonController* encryption_button_controller;
	GtkMenuButton* menu_button;
	GtkButton* invite_button;
	gboolean shows_video;
	gchar* participant_name;
};

struct _DinoUiParticipantWidgetClass {
	GtkBoxClass parent_class;
};

struct _Block16Data {
	int _ref_count_;
	DinoUiCallWindowController* self;
	gchar* participant_name;
	gchar* participant_id;
};

struct _Block17Data {
	int _ref_count_;
	Block16Data * _data16_;
	DinoUiCallConnectionDetailsWindow* conn_details_window;
	guint timeout_handle_id;
};

struct _Block18Data {
	int _ref_count_;
	DinoUiCallWindowController* self;
	DinoUiAudioSettingsPopover* audio_settings_popover;
};

struct _Block19Data {
	int _ref_count_;
	DinoUiCallWindowController* self;
	DinoUiVideoSettingsPopover* video_settings_popover;
};

static gint DinoUiCallWindowController_private_offset;
static gpointer dino_ui_call_window_controller_parent_class = NULL;

VALA_EXTERN GType dino_ui_call_window_controller_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiCallWindowController, g_object_unref)
VALA_EXTERN GType dino_ui_call_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiCallWindow, g_object_unref)
VALA_EXTERN GType dino_ui_participant_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiParticipantWidget, g_object_unref)
VALA_EXTERN DinoUiCallWindowController* dino_ui_call_window_controller_new (DinoUiCallWindow* call_window,
                                                                DinoCallState* call_state,
                                                                DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiCallWindowController* dino_ui_call_window_controller_construct (GType object_type,
                                                                      DinoUiCallWindow* call_window,
                                                                      DinoCallState* call_state,
                                                                      DinoStreamInteractor* stream_interactor);
VALA_EXTERN GType dino_ui_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiApplication, g_object_unref)
static Block14Data* block14_data_ref (Block14Data* _data14_);
static void block14_data_unref (void * _userdata_);
VALA_EXTERN GType dino_ui_call_bottom_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiCallBottomBar, g_object_unref)
VALA_EXTERN void dino_ui_call_bottom_bar_set_video_enabled (DinoUiCallBottomBar* self,
                                                gboolean value);
static void __lambda64_ (Block14Data* _data14_,
                  XmppJid* who_terminated,
                  const gchar* reason_name,
                  const gchar* reason_text);
VALA_EXTERN gchar* dino_ui_util_get_conversation_display_name (DinoStreamInteractor* stream_interactor,
                                                   DinoEntitiesConversation* conversation);
VALA_EXTERN void dino_ui_call_window_show_counterpart_ended (DinoUiCallWindow* self,
                                                 const gchar* who_terminated,
                                                 const gchar* reason_name,
                                                 const gchar* reason_text);
static gboolean __lambda66_ (Block14Data* _data14_);
static gboolean ___lambda66__gsource_func (gpointer self);
static void ___lambda64__dino_call_state_terminated (DinoCallState* _sender,
                                              XmppJid* who_terminated,
                                              const gchar* reason_name,
                                              const gchar* reason_text,
                                              gpointer self);
static void __lambda67_ (DinoUiCallWindowController* self,
                  XmppJid* jid,
                  DinoPeerState* peer_state);
static void dino_ui_call_window_controller_connect_peer_signals (DinoUiCallWindowController* self,
                                                          DinoPeerState* peer_state);
static void dino_ui_call_window_controller_add_new_participant (DinoUiCallWindowController* self,
                                                         const gchar* participant_id,
                                                         XmppJid* jid);
static void ___lambda67__dino_call_state_peer_joined (DinoCallState* _sender,
                                               XmppJid* jid,
                                               DinoPeerState* peer_state,
                                               gpointer self);
static void __lambda101_ (DinoUiCallWindowController* self,
                   XmppJid* jid,
                   DinoPeerState* peer_state,
                   const gchar* reason_name,
                   const gchar* reason_text);
static void dino_ui_call_window_controller_remove_participant (DinoUiCallWindowController* self,
                                                        const gchar* participant_id);
static void ___lambda101__dino_call_state_peer_left (DinoCallState* _sender,
                                              XmppJid* jid,
                                              DinoPeerState* peer_state,
                                              const gchar* reason_name,
                                              const gchar* reason_text,
                                              gpointer self);
static void __lambda102_ (Block14Data* _data14_);
static void ___lambda102__dino_ui_call_bottom_bar_hang_up (DinoUiCallBottomBar* _sender,
                                                    gpointer self);
static void _vala_array_add5 (gulong* * array,
                       gint* length,
                       gint* size,
                       gulong value);
static gboolean __lambda103_ (Block14Data* _data14_);
static gboolean ___lambda103__gtk_window_close_request (GtkWindow* _sender,
                                                 gpointer self);
static void _vala_array_add6 (gulong* * array,
                       gint* length,
                       gint* size,
                       gulong value);
static void __lambda104_ (Block14Data* _data14_);
VALA_EXTERN gboolean dino_ui_call_bottom_bar_get_audio_enabled (DinoUiCallBottomBar* self);
static void ___lambda104__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void _vala_array_add7 (gulong* * array,
                       gint* length,
                       gint* size,
                       gulong value);
static void __lambda105_ (Block14Data* _data14_);
VALA_EXTERN gboolean dino_ui_call_bottom_bar_get_video_enabled (DinoUiCallBottomBar* self);
static void dino_ui_call_window_controller_update_own_video (DinoUiCallWindowController* self);
static void ___lambda105__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void _vala_array_add8 (gulong* * array,
                       gint* length,
                       gint* size,
                       gulong value);
static void __lambda106_ (Block14Data* _data14_,
                   GParamSpec* event);
static void ___lambda106__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void _vala_array_add9 (gulong* * array,
                       gint* length,
                       gint* size,
                       gulong value);
static void __lambda107_ (Block14Data* _data14_,
                   GParamSpec* event);
static void ___lambda107__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void _vala_array_add10 (gulong* * array,
                        gint* length,
                        gint* size,
                        gulong value);
static void __lambda108_ (DinoUiCallWindowController* self);
static void dino_ui_call_window_controller_capture_window_size (DinoUiCallWindowController* self);
static void ___lambda108__gtk_widget_realize (GtkWidget* _sender,
                                       gpointer self);
static void _vala_array_add11 (gulong* * array,
                        gint* length,
                        gint* size,
                        gulong value);
static void __lambda109_ (DinoUiCallWindowController* self,
                   DinoEntitiesCall* call,
                   XmppXepCoinConferenceInfo* conference_info);
static void ___lambda109__dino_calls_conference_info_received (DinoCalls* _sender,
                                                        DinoEntitiesCall* call,
                                                        XmppXepCoinConferenceInfo* conference_info,
                                                        gpointer self);
static void __lambda110_ (Block14Data* _data14_,
                   guint width,
                   guint height);
VALA_EXTERN void dino_ui_call_window_set_own_video_ratio (DinoUiCallWindow* self,
                                              gint width,
                                              gint height);
static void ___lambda110__dino_plugins_video_call_widget_resolution_changed (DinoPluginsVideoCallWidget* _sender,
                                                                      guint width,
                                                                      guint height,
                                                                      gpointer self);
static void __lambda111_ (DinoUiCallWindowController* self);
static void ___lambda111__dino_ui_call_window_menu_dump_dot (DinoUiCallWindow* _sender,
                                                      gpointer self);
static void dino_ui_call_window_controller_update_audio_device_choices (DinoUiCallWindowController* self);
static void dino_ui_call_window_controller_update_video_device_choices (DinoUiCallWindowController* self);
static gboolean __lambda112_ (Block14Data* _data14_);
static gboolean ___lambda112__gtk_window_close_request (GtkWindow* _sender,
                                                 gpointer self);
static void dino_ui_call_window_controller_invite_button_clicked (DinoUiCallWindowController* self);
static gboolean _dino_entities_account_equals_func_gee_equal_data_func (gconstpointer a,
                                                                 gconstpointer b,
                                                                 gpointer self);
VALA_EXTERN GType dino_ui_select_contact_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiSelectContactDialog, g_object_unref)
VALA_EXTERN DinoUiSelectContactDialog* dino_ui_select_contact_dialog_new (DinoStreamInteractor* stream_interactor,
                                                              GeeList* accounts);
VALA_EXTERN DinoUiSelectContactDialog* dino_ui_select_contact_dialog_construct (GType object_type,
                                                                    DinoStreamInteractor* stream_interactor,
                                                                    GeeList* accounts);
static void __lambda99_ (DinoUiCallWindowController* self,
                  DinoEntitiesAccount* account,
                  XmppJid* jid);
static void ___lambda99__dino_ui_select_contact_dialog_selected (DinoUiSelectContactDialog* _sender,
                                                          DinoEntitiesAccount* account,
                                                          XmppJid* jid,
                                                          gpointer self);
static Block15Data* block15_data_ref (Block15Data* _data15_);
static void block15_data_unref (void * _userdata_);
static void __lambda68_ (Block15Data* _data15_);
VALA_EXTERN void dino_ui_call_window_set_status (DinoUiCallWindow* self,
                                     const gchar* participant_id,
                                     const gchar* state);
static void ___lambda69_ (Block15Data* _data15_,
                   GObject* _,
                   GAsyncResult* res);
VALA_EXTERN void dino_ui_participant_widget_set_may_show_invite_button (DinoUiParticipantWidget* self,
                                                            gboolean value);
static void ____lambda69__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void ___lambda70_ (DinoUiCallWindowController* self,
                   const gchar* media,
                   gboolean incoming);
static void ____lambda70__dino_plugins_video_call_plugin_devices_changed (DinoPluginsVideoCallPlugin* _sender,
                                                                   const gchar* media,
                                                                   gboolean incoming,
                                                                   gpointer self);
static gboolean ____lambda74_ (DinoUiCallWindowController* self,
                        DinoUiParticipantWidget* widget);
static gboolean _____lambda74__gee_forall_func (gpointer g,
                                         gpointer self);
static void ___lambda68__dino_peer_state_connection_ready (DinoPeerState* _sender,
                                                    gpointer self);
static void __lambda75_ (Block15Data* _data15_,
                  gboolean mute);
VALA_EXTERN void dino_ui_call_window_set_placeholder (DinoUiCallWindow* self,
                                          const gchar* participant,
                                          DinoEntitiesConversation* conversation,
                                          DinoStreamInteractor* stream_interactor);
VALA_EXTERN void dino_ui_call_window_set_video (DinoUiCallWindow* self,
                                    const gchar* participant,
                                    GtkWidget* widget);
static void ___lambda75__dino_peer_state_counterpart_sends_video_updated (DinoPeerState* _sender,
                                                                   gboolean mute,
                                                                   gpointer self);
static void __lambda76_ (Block15Data* _data15_,
                  XmppXepJingleRtpCallSessionInfo session_info);
static void ___lambda76__dino_peer_state_info_received (DinoPeerState* _sender,
                                                 XmppXepJingleRtpCallSessionInfo session_info,
                                                 gpointer self);
static void __lambda77_ (Block15Data* _data15_,
                  DinoPeerState* state,
                  XmppXepJingleContentEncryption* audio_encryption,
                  XmppXepJingleContentEncryption* video_encryption);
VALA_EXTERN GType dino_ui_call_encryption_button_controller_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiCallEncryptionButtonController, g_object_unref)
static void dino_ui_call_window_controller_update_encryption_indicator (DinoUiCallWindowController* self,
                                                                 DinoUiCallEncryptionButtonController* encryption_button,
                                                                 gboolean has_audio,
                                                                 XmppXepJingleContentEncryption* audio_encryption,
                                                                 gboolean has_video,
                                                                 XmppXepJingleContentEncryption* video_encryption);
static void ___lambda77__dino_peer_state_encryption_updated (DinoPeerState* _sender,
                                                      XmppXepJingleContentEncryption* audio_encryption,
                                                      XmppXepJingleContentEncryption* video_encryption,
                                                      gpointer self);
VALA_EXTERN void dino_ui_call_encryption_button_controller_set_info (DinoUiCallEncryptionButtonController* self,
                                                         const gchar* title,
                                                         gboolean show_keys,
                                                         gboolean has_audio,
                                                         XmppXepJingleContentEncryption* audio_encryption,
                                                         gboolean has_video,
                                                         XmppXepJingleContentEncryption* video_encryption);
VALA_EXTERN void dino_ui_call_encryption_button_controller_set_icon (DinoUiCallEncryptionButtonController* self,
                                                         gboolean encrypted,
                                                         const gchar* icon_name);
static Block16Data* block16_data_ref (Block16Data* _data16_);
static void block16_data_unref (void * _userdata_);
VALA_EXTERN DinoUiParticipantWidget* dino_ui_participant_widget_new (const gchar* participant_name);
VALA_EXTERN DinoUiParticipantWidget* dino_ui_participant_widget_construct (GType object_type,
                                                               const gchar* participant_name);
static void __lambda78_ (Block16Data* _data16_);
VALA_EXTERN GType dino_ui_call_connection_details_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiCallConnectionDetailsWindow, g_object_unref)
static Block17Data* block17_data_ref (Block17Data* _data17_);
static void block17_data_unref (void * _userdata_);
VALA_EXTERN DinoUiCallConnectionDetailsWindow* dino_ui_call_connection_details_window_new (void);
VALA_EXTERN DinoUiCallConnectionDetailsWindow* dino_ui_call_connection_details_window_construct (GType object_type);
VALA_EXTERN void dino_ui_call_connection_details_window_update_content (DinoUiCallConnectionDetailsWindow* self,
                                                            DinoPeerInfo* peer_info);
static gboolean __lambda79_ (Block17Data* _data17_);
static gboolean ___lambda79__gsource_func (gpointer self);
static gboolean __lambda80_ (Block17Data* _data17_);
static gboolean ___lambda80__gtk_window_close_request (GtkWindow* _sender,
                                                gpointer self);
static gboolean __lambda81_ (Block17Data* _data17_);
static gboolean ___lambda81__gtk_window_close_request (GtkWindow* _sender,
                                                gpointer self);
static void ___lambda78__dino_ui_participant_widget_debug_information_clicked (DinoUiParticipantWidget* _sender,
                                                                        gpointer self);
static void __lambda82_ (DinoUiCallWindowController* self);
static void ___lambda82__dino_ui_participant_widget_invite_button_clicked (DinoUiParticipantWidget* _sender,
                                                                    gpointer self);
VALA_EXTERN void dino_ui_call_window_add_participant (DinoUiCallWindow* self,
                                          const gchar* participant,
                                          DinoUiParticipantWidget* participant_widget);
static void __lambda100_ (DinoUiCallWindowController* self,
                   guint width,
                   guint height);
static void ___lambda100__dino_plugins_video_call_widget_resolution_changed (DinoPluginsVideoCallWidget* _sender,
                                                                      guint width,
                                                                      guint height,
                                                                      gpointer self);
VALA_EXTERN void dino_ui_participant_widget_set_placeholder (DinoUiParticipantWidget* self,
                                                 DinoEntitiesConversation* conversation,
                                                 DinoStreamInteractor* stream_interactor);
VALA_EXTERN void dino_ui_call_window_remove_participant (DinoUiCallWindow* self,
                                             const gchar* participant);
VALA_EXTERN GType dino_ui_audio_settings_popover_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiAudioSettingsPopover, g_object_unref)
static Block18Data* block18_data_ref (Block18Data* _data18_);
static void block18_data_unref (void * _userdata_);
VALA_EXTERN void dino_ui_call_bottom_bar_show_audio_device_error (DinoUiCallBottomBar* self);
VALA_EXTERN DinoUiAudioSettingsPopover* dino_ui_call_bottom_bar_show_audio_device_choices (DinoUiCallBottomBar* self,
                                                                               gboolean show);
static void dino_ui_call_window_controller_update_current_audio_device (DinoUiCallWindowController* self,
                                                                 DinoUiAudioSettingsPopover* audio_settings_popover);
static void __lambda71_ (Block18Data* _data18_,
                  DinoPluginsMediaDevice* device);
static void ___lambda71__dino_ui_audio_settings_popover_microphone_selected (DinoUiAudioSettingsPopover* _sender,
                                                                      DinoPluginsMediaDevice* device,
                                                                      gpointer self);
static void __lambda72_ (Block18Data* _data18_,
                  DinoPluginsMediaDevice* device);
static void ___lambda72__dino_ui_audio_settings_popover_speaker_selected (DinoUiAudioSettingsPopover* _sender,
                                                                   DinoPluginsMediaDevice* device,
                                                                   gpointer self);
VALA_EXTERN void dino_ui_audio_settings_popover_set_current_microphone_device (DinoUiAudioSettingsPopover* self,
                                                                   DinoPluginsMediaDevice* value);
VALA_EXTERN void dino_ui_audio_settings_popover_set_current_speaker_device (DinoUiAudioSettingsPopover* self,
                                                                DinoPluginsMediaDevice* value);
VALA_EXTERN GType dino_ui_video_settings_popover_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiVideoSettingsPopover, g_object_unref)
static Block19Data* block19_data_ref (Block19Data* _data19_);
static void block19_data_unref (void * _userdata_);
VALA_EXTERN void dino_ui_call_bottom_bar_show_video_device_error (DinoUiCallBottomBar* self);
VALA_EXTERN DinoUiVideoSettingsPopover* dino_ui_call_bottom_bar_show_video_device_choices (DinoUiCallBottomBar* self,
                                                                               gboolean show);
static void dino_ui_call_window_controller_update_current_video_device (DinoUiCallWindowController* self,
                                                                 DinoUiVideoSettingsPopover* video_settings_popover);
static void __lambda73_ (Block19Data* _data19_,
                  DinoPluginsMediaDevice* device);
static void ___lambda73__dino_ui_video_settings_popover_camera_selected (DinoUiVideoSettingsPopover* _sender,
                                                                  DinoPluginsMediaDevice* device,
                                                                  gpointer self);
VALA_EXTERN void dino_ui_video_settings_popover_set_current_device (DinoUiVideoSettingsPopover* self,
                                                        DinoPluginsMediaDevice* value);
VALA_EXTERN void dino_ui_call_window_set_own_video (DinoUiCallWindow* self,
                                        GtkWidget* widget_);
VALA_EXTERN void dino_ui_call_window_unset_own_video (DinoUiCallWindow* self);
static void dino_ui_call_window_controller_real_dispose (GObject* base);
static gulong* _vala_array_dup1 (gulong* self,
                          gssize length);
static void dino_ui_call_window_controller_finalize (GObject * obj);
static GType dino_ui_call_window_controller_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_call_window_controller_get_instance_private (DinoUiCallWindowController* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiCallWindowController_private_offset);
}

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

static Block14Data*
block14_data_ref (Block14Data* _data14_)
{
	g_atomic_int_inc (&_data14_->_ref_count_);
	return _data14_;
}

static void
block14_data_unref (void * _userdata_)
{
	Block14Data* _data14_;
	_data14_ = (Block14Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data14_->_ref_count_)) {
		DinoUiCallWindowController* self;
		self = _data14_->self;
		_g_object_unref0 (_data14_->app);
		_g_object_unref0 (_data14_->call_window);
		_g_object_unref0 (_data14_->call_state);
		_g_object_unref0 (_data14_->stream_interactor);
		_g_object_unref0 (self);
		g_slice_free (Block14Data, _data14_);
	}
}

static gboolean
__lambda66_ (Block14Data* _data14_)
{
	DinoUiCallWindowController* self;
	gboolean result;
	self = _data14_->self;
	gtk_window_close ((GtkWindow*) _data14_->call_window);
	gtk_window_destroy ((GtkWindow*) _data14_->call_window);
	result = FALSE;
	return result;
}

static gboolean
___lambda66__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda66_ (self);
	return result;
}

static void
__lambda64_ (Block14Data* _data14_,
             XmppJid* who_terminated,
             const gchar* reason_name,
             const gchar* reason_text)
{
	DinoUiCallWindowController* self;
	DinoEntitiesConversation* conversation = NULL;
	DinoModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	DinoConversationManager* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	XmppJid* _tmp5_;
	DinoEntitiesCall* _tmp6_;
	DinoEntitiesAccount* _tmp7_;
	DinoEntitiesAccount* _tmp8_;
	DinoEntitiesConversationType _tmp9_;
	DinoEntitiesConversation* _tmp10_;
	DinoEntitiesConversation* _tmp11_;
	gchar* _tmp12_ = NULL;
	DinoEntitiesConversation* _tmp13_;
	gchar* display_name = NULL;
	gchar* _tmp20_;
	self = _data14_->self;
	g_return_if_fail (who_terminated != NULL);
	_tmp0_ = dino_conversation_manager_IDENTITY;
	_tmp1_ = dino_stream_interactor_get_module (_data14_->stream_interactor, DINO_TYPE_CONVERSATION_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (DinoConversationManager*) _tmp1_;
	_tmp3_ = xmpp_jid_get_bare_jid (who_terminated);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_tmp6_ = self->priv->call;
	_tmp7_ = dino_entities_call_get_account (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = DINO_ENTITIES_CONVERSATION_TYPE_CHAT;
	_tmp10_ = dino_conversation_manager_get_conversation (_tmp2_, _tmp5_, _tmp8_, &_tmp9_);
	_tmp11_ = _tmp10_;
	_xmpp_jid_unref0 (_tmp5_);
	_g_object_unref0 (_tmp2_);
	conversation = _tmp11_;
	_tmp13_ = conversation;
	if (_tmp13_ != NULL) {
		DinoEntitiesConversation* _tmp14_;
		gchar* _tmp15_;
		_tmp14_ = conversation;
		_tmp15_ = dino_ui_util_get_conversation_display_name (_data14_->stream_interactor, _tmp14_);
		_g_free0 (_tmp12_);
		_tmp12_ = _tmp15_;
	} else {
		XmppJid* _tmp16_;
		XmppJid* _tmp17_;
		XmppJid* _tmp18_;
		gchar* _tmp19_;
		_tmp16_ = xmpp_jid_get_bare_jid (who_terminated);
		_tmp17_ = _tmp16_;
		_tmp18_ = _tmp17_;
		_tmp19_ = xmpp_jid_to_string (_tmp18_);
		_g_free0 (_tmp12_);
		_tmp12_ = _tmp19_;
		_xmpp_jid_unref0 (_tmp18_);
	}
	_tmp20_ = _tmp12_;
	_tmp12_ = NULL;
	display_name = _tmp20_;
	dino_ui_call_window_show_counterpart_ended (_data14_->call_window, display_name, reason_name, reason_text);
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 3, ___lambda66__gsource_func, block14_data_ref (_data14_), block14_data_unref);
	_g_free0 (display_name);
	_g_free0 (_tmp12_);
	_g_object_unref0 (conversation);
}

static void
___lambda64__dino_call_state_terminated (DinoCallState* _sender,
                                         XmppJid* who_terminated,
                                         const gchar* reason_name,
                                         const gchar* reason_text,
                                         gpointer self)
{
	__lambda64_ (self, who_terminated, reason_name, reason_text);
}

static void
__lambda67_ (DinoUiCallWindowController* self,
             XmppJid* jid,
             DinoPeerState* peer_state)
{
	const gchar* _tmp0_;
	XmppJid* _tmp1_;
	g_return_if_fail (jid != NULL);
	g_return_if_fail (peer_state != NULL);
	dino_ui_call_window_controller_connect_peer_signals (self, peer_state);
	_tmp0_ = peer_state->internal_id;
	_tmp1_ = peer_state->jid;
	dino_ui_call_window_controller_add_new_participant (self, _tmp0_, _tmp1_);
}

static void
___lambda67__dino_call_state_peer_joined (DinoCallState* _sender,
                                          XmppJid* jid,
                                          DinoPeerState* peer_state,
                                          gpointer self)
{
	__lambda67_ ((DinoUiCallWindowController*) self, jid, peer_state);
}

static void
__lambda101_ (DinoUiCallWindowController* self,
              XmppJid* jid,
              DinoPeerState* peer_state,
              const gchar* reason_name,
              const gchar* reason_text)
{
	const gchar* _tmp0_;
	g_return_if_fail (jid != NULL);
	g_return_if_fail (peer_state != NULL);
	_tmp0_ = peer_state->internal_id;
	dino_ui_call_window_controller_remove_participant (self, _tmp0_);
}

static void
___lambda101__dino_call_state_peer_left (DinoCallState* _sender,
                                         XmppJid* jid,
                                         DinoPeerState* peer_state,
                                         const gchar* reason_name,
                                         const gchar* reason_text,
                                         gpointer self)
{
	__lambda101_ ((DinoUiCallWindowController*) self, jid, peer_state, reason_name, reason_text);
}

static void
__lambda102_ (Block14Data* _data14_)
{
	DinoUiCallWindowController* self;
	self = _data14_->self;
	dino_call_state_end (_data14_->call_state, NULL);
	gtk_window_close ((GtkWindow*) _data14_->call_window);
	gtk_window_destroy ((GtkWindow*) _data14_->call_window);
	g_object_run_dispose ((GObject*) self);
}

static void
___lambda102__dino_ui_call_bottom_bar_hang_up (DinoUiCallBottomBar* _sender,
                                               gpointer self)
{
	__lambda102_ (self);
}

static void
_vala_array_add5 (gulong* * array,
                  gint* length,
                  gint* size,
                  gulong value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gulong, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static gboolean
__lambda103_ (Block14Data* _data14_)
{
	DinoUiCallWindowController* self;
	gboolean result;
	self = _data14_->self;
	dino_call_state_end (_data14_->call_state, NULL);
	g_object_run_dispose ((GObject*) self);
	result = FALSE;
	return result;
}

static gboolean
___lambda103__gtk_window_close_request (GtkWindow* _sender,
                                        gpointer self)
{
	gboolean result;
	result = __lambda103_ (self);
	return result;
}

static void
_vala_array_add6 (gulong* * array,
                  gint* length,
                  gint* size,
                  gulong value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gulong, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static void
__lambda104_ (Block14Data* _data14_)
{
	DinoUiCallWindowController* self;
	DinoUiCallBottomBar* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data14_->self;
	_tmp0_ = _data14_->call_window->bottom_bar;
	_tmp1_ = dino_ui_call_bottom_bar_get_audio_enabled (_tmp0_);
	_tmp2_ = _tmp1_;
	dino_call_state_mute_own_audio (_data14_->call_state, !_tmp2_);
}

static void
___lambda104__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda104_ (self);
}

static void
_vala_array_add7 (gulong* * array,
                  gint* length,
                  gint* size,
                  gulong value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gulong, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static void
__lambda105_ (Block14Data* _data14_)
{
	DinoUiCallWindowController* self;
	DinoUiCallBottomBar* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	self = _data14_->self;
	_tmp0_ = _data14_->call_window->bottom_bar;
	_tmp1_ = dino_ui_call_bottom_bar_get_video_enabled (_tmp0_);
	_tmp2_ = _tmp1_;
	dino_call_state_mute_own_video (_data14_->call_state, !_tmp2_);
	dino_ui_call_window_controller_update_own_video (self);
}

static void
___lambda105__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda105_ (self);
}

static void
_vala_array_add8 (gulong* * array,
                  gint* length,
                  gint* size,
                  gulong value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gulong, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static void
__lambda106_ (Block14Data* _data14_,
              GParamSpec* event)
{
	DinoUiCallWindowController* self;
	gint _tmp0_;
	gint _tmp1_;
	gint current_width = 0;
	DinoUiCallWindow* _tmp2_;
	self = _data14_->self;
	g_return_if_fail (event != NULL);
	g_object_get ((GtkWindow*) _data14_->call_window, "default-width", &_tmp0_, NULL);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == -1) {
		return;
	}
	_tmp2_ = self->priv->call_window;
	current_width = gtk_widget_get_allocated_width ((GtkWidget*) _tmp2_);
	if (self->priv->window_width != current_width) {
		g_debug ("call_window_controller.vala:89: Call window size changed by user. Disa" \
"bling auto window-to-video size adaptation. Width %i->%i", self->priv->window_width, current_width);
		self->priv->window_size_changed = TRUE;
	}
}

static void
___lambda106__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda106_ (self, pspec);
}

static void
_vala_array_add9 (gulong* * array,
                  gint* length,
                  gint* size,
                  gulong value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gulong, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static void
__lambda107_ (Block14Data* _data14_,
              GParamSpec* event)
{
	DinoUiCallWindowController* self;
	gint _tmp0_;
	gint _tmp1_;
	gint current_height = 0;
	DinoUiCallWindow* _tmp2_;
	self = _data14_->self;
	g_return_if_fail (event != NULL);
	g_object_get ((GtkWindow*) _data14_->call_window, "default-height", &_tmp0_, NULL);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == -1) {
		return;
	}
	_tmp2_ = self->priv->call_window;
	current_height = gtk_widget_get_allocated_height ((GtkWidget*) _tmp2_);
	if (self->priv->window_height != current_height) {
		g_debug ("call_window_controller.vala:97: Call window size changed by user. Disa" \
"bling auto window-to-video size adaptation. Height %i->%i", self->priv->window_height, current_height);
		self->priv->window_size_changed = TRUE;
	}
}

static void
___lambda107__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda107_ (self, pspec);
}

static void
_vala_array_add10 (gulong* * array,
                   gint* length,
                   gint* size,
                   gulong value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gulong, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static void
__lambda108_ (DinoUiCallWindowController* self)
{
	dino_ui_call_window_controller_capture_window_size (self);
}

static void
___lambda108__gtk_widget_realize (GtkWidget* _sender,
                                  gpointer self)
{
	__lambda108_ ((DinoUiCallWindowController*) self);
}

static void
_vala_array_add11 (gulong* * array,
                   gint* length,
                   gint* size,
                   gulong value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gulong, *array, *size);
	}
	(*array)[(*length)++] = value;
}

static void
__lambda109_ (DinoUiCallWindowController* self,
              DinoEntitiesCall* call,
              XmppXepCoinConferenceInfo* conference_info)
{
	DinoEntitiesCall* _tmp0_;
	GeeArrayList* participants = NULL;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeHashMap* _tmp3_;
	GeeSet* _tmp4_;
	GeeSet* _tmp5_;
	GeeSet* _tmp6_;
	g_return_if_fail (call != NULL);
	g_return_if_fail (conference_info != NULL);
	_tmp0_ = self->priv->call;
	if (!dino_entities_call_equals (_tmp0_, call)) {
		return;
	}
	_tmp1_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	participants = _tmp1_;
	_tmp2_ = participants;
	_tmp3_ = self->priv->participant_videos;
	_tmp4_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_;
	gee_array_list_add_all (_tmp2_, (GeeCollection*) _tmp6_);
	_g_object_unref0 (_tmp6_);
	{
		GeeArrayList* _participant_list = NULL;
		GeeArrayList* _tmp7_;
		gint _participant_size = 0;
		GeeArrayList* _tmp8_;
		gint _tmp9_;
		gint _tmp10_;
		gint _participant_index = 0;
		_tmp7_ = participants;
		_participant_list = _tmp7_;
		_tmp8_ = _participant_list;
		_tmp9_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp8_);
		_tmp10_ = _tmp9_;
		_participant_size = _tmp10_;
		_participant_index = -1;
		while (TRUE) {
			gint _tmp11_;
			gint _tmp12_;
			gchar* participant = NULL;
			GeeArrayList* _tmp13_;
			gpointer _tmp14_;
			const gchar* _tmp15_;
			_participant_index = _participant_index + 1;
			_tmp11_ = _participant_index;
			_tmp12_ = _participant_size;
			if (!(_tmp11_ < _tmp12_)) {
				break;
			}
			_tmp13_ = _participant_list;
			_tmp14_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, _participant_index);
			participant = (gchar*) _tmp14_;
			_tmp15_ = participant;
			dino_ui_call_window_controller_remove_participant (self, _tmp15_);
			_g_free0 (participant);
		}
	}
	{
		GeeIterator* _participant_it = NULL;
		GeeHashMap* _tmp16_;
		GeeSet* _tmp17_;
		GeeSet* _tmp18_;
		GeeSet* _tmp19_;
		GeeIterator* _tmp20_;
		GeeIterator* _tmp21_;
		_tmp16_ = conference_info->users;
		_tmp17_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = _tmp18_;
		_tmp20_ = gee_iterable_iterator ((GeeIterable*) _tmp19_);
		_tmp21_ = _tmp20_;
		_g_object_unref0 (_tmp19_);
		_participant_it = _tmp21_;
		while (TRUE) {
			GeeIterator* _tmp22_;
			XmppJid* participant = NULL;
			GeeIterator* _tmp23_;
			gpointer _tmp24_;
			XmppJid* _tmp25_;
			gchar* _tmp26_;
			gchar* _tmp27_;
			XmppJid* _tmp28_;
			_tmp22_ = _participant_it;
			if (!gee_iterator_next (_tmp22_)) {
				break;
			}
			_tmp23_ = _participant_it;
			_tmp24_ = gee_iterator_get (_tmp23_);
			participant = (XmppJid*) _tmp24_;
			_tmp25_ = participant;
			_tmp26_ = xmpp_jid_to_string (_tmp25_);
			_tmp27_ = _tmp26_;
			_tmp28_ = participant;
			dino_ui_call_window_controller_add_new_participant (self, _tmp27_, _tmp28_);
			_g_free0 (_tmp27_);
			_xmpp_jid_unref0 (participant);
		}
		_g_object_unref0 (_participant_it);
	}
	_g_object_unref0 (participants);
}

static void
___lambda109__dino_calls_conference_info_received (DinoCalls* _sender,
                                                   DinoEntitiesCall* call,
                                                   XmppXepCoinConferenceInfo* conference_info,
                                                   gpointer self)
{
	__lambda109_ ((DinoUiCallWindowController*) self, call, conference_info);
}

static void
__lambda110_ (Block14Data* _data14_,
              guint width,
              guint height)
{
	DinoUiCallWindowController* self;
	gboolean _tmp0_ = FALSE;
	self = _data14_->self;
	if (width == ((guint) 0)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = height == ((guint) 0);
	}
	if (_tmp0_) {
		return;
	}
	dino_ui_call_window_set_own_video_ratio (_data14_->call_window, (gint) width, (gint) height);
}

static void
___lambda110__dino_plugins_video_call_widget_resolution_changed (DinoPluginsVideoCallWidget* _sender,
                                                                 guint width,
                                                                 guint height,
                                                                 gpointer self)
{
	__lambda110_ (self, width, height);
}

static void
__lambda111_ (DinoUiCallWindowController* self)
{
	DinoPluginsVideoCallPlugin* _tmp0_;
	_tmp0_ = self->priv->call_plugin;
	dino_plugins_video_call_plugin_dump_dot (_tmp0_);
}

static void
___lambda111__dino_ui_call_window_menu_dump_dot (DinoUiCallWindow* _sender,
                                                 gpointer self)
{
	__lambda111_ ((DinoUiCallWindowController*) self);
}

static gboolean
__lambda112_ (Block14Data* _data14_)
{
	DinoUiCallWindowController* self;
	gboolean result;
	self = _data14_->self;
	if (self->priv->inhibit_cookie != ((guint) 0)) {
		DinoUiApplication* _tmp0_;
		_tmp0_ = _data14_->app;
		gtk_application_uninhibit ((GtkApplication*) _tmp0_, self->priv->inhibit_cookie);
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda112__gtk_window_close_request (GtkWindow* _sender,
                                        gpointer self)
{
	gboolean result;
	result = __lambda112_ (self);
	return result;
}

DinoUiCallWindowController*
dino_ui_call_window_controller_construct (GType object_type,
                                          DinoUiCallWindow* call_window,
                                          DinoCallState* call_state,
                                          DinoStreamInteractor* stream_interactor)
{
	DinoUiCallWindowController * self = NULL;
	Block14Data* _data14_;
	DinoUiCallWindow* _tmp0_;
	DinoCallState* _tmp1_;
	DinoStreamInteractor* _tmp2_;
	DinoUiCallWindow* _tmp3_;
	DinoEntitiesCall* _tmp4_;
	DinoEntitiesCall* _tmp5_;
	DinoCallState* _tmp6_;
	DinoStreamInteractor* _tmp7_;
	DinoModuleIdentity* _tmp8_;
	gpointer _tmp9_;
	DinoPluginsVideoCallPlugin* _tmp10_;
	DinoPluginsVideoCallWidget* _tmp11_;
	DinoUiCallWindow* _tmp12_;
	DinoUiCallBottomBar* _tmp13_;
	DinoUiCallBottomBar* _tmp28_;
	gulong _tmp29_;
	gulong _tmp30_;
	DinoUiCallBottomBar* _tmp31_;
	gulong _tmp32_;
	DinoUiCallBottomBar* _tmp33_;
	gulong _tmp34_;
	gulong _tmp35_;
	gulong _tmp36_;
	gulong _tmp37_;
	DinoCalls* _tmp38_;
	DinoPluginsVideoCallWidget* _tmp39_;
	GApplication* _tmp40_;
	DinoUiApplication* _tmp41_;
	DinoUiApplication* _tmp42_;
	g_return_val_if_fail (call_window != NULL, NULL);
	g_return_val_if_fail (call_state != NULL, NULL);
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	_data14_ = g_slice_new0 (Block14Data);
	_data14_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (call_window);
	_g_object_unref0 (_data14_->call_window);
	_data14_->call_window = _tmp0_;
	_tmp1_ = _g_object_ref0 (call_state);
	_g_object_unref0 (_data14_->call_state);
	_data14_->call_state = _tmp1_;
	_tmp2_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (_data14_->stream_interactor);
	_data14_->stream_interactor = _tmp2_;
	self = (DinoUiCallWindowController*) g_object_new (object_type, NULL);
	_data14_->self = g_object_ref (self);
	_tmp3_ = _g_object_ref0 (_data14_->call_window);
	_g_object_unref0 (self->priv->call_window);
	self->priv->call_window = _tmp3_;
	_tmp4_ = _data14_->call_state->call;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (self->priv->call);
	self->priv->call = _tmp5_;
	_tmp6_ = _g_object_ref0 (_data14_->call_state);
	_g_object_unref0 (self->priv->call_state);
	self->priv->call_state = _tmp6_;
	_tmp7_ = _g_object_ref0 (_data14_->stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp7_;
	_tmp8_ = dino_calls_IDENTITY;
	_tmp9_ = dino_stream_interactor_get_module (_data14_->stream_interactor, DINO_TYPE_CALLS, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp8_);
	_g_object_unref0 (self->priv->calls);
	self->priv->calls = (DinoCalls*) _tmp9_;
	_tmp10_ = self->priv->call_plugin;
	_tmp11_ = dino_plugins_video_call_plugin_create_widget (_tmp10_, DINO_PLUGINS_WIDGET_TYPE_GTK4);
	_g_object_unref0 (self->priv->own_video);
	self->priv->own_video = _tmp11_;
	gtk_window_set_default_size ((GtkWindow*) _data14_->call_window, 704, 528);
	_tmp12_ = self->priv->call_window;
	_tmp13_ = _tmp12_->bottom_bar;
	dino_ui_call_bottom_bar_set_video_enabled (_tmp13_, dino_call_state_should_we_send_video (_data14_->call_state));
	g_signal_connect_data (_data14_->call_state, "terminated", (GCallback) ___lambda64__dino_call_state_terminated, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	g_signal_connect_object (_data14_->call_state, "peer-joined", (GCallback) ___lambda67__dino_call_state_peer_joined, self, 0);
	g_signal_connect_object (_data14_->call_state, "peer-left", (GCallback) ___lambda101__dino_call_state_peer_left, self, 0);
	{
		GeeIterator* _peer_state_it = NULL;
		GeeHashMap* _tmp14_;
		GeeCollection* _tmp15_;
		GeeCollection* _tmp16_;
		GeeCollection* _tmp17_;
		GeeIterator* _tmp18_;
		GeeIterator* _tmp19_;
		_tmp14_ = _data14_->call_state->peers;
		_tmp15_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp14_);
		_tmp16_ = _tmp15_;
		_tmp17_ = _tmp16_;
		_tmp18_ = gee_iterable_iterator ((GeeIterable*) _tmp17_);
		_tmp19_ = _tmp18_;
		_g_object_unref0 (_tmp17_);
		_peer_state_it = _tmp19_;
		while (TRUE) {
			GeeIterator* _tmp20_;
			DinoPeerState* peer_state = NULL;
			GeeIterator* _tmp21_;
			gpointer _tmp22_;
			DinoPeerState* _tmp23_;
			DinoPeerState* _tmp24_;
			const gchar* _tmp25_;
			DinoPeerState* _tmp26_;
			XmppJid* _tmp27_;
			_tmp20_ = _peer_state_it;
			if (!gee_iterator_next (_tmp20_)) {
				break;
			}
			_tmp21_ = _peer_state_it;
			_tmp22_ = gee_iterator_get (_tmp21_);
			peer_state = (DinoPeerState*) _tmp22_;
			_tmp23_ = peer_state;
			dino_ui_call_window_controller_connect_peer_signals (self, _tmp23_);
			_tmp24_ = peer_state;
			_tmp25_ = _tmp24_->internal_id;
			_tmp26_ = peer_state;
			_tmp27_ = _tmp26_->jid;
			dino_ui_call_window_controller_add_new_participant (self, _tmp25_, _tmp27_);
			_g_object_unref0 (peer_state);
		}
		_g_object_unref0 (_peer_state_it);
	}
	_tmp28_ = _data14_->call_window->bottom_bar;
	_tmp29_ = g_signal_connect_data (_tmp28_, "hang-up", (GCallback) ___lambda102__dino_ui_call_bottom_bar_hang_up, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	_vala_array_add5 (&self->priv->bottom_bar_handler_ids, &self->priv->bottom_bar_handler_ids_length1, &self->priv->_bottom_bar_handler_ids_size_, _tmp29_);
	_tmp30_ = g_signal_connect_data ((GtkWindow*) _data14_->call_window, "close-request", (GCallback) ___lambda103__gtk_window_close_request, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	_vala_array_add6 (&self->priv->call_window_handler_ids, &self->priv->call_window_handler_ids_length1, &self->priv->_call_window_handler_ids_size_, _tmp30_);
	_tmp31_ = _data14_->call_window->bottom_bar;
	_tmp32_ = g_signal_connect_data ((GObject*) _tmp31_, "notify::audio-enabled", (GCallback) ___lambda104__g_object_notify, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	_vala_array_add7 (&self->priv->bottom_bar_handler_ids, &self->priv->bottom_bar_handler_ids_length1, &self->priv->_bottom_bar_handler_ids_size_, _tmp32_);
	_tmp33_ = _data14_->call_window->bottom_bar;
	_tmp34_ = g_signal_connect_data ((GObject*) _tmp33_, "notify::video-enabled", (GCallback) ___lambda105__g_object_notify, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	_vala_array_add8 (&self->priv->bottom_bar_handler_ids, &self->priv->bottom_bar_handler_ids_length1, &self->priv->_bottom_bar_handler_ids_size_, _tmp34_);
	_tmp35_ = g_signal_connect_data ((GObject*) _data14_->call_window, "notify::default-width", (GCallback) ___lambda106__g_object_notify, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	_vala_array_add9 (&self->priv->call_window_handler_ids, &self->priv->call_window_handler_ids_length1, &self->priv->_call_window_handler_ids_size_, _tmp35_);
	_tmp36_ = g_signal_connect_data ((GObject*) _data14_->call_window, "notify::default-height", (GCallback) ___lambda107__g_object_notify, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	_vala_array_add10 (&self->priv->call_window_handler_ids, &self->priv->call_window_handler_ids_length1, &self->priv->_call_window_handler_ids_size_, _tmp36_);
	_tmp37_ = g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_data14_->call_window, gtk_widget_get_type (), GtkWidget), "realize", (GCallback) ___lambda108__gtk_widget_realize, self, 0);
	_vala_array_add11 (&self->priv->call_window_handler_ids, &self->priv->call_window_handler_ids_length1, &self->priv->_call_window_handler_ids_size_, _tmp37_);
	_tmp38_ = self->priv->calls;
	g_signal_connect_object (_tmp38_, "conference-info-received", (GCallback) ___lambda109__dino_calls_conference_info_received, self, 0);
	_tmp39_ = self->priv->own_video;
	g_signal_connect_data (_tmp39_, "resolution-changed", (GCallback) ___lambda110__dino_plugins_video_call_widget_resolution_changed, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	g_signal_connect_object (_data14_->call_window, "menu-dump-dot", (GCallback) ___lambda111__dino_ui_call_window_menu_dump_dot, self, 0);
	dino_ui_call_window_controller_update_own_video (self);
	dino_ui_call_window_controller_update_audio_device_choices (self);
	dino_ui_call_window_controller_update_video_device_choices (self);
	_tmp40_ = g_application_get_default ();
	_tmp41_ = _g_object_ref0 (DINO_UI_IS_APPLICATION (_tmp40_) ? ((DinoUiApplication*) _tmp40_) : NULL);
	_data14_->app = _tmp41_;
	_tmp42_ = _data14_->app;
	self->priv->inhibit_cookie = gtk_application_inhibit ((GtkApplication*) _tmp42_, (GtkWindow*) _data14_->call_window, GTK_APPLICATION_INHIBIT_IDLE | GTK_APPLICATION_INHIBIT_SUSPEND, "Ongoing call");
	if (self->priv->inhibit_cookie == ((guint) 0)) {
		g_warning ("call_window_controller.vala:134: suspend inhibit request failed or uns" \
"upported");
	}
	g_signal_connect_data ((GtkWindow*) _data14_->call_window, "close-request", (GCallback) ___lambda112__gtk_window_close_request, block14_data_ref (_data14_), (GClosureNotify) block14_data_unref, 0);
	block14_data_unref (_data14_);
	_data14_ = NULL;
	return self;
}

DinoUiCallWindowController*
dino_ui_call_window_controller_new (DinoUiCallWindow* call_window,
                                    DinoCallState* call_state,
                                    DinoStreamInteractor* stream_interactor)
{
	return dino_ui_call_window_controller_construct (DINO_UI_TYPE_CALL_WINDOW_CONTROLLER, call_window, call_state, stream_interactor);
}

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 void
__lambda99_ (DinoUiCallWindowController* self,
             DinoEntitiesAccount* account,
             XmppJid* jid)
{
	DinoCallState* _tmp0_;
	g_return_if_fail (account != NULL);
	g_return_if_fail (jid != NULL);
	_tmp0_ = self->priv->call_state;
	dino_call_state_invite_to_call (_tmp0_, jid, NULL, NULL);
}

static void
___lambda99__dino_ui_select_contact_dialog_selected (DinoUiSelectContactDialog* _sender,
                                                     DinoEntitiesAccount* account,
                                                     XmppJid* jid,
                                                     gpointer self)
{
	__lambda99_ ((DinoUiCallWindowController*) self, account, jid);
}

static void
dino_ui_call_window_controller_invite_button_clicked (DinoUiCallWindowController* self)
{
	GeeList* acc_list = NULL;
	GeeArrayList* _tmp0_;
	DinoEntitiesCall* _tmp1_;
	DinoEntitiesAccount* _tmp2_;
	DinoEntitiesAccount* _tmp3_;
	DinoUiSelectContactDialog* add_chat_dialog = NULL;
	DinoStreamInteractor* _tmp4_;
	DinoUiSelectContactDialog* _tmp5_;
	DinoUiCallWindow* _tmp6_;
	GtkRoot* _tmp7_;
	const gchar* _tmp8_;
	GtkButton* _tmp9_;
	const gchar* _tmp10_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_array_list_new (DINO_ENTITIES_TYPE_ACCOUNT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _dino_entities_account_equals_func_gee_equal_data_func, NULL, NULL);
	acc_list = (GeeList*) _tmp0_;
	_tmp1_ = self->priv->call;
	_tmp2_ = dino_entities_call_get_account (_tmp1_);
	_tmp3_ = _tmp2_;
	gee_collection_add ((GeeCollection*) acc_list, _tmp3_);
	_tmp4_ = self->priv->stream_interactor;
	_tmp5_ = dino_ui_select_contact_dialog_new (_tmp4_, acc_list);
	g_object_ref_sink (_tmp5_);
	add_chat_dialog = _tmp5_;
	_tmp6_ = self->priv->call_window;
	_tmp7_ = gtk_widget_get_root ((GtkWidget*) _tmp6_);
	gtk_window_set_transient_for ((GtkWindow*) add_chat_dialog, G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_window_get_type (), GtkWindow));
	_tmp8_ = dino_gettext ("Invite to Call");
	gtk_window_set_title ((GtkWindow*) add_chat_dialog, _tmp8_);
	_tmp9_ = add_chat_dialog->ok_button;
	_tmp10_ = dino_gettext ("Invite");
	gtk_button_set_label (_tmp9_, _tmp10_);
	g_signal_connect_object (add_chat_dialog, "selected", (GCallback) ___lambda99__dino_ui_select_contact_dialog_selected, self, 0);
	gtk_window_present ((GtkWindow*) add_chat_dialog);
	_g_object_unref0 (add_chat_dialog);
	_g_object_unref0 (acc_list);
}

static Block15Data*
block15_data_ref (Block15Data* _data15_)
{
	g_atomic_int_inc (&_data15_->_ref_count_);
	return _data15_;
}

static void
block15_data_unref (void * _userdata_)
{
	Block15Data* _data15_;
	_data15_ = (Block15Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data15_->_ref_count_)) {
		DinoUiCallWindowController* self;
		self = _data15_->self;
		_xmpp_jid_unref0 (_data15_->peer_jid);
		_g_free0 (_data15_->peer_id);
		_g_object_unref0 (_data15_->peer_state);
		_g_object_unref0 (self);
		g_slice_free (Block15Data, _data15_);
	}
}

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

static void
___lambda69_ (Block15Data* _data15_,
              GObject* _,
              GAsyncResult* res)
{
	DinoUiCallWindowController* self;
	gboolean can_convert = FALSE;
	DinoCallState* _tmp0_;
	GeeHashMap* _tmp1_;
	gpointer _tmp2_;
	DinoUiParticipantWidget* _tmp3_;
	self = _data15_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = self->priv->call_state;
	can_convert = dino_call_state_can_convert_into_groupcall_finish (_tmp0_, res);
	_tmp1_ = self->priv->participant_widgets;
	_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, _data15_->peer_id);
	_tmp3_ = (DinoUiParticipantWidget*) _tmp2_;
	dino_ui_participant_widget_set_may_show_invite_button (_tmp3_, can_convert);
	_g_object_unref0 (_tmp3_);
}

static void
____lambda69__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda69_ (self, source_object, res);
	block15_data_unref (self);
}

static void
___lambda70_ (DinoUiCallWindowController* self,
              const gchar* media,
              gboolean incoming)
{
	g_return_if_fail (media != NULL);
	if (g_strcmp0 (media, "audio") == 0) {
		dino_ui_call_window_controller_update_audio_device_choices (self);
	}
	if (g_strcmp0 (media, "video") == 0) {
		dino_ui_call_window_controller_update_video_device_choices (self);
	}
}

static void
____lambda70__dino_plugins_video_call_plugin_devices_changed (DinoPluginsVideoCallPlugin* _sender,
                                                              const gchar* media,
                                                              gboolean incoming,
                                                              gpointer self)
{
	___lambda70_ ((DinoUiCallWindowController*) self, media, incoming);
}

static gboolean
____lambda74_ (DinoUiCallWindowController* self,
               DinoUiParticipantWidget* widget)
{
	gboolean result;
	g_return_val_if_fail (widget != NULL, FALSE);
	dino_ui_participant_widget_set_may_show_invite_button (widget, TRUE);
	result = TRUE;
	_g_object_unref0 (widget);
	return result;
}

static gboolean
_____lambda74__gee_forall_func (gpointer g,
                                gpointer self)
{
	gboolean result;
	result = ____lambda74_ ((DinoUiCallWindowController*) self, (DinoUiParticipantWidget*) g);
	return result;
}

static void
__lambda68_ (Block15Data* _data15_)
{
	DinoUiCallWindowController* self;
	DinoUiCallWindow* _tmp0_;
	GeeHashMap* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	self = _data15_->self;
	_tmp0_ = self->priv->call_window;
	dino_ui_call_window_set_status (_tmp0_, _data15_->peer_id, "");
	_tmp1_ = self->priv->participant_widgets;
	_tmp2_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ == 1) {
		DinoCallState* _tmp4_;
		DinoPluginsVideoCallPlugin* _tmp5_;
		_tmp4_ = self->priv->call_state;
		dino_call_state_can_convert_into_groupcall (_tmp4_, ____lambda69__gasync_ready_callback, block15_data_ref (_data15_));
		_tmp5_ = self->priv->call_plugin;
		g_signal_connect_object (_tmp5_, "devices-changed", (GCallback) ____lambda70__dino_plugins_video_call_plugin_devices_changed, self, 0);
		dino_ui_call_window_controller_update_audio_device_choices (self);
		dino_ui_call_window_controller_update_video_device_choices (self);
	} else {
		GeeHashMap* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		_tmp6_ = self->priv->participant_widgets;
		_tmp7_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp6_);
		_tmp8_ = _tmp7_;
		if (_tmp8_ > 1) {
			GeeHashMap* _tmp9_;
			GeeCollection* _tmp10_;
			GeeCollection* _tmp11_;
			GeeCollection* _tmp12_;
			_tmp9_ = self->priv->participant_widgets;
			_tmp10_ = gee_abstract_map_get_values ((GeeAbstractMap*) _tmp9_);
			_tmp11_ = _tmp10_;
			_tmp12_ = _tmp11_;
			gee_traversable_foreach ((GeeTraversable*) _tmp12_, _____lambda74__gee_forall_func, self);
			_g_object_unref0 (_tmp12_);
		}
	}
}

static void
___lambda68__dino_peer_state_connection_ready (DinoPeerState* _sender,
                                               gpointer self)
{
	__lambda68_ (self);
}

static void
__lambda75_ (Block15Data* _data15_,
             gboolean mute)
{
	DinoUiCallWindowController* self;
	self = _data15_->self;
	if (mute) {
		DinoEntitiesConversation* conversation = NULL;
		DinoStreamInteractor* _tmp0_;
		DinoModuleIdentity* _tmp1_;
		gpointer _tmp2_;
		DinoConversationManager* _tmp3_;
		XmppJid* _tmp4_;
		XmppJid* _tmp5_;
		XmppJid* _tmp6_;
		DinoEntitiesCall* _tmp7_;
		DinoEntitiesAccount* _tmp8_;
		DinoEntitiesAccount* _tmp9_;
		DinoEntitiesConversationType _tmp10_;
		DinoEntitiesConversation* _tmp11_;
		DinoEntitiesConversation* _tmp12_;
		DinoUiCallWindow* _tmp13_;
		DinoEntitiesConversation* _tmp14_;
		DinoStreamInteractor* _tmp15_;
		GeeHashMap* _tmp16_;
		gpointer _tmp17_;
		DinoPluginsVideoCallWidget* _tmp18_;
		_tmp0_ = self->priv->stream_interactor;
		_tmp1_ = dino_conversation_manager_IDENTITY;
		_tmp2_ = dino_stream_interactor_get_module (_tmp0_, DINO_TYPE_CONVERSATION_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp1_);
		_tmp3_ = (DinoConversationManager*) _tmp2_;
		_tmp4_ = xmpp_jid_get_bare_jid (_data15_->peer_jid);
		_tmp5_ = _tmp4_;
		_tmp6_ = _tmp5_;
		_tmp7_ = self->priv->call;
		_tmp8_ = dino_entities_call_get_account (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = DINO_ENTITIES_CONVERSATION_TYPE_CHAT;
		_tmp11_ = dino_conversation_manager_get_conversation (_tmp3_, _tmp6_, _tmp9_, &_tmp10_);
		_tmp12_ = _tmp11_;
		_xmpp_jid_unref0 (_tmp6_);
		_g_object_unref0 (_tmp3_);
		conversation = _tmp12_;
		_tmp13_ = self->priv->call_window;
		_tmp14_ = conversation;
		_tmp15_ = self->priv->stream_interactor;
		dino_ui_call_window_set_placeholder (_tmp13_, _data15_->peer_id, _tmp14_, _tmp15_);
		_tmp16_ = self->priv->participant_videos;
		_tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp16_, _data15_->peer_id);
		_tmp18_ = (DinoPluginsVideoCallWidget*) _tmp17_;
		dino_plugins_video_call_widget_detach (_tmp18_);
		_g_object_unref0 (_tmp18_);
		_g_object_unref0 (conversation);
	} else {
		GeeHashMap* _tmp19_;
		gpointer _tmp20_;
		DinoPluginsVideoCallWidget* _tmp21_;
		gboolean _tmp22_;
		GtkWidget* widget = NULL;
		GeeHashMap* _tmp23_;
		gpointer _tmp24_;
		DinoUiCallWindow* _tmp25_;
		GtkWidget* _tmp26_;
		GeeHashMap* _tmp27_;
		gpointer _tmp28_;
		DinoPluginsVideoCallWidget* _tmp29_;
		XmppXepJingleRtpStream* _tmp30_;
		XmppXepJingleRtpStream* _tmp31_;
		_tmp19_ = self->priv->participant_videos;
		_tmp20_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, _data15_->peer_id);
		_tmp21_ = (DinoPluginsVideoCallWidget*) _tmp20_;
		_tmp22_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp21_, gtk_widget_get_type ());
		_g_object_unref0 (_tmp21_);
		if (_tmp22_) {
			return;
		}
		_tmp23_ = self->priv->participant_videos;
		_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp23_, _data15_->peer_id);
		widget = G_TYPE_CHECK_INSTANCE_CAST ((DinoPluginsVideoCallWidget*) _tmp24_, gtk_widget_get_type (), GtkWidget);
		_tmp25_ = self->priv->call_window;
		_tmp26_ = widget;
		dino_ui_call_window_set_video (_tmp25_, _data15_->peer_id, _tmp26_);
		_tmp27_ = self->priv->participant_videos;
		_tmp28_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp27_, _data15_->peer_id);
		_tmp29_ = (DinoPluginsVideoCallWidget*) _tmp28_;
		_tmp30_ = dino_peer_state_get_video_stream (_data15_->peer_state);
		_tmp31_ = _tmp30_;
		dino_plugins_video_call_widget_display_stream (_tmp29_, _tmp31_, _data15_->peer_jid);
		_g_object_unref0 (_tmp31_);
		_g_object_unref0 (_tmp29_);
		_g_object_unref0 (widget);
	}
}

static void
___lambda75__dino_peer_state_counterpart_sends_video_updated (DinoPeerState* _sender,
                                                              gboolean mute,
                                                              gpointer self)
{
	__lambda75_ (self, mute);
}

static void
__lambda76_ (Block15Data* _data15_,
             XmppXepJingleRtpCallSessionInfo session_info)
{
	DinoUiCallWindowController* self;
	self = _data15_->self;
	if (session_info == XMPP_XEP_JINGLE_RTP_CALL_SESSION_INFO_RINGING) {
		DinoUiCallWindow* _tmp0_;
		_tmp0_ = self->priv->call_window;
		dino_ui_call_window_set_status (_tmp0_, _data15_->peer_id, "ringing");
	}
}

static void
___lambda76__dino_peer_state_info_received (DinoPeerState* _sender,
                                            XmppXepJingleRtpCallSessionInfo session_info,
                                            gpointer self)
{
	__lambda76_ (self, session_info);
}

static void
__lambda77_ (Block15Data* _data15_,
             DinoPeerState* state,
             XmppXepJingleContentEncryption* audio_encryption,
             XmppXepJingleContentEncryption* video_encryption)
{
	DinoUiCallWindowController* self;
	GeeHashMap* _tmp0_;
	gpointer _tmp1_;
	DinoUiParticipantWidget* _tmp2_;
	DinoUiCallEncryptionButtonController* _tmp3_;
	GeeHashMap* _tmp4_;
	gpointer _tmp5_;
	DinoPeerState* _tmp6_;
	XmppXepJingleContent* _tmp7_;
	GeeHashMap* _tmp8_;
	gpointer _tmp9_;
	DinoPeerState* _tmp10_;
	XmppXepJingleContent* _tmp11_;
	self = _data15_->self;
	g_return_if_fail (state != NULL);
	_tmp0_ = self->priv->participant_widgets;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _data15_->peer_id);
	_tmp2_ = (DinoUiParticipantWidget*) _tmp1_;
	_tmp3_ = _tmp2_->encryption_button_controller;
	_tmp4_ = self->priv->peer_states;
	_tmp5_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp4_, _data15_->peer_id);
	_tmp6_ = (DinoPeerState*) _tmp5_;
	_tmp7_ = _tmp6_->audio_content;
	_tmp8_ = self->priv->peer_states;
	_tmp9_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp8_, _data15_->peer_id);
	_tmp10_ = (DinoPeerState*) _tmp9_;
	_tmp11_ = _tmp10_->video_content;
	dino_ui_call_window_controller_update_encryption_indicator (self, _tmp3_, _tmp7_ != NULL, audio_encryption, _tmp11_ != NULL, video_encryption);
	_g_object_unref0 (_tmp10_);
	_g_object_unref0 (_tmp6_);
	_g_object_unref0 (_tmp2_);
}

static void
___lambda77__dino_peer_state_encryption_updated (DinoPeerState* _sender,
                                                 XmppXepJingleContentEncryption* audio_encryption,
                                                 XmppXepJingleContentEncryption* video_encryption,
                                                 gpointer self)
{
	__lambda77_ (self, _sender, audio_encryption, video_encryption);
}

static void
dino_ui_call_window_controller_connect_peer_signals (DinoUiCallWindowController* self,
                                                     DinoPeerState* peer_state)
{
	Block15Data* _data15_;
	DinoPeerState* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	XmppJid* _tmp3_;
	XmppJid* _tmp4_;
	GeeHashMap* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (peer_state != NULL);
	_data15_ = g_slice_new0 (Block15Data);
	_data15_->_ref_count_ = 1;
	_data15_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (peer_state);
	_g_object_unref0 (_data15_->peer_state);
	_data15_->peer_state = _tmp0_;
	_tmp1_ = _data15_->peer_state->internal_id;
	_tmp2_ = g_strdup (_tmp1_);
	_data15_->peer_id = _tmp2_;
	_tmp3_ = _data15_->peer_state->jid;
	_tmp4_ = _xmpp_jid_ref0 (_tmp3_);
	_data15_->peer_jid = _tmp4_;
	_tmp5_ = self->priv->peer_states;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, _data15_->peer_id, _data15_->peer_state);
	g_signal_connect_data (_data15_->peer_state, "connection-ready", (GCallback) ___lambda68__dino_peer_state_connection_ready, block15_data_ref (_data15_), (GClosureNotify) block15_data_unref, 0);
	g_signal_connect_data (_data15_->peer_state, "counterpart-sends-video-updated", (GCallback) ___lambda75__dino_peer_state_counterpart_sends_video_updated, block15_data_ref (_data15_), (GClosureNotify) block15_data_unref, 0);
	g_signal_connect_data (_data15_->peer_state, "info-received", (GCallback) ___lambda76__dino_peer_state_info_received, block15_data_ref (_data15_), (GClosureNotify) block15_data_unref, 0);
	g_signal_connect_data (_data15_->peer_state, "encryption-updated", (GCallback) ___lambda77__dino_peer_state_encryption_updated, block15_data_ref (_data15_), (GClosureNotify) block15_data_unref, 0);
	block15_data_unref (_data15_);
	_data15_ = NULL;
}

static gpointer
_dino_plugins_registry_ref0 (gpointer self)
{
	return self ? dino_plugins_registry_ref (self) : NULL;
}

static void
dino_ui_call_window_controller_update_encryption_indicator (DinoUiCallWindowController* self,
                                                            DinoUiCallEncryptionButtonController* encryption_button,
                                                            gboolean has_audio,
                                                            XmppXepJingleContentEncryption* audio_encryption,
                                                            gboolean has_video,
                                                            XmppXepJingleContentEncryption* video_encryption)
{
	gchar* title = NULL;
	gchar* icon_name = NULL;
	gboolean show_keys = FALSE;
	DinoPluginsRegistry* registry = NULL;
	DinoApplication* _tmp0_;
	DinoPluginsRegistry* _tmp1_;
	DinoPluginsRegistry* _tmp2_;
	DinoPluginsRegistry* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp80_;
	gboolean _tmp81_ = FALSE;
	gboolean _tmp82_ = FALSE;
	const gchar* _tmp84_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (encryption_button != NULL);
	title = NULL;
	icon_name = NULL;
	show_keys = TRUE;
	_tmp0_ = dino_application_get_default ();
	_tmp1_ = dino_application_get_plugin_registry (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _dino_plugins_registry_ref0 (_tmp2_);
	registry = _tmp3_;
	if (has_audio) {
		_tmp6_ = audio_encryption != NULL;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		_tmp5_ = TRUE;
	} else {
		gboolean _tmp7_ = FALSE;
		if (has_video) {
			_tmp7_ = video_encryption != NULL;
		} else {
			_tmp7_ = FALSE;
		}
		_tmp5_ = _tmp7_;
	}
	if (_tmp5_) {
		gboolean _tmp8_ = FALSE;
		gboolean _tmp9_ = FALSE;
		if (!has_audio) {
			_tmp9_ = TRUE;
		} else {
			_tmp9_ = !has_video;
		}
		if (_tmp9_) {
			_tmp8_ = TRUE;
		} else {
			gboolean _tmp10_ = FALSE;
			gboolean _tmp11_ = FALSE;
			if (audio_encryption != NULL) {
				_tmp11_ = video_encryption != NULL;
			} else {
				_tmp11_ = FALSE;
			}
			if (_tmp11_) {
				const gchar* _tmp12_;
				const gchar* _tmp13_;
				_tmp12_ = audio_encryption->encryption_ns;
				_tmp13_ = video_encryption->encryption_ns;
				_tmp10_ = g_strcmp0 (_tmp12_, _tmp13_) == 0;
			} else {
				_tmp10_ = FALSE;
			}
			_tmp8_ = _tmp10_;
		}
		_tmp4_ = _tmp8_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		DinoPluginsCallEncryptionEntry* _tmp14_ = NULL;
		DinoPluginsCallEncryptionEntry* audio_encryption_entry = NULL;
		DinoPluginsCallEncryptionEntry* _tmp19_;
		DinoPluginsCallEncryptionEntry* _tmp20_ = NULL;
		DinoPluginsCallEncryptionEntry* video_encryption_entry = NULL;
		DinoPluginsCallEncryptionEntry* _tmp25_;
		DinoPluginsCallEncryptionWidget* _tmp26_ = NULL;
		DinoPluginsCallEncryptionEntry* _tmp27_;
		DinoPluginsCallEncryptionWidget* audio_encryption_widgets = NULL;
		DinoPluginsCallEncryptionWidget* _tmp33_;
		DinoPluginsCallEncryptionWidget* _tmp34_ = NULL;
		DinoPluginsCallEncryptionEntry* _tmp35_;
		DinoPluginsCallEncryptionWidget* video_encryption_widgets = NULL;
		DinoPluginsCallEncryptionWidget* _tmp41_;
		gboolean _tmp42_ = FALSE;
		DinoPluginsCallEncryptionWidget* _tmp43_;
		if (audio_encryption != NULL) {
			DinoPluginsRegistry* _tmp15_;
			GeeHashMap* _tmp16_;
			const gchar* _tmp17_;
			gpointer _tmp18_;
			_tmp15_ = registry;
			_tmp16_ = _tmp15_->call_encryption_entries;
			_tmp17_ = audio_encryption->encryption_ns;
			_tmp18_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp16_, _tmp17_);
			_g_object_unref0 (_tmp14_);
			_tmp14_ = (DinoPluginsCallEncryptionEntry*) _tmp18_;
		} else {
			_g_object_unref0 (_tmp14_);
			_tmp14_ = NULL;
		}
		_tmp19_ = _tmp14_;
		_tmp14_ = NULL;
		audio_encryption_entry = _tmp19_;
		if (video_encryption != NULL) {
			DinoPluginsRegistry* _tmp21_;
			GeeHashMap* _tmp22_;
			const gchar* _tmp23_;
			gpointer _tmp24_;
			_tmp21_ = registry;
			_tmp22_ = _tmp21_->call_encryption_entries;
			_tmp23_ = video_encryption->encryption_ns;
			_tmp24_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp22_, _tmp23_);
			_g_object_unref0 (_tmp20_);
			_tmp20_ = (DinoPluginsCallEncryptionEntry*) _tmp24_;
		} else {
			_g_object_unref0 (_tmp20_);
			_tmp20_ = NULL;
		}
		_tmp25_ = _tmp20_;
		_tmp20_ = NULL;
		video_encryption_entry = _tmp25_;
		_tmp27_ = audio_encryption_entry;
		if (_tmp27_ != NULL) {
			DinoPluginsCallEncryptionEntry* _tmp28_;
			DinoEntitiesCall* _tmp29_;
			DinoEntitiesAccount* _tmp30_;
			DinoEntitiesAccount* _tmp31_;
			DinoPluginsCallEncryptionWidget* _tmp32_;
			_tmp28_ = audio_encryption_entry;
			_tmp29_ = self->priv->call;
			_tmp30_ = dino_entities_call_get_account (_tmp29_);
			_tmp31_ = _tmp30_;
			_tmp32_ = dino_plugins_call_encryption_entry_get_widget (_tmp28_, _tmp31_, audio_encryption);
			_g_object_unref0 (_tmp26_);
			_tmp26_ = _tmp32_;
		} else {
			_g_object_unref0 (_tmp26_);
			_tmp26_ = NULL;
		}
		_tmp33_ = _tmp26_;
		_tmp26_ = NULL;
		audio_encryption_widgets = _tmp33_;
		_tmp35_ = video_encryption_entry;
		if (_tmp35_ != NULL) {
			DinoPluginsCallEncryptionEntry* _tmp36_;
			DinoEntitiesCall* _tmp37_;
			DinoEntitiesAccount* _tmp38_;
			DinoEntitiesAccount* _tmp39_;
			DinoPluginsCallEncryptionWidget* _tmp40_;
			_tmp36_ = video_encryption_entry;
			_tmp37_ = self->priv->call;
			_tmp38_ = dino_entities_call_get_account (_tmp37_);
			_tmp39_ = _tmp38_;
			_tmp40_ = dino_plugins_call_encryption_entry_get_widget (_tmp36_, _tmp39_, video_encryption);
			_g_object_unref0 (_tmp34_);
			_tmp34_ = _tmp40_;
		} else {
			_g_object_unref0 (_tmp34_);
			_tmp34_ = NULL;
		}
		_tmp41_ = _tmp34_;
		_tmp34_ = NULL;
		video_encryption_widgets = _tmp41_;
		_tmp43_ = audio_encryption_widgets;
		if (_tmp43_ != NULL) {
			_tmp42_ = !has_video;
		} else {
			_tmp42_ = FALSE;
		}
		if (_tmp42_) {
			DinoPluginsCallEncryptionWidget* _tmp44_;
			gchar* _tmp45_;
			DinoPluginsCallEncryptionWidget* _tmp46_;
			gchar* _tmp47_;
			DinoPluginsCallEncryptionWidget* _tmp48_;
			_tmp44_ = audio_encryption_widgets;
			_tmp45_ = dino_plugins_call_encryption_widget_get_title (_tmp44_);
			_g_free0 (title);
			title = _tmp45_;
			_tmp46_ = audio_encryption_widgets;
			_tmp47_ = dino_plugins_call_encryption_widget_get_icon_name (_tmp46_);
			_g_free0 (icon_name);
			icon_name = _tmp47_;
			_tmp48_ = audio_encryption_widgets;
			show_keys = dino_plugins_call_encryption_widget_show_keys (_tmp48_);
		} else {
			gboolean _tmp49_ = FALSE;
			DinoPluginsCallEncryptionWidget* _tmp50_;
			_tmp50_ = video_encryption_widgets;
			if (_tmp50_ != NULL) {
				_tmp49_ = !has_audio;
			} else {
				_tmp49_ = FALSE;
			}
			if (_tmp49_) {
				DinoPluginsCallEncryptionWidget* _tmp51_;
				gchar* _tmp52_;
				DinoPluginsCallEncryptionWidget* _tmp53_;
				gchar* _tmp54_;
				DinoPluginsCallEncryptionWidget* _tmp55_;
				_tmp51_ = video_encryption_widgets;
				_tmp52_ = dino_plugins_call_encryption_widget_get_title (_tmp51_);
				_g_free0 (title);
				title = _tmp52_;
				_tmp53_ = video_encryption_widgets;
				_tmp54_ = dino_plugins_call_encryption_widget_get_icon_name (_tmp53_);
				_g_free0 (icon_name);
				icon_name = _tmp54_;
				_tmp55_ = video_encryption_widgets;
				show_keys = dino_plugins_call_encryption_widget_show_keys (_tmp55_);
			} else {
				gboolean _tmp56_ = FALSE;
				DinoPluginsCallEncryptionWidget* _tmp57_;
				_tmp57_ = audio_encryption_widgets;
				if (_tmp57_ != NULL) {
					DinoPluginsCallEncryptionWidget* _tmp58_;
					_tmp58_ = video_encryption_widgets;
					_tmp56_ = _tmp58_ != NULL;
				} else {
					_tmp56_ = FALSE;
				}
				if (_tmp56_) {
					DinoPluginsCallEncryptionWidget* _tmp59_;
					gchar* _tmp60_;
					gchar* _tmp61_;
					DinoPluginsCallEncryptionWidget* _tmp62_;
					gchar* _tmp63_;
					gchar* _tmp64_;
					gboolean _tmp65_;
					DinoPluginsCallEncryptionWidget* _tmp68_;
					gchar* _tmp69_;
					gchar* _tmp70_;
					DinoPluginsCallEncryptionWidget* _tmp71_;
					gchar* _tmp72_;
					gchar* _tmp73_;
					gboolean _tmp74_;
					DinoPluginsCallEncryptionWidget* _tmp77_;
					DinoPluginsCallEncryptionWidget* _tmp78_;
					_tmp59_ = audio_encryption_widgets;
					_tmp60_ = dino_plugins_call_encryption_widget_get_title (_tmp59_);
					_tmp61_ = _tmp60_;
					_tmp62_ = video_encryption_widgets;
					_tmp63_ = dino_plugins_call_encryption_widget_get_title (_tmp62_);
					_tmp64_ = _tmp63_;
					_tmp65_ = g_strcmp0 (_tmp61_, _tmp64_) == 0;
					_g_free0 (_tmp64_);
					_g_free0 (_tmp61_);
					if (_tmp65_) {
						DinoPluginsCallEncryptionWidget* _tmp66_;
						gchar* _tmp67_;
						_tmp66_ = audio_encryption_widgets;
						_tmp67_ = dino_plugins_call_encryption_widget_get_title (_tmp66_);
						_g_free0 (title);
						title = _tmp67_;
					}
					_tmp68_ = audio_encryption_widgets;
					_tmp69_ = dino_plugins_call_encryption_widget_get_icon_name (_tmp68_);
					_tmp70_ = _tmp69_;
					_tmp71_ = video_encryption_widgets;
					_tmp72_ = dino_plugins_call_encryption_widget_get_icon_name (_tmp71_);
					_tmp73_ = _tmp72_;
					_tmp74_ = g_strcmp0 (_tmp70_, _tmp73_) == 0;
					_g_free0 (_tmp73_);
					_g_free0 (_tmp70_);
					if (_tmp74_) {
						DinoPluginsCallEncryptionWidget* _tmp75_;
						gchar* _tmp76_;
						_tmp75_ = audio_encryption_widgets;
						_tmp76_ = dino_plugins_call_encryption_widget_get_icon_name (_tmp75_);
						_g_free0 (icon_name);
						icon_name = _tmp76_;
					}
					_tmp77_ = audio_encryption_widgets;
					_tmp78_ = video_encryption_widgets;
					if (dino_plugins_call_encryption_widget_show_keys (_tmp77_) == dino_plugins_call_encryption_widget_show_keys (_tmp78_)) {
						DinoPluginsCallEncryptionWidget* _tmp79_;
						_tmp79_ = audio_encryption_widgets;
						show_keys = dino_plugins_call_encryption_widget_show_keys (_tmp79_);
					}
				}
			}
		}
		_g_object_unref0 (video_encryption_widgets);
		_g_object_unref0 (_tmp34_);
		_g_object_unref0 (audio_encryption_widgets);
		_g_object_unref0 (_tmp26_);
		_g_object_unref0 (video_encryption_entry);
		_g_object_unref0 (_tmp20_);
		_g_object_unref0 (audio_encryption_entry);
		_g_object_unref0 (_tmp14_);
	}
	_tmp80_ = title;
	dino_ui_call_encryption_button_controller_set_info (encryption_button, _tmp80_, show_keys, has_audio, audio_encryption, has_video, video_encryption);
	if (!has_audio) {
		_tmp82_ = TRUE;
	} else {
		_tmp82_ = audio_encryption != NULL;
	}
	if (_tmp82_) {
		gboolean _tmp83_ = FALSE;
		if (!has_video) {
			_tmp83_ = TRUE;
		} else {
			_tmp83_ = video_encryption != NULL;
		}
		_tmp81_ = _tmp83_;
	} else {
		_tmp81_ = FALSE;
	}
	_tmp84_ = icon_name;
	dino_ui_call_encryption_button_controller_set_icon (encryption_button, _tmp81_, _tmp84_);
	_dino_plugins_registry_unref0 (registry);
	_g_free0 (icon_name);
	_g_free0 (title);
}

static Block16Data*
block16_data_ref (Block16Data* _data16_)
{
	g_atomic_int_inc (&_data16_->_ref_count_);
	return _data16_;
}

static void
block16_data_unref (void * _userdata_)
{
	Block16Data* _data16_;
	_data16_ = (Block16Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data16_->_ref_count_)) {
		DinoUiCallWindowController* self;
		self = _data16_->self;
		_g_free0 (_data16_->participant_name);
		_g_free0 (_data16_->participant_id);
		_g_object_unref0 (self);
		g_slice_free (Block16Data, _data16_);
	}
}

static Block17Data*
block17_data_ref (Block17Data* _data17_)
{
	g_atomic_int_inc (&_data17_->_ref_count_);
	return _data17_;
}

static void
block17_data_unref (void * _userdata_)
{
	Block17Data* _data17_;
	_data17_ = (Block17Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data17_->_ref_count_)) {
		DinoUiCallWindowController* self;
		self = _data17_->_data16_->self;
		_g_object_unref0 (_data17_->conn_details_window);
		block16_data_unref (_data17_->_data16_);
		_data17_->_data16_ = NULL;
		g_slice_free (Block17Data, _data17_);
	}
}

static gboolean
__lambda79_ (Block17Data* _data17_)
{
	Block16Data* _data16_;
	DinoUiCallWindowController* self;
	GeeHashMap* _tmp0_;
	gpointer _tmp1_;
	DinoPeerState* _tmp2_;
	DinoPeerInfo* _tmp3_;
	DinoPeerInfo* _tmp4_;
	gboolean result;
	_data16_ = _data17_->_data16_;
	self = _data16_->self;
	_tmp0_ = self->priv->peer_states;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _data16_->participant_id);
	_tmp2_ = (DinoPeerState*) _tmp1_;
	_tmp3_ = dino_peer_state_get_info (_tmp2_);
	_tmp4_ = _tmp3_;
	dino_ui_call_connection_details_window_update_content (_data17_->conn_details_window, _tmp4_);
	_dino_peer_info_unref0 (_tmp4_);
	_g_object_unref0 (_tmp2_);
	result = TRUE;
	return result;
}

static gboolean
___lambda79__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda79_ (self);
	return result;
}

static gboolean
__lambda80_ (Block17Data* _data17_)
{
	Block16Data* _data16_;
	DinoUiCallWindowController* self;
	gboolean result;
	_data16_ = _data17_->_data16_;
	self = _data16_->self;
	g_source_remove (_data17_->timeout_handle_id);
	result = FALSE;
	return result;
}

static gboolean
___lambda80__gtk_window_close_request (GtkWindow* _sender,
                                       gpointer self)
{
	gboolean result;
	result = __lambda80_ (self);
	return result;
}

static gboolean
__lambda81_ (Block17Data* _data17_)
{
	Block16Data* _data16_;
	DinoUiCallWindowController* self;
	gboolean result;
	_data16_ = _data17_->_data16_;
	self = _data16_->self;
	gtk_window_close ((GtkWindow*) _data17_->conn_details_window);
	result = FALSE;
	return result;
}

static gboolean
___lambda81__gtk_window_close_request (GtkWindow* _sender,
                                       gpointer self)
{
	gboolean result;
	result = __lambda81_ (self);
	return result;
}

static void
__lambda78_ (Block16Data* _data16_)
{
	DinoUiCallWindowController* self;
	Block17Data* _data17_;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	DinoUiCallConnectionDetailsWindow* _tmp2_ = NULL;
	GeeHashMap* _tmp3_;
	gpointer _tmp4_;
	DinoPeerState* _tmp5_;
	DinoPeerInfo* _tmp6_;
	DinoPeerInfo* _tmp7_;
	DinoUiCallWindow* _tmp8_;
	DinoUiCallWindow* _tmp9_;
	self = _data16_->self;
	_data17_ = g_slice_new0 (Block17Data);
	_data17_->_ref_count_ = 1;
	_data17_->_data16_ = block16_data_ref (_data16_);
	_tmp0_ = _data16_->participant_name;
	_tmp1_ = g_strdup (_tmp0_);
	_tmp2_ = dino_ui_call_connection_details_window_new ();
	gtk_window_set_title ((GtkWindow*) _tmp2_, _tmp1_);
	_g_free0 (_tmp1_);
	g_object_ref_sink (_tmp2_);
	_data17_->conn_details_window = _tmp2_;
	_tmp3_ = self->priv->peer_states;
	_tmp4_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp3_, _data16_->participant_id);
	_tmp5_ = (DinoPeerState*) _tmp4_;
	_tmp6_ = dino_peer_state_get_info (_tmp5_);
	_tmp7_ = _tmp6_;
	dino_ui_call_connection_details_window_update_content (_data17_->conn_details_window, _tmp7_);
	_dino_peer_info_unref0 (_tmp7_);
	_g_object_unref0 (_tmp5_);
	_data17_->timeout_handle_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 1, ___lambda79__gsource_func, block17_data_ref (_data17_), block17_data_unref);
	_tmp8_ = self->priv->call_window;
	gtk_window_set_transient_for ((GtkWindow*) _data17_->conn_details_window, (GtkWindow*) _tmp8_);
	g_signal_connect_data ((GtkWindow*) _data17_->conn_details_window, "close-request", (GCallback) ___lambda80__gtk_window_close_request, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
	gtk_window_present ((GtkWindow*) _data17_->conn_details_window);
	_tmp9_ = self->priv->call_window;
	g_signal_connect_data ((GtkWindow*) _tmp9_, "close-request", (GCallback) ___lambda81__gtk_window_close_request, block17_data_ref (_data17_), (GClosureNotify) block17_data_unref, 0);
	block17_data_unref (_data17_);
	_data17_ = NULL;
}

static void
___lambda78__dino_ui_participant_widget_debug_information_clicked (DinoUiParticipantWidget* _sender,
                                                                   gpointer self)
{
	__lambda78_ (self);
}

static void
__lambda82_ (DinoUiCallWindowController* self)
{
	dino_ui_call_window_controller_invite_button_clicked (self);
}

static void
___lambda82__dino_ui_participant_widget_invite_button_clicked (DinoUiParticipantWidget* _sender,
                                                               gpointer self)
{
	__lambda82_ ((DinoUiCallWindowController*) self);
}

static void
__lambda100_ (DinoUiCallWindowController* self,
              guint width,
              guint height)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp4_ = FALSE;
	if (self->priv->window_size_changed) {
		_tmp0_ = TRUE;
	} else {
		GeeHashMap* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		_tmp1_ = self->priv->participant_widgets;
		_tmp2_ = gee_abstract_map_get_size ((GeeAbstractMap*) _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp0_ = _tmp3_ > 1;
	}
	if (_tmp0_) {
		return;
	}
	if (width == ((guint) 0)) {
		_tmp4_ = TRUE;
	} else {
		_tmp4_ = height == ((guint) 0);
	}
	if (_tmp4_) {
		return;
	}
	if (width > height) {
		DinoUiCallWindow* _tmp5_;
		DinoUiCallWindow* _tmp6_;
		_tmp5_ = self->priv->call_window;
		g_object_set ((GtkWindow*) _tmp5_, "default-width", 704, NULL);
		_tmp6_ = self->priv->call_window;
		g_object_set ((GtkWindow*) _tmp6_, "default-height", (gint) ((height * 704) / width), NULL);
	} else {
		DinoUiCallWindow* _tmp7_;
		DinoUiCallWindow* _tmp8_;
		_tmp7_ = self->priv->call_window;
		g_object_set ((GtkWindow*) _tmp7_, "default-width", (gint) ((width * 704) / height), NULL);
		_tmp8_ = self->priv->call_window;
		g_object_set ((GtkWindow*) _tmp8_, "default-height", 704, NULL);
	}
	dino_ui_call_window_controller_capture_window_size (self);
}

static void
___lambda100__dino_plugins_video_call_widget_resolution_changed (DinoPluginsVideoCallWidget* _sender,
                                                                 guint width,
                                                                 guint height,
                                                                 gpointer self)
{
	__lambda100_ ((DinoUiCallWindowController*) self, width, height);
}

static void
dino_ui_call_window_controller_add_new_participant (DinoUiCallWindowController* self,
                                                    const gchar* participant_id,
                                                    XmppJid* jid)
{
	Block16Data* _data16_;
	gchar* _tmp0_;
	GeeHashMap* _tmp1_;
	DinoEntitiesCall* _tmp12_;
	DinoEntitiesAccount* _tmp13_;
	DinoEntitiesAccount* _tmp14_;
	XmppJid* _tmp15_;
	XmppJid* _tmp16_;
	XmppJid* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	DinoEntitiesConversation* conversation = NULL;
	DinoStreamInteractor* _tmp22_;
	DinoModuleIdentity* _tmp23_;
	gpointer _tmp24_;
	DinoConversationManager* _tmp25_;
	XmppJid* _tmp26_;
	XmppJid* _tmp27_;
	XmppJid* _tmp28_;
	DinoEntitiesCall* _tmp29_;
	DinoEntitiesAccount* _tmp30_;
	DinoEntitiesAccount* _tmp31_;
	DinoEntitiesConversationType _tmp32_;
	DinoEntitiesConversation* _tmp33_;
	DinoEntitiesConversation* _tmp34_;
	gchar* _tmp35_ = NULL;
	DinoEntitiesConversation* _tmp36_;
	gchar* _tmp44_;
	DinoUiParticipantWidget* participant_widget = NULL;
	const gchar* _tmp45_;
	DinoUiParticipantWidget* _tmp46_;
	DinoUiParticipantWidget* _tmp47_;
	GeeHashMap* _tmp48_;
	gboolean _tmp49_;
	gboolean _tmp50_;
	DinoUiParticipantWidget* _tmp51_;
	GeeHashMap* _tmp52_;
	DinoUiParticipantWidget* _tmp53_;
	gulong _tmp54_;
	GeeHashMap* _tmp55_;
	DinoUiParticipantWidget* _tmp56_;
	DinoUiCallWindow* _tmp57_;
	DinoUiParticipantWidget* _tmp58_;
	GeeHashMap* _tmp59_;
	DinoPluginsVideoCallPlugin* _tmp60_;
	DinoPluginsVideoCallWidget* _tmp61_;
	DinoPluginsVideoCallWidget* _tmp62_;
	GeeHashMap* _tmp63_;
	gpointer _tmp64_;
	DinoPluginsVideoCallWidget* _tmp65_;
	DinoUiParticipantWidget* _tmp66_;
	DinoEntitiesConversation* _tmp67_;
	DinoStreamInteractor* _tmp68_;
	DinoEntitiesCall* _tmp69_;
	gboolean _tmp70_;
	gboolean _tmp71_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (participant_id != NULL);
	g_return_if_fail (jid != NULL);
	_data16_ = g_slice_new0 (Block16Data);
	_data16_->_ref_count_ = 1;
	_data16_->self = g_object_ref (self);
	_tmp0_ = g_strdup (participant_id);
	_g_free0 (_data16_->participant_id);
	_data16_->participant_id = _tmp0_;
	_tmp1_ = self->priv->participant_widgets;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp1_, _data16_->participant_id)) {
		DinoEntitiesCall* _tmp2_;
		DinoEntitiesAccount* _tmp3_;
		DinoEntitiesAccount* _tmp4_;
		XmppJid* _tmp5_;
		XmppJid* _tmp6_;
		XmppJid* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp2_ = self->priv->call;
		_tmp3_ = dino_entities_call_get_account (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = dino_entities_account_get_bare_jid (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_;
		_tmp8_ = xmpp_jid_to_string (_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp10_ = xmpp_jid_to_string (jid);
		_tmp11_ = _tmp10_;
		g_warning ("call_window_controller.vala:241: [%s] Attempted to add same participan" \
"t twice: %s", _tmp9_, _tmp11_);
		_g_free0 (_tmp11_);
		_g_free0 (_tmp9_);
		_xmpp_jid_unref0 (_tmp7_);
		block16_data_unref (_data16_);
		_data16_ = NULL;
		return;
	}
	_tmp12_ = self->priv->call;
	_tmp13_ = dino_entities_call_get_account (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = dino_entities_account_get_bare_jid (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = _tmp16_;
	_tmp18_ = xmpp_jid_to_string (_tmp17_);
	_tmp19_ = _tmp18_;
	_tmp20_ = xmpp_jid_to_string (jid);
	_tmp21_ = _tmp20_;
	g_debug ("call_window_controller.vala:244: [%s] Call window controller | Add par" \
"ticipant: %s", _tmp19_, _tmp21_);
	_g_free0 (_tmp21_);
	_g_free0 (_tmp19_);
	_xmpp_jid_unref0 (_tmp17_);
	_tmp22_ = self->priv->stream_interactor;
	_tmp23_ = dino_conversation_manager_IDENTITY;
	_tmp24_ = dino_stream_interactor_get_module (_tmp22_, DINO_TYPE_CONVERSATION_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp23_);
	_tmp25_ = (DinoConversationManager*) _tmp24_;
	_tmp26_ = xmpp_jid_get_bare_jid (jid);
	_tmp27_ = _tmp26_;
	_tmp28_ = _tmp27_;
	_tmp29_ = self->priv->call;
	_tmp30_ = dino_entities_call_get_account (_tmp29_);
	_tmp31_ = _tmp30_;
	_tmp32_ = DINO_ENTITIES_CONVERSATION_TYPE_CHAT;
	_tmp33_ = dino_conversation_manager_get_conversation (_tmp25_, _tmp28_, _tmp31_, &_tmp32_);
	_tmp34_ = _tmp33_;
	_xmpp_jid_unref0 (_tmp28_);
	_g_object_unref0 (_tmp25_);
	conversation = _tmp34_;
	_tmp36_ = conversation;
	if (_tmp36_ != NULL) {
		DinoStreamInteractor* _tmp37_;
		DinoEntitiesConversation* _tmp38_;
		gchar* _tmp39_;
		_tmp37_ = self->priv->stream_interactor;
		_tmp38_ = conversation;
		_tmp39_ = dino_ui_util_get_conversation_display_name (_tmp37_, _tmp38_);
		_g_free0 (_tmp35_);
		_tmp35_ = _tmp39_;
	} else {
		XmppJid* _tmp40_;
		XmppJid* _tmp41_;
		XmppJid* _tmp42_;
		gchar* _tmp43_;
		_tmp40_ = xmpp_jid_get_bare_jid (jid);
		_tmp41_ = _tmp40_;
		_tmp42_ = _tmp41_;
		_tmp43_ = xmpp_jid_to_string (_tmp42_);
		_g_free0 (_tmp35_);
		_tmp35_ = _tmp43_;
		_xmpp_jid_unref0 (_tmp42_);
	}
	_tmp44_ = _tmp35_;
	_tmp35_ = NULL;
	_data16_->participant_name = _tmp44_;
	_tmp45_ = _data16_->participant_name;
	_tmp46_ = dino_ui_participant_widget_new (_tmp45_);
	g_object_ref_sink (_tmp46_);
	participant_widget = _tmp46_;
	_tmp47_ = participant_widget;
	_tmp48_ = self->priv->participant_widgets;
	_tmp49_ = gee_map_get_is_empty ((GeeMap*) _tmp48_);
	_tmp50_ = _tmp49_;
	dino_ui_participant_widget_set_may_show_invite_button (_tmp47_, !_tmp50_);
	_tmp51_ = participant_widget;
	g_signal_connect_data (_tmp51_, "debug-information-clicked", (GCallback) ___lambda78__dino_ui_participant_widget_debug_information_clicked, block16_data_ref (_data16_), (GClosureNotify) block16_data_unref, 0);
	_tmp52_ = self->priv->invite_handler_ids;
	_tmp53_ = participant_widget;
	_tmp54_ = g_signal_connect_object (_tmp53_, "invite-button-clicked", (GCallback) ___lambda82__dino_ui_participant_widget_invite_button_clicked, self, 0);
	gee_abstract_map_set ((GeeAbstractMap*) _tmp52_, _data16_->participant_id, (gpointer) ((guintptr) _tmp54_));
	_tmp55_ = self->priv->participant_widgets;
	_tmp56_ = participant_widget;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp55_, _data16_->participant_id, _tmp56_);
	_tmp57_ = self->priv->call_window;
	_tmp58_ = participant_widget;
	dino_ui_call_window_add_participant (_tmp57_, _data16_->participant_id, _tmp58_);
	_tmp59_ = self->priv->participant_videos;
	_tmp60_ = self->priv->call_plugin;
	_tmp61_ = dino_plugins_video_call_plugin_create_widget (_tmp60_, DINO_PLUGINS_WIDGET_TYPE_GTK4);
	_tmp62_ = _tmp61_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp59_, _data16_->participant_id, _tmp62_);
	_g_object_unref0 (_tmp62_);
	_tmp63_ = self->priv->participant_videos;
	_tmp64_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp63_, _data16_->participant_id);
	_tmp65_ = (DinoPluginsVideoCallWidget*) _tmp64_;
	g_signal_connect_object (_tmp65_, "resolution-changed", (GCallback) ___lambda100__dino_plugins_video_call_widget_resolution_changed, self, 0);
	_g_object_unref0 (_tmp65_);
	_tmp66_ = participant_widget;
	_tmp67_ = conversation;
	_tmp68_ = self->priv->stream_interactor;
	dino_ui_participant_widget_set_placeholder (_tmp66_, _tmp67_, _tmp68_);
	_tmp69_ = self->priv->call;
	_tmp70_ = dino_entities_call_get_direction (_tmp69_);
	_tmp71_ = _tmp70_;
	if (_tmp71_ == DINO_ENTITIES_CALL_DIRECTION_INCOMING) {
		DinoUiCallWindow* _tmp72_;
		_tmp72_ = self->priv->call_window;
		dino_ui_call_window_set_status (_tmp72_, _data16_->participant_id, "establishing");
	} else {
		DinoUiCallWindow* _tmp73_;
		_tmp73_ = self->priv->call_window;
		dino_ui_call_window_set_status (_tmp73_, _data16_->participant_id, "requested");
	}
	_g_object_unref0 (participant_widget);
	_g_free0 (_tmp35_);
	_g_object_unref0 (conversation);
	block16_data_unref (_data16_);
	_data16_ = NULL;
}

static void
dino_ui_call_window_controller_remove_participant (DinoUiCallWindowController* self,
                                                   const gchar* participant_id)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp15_;
	GeeHashMap* _tmp16_;
	gpointer _tmp17_;
	DinoUiParticipantWidget* _tmp18_;
	GeeHashMap* _tmp19_;
	gpointer _tmp20_;
	GeeHashMap* _tmp21_;
	GeeHashMap* _tmp22_;
	GeeHashMap* _tmp23_;
	DinoUiCallWindow* _tmp24_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (participant_id != NULL);
	_tmp0_ = self->priv->peer_states;
	if (gee_abstract_map_has_key ((GeeAbstractMap*) _tmp0_, participant_id)) {
		DinoEntitiesCall* _tmp1_;
		DinoEntitiesAccount* _tmp2_;
		DinoEntitiesAccount* _tmp3_;
		XmppJid* _tmp4_;
		XmppJid* _tmp5_;
		XmppJid* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		GeeHashMap* _tmp9_;
		gpointer _tmp10_;
		DinoPeerState* _tmp11_;
		XmppJid* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp1_ = self->priv->call;
		_tmp2_ = dino_entities_call_get_account (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = dino_entities_account_get_bare_jid (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp6_ = _tmp5_;
		_tmp7_ = xmpp_jid_to_string (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = self->priv->peer_states;
		_tmp10_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp9_, participant_id);
		_tmp11_ = (DinoPeerState*) _tmp10_;
		_tmp12_ = _tmp11_->jid;
		_tmp13_ = xmpp_jid_to_string (_tmp12_);
		_tmp14_ = _tmp13_;
		g_debug ("call_window_controller.vala:292: [%s] Call window controller | Remove " \
"participant: %s", _tmp8_, _tmp14_);
		_g_free0 (_tmp14_);
		_g_object_unref0 (_tmp11_);
		_g_free0 (_tmp8_);
		_xmpp_jid_unref0 (_tmp6_);
	}
	_tmp15_ = self->priv->participant_videos;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp15_, participant_id, NULL);
	_tmp16_ = self->priv->participant_widgets;
	_tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp16_, participant_id);
	_tmp18_ = (DinoUiParticipantWidget*) _tmp17_;
	_tmp19_ = self->priv->invite_handler_ids;
	_tmp20_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, participant_id);
	g_signal_handler_disconnect ((GObject*) _tmp18_, (gulong) ((guintptr) _tmp20_));
	_g_object_unref0 (_tmp18_);
	_tmp21_ = self->priv->participant_widgets;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp21_, participant_id, NULL);
	_tmp22_ = self->priv->invite_handler_ids;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp22_, participant_id, NULL);
	_tmp23_ = self->priv->peer_states;
	gee_abstract_map_unset ((GeeAbstractMap*) _tmp23_, participant_id, NULL);
	_tmp24_ = self->priv->call_window;
	dino_ui_call_window_remove_participant (_tmp24_, participant_id);
}

static void
dino_ui_call_window_controller_capture_window_size (DinoUiCallWindowController* self)
{
	GtkAllocation allocation = {0};
	DinoUiCallWindow* _tmp0_;
	GtkAllocation _tmp1_ = {0};
	DinoUiCallWindow* _tmp2_;
	DinoUiCallWindow* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->call_window;
	gtk_widget_get_allocation ((GtkWidget*) _tmp0_, &_tmp1_);
	allocation = _tmp1_;
	_tmp2_ = self->priv->call_window;
	self->priv->window_height = gtk_widget_get_allocated_height ((GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->call_window;
	self->priv->window_width = gtk_widget_get_allocated_width ((GtkWidget*) _tmp3_);
}

static Block18Data*
block18_data_ref (Block18Data* _data18_)
{
	g_atomic_int_inc (&_data18_->_ref_count_);
	return _data18_;
}

static void
block18_data_unref (void * _userdata_)
{
	Block18Data* _data18_;
	_data18_ = (Block18Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data18_->_ref_count_)) {
		DinoUiCallWindowController* self;
		self = _data18_->self;
		_g_object_unref0 (_data18_->audio_settings_popover);
		_g_object_unref0 (self);
		g_slice_free (Block18Data, _data18_);
	}
}

static void
__lambda71_ (Block18Data* _data18_,
             DinoPluginsMediaDevice* device)
{
	DinoUiCallWindowController* self;
	DinoCallState* _tmp0_;
	DinoUiAudioSettingsPopover* _tmp1_;
	self = _data18_->self;
	g_return_if_fail (device != NULL);
	_tmp0_ = self->priv->call_state;
	dino_call_state_set_audio_device (_tmp0_, device);
	_tmp1_ = _data18_->audio_settings_popover;
	dino_ui_call_window_controller_update_current_audio_device (self, _tmp1_);
}

static void
___lambda71__dino_ui_audio_settings_popover_microphone_selected (DinoUiAudioSettingsPopover* _sender,
                                                                 DinoPluginsMediaDevice* device,
                                                                 gpointer self)
{
	__lambda71_ (self, device);
}

static void
__lambda72_ (Block18Data* _data18_,
             DinoPluginsMediaDevice* device)
{
	DinoUiCallWindowController* self;
	DinoCallState* _tmp0_;
	DinoUiAudioSettingsPopover* _tmp1_;
	self = _data18_->self;
	g_return_if_fail (device != NULL);
	_tmp0_ = self->priv->call_state;
	dino_call_state_set_audio_device (_tmp0_, device);
	_tmp1_ = _data18_->audio_settings_popover;
	dino_ui_call_window_controller_update_current_audio_device (self, _tmp1_);
}

static void
___lambda72__dino_ui_audio_settings_popover_speaker_selected (DinoUiAudioSettingsPopover* _sender,
                                                              DinoPluginsMediaDevice* device,
                                                              gpointer self)
{
	__lambda72_ (self, device);
}

static void
dino_ui_call_window_controller_update_audio_device_choices (DinoUiCallWindowController* self)
{
	Block18Data* _data18_;
	gboolean _tmp0_ = FALSE;
	DinoPluginsVideoCallPlugin* _tmp1_;
	GeeList* _tmp2_;
	GeeList* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	gboolean _tmp6_;
	DinoUiCallWindow* _tmp30_;
	DinoUiCallBottomBar* _tmp31_;
	DinoUiAudioSettingsPopover* _tmp32_;
	DinoUiAudioSettingsPopover* _tmp33_;
	DinoUiAudioSettingsPopover* _tmp34_;
	DinoUiAudioSettingsPopover* _tmp35_;
	g_return_if_fail (self != NULL);
	_data18_ = g_slice_new0 (Block18Data);
	_data18_->_ref_count_ = 1;
	_data18_->self = g_object_ref (self);
	_tmp1_ = self->priv->call_plugin;
	_tmp2_ = dino_plugins_video_call_plugin_get_devices (_tmp1_, "audio", TRUE);
	_tmp3_ = _tmp2_;
	_tmp4_ = gee_collection_get_size ((GeeCollection*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _tmp5_ == 0;
	_g_object_unref0 (_tmp3_);
	if (_tmp6_) {
		_tmp0_ = TRUE;
	} else {
		DinoPluginsVideoCallPlugin* _tmp7_;
		GeeList* _tmp8_;
		GeeList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		_tmp7_ = self->priv->call_plugin;
		_tmp8_ = dino_plugins_video_call_plugin_get_devices (_tmp7_, "audio", FALSE);
		_tmp9_ = _tmp8_;
		_tmp10_ = gee_collection_get_size ((GeeCollection*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp0_ = _tmp11_ == 0;
		_g_object_unref0 (_tmp9_);
	}
	if (_tmp0_) {
		DinoUiCallWindow* _tmp12_;
		DinoUiCallBottomBar* _tmp13_;
		_tmp12_ = self->priv->call_window;
		_tmp13_ = _tmp12_->bottom_bar;
		dino_ui_call_bottom_bar_show_audio_device_error (_tmp13_);
	} else {
		gboolean _tmp14_ = FALSE;
		DinoPluginsVideoCallPlugin* _tmp15_;
		GeeList* _tmp16_;
		GeeList* _tmp17_;
		gint _tmp18_;
		gint _tmp19_;
		gboolean _tmp20_;
		_tmp15_ = self->priv->call_plugin;
		_tmp16_ = dino_plugins_video_call_plugin_get_devices (_tmp15_, "audio", TRUE);
		_tmp17_ = _tmp16_;
		_tmp18_ = gee_collection_get_size ((GeeCollection*) _tmp17_);
		_tmp19_ = _tmp18_;
		_tmp20_ = _tmp19_ == 1;
		_g_object_unref0 (_tmp17_);
		if (_tmp20_) {
			DinoPluginsVideoCallPlugin* _tmp21_;
			GeeList* _tmp22_;
			GeeList* _tmp23_;
			gint _tmp24_;
			gint _tmp25_;
			_tmp21_ = self->priv->call_plugin;
			_tmp22_ = dino_plugins_video_call_plugin_get_devices (_tmp21_, "audio", FALSE);
			_tmp23_ = _tmp22_;
			_tmp24_ = gee_collection_get_size ((GeeCollection*) _tmp23_);
			_tmp25_ = _tmp24_;
			_tmp14_ = _tmp25_ == 1;
			_g_object_unref0 (_tmp23_);
		} else {
			_tmp14_ = FALSE;
		}
		if (_tmp14_) {
			DinoUiCallWindow* _tmp26_;
			DinoUiCallBottomBar* _tmp27_;
			DinoUiAudioSettingsPopover* _tmp28_;
			DinoUiAudioSettingsPopover* _tmp29_;
			_tmp26_ = self->priv->call_window;
			_tmp27_ = _tmp26_->bottom_bar;
			_tmp28_ = dino_ui_call_bottom_bar_show_audio_device_choices (_tmp27_, FALSE);
			_tmp29_ = _tmp28_;
			_g_object_unref0 (_tmp29_);
			block18_data_unref (_data18_);
			_data18_ = NULL;
			return;
		}
	}
	_tmp30_ = self->priv->call_window;
	_tmp31_ = _tmp30_->bottom_bar;
	_tmp32_ = dino_ui_call_bottom_bar_show_audio_device_choices (_tmp31_, TRUE);
	_data18_->audio_settings_popover = _tmp32_;
	_tmp33_ = _data18_->audio_settings_popover;
	dino_ui_call_window_controller_update_current_audio_device (self, _tmp33_);
	_tmp34_ = _data18_->audio_settings_popover;
	g_signal_connect_data (_tmp34_, "microphone-selected", (GCallback) ___lambda71__dino_ui_audio_settings_popover_microphone_selected, block18_data_ref (_data18_), (GClosureNotify) block18_data_unref, 0);
	_tmp35_ = _data18_->audio_settings_popover;
	g_signal_connect_data (_tmp35_, "speaker-selected", (GCallback) ___lambda72__dino_ui_audio_settings_popover_speaker_selected, block18_data_ref (_data18_), (GClosureNotify) block18_data_unref, 0);
	block18_data_unref (_data18_);
	_data18_ = NULL;
}

static void
dino_ui_call_window_controller_update_current_audio_device (DinoUiCallWindowController* self,
                                                            DinoUiAudioSettingsPopover* audio_settings_popover)
{
	DinoCallState* _tmp0_;
	DinoPluginsMediaDevice* _tmp1_;
	DinoPluginsMediaDevice* _tmp2_;
	DinoCallState* _tmp3_;
	DinoPluginsMediaDevice* _tmp4_;
	DinoPluginsMediaDevice* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (audio_settings_popover != NULL);
	_tmp0_ = self->priv->call_state;
	_tmp1_ = dino_call_state_get_microphone_device (_tmp0_);
	_tmp2_ = _tmp1_;
	dino_ui_audio_settings_popover_set_current_microphone_device (audio_settings_popover, _tmp2_);
	_g_object_unref0 (_tmp2_);
	_tmp3_ = self->priv->call_state;
	_tmp4_ = dino_call_state_get_speaker_device (_tmp3_);
	_tmp5_ = _tmp4_;
	dino_ui_audio_settings_popover_set_current_speaker_device (audio_settings_popover, _tmp5_);
	_g_object_unref0 (_tmp5_);
}

static Block19Data*
block19_data_ref (Block19Data* _data19_)
{
	g_atomic_int_inc (&_data19_->_ref_count_);
	return _data19_;
}

static void
block19_data_unref (void * _userdata_)
{
	Block19Data* _data19_;
	_data19_ = (Block19Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data19_->_ref_count_)) {
		DinoUiCallWindowController* self;
		self = _data19_->self;
		_g_object_unref0 (_data19_->video_settings_popover);
		_g_object_unref0 (self);
		g_slice_free (Block19Data, _data19_);
	}
}

static void
__lambda73_ (Block19Data* _data19_,
             DinoPluginsMediaDevice* device)
{
	DinoUiCallWindowController* self;
	DinoCallState* _tmp0_;
	DinoUiVideoSettingsPopover* _tmp1_;
	DinoPluginsVideoCallWidget* _tmp2_;
	self = _data19_->self;
	g_return_if_fail (device != NULL);
	_tmp0_ = self->priv->call_state;
	dino_call_state_set_video_device (_tmp0_, device);
	_tmp1_ = _data19_->video_settings_popover;
	dino_ui_call_window_controller_update_current_video_device (self, _tmp1_);
	_tmp2_ = self->priv->own_video;
	dino_plugins_video_call_widget_display_device (_tmp2_, device);
}

static void
___lambda73__dino_ui_video_settings_popover_camera_selected (DinoUiVideoSettingsPopover* _sender,
                                                             DinoPluginsMediaDevice* device,
                                                             gpointer self)
{
	__lambda73_ (self, device);
}

static void
dino_ui_call_window_controller_update_video_device_choices (DinoUiCallWindowController* self)
{
	Block19Data* _data19_;
	gint device_count = 0;
	DinoPluginsVideoCallPlugin* _tmp0_;
	GeeList* _tmp1_;
	GeeList* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	DinoUiCallWindow* _tmp16_;
	DinoUiCallBottomBar* _tmp17_;
	DinoUiVideoSettingsPopover* _tmp18_;
	DinoUiVideoSettingsPopover* _tmp19_;
	DinoUiVideoSettingsPopover* _tmp20_;
	g_return_if_fail (self != NULL);
	_data19_ = g_slice_new0 (Block19Data);
	_data19_->_ref_count_ = 1;
	_data19_->self = g_object_ref (self);
	_tmp0_ = self->priv->call_plugin;
	_tmp1_ = dino_plugins_video_call_plugin_get_devices (_tmp0_, "video", FALSE);
	_tmp2_ = _tmp1_;
	_tmp3_ = gee_collection_get_size ((GeeCollection*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp2_);
	device_count = _tmp5_;
	if (device_count == 0) {
		DinoUiCallWindow* _tmp6_;
		DinoUiCallBottomBar* _tmp7_;
		_tmp6_ = self->priv->call_window;
		_tmp7_ = _tmp6_->bottom_bar;
		dino_ui_call_bottom_bar_show_video_device_error (_tmp7_);
	} else {
		gboolean _tmp8_ = FALSE;
		if (device_count == 1) {
			_tmp8_ = TRUE;
		} else {
			DinoCallState* _tmp9_;
			DinoPluginsMediaDevice* _tmp10_;
			DinoPluginsMediaDevice* _tmp11_;
			_tmp9_ = self->priv->call_state;
			_tmp10_ = dino_call_state_get_video_device (_tmp9_);
			_tmp11_ = _tmp10_;
			_tmp8_ = _tmp11_ == NULL;
			_g_object_unref0 (_tmp11_);
		}
		if (_tmp8_) {
			DinoUiCallWindow* _tmp12_;
			DinoUiCallBottomBar* _tmp13_;
			DinoUiVideoSettingsPopover* _tmp14_;
			DinoUiVideoSettingsPopover* _tmp15_;
			_tmp12_ = self->priv->call_window;
			_tmp13_ = _tmp12_->bottom_bar;
			_tmp14_ = dino_ui_call_bottom_bar_show_video_device_choices (_tmp13_, FALSE);
			_tmp15_ = _tmp14_;
			_g_object_unref0 (_tmp15_);
			block19_data_unref (_data19_);
			_data19_ = NULL;
			return;
		}
	}
	_tmp16_ = self->priv->call_window;
	_tmp17_ = _tmp16_->bottom_bar;
	_tmp18_ = dino_ui_call_bottom_bar_show_video_device_choices (_tmp17_, TRUE);
	_data19_->video_settings_popover = _tmp18_;
	_tmp19_ = _data19_->video_settings_popover;
	dino_ui_call_window_controller_update_current_video_device (self, _tmp19_);
	_tmp20_ = _data19_->video_settings_popover;
	g_signal_connect_data (_tmp20_, "camera-selected", (GCallback) ___lambda73__dino_ui_video_settings_popover_camera_selected, block19_data_ref (_data19_), (GClosureNotify) block19_data_unref, 0);
	block19_data_unref (_data19_);
	_data19_ = NULL;
}

static void
dino_ui_call_window_controller_update_current_video_device (DinoUiCallWindowController* self,
                                                            DinoUiVideoSettingsPopover* video_settings_popover)
{
	DinoCallState* _tmp0_;
	DinoPluginsMediaDevice* _tmp1_;
	DinoPluginsMediaDevice* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (video_settings_popover != NULL);
	_tmp0_ = self->priv->call_state;
	_tmp1_ = dino_call_state_get_video_device (_tmp0_);
	_tmp2_ = _tmp1_;
	dino_ui_video_settings_popover_set_current_device (video_settings_popover, _tmp2_);
	_g_object_unref0 (_tmp2_);
}

static void
dino_ui_call_window_controller_update_own_video (DinoUiCallWindowController* self)
{
	DinoUiCallWindow* _tmp0_;
	DinoUiCallBottomBar* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->call_window;
	_tmp1_ = _tmp0_->bottom_bar;
	_tmp2_ = dino_ui_call_bottom_bar_get_video_enabled (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		GeeList* devices = NULL;
		DinoPluginsVideoCallPlugin* _tmp4_;
		GeeList* _tmp5_;
		gboolean _tmp6_ = FALSE;
		DinoPluginsVideoCallWidget* _tmp7_;
		_tmp4_ = self->priv->call_plugin;
		_tmp5_ = dino_plugins_video_call_plugin_get_devices (_tmp4_, "video", FALSE);
		devices = _tmp5_;
		_tmp7_ = self->priv->own_video;
		if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, gtk_widget_get_type ())) {
			_tmp6_ = TRUE;
		} else {
			GeeList* _tmp8_;
			gboolean _tmp9_;
			gboolean _tmp10_;
			_tmp8_ = devices;
			_tmp9_ = gee_collection_get_is_empty ((GeeCollection*) _tmp8_);
			_tmp10_ = _tmp9_;
			_tmp6_ = _tmp10_;
		}
		if (_tmp6_) {
			DinoUiCallWindow* _tmp11_;
			_tmp11_ = self->priv->call_window;
			dino_ui_call_window_set_own_video (_tmp11_, NULL);
		} else {
			GtkWidget* widget = NULL;
			DinoPluginsVideoCallWidget* _tmp12_;
			GtkWidget* _tmp13_;
			DinoUiCallWindow* _tmp14_;
			GtkWidget* _tmp15_;
			DinoPluginsVideoCallWidget* _tmp16_;
			DinoCallState* _tmp17_;
			DinoPluginsMediaDevice* _tmp18_;
			DinoPluginsMediaDevice* _tmp19_;
			_tmp12_ = self->priv->own_video;
			_tmp13_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, gtk_widget_get_type (), GtkWidget));
			widget = _tmp13_;
			_tmp14_ = self->priv->call_window;
			_tmp15_ = widget;
			dino_ui_call_window_set_own_video (_tmp14_, _tmp15_);
			_tmp16_ = self->priv->own_video;
			_tmp17_ = self->priv->call_state;
			_tmp18_ = dino_call_state_get_video_device (_tmp17_);
			_tmp19_ = _tmp18_;
			dino_plugins_video_call_widget_display_device (_tmp16_, _tmp19_);
			_g_object_unref0 (_tmp19_);
			_g_object_unref0 (widget);
		}
		_g_object_unref0 (devices);
	} else {
		DinoPluginsVideoCallWidget* _tmp20_;
		DinoUiCallWindow* _tmp21_;
		_tmp20_ = self->priv->own_video;
		dino_plugins_video_call_widget_detach (_tmp20_);
		_tmp21_ = self->priv->call_window;
		dino_ui_call_window_unset_own_video (_tmp21_);
	}
}

static gulong*
_vala_array_dup1 (gulong* self,
                  gssize length)
{
	if (length > 0) {
		return _vala_memdup2 (self, length * sizeof (gulong));
	}
	return NULL;
}

static void
dino_ui_call_window_controller_real_dispose (GObject* base)
{
	DinoUiCallWindowController * self;
	gulong* _tmp0_;
	gint _tmp0__length1;
	gulong* _tmp2_;
	gint _tmp2__length1;
	GeeArrayList* participant_ids = NULL;
	GeeArrayList* _tmp5_;
	GeeArrayList* _tmp6_;
	GeeHashMap* _tmp7_;
	GeeSet* _tmp8_;
	GeeSet* _tmp9_;
	GeeSet* _tmp10_;
	gulong* _tmp20_;
	gulong* _tmp21_;
	gint _tmp21__length1;
	gulong* _tmp22_;
	gint _tmp22__length1;
	DinoPluginsVideoCallWidget* _tmp23_;
	self = (DinoUiCallWindowController*) base;
	_tmp0_ = self->priv->call_window_handler_ids;
	_tmp0__length1 = self->priv->call_window_handler_ids_length1;
	{
		gulong* handler_id_collection = NULL;
		gint handler_id_collection_length1 = 0;
		gint _handler_id_collection_size_ = 0;
		gint handler_id_it = 0;
		handler_id_collection = _tmp0_;
		handler_id_collection_length1 = _tmp0__length1;
		for (handler_id_it = 0; handler_id_it < handler_id_collection_length1; handler_id_it = handler_id_it + 1) {
			gulong handler_id = 0UL;
			handler_id = handler_id_collection[handler_id_it];
			{
				DinoUiCallWindow* _tmp1_;
				_tmp1_ = self->priv->call_window;
				g_signal_handler_disconnect ((GObject*) _tmp1_, handler_id);
			}
		}
	}
	_tmp2_ = self->priv->bottom_bar_handler_ids;
	_tmp2__length1 = self->priv->bottom_bar_handler_ids_length1;
	{
		gulong* handler_id_collection = NULL;
		gint handler_id_collection_length1 = 0;
		gint _handler_id_collection_size_ = 0;
		gint handler_id_it = 0;
		handler_id_collection = _tmp2_;
		handler_id_collection_length1 = _tmp2__length1;
		for (handler_id_it = 0; handler_id_it < handler_id_collection_length1; handler_id_it = handler_id_it + 1) {
			gulong handler_id = 0UL;
			handler_id = handler_id_collection[handler_id_it];
			{
				DinoUiCallWindow* _tmp3_;
				DinoUiCallBottomBar* _tmp4_;
				_tmp3_ = self->priv->call_window;
				_tmp4_ = _tmp3_->bottom_bar;
				g_signal_handler_disconnect ((GObject*) _tmp4_, handler_id);
			}
		}
	}
	_tmp5_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	participant_ids = _tmp5_;
	_tmp6_ = participant_ids;
	_tmp7_ = self->priv->participant_widgets;
	_tmp8_ = gee_abstract_map_get_keys ((GeeAbstractMap*) _tmp7_);
	_tmp9_ = _tmp8_;
	_tmp10_ = _tmp9_;
	gee_array_list_add_all (_tmp6_, (GeeCollection*) _tmp10_);
	_g_object_unref0 (_tmp10_);
	{
		GeeArrayList* _participant_id_list = NULL;
		GeeArrayList* _tmp11_;
		gint _participant_id_size = 0;
		GeeArrayList* _tmp12_;
		gint _tmp13_;
		gint _tmp14_;
		gint _participant_id_index = 0;
		_tmp11_ = participant_ids;
		_participant_id_list = _tmp11_;
		_tmp12_ = _participant_id_list;
		_tmp13_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp12_);
		_tmp14_ = _tmp13_;
		_participant_id_size = _tmp14_;
		_participant_id_index = -1;
		while (TRUE) {
			gint _tmp15_;
			gint _tmp16_;
			gchar* participant_id = NULL;
			GeeArrayList* _tmp17_;
			gpointer _tmp18_;
			const gchar* _tmp19_;
			_participant_id_index = _participant_id_index + 1;
			_tmp15_ = _participant_id_index;
			_tmp16_ = _participant_id_size;
			if (!(_tmp15_ < _tmp16_)) {
				break;
			}
			_tmp17_ = _participant_id_list;
			_tmp18_ = gee_abstract_list_get ((GeeAbstractList*) _tmp17_, _participant_id_index);
			participant_id = (gchar*) _tmp18_;
			_tmp19_ = participant_id;
			dino_ui_call_window_controller_remove_participant (self, _tmp19_);
			_g_free0 (participant_id);
		}
	}
	_tmp20_ = g_new0 (gulong, 0);
	self->priv->bottom_bar_handler_ids = (g_free (self->priv->bottom_bar_handler_ids), NULL);
	self->priv->bottom_bar_handler_ids = _tmp20_;
	self->priv->bottom_bar_handler_ids_length1 = 0;
	self->priv->_bottom_bar_handler_ids_size_ = self->priv->bottom_bar_handler_ids_length1;
	_tmp21_ = self->priv->bottom_bar_handler_ids;
	_tmp21__length1 = self->priv->bottom_bar_handler_ids_length1;
	_tmp22_ = (_tmp21_ != NULL) ? _vala_array_dup1 (_tmp21_, _tmp21__length1) : _tmp21_;
	_tmp22__length1 = _tmp21__length1;
	self->priv->call_window_handler_ids = (g_free (self->priv->call_window_handler_ids), NULL);
	self->priv->call_window_handler_ids = _tmp22_;
	self->priv->call_window_handler_ids_length1 = _tmp22__length1;
	self->priv->_call_window_handler_ids_size_ = self->priv->call_window_handler_ids_length1;
	_tmp23_ = self->priv->own_video;
	if (_tmp23_ != NULL) {
		DinoUiCallWindow* _tmp24_;
		DinoUiCallBottomBar* _tmp25_;
		gboolean _tmp26_;
		gboolean _tmp27_;
		_tmp24_ = self->priv->call_window;
		_tmp25_ = _tmp24_->bottom_bar;
		_tmp26_ = dino_ui_call_bottom_bar_get_video_enabled (_tmp25_);
		_tmp27_ = _tmp26_;
		if (_tmp27_) {
			DinoPluginsVideoCallWidget* _tmp28_;
			DinoUiCallWindow* _tmp29_;
			_tmp28_ = self->priv->own_video;
			dino_plugins_video_call_widget_detach (_tmp28_);
			_tmp29_ = self->priv->call_window;
			dino_ui_call_window_unset_own_video (_tmp29_);
		}
		_g_object_unref0 (self->priv->own_video);
		self->priv->own_video = NULL;
	}
	G_OBJECT_CLASS (dino_ui_call_window_controller_parent_class)->dispose (G_TYPE_CHECK_INSTANCE_CAST (self, G_TYPE_OBJECT, GObject));
	_g_object_unref0 (participant_ids);
}

static void
dino_ui_call_window_controller_class_init (DinoUiCallWindowControllerClass * klass,
                                           gpointer klass_data)
{
	dino_ui_call_window_controller_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiCallWindowController_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) dino_ui_call_window_controller_real_dispose;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_call_window_controller_finalize;
}

static void
dino_ui_call_window_controller_instance_init (DinoUiCallWindowController * self,
                                              gpointer klass)
{
	DinoApplication* _tmp0_;
	DinoPluginsRegistry* _tmp1_;
	DinoPluginsRegistry* _tmp2_;
	DinoPluginsVideoCallPlugin* _tmp3_;
	DinoPluginsVideoCallPlugin* _tmp4_;
	GeeHashMap* _tmp5_;
	GeeHashMap* _tmp6_;
	GeeHashMap* _tmp7_;
	GeeHashMap* _tmp8_;
	gulong* _tmp9_;
	gulong* _tmp10_;
	self->priv = dino_ui_call_window_controller_get_instance_private (self);
	_tmp0_ = dino_application_get_default ();
	_tmp1_ = dino_application_get_plugin_registry (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->video_call_plugin;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	self->priv->call_plugin = _tmp4_;
	self->priv->own_video = NULL;
	_tmp5_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, DINO_PLUGINS_TYPE_VIDEO_CALL_WIDGET, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->participant_videos = _tmp5_;
	_tmp6_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, DINO_UI_TYPE_PARTICIPANT_WIDGET, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->participant_widgets = _tmp6_;
	_tmp7_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, DINO_TYPE_PEER_STATE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->peer_states = _tmp7_;
	_tmp8_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_ULONG, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->invite_handler_ids = _tmp8_;
	self->priv->window_height = -1;
	self->priv->window_width = -1;
	self->priv->window_size_changed = FALSE;
	_tmp9_ = g_new0 (gulong, 0);
	self->priv->call_window_handler_ids = _tmp9_;
	self->priv->call_window_handler_ids_length1 = 0;
	self->priv->_call_window_handler_ids_size_ = self->priv->call_window_handler_ids_length1;
	_tmp10_ = g_new0 (gulong, 0);
	self->priv->bottom_bar_handler_ids = _tmp10_;
	self->priv->bottom_bar_handler_ids_length1 = 0;
	self->priv->_bottom_bar_handler_ids_size_ = self->priv->bottom_bar_handler_ids_length1;
}

static void
dino_ui_call_window_controller_finalize (GObject * obj)
{
	DinoUiCallWindowController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_CALL_WINDOW_CONTROLLER, DinoUiCallWindowController);
	_g_object_unref0 (self->priv->call_window);
	_g_object_unref0 (self->priv->call);
	_g_object_unref0 (self->priv->call_state);
	_g_object_unref0 (self->priv->stream_interactor);
	_g_object_unref0 (self->priv->calls);
	_g_object_unref0 (self->priv->call_plugin);
	_g_object_unref0 (self->priv->own_video);
	_g_object_unref0 (self->priv->participant_videos);
	_g_object_unref0 (self->priv->participant_widgets);
	_g_object_unref0 (self->priv->peer_states);
	_g_object_unref0 (self->priv->invite_handler_ids);
	self->priv->call_window_handler_ids = (g_free (self->priv->call_window_handler_ids), NULL);
	self->priv->bottom_bar_handler_ids = (g_free (self->priv->bottom_bar_handler_ids), NULL);
	G_OBJECT_CLASS (dino_ui_call_window_controller_parent_class)->finalize (obj);
}

static GType
dino_ui_call_window_controller_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiCallWindowControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_call_window_controller_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiCallWindowController), 0, (GInstanceInitFunc) dino_ui_call_window_controller_instance_init, NULL };
	GType dino_ui_call_window_controller_type_id;
	dino_ui_call_window_controller_type_id = g_type_register_static (G_TYPE_OBJECT, "DinoUiCallWindowController", &g_define_type_info, 0);
	DinoUiCallWindowController_private_offset = g_type_add_instance_private (dino_ui_call_window_controller_type_id, sizeof (DinoUiCallWindowControllerPrivate));
	return dino_ui_call_window_controller_type_id;
}

GType
dino_ui_call_window_controller_get_type (void)
{
	static volatile gsize dino_ui_call_window_controller_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_call_window_controller_type_id__once)) {
		GType dino_ui_call_window_controller_type_id;
		dino_ui_call_window_controller_type_id = dino_ui_call_window_controller_get_type_once ();
		g_once_init_leave (&dino_ui_call_window_controller_type_id__once, dino_ui_call_window_controller_type_id);
	}
	return dino_ui_call_window_controller_type_id__once;
}

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

