/* BlockedEmails.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from BlockedEmails.vala, do not modify */

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <libsoup/soup.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 TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE (tuba_views_admin_page_base_get_type ())
#define TUBA_VIEWS_ADMIN_PAGE_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE, TubaViewsAdminPageBase))
#define TUBA_VIEWS_ADMIN_PAGE_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE, TubaViewsAdminPageBaseClass))
#define TUBA_VIEWS_ADMIN_PAGE_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE))
#define TUBA_VIEWS_ADMIN_PAGE_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE))
#define TUBA_VIEWS_ADMIN_PAGE_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE, TubaViewsAdminPageBaseClass))

typedef struct _TubaViewsAdminPageBase TubaViewsAdminPageBase;
typedef struct _TubaViewsAdminPageBaseClass TubaViewsAdminPageBaseClass;
typedef struct _TubaViewsAdminPageBasePrivate TubaViewsAdminPageBasePrivate;

#define TUBA_VIEWS_ADMIN_PAGE_TYPE_BLOCKED_EMAILS (tuba_views_admin_page_blocked_emails_get_type ())
#define TUBA_VIEWS_ADMIN_PAGE_BLOCKED_EMAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_BLOCKED_EMAILS, TubaViewsAdminPageBlockedEmails))
#define TUBA_VIEWS_ADMIN_PAGE_BLOCKED_EMAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_ADMIN_PAGE_TYPE_BLOCKED_EMAILS, TubaViewsAdminPageBlockedEmailsClass))
#define TUBA_VIEWS_ADMIN_PAGE_IS_BLOCKED_EMAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_BLOCKED_EMAILS))
#define TUBA_VIEWS_ADMIN_PAGE_IS_BLOCKED_EMAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_ADMIN_PAGE_TYPE_BLOCKED_EMAILS))
#define TUBA_VIEWS_ADMIN_PAGE_BLOCKED_EMAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_ADMIN_PAGE_TYPE_BLOCKED_EMAILS, TubaViewsAdminPageBlockedEmailsClass))

typedef struct _TubaViewsAdminPageBlockedEmails TubaViewsAdminPageBlockedEmails;
typedef struct _TubaViewsAdminPageBlockedEmailsClass TubaViewsAdminPageBlockedEmailsClass;
typedef struct _TubaViewsAdminPageBlockedEmailsPrivate TubaViewsAdminPageBlockedEmailsPrivate;

#define TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE (tuba_views_admin_timeline_pagination_timeline_get_type ())
#define TUBA_VIEWS_ADMIN_TIMELINE_PAGINATION_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, TubaViewsAdminTimelinePaginationTimeline))
#define TUBA_VIEWS_ADMIN_TIMELINE_PAGINATION_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, TubaViewsAdminTimelinePaginationTimelineClass))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_PAGINATION_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_PAGINATION_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE))
#define TUBA_VIEWS_ADMIN_TIMELINE_PAGINATION_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_PAGINATION_TIMELINE, TubaViewsAdminTimelinePaginationTimelineClass))

typedef struct _TubaViewsAdminTimelinePaginationTimeline TubaViewsAdminTimelinePaginationTimeline;
typedef struct _TubaViewsAdminTimelinePaginationTimelineClass TubaViewsAdminTimelinePaginationTimelineClass;

#define TUBA_VIEWS_ADMIN_TIMELINE_TYPE_EMAIL_DOMAIN (tuba_views_admin_timeline_email_domain_get_type ())
#define TUBA_VIEWS_ADMIN_TIMELINE_EMAIL_DOMAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_EMAIL_DOMAIN, TubaViewsAdminTimelineEmailDomain))
#define TUBA_VIEWS_ADMIN_TIMELINE_EMAIL_DOMAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_EMAIL_DOMAIN, TubaViewsAdminTimelineEmailDomainClass))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_EMAIL_DOMAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_EMAIL_DOMAIN))
#define TUBA_VIEWS_ADMIN_TIMELINE_IS_EMAIL_DOMAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_EMAIL_DOMAIN))
#define TUBA_VIEWS_ADMIN_TIMELINE_EMAIL_DOMAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_ADMIN_TIMELINE_TYPE_EMAIL_DOMAIN, TubaViewsAdminTimelineEmailDomainClass))

