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

#include <adwaita.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <gee.h>
#include <json-glib/json-glib.h>
#include <glib/gi18n-lib.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_TYPE_BASE (tuba_views_base_get_type ())
#define TUBA_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBase))
#define TUBA_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))
#define TUBA_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_BASE))
#define TUBA_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_BASE, TubaViewsBaseClass))

typedef struct _TubaViewsBase TubaViewsBase;
typedef struct _TubaViewsBaseClass TubaViewsBaseClass;
typedef struct _TubaViewsBasePrivate TubaViewsBasePrivate;

#define TUBA_VIEWS_TYPE_CONTENT_BASE (tuba_views_content_base_get_type ())
#define TUBA_VIEWS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBase))
#define TUBA_VIEWS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))
#define TUBA_VIEWS_IS_CONTENT_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_IS_CONTENT_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_CONTENT_BASE))
#define TUBA_VIEWS_CONTENT_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_CONTENT_BASE, TubaViewsContentBaseClass))

typedef struct _TubaViewsContentBase TubaViewsContentBase;
typedef struct _TubaViewsContentBaseClass TubaViewsContentBaseClass;
typedef struct _TubaViewsContentBasePrivate TubaViewsContentBasePrivate;

#define TUBA_TYPE_ACCOUNT_HOLDER (tuba_account_holder_get_type ())
#define TUBA_ACCOUNT_HOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_HOLDER, TubaAccountHolder))
#define TUBA_IS_ACCOUNT_HOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_HOLDER))
#define TUBA_ACCOUNT_HOLDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_ACCOUNT_HOLDER, TubaAccountHolderIface))

typedef struct _TubaAccountHolder TubaAccountHolder;
typedef struct _TubaAccountHolderIface TubaAccountHolderIface;

#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_STREAMABLE (tuba_streamable_get_type ())
#define TUBA_STREAMABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_STREAMABLE, TubaStreamable))
#define TUBA_IS_STREAMABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_STREAMABLE))
#define TUBA_STREAMABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_STREAMABLE, TubaStreamableIface))

typedef struct _TubaStreamable TubaStreamable;
typedef struct _TubaStreamableIface TubaStreamableIface;

#define TUBA_VIEWS_TYPE_TIMELINE (tuba_views_timeline_get_type ())
#define TUBA_VIEWS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline))
#define TUBA_VIEWS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimelineClass))
#define TUBA_VIEWS_IS_TIMELINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_TIMELINE))
#define TUBA_VIEWS_IS_TIMELINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_TIMELINE))
#define TUBA_VIEWS_TIMELINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimelineClass))

typedef struct _TubaViewsTimeline TubaViewsTimeline;
typedef struct _TubaViewsTimelineClass TubaViewsTimelineClass;
typedef struct _TubaViewsTimelinePrivate TubaViewsTimelinePrivate;

#define TUBA_TYPE_REQUEST_V2 (tuba_request_v2_get_type ())
#define TUBA_REQUEST_V2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_REQUEST_V2, TubaRequestV2))
#define TUBA_REQUEST_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_REQUEST_V2, TubaRequestV2Class))
#define TUBA_IS_REQUEST_V2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_REQUEST_V2))
#define TUBA_IS_REQUEST_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_REQUEST_V2))
#define TUBA_REQUEST_V2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_REQUEST_V2, TubaRequestV2Class))

typedef struct _TubaRequestV2 TubaRequestV2;
typedef struct _TubaRequestV2Class TubaRequestV2Class;

#define TUBA_STREAMABLE_TYPE_EVENT (tuba_streamable_event_get_type ())
typedef struct _TubaStreamableEvent TubaStreamableEvent;

#define TUBA_VIEWS_TYPE_FOLLOW_REQUESTS (tuba_views_follow_requests_get_type ())
#define TUBA_VIEWS_FOLLOW_REQUESTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_FOLLOW_REQUESTS, TubaViewsFollowRequests))
#define TUBA_VIEWS_FOLLOW_REQUESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_FOLLOW_REQUESTS, TubaViewsFollowRequestsClass))
#define TUBA_VIEWS_IS_FOLLOW_REQUESTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_FOLLOW_REQUESTS))
#define TUBA_VIEWS_IS_FOLLOW_REQUESTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_FOLLOW_REQUESTS))
#define TUBA_VIEWS_FOLLOW_REQUESTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_FOLLOW_REQUESTS, TubaViewsFollowRequestsClass))

