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

#include <glib-object.h>
#include "libdino.h"
#include <gtk/gtk.h>
#include <glib.h>
#include "xmpp-vala.h"
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include "dino_i18n.h"
#include <adwaita.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_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION (dino_ui_conversation_summary_subscription_notitication_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_SUBSCRIPTION_NOTITICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION, DinoUiConversationSummarySubscriptionNotitication))
#define DINO_UI_CONVERSATION_SUMMARY_SUBSCRIPTION_NOTITICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION, DinoUiConversationSummarySubscriptionNotiticationClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_SUBSCRIPTION_NOTITICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION))
#define DINO_UI_CONVERSATION_SUMMARY_IS_SUBSCRIPTION_NOTITICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION))
#define DINO_UI_CONVERSATION_SUMMARY_SUBSCRIPTION_NOTITICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION, DinoUiConversationSummarySubscriptionNotiticationClass))

typedef struct _DinoUiConversationSummarySubscriptionNotitication DinoUiConversationSummarySubscriptionNotitication;
typedef struct _DinoUiConversationSummarySubscriptionNotiticationClass DinoUiConversationSummarySubscriptionNotiticationClass;
typedef struct _DinoUiConversationSummarySubscriptionNotiticationPrivate DinoUiConversationSummarySubscriptionNotiticationPrivate;

#define DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW (dino_ui_conversation_summary_conversation_view_get_type ())
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationView))
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationViewClass))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW))
#define DINO_UI_CONVERSATION_SUMMARY_IS_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW))
#define DINO_UI_CONVERSATION_SUMMARY_CONVERSATION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CONVERSATION_SUMMARY_TYPE_CONVERSATION_VIEW, DinoUiConversationSummaryConversationViewClass))