typedef struct _TubaViewsAdminTimelineEmailDomain TubaViewsAdminTimelineEmailDomain;
typedef struct _TubaViewsAdminTimelineEmailDomainClass TubaViewsAdminTimelineEmailDomainClass;
enum  {
	TUBA_VIEWS_ADMIN_PAGE_BLOCKED_EMAILS_0_PROPERTY,
	TUBA_VIEWS_ADMIN_PAGE_BLOCKED_EMAILS_NUM_PROPERTIES
};
static GParamSpec* tuba_views_admin_page_blocked_emails_properties[TUBA_VIEWS_ADMIN_PAGE_BLOCKED_EMAILS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block109Data Block109Data;
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_DIALOGS_ADMIN_TYPE_WINDOW (tuba_dialogs_admin_window_get_type ())
#define TUBA_DIALOGS_ADMIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_ADMIN_TYPE_WINDOW, TubaDialogsAdminWindow))
#define TUBA_DIALOGS_ADMIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_ADMIN_TYPE_WINDOW, TubaDialogsAdminWindowClass))
#define TUBA_DIALOGS_ADMIN_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_ADMIN_TYPE_WINDOW))
#define TUBA_DIALOGS_ADMIN_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_ADMIN_TYPE_WINDOW))
#define TUBA_DIALOGS_ADMIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_ADMIN_TYPE_WINDOW, TubaDialogsAdminWindowClass))

typedef struct _TubaDialogsAdminWindow TubaDialogsAdminWindow;
typedef struct _TubaDialogsAdminWindowClass TubaDialogsAdminWindowClass;

#define TUBA_TYPE_REQUEST (tuba_request_get_type ())
#define TUBA_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_REQUEST, TubaRequest))
#define TUBA_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_REQUEST, TubaRequestClass))
#define TUBA_IS_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_REQUEST))
#define TUBA_IS_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_REQUEST))
#define TUBA_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_REQUEST, TubaRequestClass))

typedef struct _TubaRequest TubaRequest;
typedef struct _TubaRequestClass TubaRequestClass;

#define TUBA_TYPE_ENTITY (tuba_entity_get_type ())
#define TUBA_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ENTITY, TubaEntity))
#define TUBA_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ENTITY, TubaEntityClass))
#define TUBA_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ENTITY))
#define TUBA_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ENTITY))
#define TUBA_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ENTITY, TubaEntityClass))

typedef struct _TubaEntity TubaEntity;
typedef struct _TubaEntityClass TubaEntityClass;

#define TUBA_API_TYPE_ACCOUNT (tuba_api_account_get_type ())
#define TUBA_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccount))
#define TUBA_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))
#define TUBA_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

#define TUBA_TYPE_INSTANCE_ACCOUNT (tuba_instance_account_get_type ())
#define TUBA_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccount))
#define TUBA_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))
#define TUBA_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

#define TUBA_TYPE_ACCOUNT_STORE (tuba_account_store_get_type ())
#define TUBA_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore))
#define TUBA_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))
#define TUBA_IS_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_IS_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_ACCOUNT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;
typedef void (*TubaNetworkSuccessCallback) (GInputStream* in_stream, SoupMessageHeaders* response_headers, gpointer user_data, GError** error);
typedef void (*TubaNetworkErrorCallback) (gint32 code, const gchar* reason, gpointer user_data);

struct _TubaViewsAdminPageBase {
	AdwNavigationPage parent_instance;
	TubaViewsAdminPageBasePrivate * priv;
	AdwHeaderBar* headerbar;
	AdwToolbarView* toolbar_view;
};

struct _TubaViewsAdminPageBaseClass {
	AdwNavigationPageClass parent_class;
	void (*add_to_page) (TubaViewsAdminPageBase* self, AdwPreferencesGroup* group);
};

struct _TubaViewsAdminPageBlockedEmails {
	TubaViewsAdminPageBase parent_instance;
	TubaViewsAdminPageBlockedEmailsPrivate * priv;
};

struct _TubaViewsAdminPageBlockedEmailsClass {
	TubaViewsAdminPageBaseClass parent_class;
};

struct _TubaViewsAdminPageBlockedEmailsPrivate {
	GtkEntry* child_entry;
	GtkButton* add_button;
	TubaViewsAdminTimelineEmailDomain* pagination_timeline;
};

struct _Block109Data {
	int _ref_count_;
	TubaViewsAdminPageBlockedEmails* self;
	gchar* domain;
	AdwAlertDialog* dlg;
};

static gint TubaViewsAdminPageBlockedEmails_private_offset;
static gpointer tuba_views_admin_page_blocked_emails_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;

VALA_EXTERN GType tuba_views_admin_page_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAdminPageBase, g_object_unref)
VALA_EXTERN GType tuba_views_admin_page_blocked_emails_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAdminPageBlockedEmails, g_object_unref)
VALA_EXTERN GType tuba_views_admin_timeline_pagination_timeline_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAdminTimelinePaginationTimeline, g_object_unref)
VALA_EXTERN GType tuba_views_admin_timeline_email_domain_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsAdminTimelineEmailDomain, g_object_unref)
static void tuba_views_admin_page_blocked_emails_new_item_cb (TubaViewsAdminPageBlockedEmails* self);
static void tuba_views_admin_page_blocked_emails_on_action_bar_activate (TubaViewsAdminPageBlockedEmails* self,
                                                                  GtkEntryBuffer* buffer);