typedef struct _TubaViewsFollowRequests TubaViewsFollowRequests;
typedef struct _TubaViewsFollowRequestsClass TubaViewsFollowRequestsClass;
typedef struct _TubaViewsFollowRequestsPrivate TubaViewsFollowRequestsPrivate;
enum  {
	TUBA_VIEWS_FOLLOW_REQUESTS_0_PROPERTY,
	TUBA_VIEWS_FOLLOW_REQUESTS_NUM_PROPERTIES
};
static GParamSpec* tuba_views_follow_requests_properties[TUBA_VIEWS_FOLLOW_REQUESTS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block67Data Block67Data;

#define TUBA_WIDGETS_TYPE_ACCOUNT (tuba_widgets_account_get_type ())
#define TUBA_WIDGETS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_ACCOUNT, TubaWidgetsAccount))
#define TUBA_WIDGETS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_ACCOUNT, TubaWidgetsAccountClass))
#define TUBA_WIDGETS_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_ACCOUNT))
#define TUBA_WIDGETS_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_ACCOUNT))
#define TUBA_WIDGETS_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_ACCOUNT, TubaWidgetsAccountClass))

typedef struct _TubaWidgetsAccount TubaWidgetsAccount;
typedef struct _TubaWidgetsAccountClass TubaWidgetsAccountClass;

#define TUBA_WIDGETS_TYPE_FOLLOW_REQUEST_ROW (tuba_widgets_follow_request_row_get_type ())
#define TUBA_WIDGETS_FOLLOW_REQUEST_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_FOLLOW_REQUEST_ROW, TubaWidgetsFollowRequestRow))
#define TUBA_WIDGETS_FOLLOW_REQUEST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_FOLLOW_REQUEST_ROW, TubaWidgetsFollowRequestRowClass))
#define TUBA_WIDGETS_IS_FOLLOW_REQUEST_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_FOLLOW_REQUEST_ROW))
#define TUBA_WIDGETS_IS_FOLLOW_REQUEST_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_FOLLOW_REQUEST_ROW))
#define TUBA_WIDGETS_FOLLOW_REQUEST_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_FOLLOW_REQUEST_ROW, TubaWidgetsFollowRequestRowClass))

typedef struct _TubaWidgetsFollowRequestRow TubaWidgetsFollowRequestRow;
typedef struct _TubaWidgetsFollowRequestRowClass TubaWidgetsFollowRequestRowClass;

#define TUBA_TYPE_WIDGETIZABLE (tuba_widgetizable_get_type ())
#define TUBA_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizable))
#define TUBA_IS_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_WIDGETIZABLE))
#define TUBA_WIDGETIZABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_WIDGETIZABLE, TubaWidgetizableIface))

typedef struct _TubaWidgetizable TubaWidgetizable;
typedef struct _TubaWidgetizableIface TubaWidgetizableIface;

#define TUBA_TYPE_OOPSIE (tuba_oopsie_get_type ())

#define TUBA_TYPE_NETWORK (tuba_network_get_type ())
#define TUBA_NETWORK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_NETWORK, TubaNetwork))
#define TUBA_NETWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_NETWORK, TubaNetworkClass))
#define TUBA_IS_NETWORK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_NETWORK))
#define TUBA_IS_NETWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_NETWORK))
#define TUBA_NETWORK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_NETWORK, TubaNetworkClass))

typedef struct _TubaNetwork TubaNetwork;
typedef struct _TubaNetworkClass TubaNetworkClass;

#define TUBA_API_TYPE_RELATIONSHIP (tuba_api_relationship_get_type ())
#define TUBA_API_RELATIONSHIP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_RELATIONSHIP, TubaAPIRelationship))
#define TUBA_API_RELATIONSHIP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_RELATIONSHIP, TubaAPIRelationshipClass))
#define TUBA_API_IS_RELATIONSHIP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_RELATIONSHIP))
#define TUBA_API_IS_RELATIONSHIP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_RELATIONSHIP))
#define TUBA_API_RELATIONSHIP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_RELATIONSHIP, TubaAPIRelationshipClass))

typedef struct _TubaAPIRelationship TubaAPIRelationship;
typedef struct _TubaAPIRelationshipClass TubaAPIRelationshipClass;
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TUBA_TYPE_APPLICATION (tuba_application_get_type ())
#define TUBA_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_APPLICATION, TubaApplication))
#define TUBA_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_APPLICATION, TubaApplicationClass))
#define TUBA_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_APPLICATION))
#define TUBA_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_APPLICATION))
#define TUBA_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_APPLICATION, TubaApplicationClass))

typedef struct _TubaApplication TubaApplication;
typedef struct _TubaApplicationClass TubaApplicationClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaViewsFollowRequestsOnAcceptData TubaViewsFollowRequestsOnAcceptData;
typedef struct _TubaViewsFollowRequestsOnDeclineData TubaViewsFollowRequestsOnDeclineData;

struct _TubaViewsBase {
	AdwBreakpointBin parent_instance;
	TubaViewsBasePrivate * priv;
	AdwHeaderBar* header;
	AdwToolbarView* toolbar_view;
	GtkScrolledWindow* scrolled;
	GtkOverlay* scrolled_overlay;
	GtkRevealer* scroll_to_top_rev;
	GtkButton* scroll_to_top;
	GtkStack* states;
	AdwClamp* content_box;
	GtkButton* status_button;
};

struct _TubaViewsBaseClass {
	AdwBreakpointBinClass parent_class;
	void (*scroll_page) (TubaViewsBase* self, gboolean up);
	void (*unbind_listboxes) (TubaViewsBase* self);
	void (*build_actions) (TubaViewsBase* self);
	void (*build_header) (TubaViewsBase* self);
	void (*clear) (TubaViewsBase* self);
	void (*on_shown) (TubaViewsBase* self);
	void (*on_hidden) (TubaViewsBase* self);
	void (*on_content_changed) (TubaViewsBase* self);
	void (*on_error) (TubaViewsBase* self, gint32 code, const gchar* reason);
};

struct _TubaViewsContentBase {
	TubaViewsBase parent_instance;
	TubaViewsContentBasePrivate * priv;
	GtkListBox* content;
	GListStore* model;
};

struct _TubaViewsContentBaseClass {
	TubaViewsBaseClass parent_class;
	void (*on_scrolled_vadjustment_value_change) (TubaViewsContentBase* self);
	void (*clear_all_but_first) (TubaViewsContentBase* self, gint i);
	void (*attempt_focus_grab) (TubaViewsContentBase* self);
	GtkWidget* (*on_create_model_widget) (TubaViewsContentBase* self, GObject* obj);
	void (*on_bottom_reached) (TubaViewsContentBase* self);
	void (*on_content_item_activated) (TubaViewsContentBase* self, GtkListBoxRow* row);
	gboolean (*get_empty) (TubaViewsContentBase* self);
};

struct _TubaAccountHolderIface {
	GTypeInterface parent_iface;
	void (*on_account_changed) (TubaAccountHolder* self, TubaInstanceAccount* acc);
	void (*on_accounts_changed) (TubaAccountHolder* self, GeeArrayList* accounts);
	TubaInstanceAccount* (*get_account) (TubaAccountHolder* self);
	void (*set_account) (TubaAccountHolder* self, TubaInstanceAccount* value);
};

struct _TubaStreamableIface {
	GTypeInterface parent_iface;
	gchar* (*get_stream_url) (TubaStreamable* self);
	void (*on_streaming_policy_changed) (TubaStreamable* self);
	const gchar* (*get_t_connection_url) (TubaStreamable* self);
	void (*set_t_connection_url) (TubaStreamable* self, const gchar* value);
	gboolean (*get_subscribed) (TubaStreamable* self);
	void (*set_subscribed) (TubaStreamable* self, gboolean value);
};

struct _TubaStreamableEvent {
	gchar* type;
	JsonNode* payload;
};

struct _TubaViewsTimeline {
	TubaViewsContentBase parent_instance;
	TubaViewsTimelinePrivate * priv;
};

struct _TubaViewsTimelineClass {
	TubaViewsContentBaseClass parent_class;
	gchar* (*get_req_url) (TubaViewsTimeline* self);
	void (*append_params_v2) (TubaViewsTimeline* self, TubaRequestV2* req);
	void (*on_request_finish) (TubaViewsTimeline* self);
	void (*request) (TubaViewsTimeline* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*request_finish) (TubaViewsTimeline* self, GAsyncResult* _res_);
	void (*on_refresh) (TubaViewsTimeline* self);
	void (*on_manual_refresh) (TubaViewsTimeline* self);
	void (*on_account_changed) (TubaViewsTimeline* self, TubaInstanceAccount* acc);
	gchar* (*get_stream_url) (TubaViewsTimeline* self);
	gboolean (*should_hide) (TubaViewsTimeline* self, TubaEntity* entity);
	void (*on_new_post) (TubaViewsTimeline* self, TubaStreamableEvent* ev);
	void (*on_edit_post) (TubaViewsTimeline* self, TubaStreamableEvent* ev);
	void (*on_delete_post) (TubaViewsTimeline* self, TubaStreamableEvent* ev);
	void (*on_remove_user) (TubaViewsTimeline* self, const gchar* user_id);
};

struct _TubaViewsFollowRequests {
	TubaViewsTimeline parent_instance;
	TubaViewsFollowRequestsPrivate * priv;
};

struct _TubaViewsFollowRequestsClass {
	TubaViewsTimelineClass parent_class;
};

struct _Block67Data {
	int _ref_count_;
	TubaViewsFollowRequests* self;
	GObject* obj;
};

struct _TubaWidgetizableIface {
	GTypeInterface parent_iface;
	GtkWidget* (*to_widget) (TubaWidgetizable* self);
	void (*open) (TubaWidgetizable* self);
	void (*resolve_open) (TubaWidgetizable* self, TubaInstanceAccount* account);
};

typedef enum  {
	TUBA_OOPSIE_USER,
	TUBA_OOPSIE_PARSING,
	TUBA_OOPSIE_INSTANCE,
	TUBA_OOPSIE_INTERNAL,
	TUBA_OOPSIE_HTTP_401 = 401,
	TUBA_OOPSIE_HTTP_403 = 403,
	TUBA_OOPSIE_HTTP_404 = 404,
	TUBA_OOPSIE_HTTP_410 = 410,
	TUBA_OOPSIE_HTTP_422 = 422,
	TUBA_OOPSIE_HTTP_429 = 429,
	TUBA_OOPSIE_HTTP_500 = 500,
	TUBA_OOPSIE_HTTP_503 = 503
} TubaOopsie;
#define TUBA_OOPSIE tuba_oopsie_quark ()

struct _TubaViewsFollowRequestsOnAcceptData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsFollowRequests* self;
	TubaWidgetsFollowRequestRow* fr_row;
	TubaRequestV2* req;
	TubaWidgetizable* widget;
	GInputStream* in_stream;
	GInputStream* _tmp0_;
	JsonParser* parser;
	GInputStream* _tmp1_;
	JsonParser* _tmp2_;
	JsonNode* node;
	TubaNetwork* _tmp3_;
	JsonParser* _tmp4_;
	JsonNode* _tmp5_;
	TubaEntity* _tmp6_;
	JsonNode* _tmp7_;
	TubaEntity* _tmp8_;
	TubaAPIRelationship* relationship;
	TubaAPIRelationship* _tmp9_;
	TubaAPIRelationship* _tmp10_;
	gboolean _tmp11_;
	gboolean _tmp12_;
	guint indx;
	gboolean found;
	GListStore* _tmp13_;
	guint _tmp14_;
	gboolean _tmp15_;
	GError* e;
	GError* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	GError* _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	TubaApplication* _tmp24_;
	GError* _tmp25_;
	const gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	GError* _inner_error0_;
};