typedef struct _DinoUiConversationSummaryConversationView DinoUiConversationSummaryConversationView;
typedef struct _DinoUiConversationSummaryConversationViewClass DinoUiConversationSummaryConversationViewClass;
enum  {
	DINO_UI_CONVERSATION_SUMMARY_SUBSCRIPTION_NOTITICATION_0_PROPERTY,
	DINO_UI_CONVERSATION_SUMMARY_SUBSCRIPTION_NOTITICATION_NUM_PROPERTIES
};
static GParamSpec* dino_ui_conversation_summary_subscription_notitication_properties[DINO_UI_CONVERSATION_SUMMARY_SUBSCRIPTION_NOTITICATION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block41Data Block41Data;
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
#define _xmpp_roster_item_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_roster_item_unref (var), NULL)))
typedef struct _Block42Data Block42Data;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_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 _DinoUiApplicationPrivate DinoUiApplicationPrivate;

#define DINO_UI_TYPE_MAIN_WINDOW (dino_ui_main_window_get_type ())
#define DINO_UI_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_MAIN_WINDOW, DinoUiMainWindow))
#define DINO_UI_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_MAIN_WINDOW, DinoUiMainWindowClass))
#define DINO_UI_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_MAIN_WINDOW))
#define DINO_UI_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_MAIN_WINDOW))
#define DINO_UI_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_MAIN_WINDOW, DinoUiMainWindowClass))

typedef struct _DinoUiMainWindow DinoUiMainWindow;
typedef struct _DinoUiMainWindowClass DinoUiMainWindowClass;

#define DINO_UI_TYPE_MAIN_WINDOW_CONTROLLER (dino_ui_main_window_controller_get_type ())
#define DINO_UI_MAIN_WINDOW_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_MAIN_WINDOW_CONTROLLER, DinoUiMainWindowController))
#define DINO_UI_MAIN_WINDOW_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_MAIN_WINDOW_CONTROLLER, DinoUiMainWindowControllerClass))
#define DINO_UI_IS_MAIN_WINDOW_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_MAIN_WINDOW_CONTROLLER))
#define DINO_UI_IS_MAIN_WINDOW_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_MAIN_WINDOW_CONTROLLER))
#define DINO_UI_MAIN_WINDOW_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_MAIN_WINDOW_CONTROLLER, DinoUiMainWindowControllerClass))

typedef struct _DinoUiMainWindowController DinoUiMainWindowController;
typedef struct _DinoUiMainWindowControllerClass DinoUiMainWindowControllerClass;
typedef struct _DinoUiMainWindowPrivate DinoUiMainWindowPrivate;

#define DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER (dino_ui_main_window_placeholder_get_type ())
#define DINO_UI_MAIN_WINDOW_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER, DinoUiMainWindowPlaceholder))
#define DINO_UI_MAIN_WINDOW_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER, DinoUiMainWindowPlaceholderClass))
#define DINO_UI_IS_MAIN_WINDOW_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER))
#define DINO_UI_IS_MAIN_WINDOW_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER))
#define DINO_UI_MAIN_WINDOW_PLACEHOLDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER, DinoUiMainWindowPlaceholderClass))

typedef struct _DinoUiMainWindowPlaceholder DinoUiMainWindowPlaceholder;
typedef struct _DinoUiMainWindowPlaceholderClass DinoUiMainWindowPlaceholderClass;

#define DINO_UI_TYPE_WELCOME_PLACEHOLDER (dino_ui_welcome_placeholder_get_type ())
#define DINO_UI_WELCOME_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_WELCOME_PLACEHOLDER, DinoUiWelcomePlaceholder))
#define DINO_UI_WELCOME_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_WELCOME_PLACEHOLDER, DinoUiWelcomePlaceholderClass))
#define DINO_UI_IS_WELCOME_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_WELCOME_PLACEHOLDER))
#define DINO_UI_IS_WELCOME_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_WELCOME_PLACEHOLDER))
#define DINO_UI_WELCOME_PLACEHOLDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_WELCOME_PLACEHOLDER, DinoUiWelcomePlaceholderClass))

typedef struct _DinoUiWelcomePlaceholder DinoUiWelcomePlaceholder;
typedef struct _DinoUiWelcomePlaceholderClass DinoUiWelcomePlaceholderClass;

#define DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER (dino_ui_no_accounts_placeholder_get_type ())
#define DINO_UI_NO_ACCOUNTS_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER, DinoUiNoAccountsPlaceholder))
#define DINO_UI_NO_ACCOUNTS_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER, DinoUiNoAccountsPlaceholderClass))
#define DINO_UI_IS_NO_ACCOUNTS_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER))
#define DINO_UI_IS_NO_ACCOUNTS_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER))
#define DINO_UI_NO_ACCOUNTS_PLACEHOLDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER, DinoUiNoAccountsPlaceholderClass))

typedef struct _DinoUiNoAccountsPlaceholder DinoUiNoAccountsPlaceholder;
typedef struct _DinoUiNoAccountsPlaceholderClass DinoUiNoAccountsPlaceholderClass;

#define DINO_UI_TYPE_CONVERSATION_VIEW (dino_ui_conversation_view_get_type ())
#define DINO_UI_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONVERSATION_VIEW, DinoUiConversationView))
#define DINO_UI_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONVERSATION_VIEW, DinoUiConversationViewClass))
#define DINO_UI_IS_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONVERSATION_VIEW))
#define DINO_UI_IS_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONVERSATION_VIEW))
#define DINO_UI_CONVERSATION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONVERSATION_VIEW, DinoUiConversationViewClass))

typedef struct _DinoUiConversationView DinoUiConversationView;
typedef struct _DinoUiConversationViewClass DinoUiConversationViewClass;

#define DINO_UI_TYPE_CONVERSATION_SELECTOR (dino_ui_conversation_selector_get_type ())
#define DINO_UI_CONVERSATION_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONVERSATION_SELECTOR, DinoUiConversationSelector))
#define DINO_UI_CONVERSATION_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONVERSATION_SELECTOR, DinoUiConversationSelectorClass))
#define DINO_UI_IS_CONVERSATION_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONVERSATION_SELECTOR))
#define DINO_UI_IS_CONVERSATION_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONVERSATION_SELECTOR))
#define DINO_UI_CONVERSATION_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONVERSATION_SELECTOR, DinoUiConversationSelectorClass))

typedef struct _DinoUiConversationSelector DinoUiConversationSelector;
typedef struct _DinoUiConversationSelectorClass DinoUiConversationSelectorClass;

#define DINO_UI_TYPE_CONVERSATION_TITLEBAR (dino_ui_conversation_titlebar_get_type ())
#define DINO_UI_CONVERSATION_TITLEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONVERSATION_TITLEBAR, DinoUiConversationTitlebar))
#define DINO_UI_CONVERSATION_TITLEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONVERSATION_TITLEBAR, DinoUiConversationTitlebarClass))
#define DINO_UI_IS_CONVERSATION_TITLEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONVERSATION_TITLEBAR))
#define DINO_UI_IS_CONVERSATION_TITLEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONVERSATION_TITLEBAR))
#define DINO_UI_CONVERSATION_TITLEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONVERSATION_TITLEBAR, DinoUiConversationTitlebarClass))

typedef struct _DinoUiConversationTitlebar DinoUiConversationTitlebar;
typedef struct _DinoUiConversationTitlebarClass DinoUiConversationTitlebarClass;

#define DINO_UI_TYPE_GLOBAL_SEARCH (dino_ui_global_search_get_type ())
#define DINO_UI_GLOBAL_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_GLOBAL_SEARCH, DinoUiGlobalSearch))
#define DINO_UI_GLOBAL_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_GLOBAL_SEARCH, DinoUiGlobalSearchClass))
#define DINO_UI_IS_GLOBAL_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_GLOBAL_SEARCH))
#define DINO_UI_IS_GLOBAL_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_GLOBAL_SEARCH))
#define DINO_UI_GLOBAL_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_GLOBAL_SEARCH, DinoUiGlobalSearchClass))

typedef struct _DinoUiGlobalSearch DinoUiGlobalSearch;
typedef struct _DinoUiGlobalSearchClass DinoUiGlobalSearchClass;
typedef struct _DinoUiConversationViewPrivate DinoUiConversationViewPrivate;

#define DINO_UI_CHAT_INPUT_TYPE_VIEW (dino_ui_chat_input_view_get_type ())
#define DINO_UI_CHAT_INPUT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_CHAT_INPUT_TYPE_VIEW, DinoUiChatInputView))
#define DINO_UI_CHAT_INPUT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_CHAT_INPUT_TYPE_VIEW, DinoUiChatInputViewClass))
#define DINO_UI_CHAT_INPUT_IS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_CHAT_INPUT_TYPE_VIEW))
#define DINO_UI_CHAT_INPUT_IS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_CHAT_INPUT_TYPE_VIEW))
#define DINO_UI_CHAT_INPUT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_CHAT_INPUT_TYPE_VIEW, DinoUiChatInputViewClass))

typedef struct _DinoUiChatInputView DinoUiChatInputView;
typedef struct _DinoUiChatInputViewClass DinoUiChatInputViewClass;
typedef struct _DinoUiChatInputViewPrivate DinoUiChatInputViewPrivate;

#define DINO_UI_TYPE_CHAT_TEXT_VIEW (dino_ui_chat_text_view_get_type ())
#define DINO_UI_CHAT_TEXT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CHAT_TEXT_VIEW, DinoUiChatTextView))
#define DINO_UI_CHAT_TEXT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CHAT_TEXT_VIEW, DinoUiChatTextViewClass))
#define DINO_UI_IS_CHAT_TEXT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CHAT_TEXT_VIEW))
#define DINO_UI_IS_CHAT_TEXT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CHAT_TEXT_VIEW))
#define DINO_UI_CHAT_TEXT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CHAT_TEXT_VIEW, DinoUiChatTextViewClass))

typedef struct _DinoUiChatTextView DinoUiChatTextView;
typedef struct _DinoUiChatTextViewClass DinoUiChatTextViewClass;

#define DINO_UI_TYPE_ENCRYPTION_BUTTON (dino_ui_encryption_button_get_type ())
#define DINO_UI_ENCRYPTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_ENCRYPTION_BUTTON, DinoUiEncryptionButton))
#define DINO_UI_ENCRYPTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_ENCRYPTION_BUTTON, DinoUiEncryptionButtonClass))
#define DINO_UI_IS_ENCRYPTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_ENCRYPTION_BUTTON))
#define DINO_UI_IS_ENCRYPTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_ENCRYPTION_BUTTON))
#define DINO_UI_ENCRYPTION_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_ENCRYPTION_BUTTON, DinoUiEncryptionButtonClass))

typedef struct _DinoUiEncryptionButton DinoUiEncryptionButton;
typedef struct _DinoUiEncryptionButtonClass DinoUiEncryptionButtonClass;
typedef struct _DinoUiChatTextViewPrivate DinoUiChatTextViewPrivate;
typedef struct _Block43Data Block43Data;

struct _DinoUiConversationSummarySubscriptionNotitication {
	GObject parent_instance;
	DinoUiConversationSummarySubscriptionNotiticationPrivate * priv;
};

struct _DinoUiConversationSummarySubscriptionNotiticationClass {
	GObjectClass parent_class;
};

struct _DinoUiConversationSummarySubscriptionNotiticationPrivate {
	DinoStreamInteractor* stream_interactor;
	DinoEntitiesConversation* conversation;
	DinoUiConversationSummaryConversationView* conversation_view;
};

struct _Block41Data {
	int _ref_count_;
	DinoUiConversationSummarySubscriptionNotitication* self;
	DinoStreamInteractor* stream_interactor;
};

struct _Block42Data {
	int _ref_count_;
	DinoUiConversationSummarySubscriptionNotitication* self;
	GtkBox* box;
	GApplication* app;
	gboolean already_in_roster;
};

struct _DinoUiApplication {
	AdwApplication parent_instance;
	DinoUiApplicationPrivate * priv;
	DinoUiMainWindow* window;
	DinoUiMainWindowController* controller;
};

struct _DinoUiApplicationClass {
	AdwApplicationClass parent_class;
};

struct _DinoUiMainWindow {
	AdwApplicationWindow parent_instance;
	DinoUiMainWindowPrivate * priv;
	DinoUiWelcomePlaceholder* welcome_placeholder;
	DinoUiNoAccountsPlaceholder* accounts_placeholder;
	DinoUiConversationView* conversation_view;
	DinoUiConversationSelector* conversation_selector;
	DinoUiConversationTitlebar* conversation_titlebar;
	GtkWidget* conversation_list_titlebar;
	GtkBox* box;
	GtkBox* left_box;
	GtkBox* right_box;
	AdwFlap* search_flap;
	DinoUiGlobalSearch* global_search;
};

struct _DinoUiMainWindowClass {
	AdwApplicationWindowClass parent_class;
};

struct _DinoUiConversationView {
	GtkWidget parent_instance;
	DinoUiConversationViewPrivate * priv;
	GtkOverlay* overlay;
	GtkRevealer* goto_end_revealer;
	GtkButton* goto_end_button;
	DinoUiChatInputView* chat_input;
	DinoUiConversationSummaryConversationView* conversation_frame;
	GtkRevealer* white_revealer;
	GtkRevealer* content_revealer;
	GtkListView* list_view;
	gboolean at_current_content;
};

struct _DinoUiConversationViewClass {
	GtkWidgetClass parent_class;
};

struct _DinoUiChatInputView {
	GtkBox parent_instance;
	DinoUiChatInputViewPrivate * priv;
	GtkFrame* frame;
	GtkBox* quote_box;
	DinoUiChatTextView* chat_text_view;
	GtkButton* file_button;
	GtkMenuButton* emoji_button;
	GtkMenuButton* encryption_button;
	GtkSeparator* file_separator;
	GtkLabel* chat_input_status;
	DinoUiEncryptionButton* encryption_widget;
};

struct _DinoUiChatInputViewClass {
	GtkBoxClass parent_class;
};

struct _DinoUiChatTextView {
	GtkBox parent_instance;
	DinoUiChatTextViewPrivate * priv;
	GtkScrolledWindow* scrolled_window;
	GtkTextView* text_view;
};

struct _DinoUiChatTextViewClass {
	GtkBoxClass parent_class;
};

struct _Block43Data {
	int _ref_count_;
	DinoUiConversationSummarySubscriptionNotitication* self;
	GtkBox* box;
	GApplication* app;
};

static gint DinoUiConversationSummarySubscriptionNotitication_private_offset;
static gpointer dino_ui_conversation_summary_subscription_notitication_parent_class = NULL;

VALA_EXTERN GType dino_ui_conversation_summary_subscription_notitication_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummarySubscriptionNotitication, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_summary_conversation_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSummaryConversationView, g_object_unref)
VALA_EXTERN DinoUiConversationSummarySubscriptionNotitication* dino_ui_conversation_summary_subscription_notitication_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiConversationSummarySubscriptionNotitication* dino_ui_conversation_summary_subscription_notitication_construct (GType object_type,
                                                                                                                     DinoStreamInteractor* stream_interactor);