static void tuba_views_admin_page_blocked_emails_on_entry_changed (TubaViewsAdminPageBlockedEmails* self);
static Block109Data* block109_data_ref (Block109Data* _data109_);
static void block109_data_unref (void * _userdata_);
VALA_EXTERN GType tuba_dialogs_admin_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsAdminWindow, g_object_unref)
VALA_EXTERN TubaDialogsAdminWindow* tuba_views_admin_page_base_get_admin_window (TubaViewsAdminPageBase* self);
static void ___lambda244_ (Block109Data* _data109_,
                    GObject* obj,
                    GAsyncResult* res);
VALA_EXTERN TubaRequest* tuba_request_new_POST (const gchar* url);
VALA_EXTERN TubaRequest* tuba_request_construct_POST (GType object_type,
                                          const gchar* url);
VALA_EXTERN GType tuba_request_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequest, g_object_unref)
VALA_EXTERN GType tuba_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEntity, g_object_unref)
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN TubaRequest* tuba_request_with_account (TubaRequest* self,
                                        TubaInstanceAccount* account);
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, g_object_unref)
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN TubaRequest* tuba_request_with_form_data (TubaRequest* self,
                                          const gchar* name,
                                          const gchar* val);
VALA_EXTERN TubaRequest* tuba_request_then (TubaRequest* self,
                                TubaNetworkSuccessCallback cb,
                                gpointer cb_target,
                                GDestroyNotify cb_target_destroy_notify);
static void ___lambda245_ (TubaViewsAdminPageBlockedEmails* self,
                    GError** error);
VALA_EXTERN void tuba_views_admin_timeline_pagination_timeline_request_idle (TubaViewsAdminTimelinePaginationTimeline* self);
static void ____lambda245__tuba_network_success_callback (GInputStream* in_stream,
                                                   SoupMessageHeaders* response_headers,
                                                   gpointer self,
                                                   GError** error);
VALA_EXTERN TubaRequest* tuba_request_on_error (TubaRequest* self,
                                    TubaNetworkErrorCallback cb,
                                    gpointer cb_target,
                                    GDestroyNotify cb_target_destroy_notify);
static void ___lambda246_ (Block109Data* _data109_,
                    gint32 code,
                    const gchar* message);
VALA_EXTERN void tuba_views_admin_page_base_on_error (TubaViewsAdminPageBase* self,
                                          gint code,
                                          const gchar* message);
static void ____lambda246__tuba_network_error_callback (gint32 code,
                                                 const gchar* reason,
                                                 gpointer self);
VALA_EXTERN TubaRequest* tuba_request_exec (TubaRequest* self);
static void ____lambda244__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
VALA_EXTERN TubaViewsAdminPageBlockedEmails* tuba_views_admin_page_blocked_emails_new (void);
VALA_EXTERN TubaViewsAdminPageBlockedEmails* tuba_views_admin_page_blocked_emails_construct (GType object_type);
VALA_EXTERN TubaViewsAdminPageBase* tuba_views_admin_page_base_new (void);
VALA_EXTERN TubaViewsAdminPageBase* tuba_views_admin_page_base_construct (GType object_type);
static GObject * tuba_views_admin_page_blocked_emails_constructor (GType type,
                                                            guint n_construct_properties,
                                                            GObjectConstructParam * construct_properties);