struct _TubaViewsFollowRequestsOnDeclineData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsFollowRequests* self;
	TubaWidgetsFollowRequestRow* fr_row;
	TubaRequestV2* req;
	TubaWidgetizable* widget;
	GInputStream* _tmp0_;
	GInputStream* _tmp1_;
	guint indx;
	gboolean found;
	GListStore* _tmp2_;
	guint _tmp3_;
	gboolean _tmp4_;
	GError* e;
	GError* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	GError* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	TubaApplication* _tmp13_;
	GError* _tmp14_;
	const gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	GError* _inner_error0_;
};

static gpointer tuba_views_follow_requests_parent_class = NULL;
VALA_EXTERN TubaNetwork* tuba_network;
VALA_EXTERN TubaApplication* tuba_app;

VALA_EXTERN GType tuba_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBase, g_object_unref)
VALA_EXTERN GType tuba_views_content_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsContentBase, 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 GType tuba_account_holder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountHolder, g_object_unref)
VALA_EXTERN GType tuba_streamable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaStreamable, g_object_unref)
VALA_EXTERN GType tuba_views_timeline_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsTimeline, g_object_unref)
VALA_EXTERN GType tuba_request_v2_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaRequestV2, g_object_unref)
VALA_EXTERN GType tuba_streamable_event_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaStreamableEvent* tuba_streamable_event_dup (const TubaStreamableEvent* self);
VALA_EXTERN void tuba_streamable_event_free (TubaStreamableEvent* self);
VALA_EXTERN void tuba_streamable_event_copy (const TubaStreamableEvent* self,
                                 TubaStreamableEvent* dest);