static Block41Data* block41_data_ref (Block41Data* _data41_);
static void block41_data_unref (void * _userdata_);
static void __lambda114_ (Block41Data* _data41_,
                   XmppJid* jid,
                   DinoEntitiesAccount* account);
static void dino_ui_conversation_summary_subscription_notitication_show_pending_subscription_request (DinoUiConversationSummarySubscriptionNotitication* self);
static void ___lambda114__dino_presence_manager_received_subscription_request (DinoPresenceManager* _sender,
                                                                        XmppJid* jid,
                                                                        DinoEntitiesAccount* account,
                                                                        gpointer self);
VALA_EXTERN void dino_ui_conversation_summary_subscription_notitication_init (DinoUiConversationSummarySubscriptionNotitication* self,
                                                                  DinoEntitiesConversation* conversation,
                                                                  DinoUiConversationSummaryConversationView* conversation_view);
static void dino_ui_conversation_summary_subscription_notitication_show_no_subscription (DinoUiConversationSummarySubscriptionNotitication* self,
                                                                                  gboolean already_in_roster);
static Block42Data* block42_data_ref (Block42Data* _data42_);
static void block42_data_unref (void * _userdata_);
static void __lambda118_ (Block42Data* _data42_);
static GVariant* _variant_new1 (gint value);
VALA_EXTERN GType dino_ui_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiApplication, g_object_unref)
VALA_EXTERN GType dino_ui_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiMainWindow, g_object_unref)
VALA_EXTERN GType dino_ui_main_window_controller_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiMainWindowController, g_object_unref)
VALA_EXTERN GType dino_ui_main_window_placeholder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiMainWindowPlaceholder, g_object_unref)
VALA_EXTERN GType dino_ui_welcome_placeholder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiWelcomePlaceholder, g_object_unref)
VALA_EXTERN GType dino_ui_no_accounts_placeholder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiNoAccountsPlaceholder, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationView, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_selector_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSelector, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_titlebar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationTitlebar, g_object_unref)
VALA_EXTERN gpointer dino_ui_global_search_ref (gpointer instance);
VALA_EXTERN void dino_ui_global_search_unref (gpointer instance);
VALA_EXTERN GParamSpec* dino_ui_param_spec_global_search (const gchar* name,
                                              const gchar* nick,
                                              const gchar* blurb,
                                              GType object_type,
                                              GParamFlags flags);