static void _tuba_views_admin_page_blocked_emails_new_item_cb_gtk_button_clicked (GtkButton* _sender,
                                                                           gpointer self);
static void _tuba_views_admin_page_blocked_emails_new_item_cb_gtk_entry_activate (GtkEntry* _sender,
                                                                           gpointer self);
static void _tuba_views_admin_page_blocked_emails_on_entry_changed_g_object_notify (GObject* _sender,
                                                                             GParamSpec* pspec,
                                                                             gpointer self);
VALA_EXTERN TubaViewsAdminTimelineEmailDomain* tuba_views_admin_timeline_email_domain_new (void);
VALA_EXTERN TubaViewsAdminTimelineEmailDomain* tuba_views_admin_timeline_email_domain_construct (GType object_type);
static void _tuba_views_admin_page_base_on_error_tuba_views_admin_timeline_pagination_timeline_on_error (TubaViewsAdminTimelinePaginationTimeline* _sender,
                                                                                                  gint code,
                                                                                                  const gchar* message,
                                                                                                  gpointer self);
VALA_EXTERN void tuba_views_admin_page_base_set_page (TubaViewsAdminPageBase* self,
                                          GtkWidget* value);
static void tuba_views_admin_page_blocked_emails_finalize (GObject * obj);
static GType tuba_views_admin_page_blocked_emails_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
tuba_views_admin_page_blocked_emails_get_instance_private (TubaViewsAdminPageBlockedEmails* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsAdminPageBlockedEmails_private_offset);
}

static void
tuba_views_admin_page_blocked_emails_new_item_cb (TubaViewsAdminPageBlockedEmails* self)
{
	GtkEntry* _tmp0_;
	GtkEntryBuffer* _tmp1_;
	GtkEntryBuffer* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->child_entry;
	_tmp1_ = gtk_entry_get_buffer (_tmp0_);
	_tmp2_ = _tmp1_;
	tuba_views_admin_page_blocked_emails_on_action_bar_activate (self, _tmp2_);
}

static void
tuba_views_admin_page_blocked_emails_on_entry_changed (TubaViewsAdminPageBlockedEmails* self)
{
	GtkButton* _tmp0_;
	GtkEntry* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gint _tmp4_;
	gint _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->add_button;
	_tmp1_ = self->priv->child_entry;
	_tmp2_ = gtk_editable_get_text ((GtkEditable*) _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = strlen (_tmp3_);
	_tmp5_ = _tmp4_;
	gtk_widget_set_sensitive ((GtkWidget*) _tmp0_, _tmp5_ > 0);
}

static Block109Data*
block109_data_ref (Block109Data* _data109_)
{
	g_atomic_int_inc (&_data109_->_ref_count_);
	return _data109_;
}

static void
block109_data_unref (void * _userdata_)
{
	Block109Data* _data109_;
	_data109_ = (Block109Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data109_->_ref_count_)) {
		TubaViewsAdminPageBlockedEmails* self;
		self = _data109_->self;
		_g_object_unref0 (_data109_->dlg);
		_g_free0 (_data109_->domain);
		_g_object_unref0 (self);
		g_slice_free (Block109Data, _data109_);
	}
}

static void
___lambda245_ (TubaViewsAdminPageBlockedEmails* self,
               GError** error)
{
	TubaViewsAdminTimelineEmailDomain* _tmp0_;
	_tmp0_ = self->priv->pagination_timeline;
	tuba_views_admin_timeline_pagination_timeline_request_idle ((TubaViewsAdminTimelinePaginationTimeline*) _tmp0_);
}

static void
____lambda245__tuba_network_success_callback (GInputStream* in_stream,
                                              SoupMessageHeaders* response_headers,
                                              gpointer self,
                                              GError** error)
{
	___lambda245_ ((TubaViewsAdminPageBlockedEmails*) self, error);
}

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