VALA_EXTERN void tuba_streamable_event_destroy (TubaStreamableEvent* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaStreamableEvent, tuba_streamable_event_destroy)
VALA_EXTERN GType tuba_views_follow_requests_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsFollowRequests, g_object_unref)
VALA_EXTERN GtkWidget* tuba_views_content_base_on_create_model_widget (TubaViewsContentBase* self,
                                                           GObject* obj);
VALA_EXTERN TubaViewsFollowRequests* tuba_views_follow_requests_new (void);
VALA_EXTERN TubaViewsFollowRequests* tuba_views_follow_requests_construct (GType object_type);
static GtkWidget* tuba_views_follow_requests_real_on_create_model_widget (TubaViewsContentBase* base,
                                                                   GObject* obj);
static Block67Data* block67_data_ref (Block67Data* _data67_);
static void block67_data_unref (void * _userdata_);
VALA_EXTERN GType tuba_widgets_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsAccount, g_object_unref)
VALA_EXTERN GType tuba_widgets_follow_request_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsFollowRequestRow, g_object_unref)
VALA_EXTERN TubaWidgetsFollowRequestRow* tuba_widgets_account_add_fr_row (TubaWidgetsAccount* self);
static void ___lambda205_ (Block67Data* _data67_,
                    TubaWidgetsFollowRequestRow* fr_row,
                    TubaRequestV2* req);