VALA_EXTERN void dino_ui_value_set_global_search (GValue* value,
                                      gpointer v_object);
VALA_EXTERN void dino_ui_value_take_global_search (GValue* value,
                                       gpointer v_object);
VALA_EXTERN gpointer dino_ui_value_get_global_search (const GValue* value);
VALA_EXTERN GType dino_ui_global_search_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiGlobalSearch, dino_ui_global_search_unref)
VALA_EXTERN GType dino_ui_chat_input_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiChatInputView, g_object_unref)
VALA_EXTERN GType dino_ui_chat_text_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiChatTextView, g_object_unref)
VALA_EXTERN gpointer dino_ui_encryption_button_ref (gpointer instance);
VALA_EXTERN void dino_ui_encryption_button_unref (gpointer instance);
VALA_EXTERN GParamSpec* dino_ui_param_spec_encryption_button (const gchar* name,
                                                  const gchar* nick,
                                                  const gchar* blurb,
                                                  GType object_type,
                                                  GParamFlags flags);
VALA_EXTERN void dino_ui_value_set_encryption_button (GValue* value,
                                          gpointer v_object);
VALA_EXTERN void dino_ui_value_take_encryption_button (GValue* value,
                                           gpointer v_object);
VALA_EXTERN gpointer dino_ui_value_get_encryption_button (const GValue* value);
VALA_EXTERN GType dino_ui_encryption_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiEncryptionButton, dino_ui_encryption_button_unref)
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_remove_notification (DinoUiConversationSummaryConversationView* self,
                                                                         GtkWidget* widget);
static void ___lambda118__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
VALA_EXTERN void dino_ui_conversation_summary_conversation_view_add_notification (DinoUiConversationSummaryConversationView* self,
                                                                      GtkWidget* widget);
static Block43Data* block43_data_ref (Block43Data* _data43_);
static void block43_data_unref (void * _userdata_);
static void __lambda115_ (Block43Data* _data43_);
static GVariant* _variant_new2 (gint value);
static void ___lambda115__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void __lambda116_ (Block43Data* _data43_);
static GVariant* _variant_new3 (gint value);
static void ___lambda116__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void dino_ui_conversation_summary_subscription_notitication_finalize (GObject * obj);
static GType dino_ui_conversation_summary_subscription_notitication_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_conversation_summary_subscription_notitication_get_instance_private (DinoUiConversationSummarySubscriptionNotitication* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiConversationSummarySubscriptionNotitication_private_offset);
}

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

static Block41Data*
block41_data_ref (Block41Data* _data41_)
{
	g_atomic_int_inc (&_data41_->_ref_count_);
	return _data41_;
}

static void
block41_data_unref (void * _userdata_)
{
	Block41Data* _data41_;
	_data41_ = (Block41Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data41_->_ref_count_)) {
		DinoUiConversationSummarySubscriptionNotitication* self;
		self = _data41_->self;
		_g_object_unref0 (_data41_->stream_interactor);
		_g_object_unref0 (self);
		g_slice_free (Block41Data, _data41_);
	}
}

static void
__lambda114_ (Block41Data* _data41_,
              XmppJid* jid,
              DinoEntitiesAccount* account)
{
	DinoUiConversationSummarySubscriptionNotitication* self;
	DinoEntitiesConversation* relevant_conversation = NULL;
	DinoModuleIdentity* _tmp0_;
	gpointer _tmp1_;
	DinoConversationManager* _tmp2_;
	DinoEntitiesConversationType _tmp3_;
	DinoEntitiesConversation* _tmp4_;
	DinoEntitiesConversation* _tmp5_;
	DinoModuleIdentity* _tmp6_;
	gpointer _tmp7_;
	DinoConversationManager* _tmp8_;
	DinoEntitiesConversation* _tmp9_;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	DinoEntitiesConversation* _tmp12_;
	self = _data41_->self;
	g_return_if_fail (jid != NULL);
	g_return_if_fail (account != NULL);
	_tmp0_ = dino_conversation_manager_IDENTITY;
	_tmp1_ = dino_stream_interactor_get_module (_data41_->stream_interactor, DINO_TYPE_CONVERSATION_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp0_);
	_tmp2_ = (DinoConversationManager*) _tmp1_;
	_tmp3_ = DINO_ENTITIES_CONVERSATION_TYPE_CHAT;
	_tmp4_ = dino_conversation_manager_create_conversation (_tmp2_, jid, account, &_tmp3_);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp2_);
	relevant_conversation = _tmp5_;
	_tmp6_ = dino_conversation_manager_IDENTITY;
	_tmp7_ = dino_stream_interactor_get_module (_data41_->stream_interactor, DINO_TYPE_CONVERSATION_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp6_);
	_tmp8_ = (DinoConversationManager*) _tmp7_;
	_tmp9_ = relevant_conversation;
	dino_conversation_manager_start_conversation (_tmp8_, _tmp9_);
	_g_object_unref0 (_tmp8_);
	_tmp12_ = self->priv->conversation;
	if (_tmp12_ != NULL) {
		DinoEntitiesConversation* _tmp13_;
		DinoEntitiesAccount* _tmp14_;
		DinoEntitiesAccount* _tmp15_;
		_tmp13_ = self->priv->conversation;
		_tmp14_ = dino_entities_conversation_get_account (_tmp13_);
		_tmp15_ = _tmp14_;
		_tmp11_ = dino_entities_account_equals (account, _tmp15_);
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		DinoEntitiesConversation* _tmp16_;
		XmppJid* _tmp17_;
		XmppJid* _tmp18_;
		_tmp16_ = self->priv->conversation;
		_tmp17_ = dino_entities_conversation_get_counterpart (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp10_ = xmpp_jid_equals (jid, _tmp18_);
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		dino_ui_conversation_summary_subscription_notitication_show_pending_subscription_request (self);
	}
	_g_object_unref0 (relevant_conversation);
}