static void
___lambda246_ (Block109Data* _data109_,
               gint32 code,
               const gchar* message)
{
	TubaViewsAdminPageBlockedEmails* self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	self = _data109_->self;
	g_return_if_fail (message != NULL);
	_tmp0_ = _data109_->domain;
	_tmp1_ = string_to_string (_tmp0_);
	_tmp2_ = string_to_string (message);
	_tmp3_ = g_strdup_printf ("%i", code);
	_tmp4_ = _tmp3_;
	_tmp5_ = g_strconcat ("Error trying to block e-mail domain ", _tmp1_, ": ", _tmp2_, " ", _tmp4_, NULL);
	_tmp6_ = _tmp5_;
	g_warning ("BlockedEmails.vala:82: %s", _tmp6_);
	_g_free0 (_tmp6_);
	_g_free0 (_tmp4_);
	tuba_views_admin_page_base_on_error ((TubaViewsAdminPageBase*) self, (gint) code, message);
}

static void
____lambda246__tuba_network_error_callback (gint32 code,
                                            const gchar* reason,
                                            gpointer self)
{
	___lambda246_ (self, code, reason);
}

static void
___lambda244_ (Block109Data* _data109_,
               GObject* obj,
               GAsyncResult* res)
{
	TubaViewsAdminPageBlockedEmails* self;
	AdwAlertDialog* _tmp0_;
	const gchar* _tmp1_;
	self = _data109_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = _data109_->dlg;
	_tmp1_ = adw_alert_dialog_choose_finish (_tmp0_, res);
	if (g_strcmp0 (_tmp1_, "yes") == 0) {
		TubaRequest* _tmp2_;
		TubaRequest* _tmp3_;
		TubaAccountStore* _tmp4_;
		TubaInstanceAccount* _tmp5_;
		TubaInstanceAccount* _tmp6_;
		TubaRequest* _tmp7_;
		TubaRequest* _tmp8_;
		const gchar* _tmp9_;
		TubaRequest* _tmp10_;
		TubaRequest* _tmp11_;
		TubaRequest* _tmp12_;
		TubaRequest* _tmp13_;
		TubaRequest* _tmp14_;
		TubaRequest* _tmp15_;
		TubaRequest* _tmp16_;
		TubaRequest* _tmp17_;
		_tmp2_ = tuba_request_new_POST ("/api/v1/admin/email_domain_blocks");
		_tmp3_ = _tmp2_;
		_tmp4_ = tuba_accounts;
		_tmp5_ = tuba_account_store_get_active (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = tuba_request_with_account (_tmp3_, _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = _data109_->domain;
		_tmp10_ = tuba_request_with_form_data (_tmp8_, "domain", _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = tuba_request_then (_tmp11_, ____lambda245__tuba_network_success_callback, g_object_ref (self), g_object_unref);
		_tmp13_ = _tmp12_;
		_tmp14_ = tuba_request_on_error (_tmp13_, ____lambda246__tuba_network_error_callback, block109_data_ref (_data109_), block109_data_unref);
		_tmp15_ = _tmp14_;
		_tmp16_ = tuba_request_exec (_tmp15_);
		_tmp17_ = _tmp16_;
		_g_object_unref0 (_tmp17_);
		_g_object_unref0 (_tmp15_);
		_g_object_unref0 (_tmp13_);
		_g_object_unref0 (_tmp11_);
		_g_object_unref0 (_tmp8_);
		_g_object_unref0 (_tmp3_);
	}
}

static void
____lambda244__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda244_ (self, source_object, res);
	block109_data_unref (self);
}

static guint8*
string_get_data (const gchar* self,
                 gint* result_length1)
{
	guint8* result;
	guint8* res = NULL;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	g_return_val_if_fail (self != NULL, NULL);
	res = (guint8*) self;
	res_length1 = -1;
	_res_size_ = res_length1;
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	res_length1 = (gint) _tmp1_;
	_tmp2_ = res;
	_tmp2__length1 = res_length1;
	if (result_length1) {
		*result_length1 = _tmp2__length1;
	}
	result = _tmp2_;
	return result;
}

static void
tuba_views_admin_page_blocked_emails_on_action_bar_activate (TubaViewsAdminPageBlockedEmails* self,
                                                             GtkEntryBuffer* buffer)
{
	guint _tmp0_;
	guint _tmp1_;
	guint8* _tmp17_;
	gint _tmp17__length1;
	gint _tmp18_ = 0;
	guint8* _tmp19_;
	gint _tmp19__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (buffer != NULL);
	_tmp0_ = gtk_entry_buffer_get_length (buffer);
	_tmp1_ = _tmp0_;
	if (_tmp1_ > ((guint) 0)) {
		Block109Data* _data109_;
		const gchar* _tmp2_;
		const gchar* _tmp3_;
		gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		AdwAlertDialog* _tmp8_;
		AdwAlertDialog* _tmp9_;
		AdwAlertDialog* _tmp10_;
		AdwAlertDialog* _tmp11_;
		AdwAlertDialog* _tmp12_;
		AdwAlertDialog* _tmp13_;
		AdwAlertDialog* _tmp14_;
		TubaDialogsAdminWindow* _tmp15_;
		TubaDialogsAdminWindow* _tmp16_;
		_data109_ = g_slice_new0 (Block109Data);
		_data109_->_ref_count_ = 1;
		_data109_->self = g_object_ref (self);
		_tmp2_ = gtk_entry_buffer_get_text (buffer);
		_tmp3_ = _tmp2_;
		_tmp4_ = g_strdup (_tmp3_);
		_data109_->domain = _tmp4_;
		_tmp5_ = _data109_->domain;
		_tmp6_ = g_strdup_printf (_ ("Block %s?"), _tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = (AdwAlertDialog*) adw_alert_dialog_new (_tmp7_, _ ("This can be the domain name that shows up in the e-mail address or the" \
" MX record it uses. They will be checked upon sign-up."));
		g_object_ref_sink (_tmp8_);
		_tmp9_ = _tmp8_;
		_g_free0 (_tmp7_);
		_data109_->dlg = _tmp9_;
		_tmp10_ = _data109_->dlg;
		adw_alert_dialog_add_response (_tmp10_, "no", _ ("Cancel"));
		_tmp11_ = _data109_->dlg;
		adw_alert_dialog_set_response_appearance (_tmp11_, "no", ADW_RESPONSE_DEFAULT);
		_tmp12_ = _data109_->dlg;
		adw_alert_dialog_add_response (_tmp12_, "yes", _ ("Block"));
		_tmp13_ = _data109_->dlg;
		adw_alert_dialog_set_response_appearance (_tmp13_, "yes", ADW_RESPONSE_DESTRUCTIVE);
		_tmp14_ = _data109_->dlg;
		_tmp15_ = tuba_views_admin_page_base_get_admin_window ((TubaViewsAdminPageBase*) self);
		_tmp16_ = _tmp15_;
		adw_alert_dialog_choose (_tmp14_, (GtkWidget*) _tmp16_, NULL, ____lambda244__gasync_ready_callback, block109_data_ref (_data109_));
		block109_data_unref (_data109_);
		_data109_ = NULL;
	}
	_tmp17_ = string_get_data ("", &_tmp18_);
	_tmp17__length1 = _tmp18_;
	_tmp19_ = _tmp17_;
	_tmp19__length1 = _tmp17__length1;
	gtk_entry_buffer_set_text (buffer, (const char*) _tmp19_, (gint) _tmp19__length1);
}

TubaViewsAdminPageBlockedEmails*
tuba_views_admin_page_blocked_emails_construct (GType object_type)
{
	TubaViewsAdminPageBlockedEmails * self = NULL;
	self = (TubaViewsAdminPageBlockedEmails*) tuba_views_admin_page_base_construct (object_type);
	return self;
}

TubaViewsAdminPageBlockedEmails*
tuba_views_admin_page_blocked_emails_new (void)
{
	return tuba_views_admin_page_blocked_emails_construct (TUBA_VIEWS_ADMIN_PAGE_TYPE_BLOCKED_EMAILS);
}

static void
_tuba_views_admin_page_blocked_emails_new_item_cb_gtk_button_clicked (GtkButton* _sender,
                                                                      gpointer self)
{
	tuba_views_admin_page_blocked_emails_new_item_cb ((TubaViewsAdminPageBlockedEmails*) self);
}

static void
_tuba_views_admin_page_blocked_emails_new_item_cb_gtk_entry_activate (GtkEntry* _sender,
                                                                      gpointer self)
{
	tuba_views_admin_page_blocked_emails_new_item_cb ((TubaViewsAdminPageBlockedEmails*) self);
}

static void
_tuba_views_admin_page_blocked_emails_on_entry_changed_g_object_notify (GObject* _sender,
                                                                        GParamSpec* pspec,
                                                                        gpointer self)
{
	tuba_views_admin_page_blocked_emails_on_entry_changed ((TubaViewsAdminPageBlockedEmails*) self);
}

static void
_tuba_views_admin_page_base_on_error_tuba_views_admin_timeline_pagination_timeline_on_error (TubaViewsAdminTimelinePaginationTimeline* _sender,
                                                                                             gint code,
                                                                                             const gchar* message,
                                                                                             gpointer self)
{
	tuba_views_admin_page_base_on_error ((TubaViewsAdminPageBase*) self, code, message);
}

static GObject *
tuba_views_admin_page_blocked_emails_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsAdminPageBlockedEmails * self;
	GtkActionBar* add_action_bar = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	GtkActionBar* _tmp2_ = NULL;
	gchar* _tmp3_;
	GtkEntry* _tmp4_ = NULL;
	GtkBox* child_box = NULL;
	GtkBox* _tmp5_;
	GtkButton* _tmp6_ = NULL;
	GtkButton* _tmp7_;
	GtkEntry* _tmp8_;
	GtkEntry* _tmp9_;
	GtkBox* _tmp10_;
	GtkEntry* _tmp11_;
	GtkBox* _tmp12_;
	GtkButton* _tmp13_;
	GtkActionBar* _tmp14_;
	GtkBox* _tmp15_;
	AdwToolbarView* _tmp16_;
	GtkActionBar* _tmp17_;
	TubaViewsAdminTimelineEmailDomain* _tmp18_;
	TubaViewsAdminTimelineEmailDomain* _tmp19_;
	TubaViewsAdminTimelineEmailDomain* _tmp20_;
	TubaViewsAdminTimelineEmailDomain* _tmp21_;
	TubaViewsAdminTimelineEmailDomain* _tmp22_;
	parent_class = G_OBJECT_CLASS (tuba_views_admin_page_blocked_emails_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_ADMIN_PAGE_TYPE_BLOCKED_EMAILS, TubaViewsAdminPageBlockedEmails);
	adw_navigation_page_set_title ((AdwNavigationPage*) self, _ ("Blocked E-mail Domains"));
	_tmp0_ = g_strdup ("ttl-box-no-shadow");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = (GtkActionBar*) gtk_action_bar_new ();
	gtk_widget_set_css_classes ((GtkWidget*) _tmp2_, _tmp1_);
	_tmp1_ = (_vala_array_free (_tmp1_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp2_);
	add_action_bar = _tmp2_;
	_tmp3_ = g_strdup (_ ("Block a new e-mail domain"));
	_tmp4_ = (GtkEntry*) gtk_entry_new ();
	gtk_entry_set_input_purpose (_tmp4_, GTK_INPUT_PURPOSE_URL);
	gtk_entry_set_placeholder_text (_tmp4_, _tmp3_);
	_g_free0 (_tmp3_);
	g_object_ref_sink (_tmp4_);
	_g_object_unref0 (self->priv->child_entry);
	self->priv->child_entry = _tmp4_;
	_tmp5_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
	g_object_ref_sink (_tmp5_);
	child_box = _tmp5_;
	_tmp6_ = (GtkButton*) gtk_button_new_with_label (_ ("Block"));
	gtk_widget_set_sensitive ((GtkWidget*) _tmp6_, FALSE);
	g_object_ref_sink (_tmp6_);
	_g_object_unref0 (self->priv->add_button);
	self->priv->add_button = _tmp6_;
	_tmp7_ = self->priv->add_button;
	g_signal_connect_object (_tmp7_, "clicked", (GCallback) _tuba_views_admin_page_blocked_emails_new_item_cb_gtk_button_clicked, self, 0);
	_tmp8_ = self->priv->child_entry;
	g_signal_connect_object (_tmp8_, "activate", (GCallback) _tuba_views_admin_page_blocked_emails_new_item_cb_gtk_entry_activate, self, 0);
	_tmp9_ = self->priv->child_entry;
	g_signal_connect_object ((GObject*) _tmp9_, "notify::text", (GCallback) _tuba_views_admin_page_blocked_emails_on_entry_changed_g_object_notify, self, 0);
	_tmp10_ = child_box;
	_tmp11_ = self->priv->child_entry;
	gtk_box_append (_tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = child_box;
	_tmp13_ = self->priv->add_button;
	gtk_box_append (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = add_action_bar;
	_tmp15_ = child_box;
	gtk_action_bar_set_center_widget (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = ((TubaViewsAdminPageBase*) self)->toolbar_view;
	_tmp17_ = add_action_bar;
	adw_toolbar_view_add_top_bar (_tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = tuba_views_admin_timeline_email_domain_new ();
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->pagination_timeline);
	self->priv->pagination_timeline = _tmp18_;
	_tmp19_ = self->priv->pagination_timeline;
	g_signal_connect_object ((TubaViewsAdminTimelinePaginationTimeline*) _tmp19_, "on-error", (GCallback) _tuba_views_admin_page_base_on_error_tuba_views_admin_timeline_pagination_timeline_on_error, (TubaViewsAdminPageBase*) self, 0);
	_tmp20_ = self->priv->pagination_timeline;
	g_object_bind_property_with_closures ((GObject*) _tmp20_, "working", (GObject*) self, "spinning", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp21_ = self->priv->pagination_timeline;
	tuba_views_admin_page_base_set_page ((TubaViewsAdminPageBase*) self, (GtkWidget*) _tmp21_);
	_tmp22_ = self->priv->pagination_timeline;
	tuba_views_admin_timeline_pagination_timeline_request_idle ((TubaViewsAdminTimelinePaginationTimeline*) _tmp22_);
	_g_object_unref0 (child_box);
	_g_object_unref0 (add_action_bar);
	return obj;
}

static void
tuba_views_admin_page_blocked_emails_class_init (TubaViewsAdminPageBlockedEmailsClass * klass,
                                                 gpointer klass_data)
{
	tuba_views_admin_page_blocked_emails_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsAdminPageBlockedEmails_private_offset);
	G_OBJECT_CLASS (klass)->constructor = tuba_views_admin_page_blocked_emails_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_admin_page_blocked_emails_finalize;
}

static void
tuba_views_admin_page_blocked_emails_instance_init (TubaViewsAdminPageBlockedEmails * self,
                                                    gpointer klass)
{
	self->priv = tuba_views_admin_page_blocked_emails_get_instance_private (self);
}

static void
tuba_views_admin_page_blocked_emails_finalize (GObject * obj)
{
	TubaViewsAdminPageBlockedEmails * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_ADMIN_PAGE_TYPE_BLOCKED_EMAILS, TubaViewsAdminPageBlockedEmails);
	_g_object_unref0 (self->priv->child_entry);
	_g_object_unref0 (self->priv->add_button);
	_g_object_unref0 (self->priv->pagination_timeline);
	G_OBJECT_CLASS (tuba_views_admin_page_blocked_emails_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_admin_page_blocked_emails_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsAdminPageBlockedEmailsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_admin_page_blocked_emails_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsAdminPageBlockedEmails), 0, (GInstanceInitFunc) tuba_views_admin_page_blocked_emails_instance_init, NULL };
	GType tuba_views_admin_page_blocked_emails_type_id;
	tuba_views_admin_page_blocked_emails_type_id = g_type_register_static (TUBA_VIEWS_ADMIN_PAGE_TYPE_BASE, "TubaViewsAdminPageBlockedEmails", &g_define_type_info, 0);
	TubaViewsAdminPageBlockedEmails_private_offset = g_type_add_instance_private (tuba_views_admin_page_blocked_emails_type_id, sizeof (TubaViewsAdminPageBlockedEmailsPrivate));
	return tuba_views_admin_page_blocked_emails_type_id;
}

GType
tuba_views_admin_page_blocked_emails_get_type (void)
{
	static gsize tuba_views_admin_page_blocked_emails_type_id__once = 0;
	if (g_once_init_enter (&tuba_views_admin_page_blocked_emails_type_id__once)) {
		GType tuba_views_admin_page_blocked_emails_type_id;
		tuba_views_admin_page_blocked_emails_type_id = tuba_views_admin_page_blocked_emails_get_type_once ();
		g_once_init_leave (&tuba_views_admin_page_blocked_emails_type_id__once, tuba_views_admin_page_blocked_emails_type_id);
	}
	return tuba_views_admin_page_blocked_emails_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

