/* Hashtag.c generated by valac 0.56.19, the Vala compiler
 * generated from Hashtag.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_HASHTAG (tuba_views_hashtag_get_type ())
#define TUBA_VIEWS_HASHTAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_HASHTAG, TubaViewsHashtag))
#define TUBA_VIEWS_HASHTAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_HASHTAG, TubaViewsHashtagClass))
#define TUBA_VIEWS_IS_HASHTAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_HASHTAG))
#define TUBA_VIEWS_IS_HASHTAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_HASHTAG))
#define TUBA_VIEWS_HASHTAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_HASHTAG, TubaViewsHashtagClass))

typedef struct _TubaViewsHashtag TubaViewsHashtag;
typedef struct _TubaViewsHashtagClass TubaViewsHashtagClass;
typedef struct _TubaViewsHashtagPrivate TubaViewsHashtagPrivate;

#define TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON (tuba_widgets_status_action_button_get_type ())
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButton))
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButtonClass))
#define TUBA_WIDGETS_IS_STATUS_ACTION_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON))
#define TUBA_WIDGETS_IS_STATUS_ACTION_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON))
#define TUBA_WIDGETS_STATUS_ACTION_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_STATUS_ACTION_BUTTON, TubaWidgetsStatusActionButtonClass))

typedef struct _TubaWidgetsStatusActionButton TubaWidgetsStatusActionButton;
typedef struct _TubaWidgetsStatusActionButtonClass TubaWidgetsStatusActionButtonClass;
enum  {
	TUBA_VIEWS_HASHTAG_0_PROPERTY,
	TUBA_VIEWS_HASHTAG_FEATURED_PROPERTY,
	TUBA_VIEWS_HASHTAG_NUM_PROPERTIES
};
static GParamSpec* tuba_views_hashtag_properties[TUBA_VIEWS_HASHTAG_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_TYPE_FAVORITE_BUTTON (tuba_views_hashtags_favorite_tag_favorite_button_get_type ())
#define TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_FAVORITE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_TYPE_FAVORITE_BUTTON, TubaViewsHashtagsFavoriteTagFavoriteButton))
#define TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_FAVORITE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_TYPE_FAVORITE_BUTTON, TubaViewsHashtagsFavoriteTagFavoriteButtonClass))
#define TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_IS_FAVORITE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_TYPE_FAVORITE_BUTTON))
#define TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_IS_FAVORITE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_TYPE_FAVORITE_BUTTON))
#define TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_FAVORITE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_HASHTAGS_FAVORITE_TAG_TYPE_FAVORITE_BUTTON, TubaViewsHashtagsFavoriteTagFavoriteButtonClass))

typedef struct _TubaViewsHashtagsFavoriteTagFavoriteButton TubaViewsHashtagsFavoriteTagFavoriteButton;
typedef struct _TubaViewsHashtagsFavoriteTagFavoriteButtonClass TubaViewsHashtagsFavoriteTagFavoriteButtonClass;

#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;

#define TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS (tuba_api_instance_v2_api_versions_get_type ())
#define TUBA_API_INSTANCE_V2_API_VERSIONS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersions))
#define TUBA_API_INSTANCE_V2_API_VERSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersionsClass))
#define TUBA_API_INSTANCE_V2_IS_API_VERSIONS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS))
#define TUBA_API_INSTANCE_V2_IS_API_VERSIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS))
#define TUBA_API_INSTANCE_V2_API_VERSIONS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_INSTANCE_V2_TYPE_API_VERSIONS, TubaAPIInstanceV2APIVersionsClass))

typedef struct _TubaAPIInstanceV2APIVersions TubaAPIInstanceV2APIVersions;
typedef struct _TubaAPIInstanceV2APIVersionsClass TubaAPIInstanceV2APIVersionsClass;
typedef enum  {
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_NONE = 1 << 0,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_QUOTE = 1 << 1,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_EMOJI_REACTIONS = 1 << 2,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_BUBBLE = 1 << 3,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GROUP_NOTIFICATIONS = 1 << 4,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_FEATURE_TAGS = 1 << 5,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ENDORSE_USERS = 1 << 6,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_MUTUALS = 1 << 7,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_TRANSLATION = 1 << 8,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP = 1 << 9,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GLITCH = 1 << 10,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_LOCAL_ONLY = 1 << 11,
	TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GOTOSOCIAL = 1 << 12
} TubaInstanceAccountInstanceFeatures;

#define TUBA_INSTANCE_ACCOUNT_TYPE_INSTANCE_FEATURES (tuba_instance_account_instance_features_get_type ())
typedef enum  {
	TUBA_REQUEST_V2_METHOD_GET,
	TUBA_REQUEST_V2_METHOD_POST,
	TUBA_REQUEST_V2_METHOD_PUT,
	TUBA_REQUEST_V2_METHOD_DELETE,
	TUBA_REQUEST_V2_METHOD_PATCH
} TubaRequestV2Method;

#define TUBA_REQUEST_V2_TYPE_METHOD (tuba_request_v2_method_get_type ())

#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_TAG (tuba_api_tag_get_type ())
#define TUBA_API_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_TAG, TubaAPITag))
#define TUBA_API_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_TAG, TubaAPITagClass))
#define TUBA_API_IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_TAG))
#define TUBA_API_IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_TAG))
#define TUBA_API_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_TAG, TubaAPITagClass))

typedef struct _TubaAPITag TubaAPITag;
typedef struct _TubaAPITagClass TubaAPITagClass;
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_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 _TubaViewsHashtagOnFeatureRealData TubaViewsHashtagOnFeatureRealData;
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
typedef struct _TubaViewsHashtagFollowRealData TubaViewsHashtagFollowRealData;
typedef struct _TubaViewsHashtagInitTagData TubaViewsHashtagInitTagData;

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 _TubaViewsHashtag {
	TubaViewsTimeline parent_instance;
	TubaViewsHashtagPrivate * priv;
};

struct _TubaViewsHashtagClass {
	TubaViewsTimelineClass parent_class;
};

struct _TubaViewsHashtagPrivate {
	gboolean _featured;
	gchar* _tag;
	gboolean _following;
	TubaWidgetsStatusActionButton* feature_tag_btn;
	GtkButton* follow_tag_btn;
};

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 _TubaViewsHashtagOnFeatureRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsHashtag* self;
	const gchar* _tmp0_;
	gboolean _tmp1_;
	TubaRequestV2* req;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	TubaAccountStore* _tmp7_;
	TubaInstanceAccount* _tmp8_;
	TubaInstanceAccount* _tmp9_;
	TubaInstanceAccount* _tmp10_;
	TubaRequestV2* _tmp11_;
	TubaRequestV2* _tmp12_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp13_;
	GInputStream* _tmp14_;
	JsonParser* parser;
	GInputStream* _tmp15_;
	JsonParser* _tmp16_;
	JsonNode* node;
	TubaNetwork* _tmp17_;
	JsonParser* _tmp18_;
	JsonNode* _tmp19_;
	TubaAPITag* tag_info;
	JsonNode* _tmp20_;
	TubaAPITag* _tmp21_;
	gboolean _tmp22_;
	gboolean _tmp23_;
	TubaAPITag* _tmp24_;
	gboolean _tmp25_;
	gboolean _tmp26_;
	TubaAPITag* _tmp27_;
	gboolean _tmp28_;
	gboolean _tmp29_;
	gboolean _tmp30_;
	TubaAPITag* _tmp31_;
	gboolean _tmp32_;
	gboolean _tmp33_;
	TubaAPITag* _tmp34_;
	gboolean _tmp35_;
	gboolean _tmp36_;
	TubaApplication* _tmp37_;
	TubaWidgetsStatusActionButton* _tmp38_;
	GError* e;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	GError* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	GError* _tmp44_;
	const gchar* _tmp45_;
	const gchar* _tmp46_;
	gchar* _tmp47_;
	gchar* _tmp48_;
	TubaApplication* _tmp49_;
	GError* _tmp50_;
	const gchar* _tmp51_;
	gboolean _tmp52_;
	TubaWidgetsStatusActionButton* _tmp53_;
	GError* _inner_error0_;
};

struct _TubaViewsHashtagFollowRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsHashtag* self;
	gchar* action;
	TubaRequestV2* req;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	TubaAccountStore* _tmp5_;
	TubaInstanceAccount* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaInstanceAccount* _tmp8_;
	TubaRequestV2* _tmp9_;
	TubaRequestV2* _tmp10_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp11_;
	GInputStream* _tmp12_;
	JsonParser* parser;
	GInputStream* _tmp13_;
	JsonParser* _tmp14_;
	JsonObject* root;
	TubaNetwork* _tmp15_;
	JsonParser* _tmp16_;
	JsonObject* _tmp17_;
	JsonObject* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	GError* _inner_error0_;
};

struct _TubaViewsHashtagInitTagData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaViewsHashtag* self;
	TubaRequestV2* req;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	TubaAccountStore* _tmp4_;
	TubaInstanceAccount* _tmp5_;
	TubaInstanceAccount* _tmp6_;
	TubaInstanceAccount* _tmp7_;
	TubaRequestV2* _tmp8_;
	TubaRequestV2* _tmp9_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp10_;
	GInputStream* _tmp11_;
	JsonParser* parser;
	GInputStream* _tmp12_;
	JsonParser* _tmp13_;
	JsonNode* node;
	TubaNetwork* _tmp14_;
	JsonParser* _tmp15_;
	JsonNode* _tmp16_;
	TubaAPITag* tag_info;
	JsonNode* _tmp17_;
	TubaAPITag* _tmp18_;
	TubaAPITag* _tmp19_;
	gboolean _tmp20_;
	gboolean _tmp21_;
	TubaAPITag* _tmp22_;
	gboolean _tmp23_;
	gboolean _tmp24_;
	GError* _inner_error0_;
};

static gint TubaViewsHashtag_private_offset;
static gpointer tuba_views_hashtag_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
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_hashtag_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsHashtag, g_object_unref)
VALA_EXTERN GType tuba_widgets_status_action_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsStatusActionButton, g_object_unref)
VALA_EXTERN gchar* tuba_views_timeline_get_stream_url (TubaViewsTimeline* self);
VALA_EXTERN TubaViewsHashtag* tuba_views_hashtag_new (const gchar* tag,
                                          gboolean* following,
                                          const gchar* url_basename,
                                          gboolean* featured);
VALA_EXTERN TubaViewsHashtag* tuba_views_hashtag_construct (GType object_type,
                                                const gchar* tag,
                                                gboolean* following,
                                                const gchar* url_basename,
                                                gboolean* featured);
static void tuba_views_hashtag_set_tag (TubaViewsHashtag* self,
                                 const gchar* value);
static const gchar* tuba_views_hashtag_get_tag (TubaViewsHashtag* self);
VALA_EXTERN TubaViewsHashtagsFavoriteTagFavoriteButton* tuba_views_hashtags_favorite_tag_favorite_button_new (const gchar* tag,
                                                                                                  gboolean force_recheck);
VALA_EXTERN TubaViewsHashtagsFavoriteTagFavoriteButton* tuba_views_hashtags_favorite_tag_favorite_button_construct (GType object_type,
                                                                                                        const gchar* tag,
                                                                                                        gboolean force_recheck);
VALA_EXTERN GType tuba_views_hashtags_favorite_tag_favorite_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsHashtagsFavoriteTagFavoriteButton, g_object_unref)
static void tuba_views_hashtag_set_following (TubaViewsHashtag* self,
                                       gboolean value);
static void tuba_views_hashtag_set_featured (TubaViewsHashtag* self,
                                      gboolean value);
static void tuba_views_hashtag_create_featuring_button (TubaViewsHashtag* self);
static void tuba_views_hashtag_init_tag (TubaViewsHashtag* self,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_);
static void tuba_views_hashtag_init_tag_finish (TubaViewsHashtag* self,
                                         GAsyncResult* _res_);
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 GType tuba_api_instance_v2_api_versions_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIInstanceV2APIVersions, g_object_unref)
VALA_EXTERN TubaAPIInstanceV2APIVersions* tuba_instance_account_get_tuba_api_versions (TubaInstanceAccount* self);
VALA_EXTERN gint8 tuba_api_instance_v2_api_versions_get_mastodon (TubaAPIInstanceV2APIVersions* self);
VALA_EXTERN GType tuba_instance_account_instance_features_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaInstanceAccountInstanceFeatures tuba_instance_account_get_tuba_instance_features (TubaInstanceAccount* self);
VALA_EXTERN TubaWidgetsStatusActionButton* tuba_widgets_status_action_button_new_with_icon_name (const gchar* icon_name);
VALA_EXTERN TubaWidgetsStatusActionButton* tuba_widgets_status_action_button_construct_with_icon_name (GType object_type,
                                                                                           const gchar* icon_name);
VALA_EXTERN void tuba_widgets_status_action_button_set_active_icon_name (TubaWidgetsStatusActionButton* self,
                                                             const gchar* value);
static void tuba_views_hashtag_on_feature (TubaViewsHashtag* self);
static void _tuba_views_hashtag_on_feature_gtk_button_clicked (GtkButton* _sender,
                                                        gpointer self);
VALA_EXTERN void tuba_widgets_status_action_button_block_clicked (TubaWidgetsStatusActionButton* self);
VALA_EXTERN gboolean tuba_views_hashtag_get_featured (TubaViewsHashtag* self);
static void tuba_views_hashtag_on_feature_real (TubaViewsHashtag* self,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_);
static void tuba_views_hashtag_on_feature_real_finish (TubaViewsHashtag* self,
                                                GAsyncResult* _res_);
static void tuba_views_hashtag_on_feature_real_data_free (gpointer _data);
static gboolean tuba_views_hashtag_on_feature_real_co (TubaViewsHashtagOnFeatureRealData* _data_);
VALA_EXTERN GType tuba_request_v2_method_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaRequestV2* tuba_request_v2_new (const gchar* url,
                                    TubaRequestV2Method method);
VALA_EXTERN TubaRequestV2* tuba_request_v2_construct (GType object_type,
                                          const gchar* url,
                                          TubaRequestV2Method method);
VALA_EXTERN void tuba_request_v2_set_account (TubaRequestV2* self,
                                  TubaInstanceAccount* value);
VALA_EXTERN void tuba_request_v2_set_ctx (TubaRequestV2* self,
                              GtkWidget* value);
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_hashtag_on_feature_real_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 GType tuba_api_tag_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPITag, g_object_unref)
VALA_EXTERN TubaAPITag* tuba_api_tag_from (JsonNode* node,
                               GError** error);
static void _vala_JsonNode_free (JsonNode* self);
static gboolean tuba_views_hashtag_get_following (TubaViewsHashtag* self);
VALA_EXTERN gboolean tuba_api_tag_get_following (TubaAPITag* self);
VALA_EXTERN gboolean tuba_api_tag_get_featuring (TubaAPITag* self);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
VALA_EXTERN void tuba_widgets_status_action_button_unblock_clicked (TubaWidgetsStatusActionButton* self);
static void tuba_views_hashtag_create_follow_button (TubaViewsHashtag* self);
static void tuba_views_hashtag_follow (TubaViewsHashtag* self);
static void _tuba_views_hashtag_follow_gtk_button_clicked (GtkButton* _sender,
                                                    gpointer self);
static void tuba_views_hashtag_update_follow_button (TubaViewsHashtag* self);
static void tuba_views_hashtag_follow_real (TubaViewsHashtag* self,
                                     const gchar* action,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_);
static void tuba_views_hashtag_follow_real_finish (TubaViewsHashtag* self,
                                            GAsyncResult* _res_);
static void tuba_views_hashtag_follow_real_data_free (gpointer _data);
static gboolean tuba_views_hashtag_follow_real_co (TubaViewsHashtagFollowRealData* _data_);
static void tuba_views_hashtag_follow_real_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_);
VALA_EXTERN JsonObject* tuba_network_parse (TubaNetwork* self,
                                JsonParser* parser);
static void tuba_views_hashtag_init_tag_data_free (gpointer _data);
static gboolean tuba_views_hashtag_init_tag_co (TubaViewsHashtagInitTagData* _data_);
static void tuba_views_hashtag_init_tag_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_);
static gchar* tuba_views_hashtag_real_get_stream_url (TubaViewsTimeline* base);
VALA_EXTERN const gchar* tuba_views_timeline_get_url (TubaViewsTimeline* self);
VALA_EXTERN TubaInstanceAccount* tuba_account_holder_get_account (TubaAccountHolder* self);
VALA_EXTERN const gchar* tuba_instance_account_get_tuba_streaming_url (TubaInstanceAccount* self);
VALA_EXTERN const gchar* tuba_instance_account_get_access_token (TubaInstanceAccount* self);
static void tuba_views_hashtag_finalize (GObject * obj);
static GType tuba_views_hashtag_get_type_once (void);
static void _vala_tuba_views_hashtag_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);
static void _vala_tuba_views_hashtag_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec);
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 gssize _vala_array_length (gpointer array);

static inline gpointer
tuba_views_hashtag_get_instance_private (TubaViewsHashtag* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsHashtag_private_offset);
}

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

TubaViewsHashtag*
tuba_views_hashtag_construct (GType object_type,
                              const gchar* tag,
                              gboolean* following,
                              const gchar* url_basename,
                              gboolean* featured)
{
	TubaViewsHashtag * self = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* temp_tag = NULL;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	AdwHeaderBar* _tmp10_;
	const gchar* _tmp11_;
	TubaViewsHashtagsFavoriteTagFavoriteButton* _tmp12_;
	TubaViewsHashtagsFavoriteTagFavoriteButton* _tmp13_;
	g_return_val_if_fail (tag != NULL, NULL);
	if (url_basename == NULL) {
		_tmp0_ = tag;
	} else {
		_tmp0_ = url_basename;
	}
	_tmp1_ = g_strdup (_tmp0_);
	temp_tag = _tmp1_;
	_tmp2_ = temp_tag;
	_tmp3_ = string_to_string (_tmp2_);
	_tmp4_ = g_strconcat ("/api/v1/timelines/tag/", _tmp3_, NULL);
	_tmp5_ = _tmp4_;
	_tmp6_ = string_to_string (tag);
	_tmp7_ = g_strconcat ("#", _tmp6_, NULL);
	_tmp8_ = _tmp7_;
	self = (TubaViewsHashtag*) g_object_new (object_type, "url", _tmp5_, "label", _tmp8_, NULL);
	_g_free0 (_tmp8_);
	_g_free0 (_tmp5_);
	_tmp9_ = temp_tag;
	tuba_views_hashtag_set_tag (self, _tmp9_);
	_tmp10_ = ((TubaViewsBase*) self)->header;
	_tmp11_ = self->priv->_tag;
	_tmp12_ = tuba_views_hashtags_favorite_tag_favorite_button_new (_tmp11_, FALSE);
	g_object_ref_sink (_tmp12_);
	_tmp13_ = _tmp12_;
	adw_header_bar_pack_start (_tmp10_, (GtkWidget*) _tmp13_);
	_g_object_unref0 (_tmp13_);
	if (following != NULL) {
		tuba_views_hashtag_set_following (self, *following);
	}
	if (featured != NULL) {
		tuba_views_hashtag_set_featured (self, *featured);
		tuba_views_hashtag_create_featuring_button (self);
	}
	tuba_views_hashtag_init_tag (self, NULL, NULL);
	_g_free0 (temp_tag);
	return self;
}

TubaViewsHashtag*
tuba_views_hashtag_new (const gchar* tag,
                        gboolean* following,
                        const gchar* url_basename,
                        gboolean* featured)
{
	return tuba_views_hashtag_construct (TUBA_VIEWS_TYPE_HASHTAG, tag, following, url_basename, featured);
}

static void
_tuba_views_hashtag_on_feature_gtk_button_clicked (GtkButton* _sender,
                                                   gpointer self)
{
	tuba_views_hashtag_on_feature ((TubaViewsHashtag*) self);
}

static void
tuba_views_hashtag_create_featuring_button (TubaViewsHashtag* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	TubaAccountStore* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	TubaInstanceAccount* _tmp4_;
	TubaAPIInstanceV2APIVersions* _tmp5_;
	TubaAPIInstanceV2APIVersions* _tmp6_;
	gint8 _tmp7_;
	gint8 _tmp8_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar** _tmp18_;
	gchar* _tmp19_;
	TubaWidgetsStatusActionButton* _tmp20_ = NULL;
	TubaWidgetsStatusActionButton* _tmp21_;
	TubaWidgetsStatusActionButton* _tmp22_;
	AdwHeaderBar* _tmp23_;
	TubaWidgetsStatusActionButton* _tmp24_;
	g_return_if_fail (self != NULL);
	_tmp2_ = tuba_accounts;
	_tmp3_ = tuba_account_store_get_active (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = tuba_instance_account_get_tuba_api_versions (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = tuba_api_instance_v2_api_versions_get_mastodon (_tmp6_);
	_tmp8_ = _tmp7_;
	if (((gint) _tmp8_) <= 5) {
		TubaAccountStore* _tmp9_;
		TubaInstanceAccount* _tmp10_;
		TubaInstanceAccount* _tmp11_;
		TubaInstanceAccountInstanceFeatures _tmp12_;
		TubaInstanceAccountInstanceFeatures _tmp13_;
		_tmp9_ = tuba_accounts;
		_tmp10_ = tuba_account_store_get_active (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = tuba_instance_account_get_tuba_instance_features (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp1_ = !((_tmp13_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_FEATURE_TAGS) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_FEATURE_TAGS);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		TubaWidgetsStatusActionButton* _tmp14_;
		_tmp14_ = self->priv->feature_tag_btn;
		_tmp0_ = _tmp14_ != NULL;
	}
	if (_tmp0_) {
		return;
	}
	_tmp15_ = g_strdup ("tuba-heart-filled-symbolic");
	_tmp16_ = g_strdup ("ttl-status-action-heart");
	_tmp17_ = g_strdup ("raised");
	_tmp18_ = g_new0 (gchar*, 2 + 1);
	_tmp18_[0] = _tmp16_;
	_tmp18_[1] = _tmp17_;
	_tmp19_ = g_strdup (_ ("Feature on Profile"));
	_tmp20_ = tuba_widgets_status_action_button_new_with_icon_name ("tuba-heart-outline-thick-symbolic");
	tuba_widgets_status_action_button_set_active_icon_name (_tmp20_, _tmp15_);
	_g_free0 (_tmp15_);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp20_, _tmp18_);
	_tmp18_ = (_vala_array_free (_tmp18_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_valign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	gtk_widget_set_halign ((GtkWidget*) _tmp20_, GTK_ALIGN_CENTER);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp20_, _tmp19_);
	_g_free0 (_tmp19_);
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->feature_tag_btn);
	self->priv->feature_tag_btn = _tmp20_;
	_tmp21_ = self->priv->feature_tag_btn;
	g_object_bind_property_with_closures ((GObject*) self, "featured", (GObject*) _tmp21_, "active", 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)));
	_tmp22_ = self->priv->feature_tag_btn;
	g_signal_connect_object ((GtkButton*) _tmp22_, "clicked", (GCallback) _tuba_views_hashtag_on_feature_gtk_button_clicked, self, 0);
	_tmp23_ = ((TubaViewsBase*) self)->header;
	_tmp24_ = self->priv->feature_tag_btn;
	adw_header_bar_pack_end (_tmp23_, (GtkWidget*) _tmp24_);
}

static void
tuba_views_hashtag_on_feature (TubaViewsHashtag* self)
{
	TubaWidgetsStatusActionButton* _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->feature_tag_btn;
	tuba_widgets_status_action_button_block_clicked (_tmp0_);
	_tmp1_ = self->priv->_featured;
	tuba_views_hashtag_set_featured (self, !_tmp1_);
	tuba_views_hashtag_on_feature_real (self, NULL, NULL);
}

static void
tuba_views_hashtag_on_feature_real_data_free (gpointer _data)
{
	TubaViewsHashtagOnFeatureRealData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsHashtagOnFeatureRealData, _data_);
}

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

static void
tuba_views_hashtag_on_feature_real (TubaViewsHashtag* self,
                                    GAsyncReadyCallback _callback_,
                                    gpointer _user_data_)
{
	TubaViewsHashtagOnFeatureRealData* _data_;
	TubaViewsHashtag* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsHashtagOnFeatureRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_hashtag_on_feature_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_views_hashtag_on_feature_real_co (_data_);
}

static void
tuba_views_hashtag_on_feature_real_finish (TubaViewsHashtag* self,
                                           GAsyncResult* _res_)
{
	TubaViewsHashtagOnFeatureRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_hashtag_on_feature_real_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_)
{
	TubaViewsHashtagOnFeatureRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_hashtag_on_feature_real_co (_data_);
}

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

static gboolean
tuba_views_hashtag_on_feature_real_co (TubaViewsHashtagOnFeatureRealData* _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:
	_data_->_tmp1_ = _data_->self->priv->_featured;
	if (!_data_->_tmp1_) {
		_data_->_tmp0_ = "unfeature";
	} else {
		_data_->_tmp0_ = "feature";
	}
	_data_->_tmp2_ = _data_->self->priv->_tag;
	_data_->_tmp3_ = string_to_string (_data_->_tmp2_);
	_data_->_tmp4_ = string_to_string (_data_->_tmp0_);
	_data_->_tmp5_ = g_strconcat ("/api/v1/tags/", _data_->_tmp3_, "/", _data_->_tmp4_, NULL);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = tuba_accounts;
	_data_->_tmp8_ = tuba_account_store_get_active (_data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = _g_object_ref0 (_data_->_tmp9_);
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = tuba_request_v2_new (_data_->_tmp6_, TUBA_REQUEST_V2_METHOD_POST);
	tuba_request_v2_set_account (_data_->_tmp11_, _data_->_tmp10_);
	_g_object_unref0 (_data_->_tmp10_);
	tuba_request_v2_set_ctx (_data_->_tmp11_, (GtkWidget*) _data_->self);
	_data_->_tmp12_ = _data_->_tmp11_;
	_g_free0 (_data_->_tmp6_);
	_data_->req = _data_->_tmp12_;
	{
		_data_->_tmp13_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp13_, tuba_views_hashtag_on_feature_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp14_ = tuba_request_v2_exec_finish (_data_->_tmp13_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp14_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp15_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp15_, NULL, tuba_views_hashtag_on_feature_real_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp16_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp16_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp17_ = tuba_network;
		_data_->_tmp18_ = _data_->parser;
		_data_->_tmp19_ = tuba_network_parse_node (_data_->_tmp17_, _data_->_tmp18_);
		_data_->node = _data_->_tmp19_;
		_data_->_tmp20_ = _data_->node;
		_data_->_tmp21_ = tuba_api_tag_from (_data_->_tmp20_, &_data_->_inner_error0_);
		_data_->tag_info = _data_->_tmp21_;
		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_->_tmp22_ = tuba_views_hashtag_get_following (_data_->self);
		_data_->_tmp23_ = _data_->_tmp22_;
		_data_->_tmp24_ = _data_->tag_info;
		_data_->_tmp25_ = tuba_api_tag_get_following (_data_->_tmp24_);
		_data_->_tmp26_ = _data_->_tmp25_;
		if (_data_->_tmp23_ != _data_->_tmp26_) {
			_data_->_tmp27_ = _data_->tag_info;
			_data_->_tmp28_ = tuba_api_tag_get_following (_data_->_tmp27_);
			_data_->_tmp29_ = _data_->_tmp28_;
			tuba_views_hashtag_set_following (_data_->self, _data_->_tmp29_);
		}
		_data_->_tmp30_ = _data_->self->priv->_featured;
		_data_->_tmp31_ = _data_->tag_info;
		_data_->_tmp32_ = tuba_api_tag_get_featuring (_data_->_tmp31_);
		_data_->_tmp33_ = _data_->_tmp32_;
		if (_data_->_tmp30_ != _data_->_tmp33_) {
			_data_->_tmp34_ = _data_->tag_info;
			_data_->_tmp35_ = tuba_api_tag_get_featuring (_data_->_tmp34_);
			_data_->_tmp36_ = _data_->_tmp35_;
			tuba_views_hashtag_set_featured (_data_->self, _data_->_tmp36_);
		}
		_data_->_tmp37_ = tuba_app;
		g_signal_emit_by_name (_data_->_tmp37_, "refresh-featured");
		_data_->_tmp38_ = _data_->self->priv->feature_tag_btn;
		tuba_widgets_status_action_button_unblock_clicked (_data_->_tmp38_);
		_g_object_unref0 (_data_->tag_info);
		__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_->_tmp39_ = _data_->self->priv->_tag;
		_data_->_tmp40_ = string_to_string (_data_->_tmp39_);
		_data_->_tmp41_ = _data_->e;
		_data_->_tmp42_ = g_strdup_printf ("%i", _data_->_tmp41_->code);
		_data_->_tmp43_ = _data_->_tmp42_;
		_data_->_tmp44_ = _data_->e;
		_data_->_tmp45_ = _data_->_tmp44_->message;
		_data_->_tmp46_ = string_to_string (_data_->_tmp45_);
		_data_->_tmp47_ = g_strconcat ("Couldn't feature tag '", _data_->_tmp40_, "': ", _data_->_tmp43_, " ", _data_->_tmp46_, NULL);
		_data_->_tmp48_ = _data_->_tmp47_;
		g_warning ("Hashtag.vala:79: %s", _data_->_tmp48_);
		_g_free0 (_data_->_tmp48_);
		_g_free0 (_data_->_tmp43_);
		_data_->_tmp49_ = tuba_app;
		_data_->_tmp50_ = _data_->e;
		_data_->_tmp51_ = _data_->_tmp50_->message;
		g_signal_emit_by_name (_data_->_tmp49_, "toast", _data_->_tmp51_, (guint) 5, NULL, NULL, NULL);
		_data_->_tmp52_ = _data_->self->priv->_featured;
		tuba_views_hashtag_set_featured (_data_->self, !_data_->_tmp52_);
		_data_->_tmp53_ = _data_->self->priv->feature_tag_btn;
		tuba_widgets_status_action_button_unblock_clicked (_data_->_tmp53_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		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_object_unref0 (_data_->req);
	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_hashtag_follow_gtk_button_clicked (GtkButton* _sender,
                                               gpointer self)
{
	tuba_views_hashtag_follow ((TubaViewsHashtag*) self);
}

static void
tuba_views_hashtag_create_follow_button (TubaViewsHashtag* self)
{
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	AdwHeaderBar* _tmp3_;
	GtkButton* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->follow_tag_btn;
	if (_tmp0_ != NULL) {
		return;
	}
	_tmp1_ = (GtkButton*) gtk_button_new_with_label (_ ("Follow"));
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->follow_tag_btn);
	self->priv->follow_tag_btn = _tmp1_;
	_tmp2_ = self->priv->follow_tag_btn;
	g_signal_connect_object (_tmp2_, "clicked", (GCallback) _tuba_views_hashtag_follow_gtk_button_clicked, self, 0);
	_tmp3_ = ((TubaViewsBase*) self)->header;
	_tmp4_ = self->priv->follow_tag_btn;
	adw_header_bar_pack_end (_tmp3_, (GtkWidget*) _tmp4_);
}

static void
tuba_views_hashtag_update_follow_button (TubaViewsHashtag* self)
{
	GtkButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->follow_tag_btn;
	if (_tmp0_ == NULL) {
		tuba_views_hashtag_create_follow_button (self);
	}
	_tmp1_ = tuba_views_hashtag_get_following (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		GtkButton* _tmp3_;
		GtkButton* _tmp4_;
		GtkButton* _tmp5_;
		_tmp3_ = self->priv->follow_tag_btn;
		gtk_button_set_label (_tmp3_, _ ("Unfollow"));
		_tmp4_ = self->priv->follow_tag_btn;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp4_, "suggested-action");
		_tmp5_ = self->priv->follow_tag_btn;
		gtk_widget_add_css_class ((GtkWidget*) _tmp5_, "destructive-action");
	} else {
		GtkButton* _tmp6_;
		GtkButton* _tmp7_;
		GtkButton* _tmp8_;
		_tmp6_ = self->priv->follow_tag_btn;
		gtk_button_set_label (_tmp6_, _ ("Follow"));
		_tmp7_ = self->priv->follow_tag_btn;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp7_, "destructive-action");
		_tmp8_ = self->priv->follow_tag_btn;
		gtk_widget_add_css_class ((GtkWidget*) _tmp8_, "suggested-action");
	}
}

static void
tuba_views_hashtag_follow (TubaViewsHashtag* self)
{
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gchar* action = NULL;
	gchar* _tmp3_;
	gboolean _tmp4_;
	gboolean _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp1_ = tuba_views_hashtag_get_following (self);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		_tmp0_ = "unfollow";
	} else {
		_tmp0_ = "follow";
	}
	_tmp3_ = g_strdup (_tmp0_);
	action = _tmp3_;
	_tmp4_ = tuba_views_hashtag_get_following (self);
	_tmp5_ = _tmp4_;
	tuba_views_hashtag_set_following (self, !_tmp5_);
	tuba_views_hashtag_follow_real (self, action, NULL, NULL);
	_g_free0 (action);
}

static void
tuba_views_hashtag_follow_real_data_free (gpointer _data)
{
	TubaViewsHashtagFollowRealData* _data_;
	_data_ = _data;
	_g_free0 (_data_->action);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsHashtagFollowRealData, _data_);
}

static void
tuba_views_hashtag_follow_real (TubaViewsHashtag* self,
                                const gchar* action,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_)
{
	TubaViewsHashtagFollowRealData* _data_;
	TubaViewsHashtag* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_data_ = g_slice_new0 (TubaViewsHashtagFollowRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_hashtag_follow_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (action);
	_g_free0 (_data_->action);
	_data_->action = _tmp1_;
	tuba_views_hashtag_follow_real_co (_data_);
}

static void
tuba_views_hashtag_follow_real_finish (TubaViewsHashtag* self,
                                       GAsyncResult* _res_)
{
	TubaViewsHashtagFollowRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_hashtag_follow_real_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_)
{
	TubaViewsHashtagFollowRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_hashtag_follow_real_co (_data_);
}

static gboolean
tuba_views_hashtag_follow_real_co (TubaViewsHashtagFollowRealData* _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:
	_data_->_tmp0_ = _data_->self->priv->_tag;
	_data_->_tmp1_ = string_to_string (_data_->_tmp0_);
	_data_->_tmp2_ = string_to_string (_data_->action);
	_data_->_tmp3_ = g_strconcat ("/api/v1/tags/", _data_->_tmp1_, "/", _data_->_tmp2_, NULL);
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = tuba_accounts;
	_data_->_tmp6_ = tuba_account_store_get_active (_data_->_tmp5_);
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = _g_object_ref0 (_data_->_tmp7_);
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = tuba_request_v2_new (_data_->_tmp4_, TUBA_REQUEST_V2_METHOD_POST);
	tuba_request_v2_set_account (_data_->_tmp9_, _data_->_tmp8_);
	_g_object_unref0 (_data_->_tmp8_);
	tuba_request_v2_set_ctx (_data_->_tmp9_, (GtkWidget*) _data_->self);
	_data_->_tmp10_ = _data_->_tmp9_;
	_g_free0 (_data_->_tmp4_);
	_data_->req = _data_->_tmp10_;
	{
		_data_->_tmp11_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp11_, tuba_views_hashtag_follow_real_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp12_ = tuba_request_v2_exec_finish (_data_->_tmp11_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp12_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp13_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp13_, NULL, tuba_views_hashtag_follow_real_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp14_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp14_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp15_ = tuba_network;
		_data_->_tmp16_ = _data_->parser;
		_data_->_tmp17_ = tuba_network_parse (_data_->_tmp15_, _data_->_tmp16_);
		_data_->root = _data_->_tmp17_;
		_data_->_tmp18_ = _data_->root;
		if (!json_object_has_member (_data_->_tmp18_, "following")) {
			_data_->_tmp19_ = tuba_views_hashtag_get_following (_data_->self);
			_data_->_tmp20_ = _data_->_tmp19_;
			tuba_views_hashtag_set_following (_data_->self, !_data_->_tmp20_);
		}
		_json_object_unref0 (_data_->root);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		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_object_unref0 (_data_->req);
	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_hashtag_init_tag_data_free (gpointer _data)
{
	TubaViewsHashtagInitTagData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaViewsHashtagInitTagData, _data_);
}

static void
tuba_views_hashtag_init_tag (TubaViewsHashtag* self,
                             GAsyncReadyCallback _callback_,
                             gpointer _user_data_)
{
	TubaViewsHashtagInitTagData* _data_;
	TubaViewsHashtag* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (TubaViewsHashtagInitTagData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_views_hashtag_init_tag_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	tuba_views_hashtag_init_tag_co (_data_);
}

static void
tuba_views_hashtag_init_tag_finish (TubaViewsHashtag* self,
                                    GAsyncResult* _res_)
{
	TubaViewsHashtagInitTagData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_views_hashtag_init_tag_ready (GObject* source_object,
                                   GAsyncResult* _res_,
                                   gpointer _user_data_)
{
	TubaViewsHashtagInitTagData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_views_hashtag_init_tag_co (_data_);
}

static gboolean
tuba_views_hashtag_init_tag_co (TubaViewsHashtagInitTagData* _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:
	_data_->_tmp0_ = _data_->self->priv->_tag;
	_data_->_tmp1_ = string_to_string (_data_->_tmp0_);
	_data_->_tmp2_ = g_strconcat ("/api/v1/tags/", _data_->_tmp1_, NULL);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = tuba_accounts;
	_data_->_tmp5_ = tuba_account_store_get_active (_data_->_tmp4_);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = _g_object_ref0 (_data_->_tmp6_);
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = tuba_request_v2_new (_data_->_tmp3_, TUBA_REQUEST_V2_METHOD_GET);
	tuba_request_v2_set_account (_data_->_tmp8_, _data_->_tmp7_);
	_g_object_unref0 (_data_->_tmp7_);
	tuba_request_v2_set_ctx (_data_->_tmp8_, (GtkWidget*) _data_->self);
	_data_->_tmp9_ = _data_->_tmp8_;
	_g_free0 (_data_->_tmp3_);
	_data_->req = _data_->_tmp9_;
	{
		_data_->_tmp10_ = _data_->req;
		_data_->_state_ = 1;
		tuba_request_v2_exec (_data_->_tmp10_, tuba_views_hashtag_init_tag_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp11_ = tuba_request_v2_exec_finish (_data_->_tmp10_, _data_->_res_, NULL, &_data_->_inner_error0_);
		_data_->in_stream = _data_->_tmp11_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp12_ = _data_->in_stream;
		_data_->_state_ = 2;
		tuba_network_get_parser_from_inputstream_async (_data_->_tmp12_, NULL, tuba_views_hashtag_init_tag_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp13_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
		_data_->parser = _data_->_tmp13_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->in_stream);
			goto __catch0_g_error;
		}
		_data_->_tmp14_ = tuba_network;
		_data_->_tmp15_ = _data_->parser;
		_data_->_tmp16_ = tuba_network_parse_node (_data_->_tmp14_, _data_->_tmp15_);
		_data_->node = _data_->_tmp16_;
		_data_->_tmp17_ = _data_->node;
		_data_->_tmp18_ = tuba_api_tag_from (_data_->_tmp17_, &_data_->_inner_error0_);
		_data_->tag_info = _data_->_tmp18_;
		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_->_tmp19_ = _data_->tag_info;
		_data_->_tmp20_ = tuba_api_tag_get_following (_data_->_tmp19_);
		_data_->_tmp21_ = _data_->_tmp20_;
		tuba_views_hashtag_set_following (_data_->self, _data_->_tmp21_);
		_data_->_tmp22_ = _data_->tag_info;
		_data_->_tmp23_ = tuba_api_tag_get_featuring (_data_->_tmp22_);
		_data_->_tmp24_ = _data_->_tmp23_;
		tuba_views_hashtag_set_featured (_data_->self, _data_->_tmp24_);
		tuba_views_hashtag_create_featuring_button (_data_->self);
		_g_object_unref0 (_data_->tag_info);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_object_unref0 (_data_->req);
		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_object_unref0 (_data_->req);
	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 gchar*
tuba_views_hashtag_real_get_stream_url (TubaViewsTimeline* base)
{
	TubaViewsHashtag * self;
	gchar** split_url = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar** _tmp2_;
	gchar** _tmp3_;
	gint split_url_length1;
	gint _split_url_size_;
	gchar* tag = NULL;
	gchar** _tmp4_;
	gint _tmp4__length1;
	gchar** _tmp5_;
	gint _tmp5__length1;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_ = NULL;
	TubaInstanceAccount* _tmp9_;
	TubaInstanceAccount* _tmp10_;
	gchar* _tmp24_;
	gchar* result;
	self = (TubaViewsHashtag*) base;
	_tmp0_ = tuba_views_timeline_get_url ((TubaViewsTimeline*) self);
	_tmp1_ = _tmp0_;
	_tmp3_ = _tmp2_ = g_strsplit (_tmp1_, "/", 0);
	split_url = _tmp3_;
	split_url_length1 = _vala_array_length (_tmp2_);
	_split_url_size_ = split_url_length1;
	_tmp4_ = split_url;
	_tmp4__length1 = split_url_length1;
	_tmp5_ = split_url;
	_tmp5__length1 = split_url_length1;
	_tmp6_ = _tmp4_[_tmp5__length1 - 1];
	_tmp7_ = g_strdup (_tmp6_);
	tag = _tmp7_;
	_tmp9_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
	_tmp10_ = _tmp9_;
	if (_tmp10_ != NULL) {
		TubaInstanceAccount* _tmp11_;
		TubaInstanceAccount* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		TubaInstanceAccount* _tmp18_;
		TubaInstanceAccount* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		const gchar* _tmp22_;
		gchar* _tmp23_;
		_tmp11_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp12_ = _tmp11_;
		_tmp13_ = tuba_instance_account_get_tuba_streaming_url (_tmp12_);
		_tmp14_ = _tmp13_;
		_tmp15_ = string_to_string (_tmp14_);
		_tmp16_ = tag;
		_tmp17_ = string_to_string (_tmp16_);
		_tmp18_ = tuba_account_holder_get_account ((TubaAccountHolder*) self);
		_tmp19_ = _tmp18_;
		_tmp20_ = tuba_instance_account_get_access_token (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = string_to_string (_tmp21_);
		_tmp23_ = g_strconcat (_tmp15_, "/api/v1/streaming?stream=hashtag&tag=", _tmp17_, "&access_token=", _tmp22_, NULL);
		_g_free0 (_tmp8_);
		_tmp8_ = _tmp23_;
	} else {
		_g_free0 (_tmp8_);
		_tmp8_ = NULL;
	}
	_tmp24_ = _tmp8_;
	_tmp8_ = NULL;
	result = _tmp24_;
	_g_free0 (_tmp8_);
	_g_free0 (tag);
	split_url = (_vala_array_free (split_url, split_url_length1, (GDestroyNotify) g_free), NULL);
	return result;
}

gboolean
tuba_views_hashtag_get_featured (TubaViewsHashtag* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_featured;
	return result;
}

static void
tuba_views_hashtag_set_featured (TubaViewsHashtag* self,
                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_views_hashtag_get_featured (self);
	if (old_value != value) {
		self->priv->_featured = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_views_hashtag_properties[TUBA_VIEWS_HASHTAG_FEATURED_PROPERTY]);
	}
}

static const gchar*
tuba_views_hashtag_get_tag (TubaViewsHashtag* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_tag;
	result = _tmp0_;
	return result;
}

static void
tuba_views_hashtag_set_tag (TubaViewsHashtag* self,
                            const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->_tag);
	self->priv->_tag = _tmp0_;
}

static gboolean
tuba_views_hashtag_get_following (TubaViewsHashtag* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_following;
	return result;
}

static void
tuba_views_hashtag_set_following (TubaViewsHashtag* self,
                                  gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_following = value;
	tuba_views_hashtag_update_follow_button (self);
}

static void
tuba_views_hashtag_class_init (TubaViewsHashtagClass * klass,
                               gpointer klass_data)
{
	tuba_views_hashtag_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsHashtag_private_offset);
	((TubaViewsTimelineClass *) klass)->get_stream_url = (gchar* (*) (TubaViewsTimeline*)) tuba_views_hashtag_real_get_stream_url;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_hashtag_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_hashtag_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_hashtag_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_HASHTAG_FEATURED_PROPERTY, tuba_views_hashtag_properties[TUBA_VIEWS_HASHTAG_FEATURED_PROPERTY] = g_param_spec_boolean ("featured", "featured", "featured", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
tuba_views_hashtag_instance_init (TubaViewsHashtag * self,
                                  gpointer klass)
{
	self->priv = tuba_views_hashtag_get_instance_private (self);
	self->priv->_featured = FALSE;
	self->priv->_following = FALSE;
	self->priv->feature_tag_btn = NULL;
	self->priv->follow_tag_btn = NULL;
}

static void
tuba_views_hashtag_finalize (GObject * obj)
{
	TubaViewsHashtag * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_HASHTAG, TubaViewsHashtag);
	_g_free0 (self->priv->_tag);
	_g_object_unref0 (self->priv->feature_tag_btn);
	_g_object_unref0 (self->priv->follow_tag_btn);
	G_OBJECT_CLASS (tuba_views_hashtag_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_hashtag_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsHashtagClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_hashtag_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsHashtag), 0, (GInstanceInitFunc) tuba_views_hashtag_instance_init, NULL };
	GType tuba_views_hashtag_type_id;
	tuba_views_hashtag_type_id = g_type_register_static (TUBA_VIEWS_TYPE_TIMELINE, "TubaViewsHashtag", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsHashtag_private_offset = g_type_add_instance_private (tuba_views_hashtag_type_id, sizeof (TubaViewsHashtagPrivate));
	return tuba_views_hashtag_type_id;
}

GType
tuba_views_hashtag_get_type (void)
{
	static GType tuba_views_hashtag_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_hashtag_type_id__once)) {
		GType tuba_views_hashtag_type_id;
		tuba_views_hashtag_type_id = tuba_views_hashtag_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_hashtag_type_id__once, tuba_views_hashtag_type_id);
	}
	return tuba_views_hashtag_type_id__once;
}

static void
_vala_tuba_views_hashtag_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	TubaViewsHashtag * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_HASHTAG, TubaViewsHashtag);
	switch (property_id) {
		case TUBA_VIEWS_HASHTAG_FEATURED_PROPERTY:
		g_value_set_boolean (value, tuba_views_hashtag_get_featured (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_hashtag_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec)
{
	TubaViewsHashtag * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_TYPE_HASHTAG, TubaViewsHashtag);
	switch (property_id) {
		case TUBA_VIEWS_HASHTAG_FEATURED_PROPERTY:
		tuba_views_hashtag_set_featured (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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);
}

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