static void
___lambda114__dino_presence_manager_received_subscription_request (DinoPresenceManager* _sender,
                                                                   XmppJid* jid,
                                                                   DinoEntitiesAccount* account,
                                                                   gpointer self)
{
	__lambda114_ (self, jid, account);
}

DinoUiConversationSummarySubscriptionNotitication*
dino_ui_conversation_summary_subscription_notitication_construct (GType object_type,
                                                                  DinoStreamInteractor* stream_interactor)
{
	DinoUiConversationSummarySubscriptionNotitication * self = NULL;
	Block41Data* _data41_;
	DinoStreamInteractor* _tmp0_;
	DinoStreamInteractor* _tmp1_;
	DinoModuleIdentity* _tmp2_;
	gpointer _tmp3_;
	DinoPresenceManager* _tmp4_;
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	_data41_ = g_slice_new0 (Block41Data);
	_data41_->_ref_count_ = 1;
	_tmp0_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (_data41_->stream_interactor);
	_data41_->stream_interactor = _tmp0_;
	self = (DinoUiConversationSummarySubscriptionNotitication*) g_object_new (object_type, NULL);
	_data41_->self = g_object_ref (self);
	_tmp1_ = _g_object_ref0 (_data41_->stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp1_;
	_tmp2_ = dino_presence_manager_IDENTITY;
	_tmp3_ = dino_stream_interactor_get_module (_data41_->stream_interactor, DINO_TYPE_PRESENCE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp2_);
	_tmp4_ = (DinoPresenceManager*) _tmp3_;
	g_signal_connect_data (_tmp4_, "received-subscription-request", (GCallback) ___lambda114__dino_presence_manager_received_subscription_request, block41_data_ref (_data41_), (GClosureNotify) block41_data_unref, 0);
	_g_object_unref0 (_tmp4_);
	block41_data_unref (_data41_);
	_data41_ = NULL;
	return self;
}

DinoUiConversationSummarySubscriptionNotitication*
dino_ui_conversation_summary_subscription_notitication_new (DinoStreamInteractor* stream_interactor)
{
	return dino_ui_conversation_summary_subscription_notitication_construct (DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION, stream_interactor);
}

void
dino_ui_conversation_summary_subscription_notitication_init (DinoUiConversationSummarySubscriptionNotitication* self,
                                                             DinoEntitiesConversation* conversation,
                                                             DinoUiConversationSummaryConversationView* conversation_view)
{
	DinoEntitiesConversation* _tmp0_;
	DinoUiConversationSummaryConversationView* _tmp1_;
	DinoEntitiesConversationType _tmp2_;
	DinoEntitiesConversationType _tmp3_;
	DinoStreamInteractor* _tmp4_;
	DinoModuleIdentity* _tmp5_;
	gpointer _tmp6_;
	DinoPresenceManager* _tmp7_;
	DinoEntitiesAccount* _tmp8_;
	DinoEntitiesAccount* _tmp9_;
	XmppJid* _tmp10_;
	XmppJid* _tmp11_;
	gboolean _tmp12_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (conversation != NULL);
	g_return_if_fail (conversation_view != NULL);
	_tmp0_ = _g_object_ref0 (conversation);
	_g_object_unref0 (self->priv->conversation);
	self->priv->conversation = _tmp0_;
	_tmp1_ = _g_object_ref0 (conversation_view);
	_g_object_unref0 (self->priv->conversation_view);
	self->priv->conversation_view = _tmp1_;
	_tmp2_ = dino_entities_conversation_get_type_ (conversation);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != DINO_ENTITIES_CONVERSATION_TYPE_CHAT) {
		return;
	}
	_tmp4_ = self->priv->stream_interactor;
	_tmp5_ = dino_presence_manager_IDENTITY;
	_tmp6_ = dino_stream_interactor_get_module (_tmp4_, DINO_TYPE_PRESENCE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp5_);
	_tmp7_ = (DinoPresenceManager*) _tmp6_;
	_tmp8_ = dino_entities_conversation_get_account (conversation);
	_tmp9_ = _tmp8_;
	_tmp10_ = dino_entities_conversation_get_counterpart (conversation);
	_tmp11_ = _tmp10_;
	_tmp12_ = dino_presence_manager_exists_subscription_request (_tmp7_, _tmp9_, _tmp11_);
	_g_object_unref0 (_tmp7_);
	if (_tmp12_) {
		dino_ui_conversation_summary_subscription_notitication_show_pending_subscription_request (self);
	} else {
		XmppJid* _tmp13_;
		XmppJid* _tmp14_;
		DinoEntitiesAccount* _tmp15_;
		DinoEntitiesAccount* _tmp16_;
		XmppJid* _tmp17_;
		XmppJid* _tmp18_;
		XmppJid* _tmp19_;
		gboolean _tmp20_;
		_tmp13_ = dino_entities_conversation_get_counterpart (conversation);
		_tmp14_ = _tmp13_;
		_tmp15_ = dino_entities_conversation_get_account (conversation);
		_tmp16_ = _tmp15_;
		_tmp17_ = dino_entities_account_get_bare_jid (_tmp16_);
		_tmp18_ = _tmp17_;
		_tmp19_ = _tmp18_;
		_tmp20_ = !xmpp_jid_equals_bare (_tmp14_, _tmp19_);
		_xmpp_jid_unref0 (_tmp19_);
		if (_tmp20_) {
			XmppRosterItem* roster_item = NULL;
			DinoStreamInteractor* _tmp21_;
			DinoModuleIdentity* _tmp22_;
			gpointer _tmp23_;
			DinoRosterManager* _tmp24_;
			DinoEntitiesAccount* _tmp25_;
			DinoEntitiesAccount* _tmp26_;
			XmppJid* _tmp27_;
			XmppJid* _tmp28_;
			XmppRosterItem* _tmp29_;
			XmppRosterItem* _tmp30_;
			gboolean _tmp31_ = FALSE;
			XmppRosterItem* _tmp32_;
			_tmp21_ = self->priv->stream_interactor;
			_tmp22_ = dino_roster_manager_IDENTITY;
			_tmp23_ = dino_stream_interactor_get_module (_tmp21_, DINO_TYPE_ROSTER_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp22_);
			_tmp24_ = (DinoRosterManager*) _tmp23_;
			_tmp25_ = dino_entities_conversation_get_account (conversation);
			_tmp26_ = _tmp25_;
			_tmp27_ = dino_entities_conversation_get_counterpart (conversation);
			_tmp28_ = _tmp27_;
			_tmp29_ = dino_roster_manager_get_roster_item (_tmp24_, _tmp26_, _tmp28_);
			_tmp30_ = _tmp29_;
			_g_object_unref0 (_tmp24_);
			roster_item = _tmp30_;
			_tmp32_ = roster_item;
			if (_tmp32_ == NULL) {
				_tmp31_ = TRUE;
			} else {
				gboolean _tmp33_ = FALSE;
				gboolean _tmp34_ = FALSE;
				XmppRosterItem* _tmp35_;
				const gchar* _tmp36_;
				const gchar* _tmp37_;
				_tmp35_ = roster_item;
				_tmp36_ = xmpp_roster_item_get_subscription (_tmp35_);
				_tmp37_ = _tmp36_;
				if (g_strcmp0 (_tmp37_, XMPP_ROSTER_ITEM_SUBSCRIPTION_NONE) == 0) {
					_tmp34_ = TRUE;
				} else {
					XmppRosterItem* _tmp38_;
					const gchar* _tmp39_;
					const gchar* _tmp40_;
					_tmp38_ = roster_item;
					_tmp39_ = xmpp_roster_item_get_subscription (_tmp38_);
					_tmp40_ = _tmp39_;
					_tmp34_ = g_strcmp0 (_tmp40_, XMPP_ROSTER_ITEM_SUBSCRIPTION_FROM) == 0;
				}
				if (_tmp34_) {
					XmppRosterItem* _tmp41_;
					gboolean _tmp42_;
					gboolean _tmp43_;
					_tmp41_ = roster_item;
					_tmp42_ = xmpp_roster_item_get_subscription_requested (_tmp41_);
					_tmp43_ = _tmp42_;
					_tmp33_ = !_tmp43_;
				} else {
					_tmp33_ = FALSE;
				}
				_tmp31_ = _tmp33_;
			}
			if (_tmp31_) {
				XmppRosterItem* _tmp44_;
				_tmp44_ = roster_item;
				dino_ui_conversation_summary_subscription_notitication_show_no_subscription (self, _tmp44_ != NULL);
			}
			_xmpp_roster_item_unref0 (roster_item);
		}
	}
}