VALA_EXTERN GType tuba_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetizable, g_object_unref)
VALA_EXTERN void tuba_views_follow_requests_on_decline (TubaViewsFollowRequests* self,
                                            TubaWidgetsFollowRequestRow* fr_row,
                                            TubaRequestV2* req,
                                            TubaWidgetizable* widget,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
VALA_EXTERN void tuba_views_follow_requests_on_decline_finish (TubaViewsFollowRequests* self,
                                                   GAsyncResult* _res_);
static void ____lambda205__tuba_widgets_follow_request_row_declined (TubaWidgetsFollowRequestRow* _sender,
                                                              TubaRequestV2* req,
                                                              gpointer self);
static void ___lambda206_ (Block67Data* _data67_,
                    TubaWidgetsFollowRequestRow* fr_row,
                    TubaRequestV2* req);
VALA_EXTERN void tuba_views_follow_requests_on_accept (TubaViewsFollowRequests* self,
                                           TubaWidgetsFollowRequestRow* fr_row,
                                           TubaRequestV2* req,
                                           TubaWidgetizable* widget,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_);
VALA_EXTERN void tuba_views_follow_requests_on_accept_finish (TubaViewsFollowRequests* self,
                                                  GAsyncResult* _res_);
static void ____lambda206__tuba_widgets_follow_request_row_accepted (TubaWidgetsFollowRequestRow* _sender,
                                                              TubaRequestV2* req,
                                                              gpointer self);
static void tuba_views_follow_requests_on_accept_data_free (gpointer _data);
static gboolean tuba_views_follow_requests_on_accept_co (TubaViewsFollowRequestsOnAcceptData* _data_);
VALA_EXTERN void tuba_request_v2_exec (TubaRequestV2* self,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN GQuark tuba_oopsie_quark (void);
VALA_EXTERN GType tuba_oopsie_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GInputStream* tuba_request_v2_exec_finish (TubaRequestV2* self,
                                           GAsyncResult* _res_,
                                           SoupMessageHeaders** response_headers,
                                           GError** error);
static void tuba_views_follow_requests_on_accept_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_);
VALA_EXTERN void tuba_network_get_parser_from_inputstream_async (GInputStream* in_stream,
                                                     GCancellable* cancellable,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
VALA_EXTERN JsonParser* tuba_network_get_parser_from_inputstream_finish (GAsyncResult* _res_,
                                                             GError** error);
VALA_EXTERN GType tuba_network_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaNetwork, g_object_unref)
VALA_EXTERN JsonNode* tuba_network_parse_node (TubaNetwork* self,
                                   JsonParser* parser);
VALA_EXTERN TubaEntity* tuba_entity_from_json (GType type,
                                   JsonNode* node,
                                   GError** error);
VALA_EXTERN GType tuba_api_relationship_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIRelationship, g_object_unref)
static void _vala_JsonNode_free (JsonNode* self);
VALA_EXTERN gboolean tuba_api_relationship_get_followed_by (TubaAPIRelationship* self);
VALA_EXTERN void tuba_views_timeline_safely_remove (TubaViewsTimeline* self,
                                        gint i);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
static void tuba_views_follow_requests_on_decline_data_free (gpointer _data);
static gboolean tuba_views_follow_requests_on_decline_co (TubaViewsFollowRequestsOnDeclineData* _data_);
static void tuba_views_follow_requests_on_decline_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
static GObject * tuba_views_follow_requests_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties);
VALA_EXTERN void tuba_views_timeline_set_accepts (TubaViewsTimeline* self,
                                      GType value);
static GType tuba_views_follow_requests_get_type_once (void);

TubaViewsFollowRequests*
tuba_views_follow_requests_construct (GType object_type)
{
	TubaViewsFollowRequests * self = NULL;
	self = (TubaViewsFollowRequests*) g_object_new (object_type, "url", "/api/v1/follow_requests", "label", _ ("Follow Requests"), "icon", "address-book-new-symbolic", "empty-state-title", _ ("No Follow Requests"), "batch-size-min", 20, NULL);
	return self;
}

TubaViewsFollowRequests*
tuba_views_follow_requests_new (void)
{
	return tuba_views_follow_requests_construct (TUBA_VIEWS_TYPE_FOLLOW_REQUESTS);
}

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

static Block67Data*
block67_data_ref (Block67Data* _data67_)
{
	g_atomic_int_inc (&_data67_->_ref_count_);
	return _data67_;
}

static void
block67_data_unref (void * _userdata_)
{
	Block67Data* _data67_;
	_data67_ = (Block67Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data67_->_ref_count_)) {
		TubaViewsFollowRequests* self;
		self = _data67_->self;
		_g_object_unref0 (_data67_->obj);
		_g_object_unref0 (self);
		g_slice_free (Block67Data, _data67_);
	}
}

static void
___lambda205_ (Block67Data* _data67_,
               TubaWidgetsFollowRequestRow* fr_row,
               TubaRequestV2* req)
{
	TubaViewsFollowRequests* self;
	self = _data67_->self;
	g_return_if_fail (fr_row != NULL);
	g_return_if_fail (req != NULL);
	tuba_views_follow_requests_on_decline (self, fr_row, req, TUBA_IS_WIDGETIZABLE (_data67_->obj) ? ((TubaWidgetizable*) _data67_->obj) : NULL, NULL, NULL);
}

static void
____lambda205__tuba_widgets_follow_request_row_declined (TubaWidgetsFollowRequestRow* _sender,
                                                         TubaRequestV2* req,
                                                         gpointer self)
{
	___lambda205_ (self, _sender, req);
}