static Block42Data*
block42_data_ref (Block42Data* _data42_)
{
	g_atomic_int_inc (&_data42_->_ref_count_);
	return _data42_;
}

static void
block42_data_unref (void * _userdata_)
{
	Block42Data* _data42_;
	_data42_ = (Block42Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data42_->_ref_count_)) {
		DinoUiConversationSummarySubscriptionNotitication* self;
		self = _data42_->self;
		_g_object_unref0 (_data42_->app);
		_g_object_unref0 (_data42_->box);
		_g_object_unref0 (self);
		g_slice_free (Block42Data, _data42_);
	}
}

static GVariant*
_variant_new1 (gint value)
{
	return g_variant_ref_sink (g_variant_new_int32 (value));
}

static void
__lambda118_ (Block42Data* _data42_)
{
	DinoUiConversationSummarySubscriptionNotitication* self;
	DinoStreamInteractor* _tmp10_;
	DinoModuleIdentity* _tmp11_;
	gpointer _tmp12_;
	DinoPresenceManager* _tmp13_;
	DinoEntitiesConversation* _tmp14_;
	DinoEntitiesAccount* _tmp15_;
	DinoEntitiesAccount* _tmp16_;
	DinoEntitiesConversation* _tmp17_;
	XmppJid* _tmp18_;
	XmppJid* _tmp19_;
	DinoEntitiesConversation* _tmp20_;
	gint _tmp21_;
	gint _tmp22_;
	GVariant* _tmp23_;
	DinoUiMainWindow* _tmp24_;
	DinoUiConversationView* _tmp25_;
	DinoUiChatInputView* _tmp26_;
	DinoUiChatTextView* _tmp27_;
	GtkTextView* _tmp28_;
	DinoUiConversationSummaryConversationView* _tmp29_;
	self = _data42_->self;
	if (!_data42_->already_in_roster) {
		DinoStreamInteractor* _tmp0_;
		DinoModuleIdentity* _tmp1_;
		gpointer _tmp2_;
		DinoRosterManager* _tmp3_;
		DinoEntitiesConversation* _tmp4_;
		DinoEntitiesAccount* _tmp5_;
		DinoEntitiesAccount* _tmp6_;
		DinoEntitiesConversation* _tmp7_;
		XmppJid* _tmp8_;
		XmppJid* _tmp9_;
		_tmp0_ = self->priv->stream_interactor;
		_tmp1_ = dino_roster_manager_IDENTITY;
		_tmp2_ = dino_stream_interactor_get_module (_tmp0_, DINO_TYPE_ROSTER_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp1_);
		_tmp3_ = (DinoRosterManager*) _tmp2_;
		_tmp4_ = self->priv->conversation;
		_tmp5_ = dino_entities_conversation_get_account (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = self->priv->conversation;
		_tmp8_ = dino_entities_conversation_get_counterpart (_tmp7_);
		_tmp9_ = _tmp8_;
		dino_roster_manager_add_jid (_tmp3_, _tmp6_, _tmp9_, NULL);
		_g_object_unref0 (_tmp3_);
	}
	_tmp10_ = self->priv->stream_interactor;
	_tmp11_ = dino_presence_manager_IDENTITY;
	_tmp12_ = dino_stream_interactor_get_module (_tmp10_, DINO_TYPE_PRESENCE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp11_);
	_tmp13_ = (DinoPresenceManager*) _tmp12_;
	_tmp14_ = self->priv->conversation;
	_tmp15_ = dino_entities_conversation_get_account (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = self->priv->conversation;
	_tmp18_ = dino_entities_conversation_get_counterpart (_tmp17_);
	_tmp19_ = _tmp18_;
	dino_presence_manager_request_subscription (_tmp13_, _tmp16_, _tmp19_);
	_g_object_unref0 (_tmp13_);
	_tmp20_ = self->priv->conversation;
	_tmp21_ = dino_entities_conversation_get_id (_tmp20_);
	_tmp22_ = _tmp21_;
	_tmp23_ = _variant_new1 (_tmp22_);
	g_action_group_activate_action ((GActionGroup*) _data42_->app, "accept-subscription", _tmp23_);
	_g_variant_unref0 (_tmp23_);
	_tmp24_ = G_TYPE_CHECK_INSTANCE_CAST (_data42_->app, DINO_UI_TYPE_APPLICATION, DinoUiApplication)->window;
	_tmp25_ = _tmp24_->conversation_view;
	_tmp26_ = _tmp25_->chat_input;
	_tmp27_ = _tmp26_->chat_text_view;
	_tmp28_ = _tmp27_->text_view;
	gtk_widget_grab_focus ((GtkWidget*) _tmp28_);
	_tmp29_ = self->priv->conversation_view;
	dino_ui_conversation_summary_conversation_view_remove_notification (_tmp29_, (GtkWidget*) _data42_->box);
}

static void
___lambda118__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda118_ (self);
}

static void
dino_ui_conversation_summary_subscription_notitication_show_no_subscription (DinoUiConversationSummarySubscriptionNotitication* self,
                                                                             gboolean already_in_roster)
{
	Block42Data* _data42_;
	GtkBox* _tmp0_;
	GtkButton* accept_button = NULL;
	const gchar* _tmp1_;
	GtkButton* _tmp2_;
	GApplication* _tmp3_;
	GApplication* _tmp4_;
	const gchar* _tmp5_;
	GtkLabel* _tmp6_ = NULL;
	GtkLabel* _tmp7_;
	DinoUiConversationSummaryConversationView* _tmp8_;
	g_return_if_fail (self != NULL);
	_data42_ = g_slice_new0 (Block42Data);
	_data42_->_ref_count_ = 1;
	_data42_->self = g_object_ref (self);
	_data42_->already_in_roster = already_in_roster;
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	g_object_ref_sink (_tmp0_);
	_data42_->box = _tmp0_;
	_tmp1_ = dino_gettext ("Send request");
	_tmp2_ = (GtkButton*) gtk_button_new_with_label (_tmp1_);
	g_object_ref_sink (_tmp2_);
	accept_button = _tmp2_;
	_tmp3_ = g_application_get_default ();
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_data42_->app = _tmp4_;
	g_signal_connect_data (accept_button, "clicked", (GCallback) ___lambda118__gtk_button_clicked, block42_data_ref (_data42_), (GClosureNotify) block42_data_unref, 0);
	_tmp5_ = dino_gettext ("You do not receive status updates from this contact yet.");
	_tmp6_ = (GtkLabel*) gtk_label_new (_tmp5_);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp6_, 10);
	g_object_ref_sink (_tmp6_);
	_tmp7_ = _tmp6_;
	gtk_box_append (_data42_->box, (GtkWidget*) _tmp7_);
	_g_object_unref0 (_tmp7_);
	gtk_box_append (_data42_->box, (GtkWidget*) accept_button);
	_tmp8_ = self->priv->conversation_view;
	dino_ui_conversation_summary_conversation_view_add_notification (_tmp8_, (GtkWidget*) _data42_->box);
	_g_object_unref0 (accept_button);
	block42_data_unref (_data42_);
	_data42_ = NULL;
}

static Block43Data*
block43_data_ref (Block43Data* _data43_)
{
	g_atomic_int_inc (&_data43_->_ref_count_);
	return _data43_;
}

static void
block43_data_unref (void * _userdata_)
{
	Block43Data* _data43_;
	_data43_ = (Block43Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data43_->_ref_count_)) {
		DinoUiConversationSummarySubscriptionNotitication* self;
		self = _data43_->self;
		_g_object_unref0 (_data43_->app);
		_g_object_unref0 (_data43_->box);
		_g_object_unref0 (self);
		g_slice_free (Block43Data, _data43_);
	}
}

static GVariant*
_variant_new2 (gint value)
{
	return g_variant_ref_sink (g_variant_new_int32 (value));
}

static void
__lambda115_ (Block43Data* _data43_)
{
	DinoUiConversationSummarySubscriptionNotitication* self;
	DinoEntitiesConversation* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GVariant* _tmp3_;
	DinoUiMainWindow* _tmp4_;
	DinoUiConversationView* _tmp5_;
	DinoUiChatInputView* _tmp6_;
	DinoUiChatTextView* _tmp7_;
	GtkTextView* _tmp8_;
	DinoUiConversationSummaryConversationView* _tmp9_;
	self = _data43_->self;
	_tmp0_ = self->priv->conversation;
	_tmp1_ = dino_entities_conversation_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _variant_new2 (_tmp2_);
	g_action_group_activate_action ((GActionGroup*) _data43_->app, "accept-subscription", _tmp3_);
	_g_variant_unref0 (_tmp3_);
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_data43_->app, DINO_UI_TYPE_APPLICATION, DinoUiApplication)->window;
	_tmp5_ = _tmp4_->conversation_view;
	_tmp6_ = _tmp5_->chat_input;
	_tmp7_ = _tmp6_->chat_text_view;
	_tmp8_ = _tmp7_->text_view;
	gtk_widget_grab_focus ((GtkWidget*) _tmp8_);
	_tmp9_ = self->priv->conversation_view;
	dino_ui_conversation_summary_conversation_view_remove_notification (_tmp9_, (GtkWidget*) _data43_->box);
}

static void
___lambda115__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda115_ (self);
}

static GVariant*
_variant_new3 (gint value)
{
	return g_variant_ref_sink (g_variant_new_int32 (value));
}

static void
__lambda116_ (Block43Data* _data43_)
{
	DinoUiConversationSummarySubscriptionNotitication* self;
	DinoEntitiesConversation* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	GVariant* _tmp3_;
	DinoUiMainWindow* _tmp4_;
	DinoUiConversationView* _tmp5_;
	DinoUiChatInputView* _tmp6_;
	DinoUiChatTextView* _tmp7_;
	GtkTextView* _tmp8_;
	DinoUiConversationSummaryConversationView* _tmp9_;
	self = _data43_->self;
	_tmp0_ = self->priv->conversation;
	_tmp1_ = dino_entities_conversation_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = _variant_new3 (_tmp2_);
	g_action_group_activate_action ((GActionGroup*) _data43_->app, "deny-subscription", _tmp3_);
	_g_variant_unref0 (_tmp3_);
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_data43_->app, DINO_UI_TYPE_APPLICATION, DinoUiApplication)->window;
	_tmp5_ = _tmp4_->conversation_view;
	_tmp6_ = _tmp5_->chat_input;
	_tmp7_ = _tmp6_->chat_text_view;
	_tmp8_ = _tmp7_->text_view;
	gtk_widget_grab_focus ((GtkWidget*) _tmp8_);
	_tmp9_ = self->priv->conversation_view;
	dino_ui_conversation_summary_conversation_view_remove_notification (_tmp9_, (GtkWidget*) _data43_->box);
}