static void
___lambda206_ (Block67Data* _data67_,
               TubaWidgetsFollowRequestRow* fr_row,
               TubaRequestV2* req)
{
	TubaViewsFollowRequests* self;
	self = _data67_->self;
	g_return_if_fail (fr_row != NULL);
	g_return_if_fail (req != NULL);
	tuba_views_follow_requests_on_accept (self, fr_row, req, TUBA_IS_WIDGETIZABLE (_data67_->obj) ? ((TubaWidgetizable*) _data67_->obj) : NULL, NULL, NULL);
}

static void
____lambda206__tuba_widgets_follow_request_row_accepted (TubaWidgetsFollowRequestRow* _sender,
                                                         TubaRequestV2* req,
                                                         gpointer self)
{
	___lambda206_ (self, _sender, req);
}

static GtkWidget*
tuba_views_follow_requests_real_on_create_model_widget (TubaViewsContentBase* base,
                                                        GObject* obj)
{
	TubaViewsFollowRequests * self;
	Block67Data* _data67_;
	GObject* _tmp0_;
	GtkWidget* widget = NULL;
	GtkWidget* _tmp1_;
	TubaWidgetsAccount* widget_account = NULL;
	GtkWidget* _tmp2_;
	TubaWidgetsAccount* _tmp3_;
	TubaWidgetsAccount* _tmp4_;
	GtkWidget* result;
	self = (TubaViewsFollowRequests*) base;
	g_return_val_if_fail (obj != NULL, NULL);
	_data67_ = g_slice_new0 (Block67Data);
	_data67_->_ref_count_ = 1;
	_data67_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (obj);
	_g_object_unref0 (_data67_->obj);
	_data67_->obj = _tmp0_;
	_tmp1_ = TUBA_VIEWS_CONTENT_BASE_CLASS (tuba_views_follow_requests_parent_class)->on_create_model_widget ((TubaViewsContentBase*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_VIEWS_TYPE_TIMELINE, TubaViewsTimeline), _data67_->obj);
	widget = _tmp1_;
	_tmp2_ = widget;
	_tmp3_ = _g_object_ref0 (TUBA_WIDGETS_IS_ACCOUNT (_tmp2_) ? ((TubaWidgetsAccount*) _tmp2_) : NULL);
	widget_account = _tmp3_;
	_tmp4_ = widget_account;
	if (_tmp4_ != NULL) {
		TubaWidgetsFollowRequestRow* fr_row = NULL;
		TubaWidgetsAccount* _tmp5_;
		TubaWidgetsFollowRequestRow* _tmp6_;
		TubaWidgetsFollowRequestRow* _tmp7_;
		TubaWidgetsFollowRequestRow* _tmp8_;
		_tmp5_ = widget_account;
		_tmp6_ = tuba_widgets_account_add_fr_row (_tmp5_);
		fr_row = _tmp6_;
		_tmp7_ = fr_row;
		g_signal_connect_data (_tmp7_, "declined", (GCallback) ____lambda205__tuba_widgets_follow_request_row_declined, block67_data_ref (_data67_), (GClosureNotify) block67_data_unref, 0);
		_tmp8_ = fr_row;
		g_signal_connect_data (_tmp8_, "accepted", (GCallback) ____lambda206__tuba_widgets_follow_request_row_accepted, block67_data_ref (_data67_), (GClosureNotify) block67_data_unref, 0);
		_g_object_unref0 (fr_row);
	}
	result = widget;
	_g_object_unref0 (widget_account);
	block67_data_unref (_data67_);
	_data67_ = NULL;
	return result;
}

static void
tuba_views_follow_requests_on_accept_data_free (gpointer _data)
{
	TubaViewsFollowRequestsOnAcceptData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->fr_row);
	_g_object_unref0 (_data_->req);
	_g_object_unref0 (_data_->widget);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsFollowRequestsOnAcceptData, _data_);
}