static void
___lambda116__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda116_ (self);
}

static void
dino_ui_conversation_summary_subscription_notitication_show_pending_subscription_request (DinoUiConversationSummarySubscriptionNotitication* self)
{
	Block43Data* _data43_;
	GtkBox* _tmp0_;
	GtkButton* accept_button = NULL;
	const gchar* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* deny_button = NULL;
	const gchar* _tmp3_;
	GtkButton* _tmp4_;
	GApplication* _tmp5_;
	GApplication* _tmp6_;
	const gchar* _tmp7_;
	GtkLabel* _tmp8_ = NULL;
	GtkLabel* _tmp9_;
	DinoUiConversationSummaryConversationView* _tmp10_;
	g_return_if_fail (self != NULL);
	_data43_ = g_slice_new0 (Block43Data);
	_data43_->_ref_count_ = 1;
	_data43_->self = g_object_ref (self);
	_tmp0_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	g_object_ref_sink (_tmp0_);
	_data43_->box = _tmp0_;
	_tmp1_ = dino_gettext ("Accept");
	_tmp2_ = (GtkButton*) gtk_button_new_with_label (_tmp1_);
	g_object_ref_sink (_tmp2_);
	accept_button = _tmp2_;
	_tmp3_ = dino_gettext ("Deny");
	_tmp4_ = (GtkButton*) gtk_button_new_with_label (_tmp3_);
	g_object_ref_sink (_tmp4_);
	deny_button = _tmp4_;
	_tmp5_ = g_application_get_default ();
	_tmp6_ = _g_object_ref0 (_tmp5_);
	_data43_->app = _tmp6_;
	g_signal_connect_data (accept_button, "clicked", (GCallback) ___lambda115__gtk_button_clicked, block43_data_ref (_data43_), (GClosureNotify) block43_data_unref, 0);
	g_signal_connect_data (deny_button, "clicked", (GCallback) ___lambda116__gtk_button_clicked, block43_data_ref (_data43_), (GClosureNotify) block43_data_unref, 0);
	_tmp7_ = dino_gettext ("This contact would like to add you to their contact list");
	_tmp8_ = (GtkLabel*) gtk_label_new (_tmp7_);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp8_, 10);
	g_object_ref_sink (_tmp8_);
	_tmp9_ = _tmp8_;
	gtk_box_append (_data43_->box, (GtkWidget*) _tmp9_);
	_g_object_unref0 (_tmp9_);
	gtk_box_append (_data43_->box, (GtkWidget*) accept_button);
	gtk_box_append (_data43_->box, (GtkWidget*) deny_button);
	_tmp10_ = self->priv->conversation_view;
	dino_ui_conversation_summary_conversation_view_add_notification (_tmp10_, (GtkWidget*) _data43_->box);
	_g_object_unref0 (deny_button);
	_g_object_unref0 (accept_button);
	block43_data_unref (_data43_);
	_data43_ = NULL;
}

static void
dino_ui_conversation_summary_subscription_notitication_class_init (DinoUiConversationSummarySubscriptionNotiticationClass * klass,
                                                                   gpointer klass_data)
{
	dino_ui_conversation_summary_subscription_notitication_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiConversationSummarySubscriptionNotitication_private_offset);
	G_OBJECT_CLASS (klass)->finalize = dino_ui_conversation_summary_subscription_notitication_finalize;
}

static void
dino_ui_conversation_summary_subscription_notitication_instance_init (DinoUiConversationSummarySubscriptionNotitication * self,
                                                                      gpointer klass)
{
	self->priv = dino_ui_conversation_summary_subscription_notitication_get_instance_private (self);
}

static void
dino_ui_conversation_summary_subscription_notitication_finalize (GObject * obj)
{
	DinoUiConversationSummarySubscriptionNotitication * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_CONVERSATION_SUMMARY_TYPE_SUBSCRIPTION_NOTITICATION, DinoUiConversationSummarySubscriptionNotitication);
	_g_object_unref0 (self->priv->stream_interactor);
	_g_object_unref0 (self->priv->conversation);
	_g_object_unref0 (self->priv->conversation_view);
	G_OBJECT_CLASS (dino_ui_conversation_summary_subscription_notitication_parent_class)->finalize (obj);
}

static GType
dino_ui_conversation_summary_subscription_notitication_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiConversationSummarySubscriptionNotiticationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_conversation_summary_subscription_notitication_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiConversationSummarySubscriptionNotitication), 0, (GInstanceInitFunc) dino_ui_conversation_summary_subscription_notitication_instance_init, NULL };
	GType dino_ui_conversation_summary_subscription_notitication_type_id;
	dino_ui_conversation_summary_subscription_notitication_type_id = g_type_register_static (G_TYPE_OBJECT, "DinoUiConversationSummarySubscriptionNotitication", &g_define_type_info, 0);
	DinoUiConversationSummarySubscriptionNotitication_private_offset = g_type_add_instance_private (dino_ui_conversation_summary_subscription_notitication_type_id, sizeof (DinoUiConversationSummarySubscriptionNotiticationPrivate));
	return dino_ui_conversation_summary_subscription_notitication_type_id;
}

GType
dino_ui_conversation_summary_subscription_notitication_get_type (void)
{
	static volatile gsize dino_ui_conversation_summary_subscription_notitication_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_conversation_summary_subscription_notitication_type_id__once)) {
		GType dino_ui_conversation_summary_subscription_notitication_type_id;
		dino_ui_conversation_summary_subscription_notitication_type_id = dino_ui_conversation_summary_subscription_notitication_get_type_once ();
		g_once_init_leave (&dino_ui_conversation_summary_subscription_notitication_type_id__once, dino_ui_conversation_summary_subscription_notitication_type_id);
	}
	return dino_ui_conversation_summary_subscription_notitication_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;
}