void
tuba_views_follow_requests_on_accept (TubaViewsFollowRequests* self,
                                      TubaWidgetsFollowRequestRow* fr_row,
                                      TubaRequestV2* req,
                                      TubaWidgetizable* widget,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_)
{
	TubaViewsFollowRequestsOnAcceptData* _data_;
	TubaViewsFollowRequests* _tmp0_;
	TubaWidgetsFollowRequestRow* _tmp1_;
	TubaRequestV2* _tmp2_;
	TubaWidgetizable* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (fr_row != NULL);
	g_return_if_fail (req != NULL);
	g_return_if_fail (widget != NULL);
	_data_ = g_slice_new0 (TubaViewsFollowRequestsOnAcceptData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_follow_requests_on_accept_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (fr_row);
	_g_object_unref0 (_data_->fr_row);
	_data_->fr_row = _tmp1_;
	_tmp2_ = _g_object_ref0 (req);
	_g_object_unref0 (_data_->req);
	_data_->req = _tmp2_;
	_tmp3_ = _g_object_ref0 (widget);
	_g_object_unref0 (_data_->widget);
	_data_->widget = _tmp3_;
	tuba_views_follow_requests_on_accept_co (_data_);
}

void
tuba_views_follow_requests_on_accept_finish (TubaViewsFollowRequests* self,
                                             GAsyncResult* _res_)
{
	TubaViewsFollowRequestsOnAcceptData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_follow_requests_on_accept_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_)
{
	TubaViewsFollowRequestsOnAcceptData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_follow_requests_on_accept_co (_data_);
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

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 gboolean
tuba_views_follow_requests_on_accept_co (TubaViewsFollowRequestsOnAcceptData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	gtk_widget_set_sensitive ((GtkWidget*) _data_->fr_row, FALSE);
	{
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->req, tuba_views_follow_requests_on_accept_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp0_ = tuba_request_v2_exec_finish (_data_->req, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp0_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp1_, NULL, tuba_views_follow_requests_on_accept_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp2_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp2_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp3_ = tuba_network;
		_data_->_tmp4_ = _data_->parser;
		_data_->_tmp5_ = tuba_network_parse_node (_data_->_tmp3_, _data_->_tmp4_);
		_data_->node = _data_->_tmp5_;
		_data_->_tmp7_ = _data_->node;
		_data_->_tmp8_ = tuba_entity_from_json (TUBA_API_TYPE_RELATIONSHIP, _data_->_tmp7_, &_data_->_inner_error0_);
		_data_->_tmp6_ = _data_->_tmp8_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			__vala_JsonNode_free0 (_data_->node);
			_g_object_unref0 (_data_->parser);
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp9_ = _g_object_ref0 (TUBA_API_IS_RELATIONSHIP (_data_->_tmp6_) ? ((TubaAPIRelationship*) _data_->_tmp6_) : NULL);
		_data_->relationship = _data_->_tmp9_;
		_data_->_tmp10_ = _data_->relationship;
		_data_->_tmp11_ = tuba_api_relationship_get_followed_by (_data_->_tmp10_);
		_data_->_tmp12_ = _data_->_tmp11_;
		if (_data_->_tmp12_ == TRUE) {
			_data_->_tmp13_ = ((TubaViewsContentBase*) _data_->self)->model;
			_data_->_tmp14_ = 0U;
			_data_->_tmp15_ = g_list_store_find (_data_->_tmp13_, (GObject*) _data_->widget, &_data_->_tmp14_);
			_data_->indx = _data_->_tmp14_;
			_data_->found = _data_->_tmp15_;
			if (_data_->found) {
				tuba_views_timeline_safely_remove ((TubaViewsTimeline*) _data_->self, (gint) _data_->indx);
			}
		} else {
			gtk_widget_set_sensitive ((GtkWidget*) _data_->fr_row, TRUE);
		}
		_g_object_unref0 (_data_->relationship);
		_g_object_unref0 (_data_->_tmp6_);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp16_ = _data_->e;
		_data_->_tmp17_ = g_strdup_printf ("%i", _data_->_tmp16_->code);
		_data_->_tmp18_ = _data_->_tmp17_;
		_data_->_tmp19_ = _data_->e;
		_data_->_tmp20_ = _data_->_tmp19_->message;
		_data_->_tmp21_ = string_to_string (_data_->_tmp20_);
		_data_->_tmp22_ = g_strconcat ("Couldn't perform accept: ", _data_->_tmp18_, " ", _data_->_tmp21_, NULL);
		_data_->_tmp23_ = _data_->_tmp22_;
		g_warning ("FollowRequests.vala:47: %s", _data_->_tmp23_);
		_g_free0 (_data_->_tmp23_);
		_g_free0 (_data_->_tmp18_);
		_data_->_tmp24_ = tuba_app;
		_data_->_tmp25_ = _data_->e;
		_data_->_tmp26_ = _data_->_tmp25_->message;
		_data_->_tmp27_ = g_strdup_printf ("%s: %s", _ ("Error"), _data_->_tmp26_);
		_data_->_tmp28_ = _data_->_tmp27_;
		g_signal_emit_by_name (_data_->_tmp24_, "toast", _data_->_tmp28_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_data_->_tmp28_);
		gtk_widget_set_sensitive ((GtkWidget*) _data_->fr_row, TRUE);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
tuba_views_follow_requests_on_decline_data_free (gpointer _data)
{
	TubaViewsFollowRequestsOnDeclineData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->fr_row);
	_g_object_unref0 (_data_->req);
	_g_object_unref0 (_data_->widget);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsFollowRequestsOnDeclineData, _data_);
}

void
tuba_views_follow_requests_on_decline (TubaViewsFollowRequests* self,
                                       TubaWidgetsFollowRequestRow* fr_row,
                                       TubaRequestV2* req,
                                       TubaWidgetizable* widget,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	TubaViewsFollowRequestsOnDeclineData* _data_;
	TubaViewsFollowRequests* _tmp0_;
	TubaWidgetsFollowRequestRow* _tmp1_;
	TubaRequestV2* _tmp2_;
	TubaWidgetizable* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (fr_row != NULL);
	g_return_if_fail (req != NULL);
	g_return_if_fail (widget != NULL);
	_data_ = g_slice_new0 (TubaViewsFollowRequestsOnDeclineData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_follow_requests_on_decline_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (fr_row);
	_g_object_unref0 (_data_->fr_row);
	_data_->fr_row = _tmp1_;
	_tmp2_ = _g_object_ref0 (req);
	_g_object_unref0 (_data_->req);
	_data_->req = _tmp2_;
	_tmp3_ = _g_object_ref0 (widget);
	_g_object_unref0 (_data_->widget);
	_data_->widget = _tmp3_;
	tuba_views_follow_requests_on_decline_co (_data_);
}

void
tuba_views_follow_requests_on_decline_finish (TubaViewsFollowRequests* self,
                                              GAsyncResult* _res_)
{
	TubaViewsFollowRequestsOnDeclineData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_follow_requests_on_decline_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	TubaViewsFollowRequestsOnDeclineData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_follow_requests_on_decline_co (_data_);
}

static gboolean
tuba_views_follow_requests_on_decline_co (TubaViewsFollowRequestsOnDeclineData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	gtk_widget_set_sensitive ((GtkWidget*) _data_->fr_row, FALSE);
	{
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->req, tuba_views_follow_requests_on_decline_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp0_ = tuba_request_v2_exec_finish (_data_->req, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp0_;
		_g_object_unref0 (_data_->_tmp1_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp2_ = ((TubaViewsContentBase*) _data_->self)->model;
		_data_->_tmp3_ = 0U;
		_data_->_tmp4_ = g_list_store_find (_data_->_tmp2_, (GObject*) _data_->widget, &_data_->_tmp3_);
		_data_->indx = _data_->_tmp3_;
		_data_->found = _data_->_tmp4_;
		if (_data_->found) {
			tuba_views_timeline_safely_remove ((TubaViewsTimeline*) _data_->self, (gint) _data_->indx);
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp5_ = _data_->e;
		_data_->_tmp6_ = g_strdup_printf ("%i", _data_->_tmp5_->code);
		_data_->_tmp7_ = _data_->_tmp6_;
		_data_->_tmp8_ = _data_->e;
		_data_->_tmp9_ = _data_->_tmp8_->message;
		_data_->_tmp10_ = string_to_string (_data_->_tmp9_);
		_data_->_tmp11_ = g_strconcat ("Couldn't perform decline: ", _data_->_tmp7_, " ", _data_->_tmp10_, NULL);
		_data_->_tmp12_ = _data_->_tmp11_;
		g_warning ("FollowRequests.vala:63: %s", _data_->_tmp12_);
		_g_free0 (_data_->_tmp12_);
		_g_free0 (_data_->_tmp7_);
		_data_->_tmp13_ = tuba_app;
		_data_->_tmp14_ = _data_->e;
		_data_->_tmp15_ = _data_->_tmp14_->message;
		_data_->_tmp16_ = g_strdup_printf ("%s: %s", _ ("Error"), _data_->_tmp15_);
		_data_->_tmp17_ = _data_->_tmp16_;
		g_signal_emit_by_name (_data_->_tmp13_, "toast", _data_->_tmp17_, (guint) 5, NULL, NULL, NULL);
		_g_free0 (_data_->_tmp17_);
		gtk_widget_set_sensitive ((GtkWidget*) _data_->fr_row, TRUE);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static GObject *
tuba_views_follow_requests_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsFollowRequests * self;
	parent_class = G_OBJECT_CLASS (tuba_views_follow_requests_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_FOLLOW_REQUESTS, TubaViewsFollowRequests);
	tuba_views_timeline_set_accepts ((TubaViewsTimeline*) self, TUBA_API_TYPE_ACCOUNT);
	return obj;
}

static void
tuba_views_follow_requests_class_init (TubaViewsFollowRequestsClass * klass,
                                       gpointer klass_data)
{
	tuba_views_follow_requests_parent_class = g_type_class_peek_parent (klass);
	((TubaViewsContentBaseClass *) klass)->on_create_model_widget = (GtkWidget* (*) (TubaViewsContentBase*, GObject*)) tuba_views_follow_requests_real_on_create_model_widget;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_follow_requests_constructor;
}

static void
tuba_views_follow_requests_instance_init (TubaViewsFollowRequests * self,
                                          gpointer klass)
{
}

 G_GNUC_NO_INLINE static GType
tuba_views_follow_requests_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsFollowRequestsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_follow_requests_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsFollowRequests), 0, (GInstanceInitFunc) tuba_views_follow_requests_instance_init, NULL };
	GType tuba_views_follow_requests_type_id;
	tuba_views_follow_requests_type_id = g_type_register_static (TUBA_VIEWS_TYPE_TIMELINE, "TubaViewsFollowRequests", &g_define_type_info, G_TYPE_FLAG_NONE);
	return tuba_views_follow_requests_type_id;
}

GType
tuba_views_follow_requests_get_type (void)
{
	static GType tuba_views_follow_requests_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_follow_requests_type_id__once)) {
		GType tuba_views_follow_requests_type_id;
		tuba_views_follow_requests_type_id = tuba_views_follow_requests_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_follow_requests_type_id__once, tuba_views_follow_requests_type_id);
	}
	return tuba_views_follow_requests_type_id__once;
}

