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

#include <glib-object.h>
#include <glib.h>
#include <gio/gio.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <adwaita.h>
#include <gtk/gtk.h>
#include <json-glib/json-glib.h>
#include <glib/gi18n-lib.h>
#include <libsoup/soup.h>

#define BUILD_NAME "Tuba"
#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_TYPE_ACCOUNT_STORE (tuba_account_store_get_type ())
#define TUBA_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore))
#define TUBA_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))
#define TUBA_IS_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_IS_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_ACCOUNT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;
typedef struct _TubaAccountStorePrivate TubaAccountStorePrivate;

#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;
enum  {
	TUBA_ACCOUNT_STORE_0_PROPERTY,
	TUBA_ACCOUNT_STORE_SAVED_PROPERTY,
	TUBA_ACCOUNT_STORE_ACTIVE_PROPERTY,
	TUBA_ACCOUNT_STORE_NUM_PROPERTIES
};
static GParamSpec* tuba_account_store_properties[TUBA_ACCOUNT_STORE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TUBA_TYPE_SETTINGS (tuba_settings_get_type ())
#define TUBA_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_SETTINGS, TubaSettings))
#define TUBA_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_SETTINGS, TubaSettingsClass))
#define TUBA_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_SETTINGS))
#define TUBA_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_SETTINGS))
#define TUBA_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_SETTINGS, TubaSettingsClass))

typedef struct _TubaSettings TubaSettings;
typedef struct _TubaSettingsClass TubaSettingsClass;

#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_free0(var) (var = (g_free (var), NULL))
typedef struct _Block48Data Block48Data;

#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_ACCOUNT_SOURCE (tuba_api_account_source_get_type ())
#define TUBA_API_ACCOUNT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT_SOURCE, TubaAPIAccountSource))
#define TUBA_API_ACCOUNT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT_SOURCE, TubaAPIAccountSourceClass))
#define TUBA_API_IS_ACCOUNT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT_SOURCE))
#define TUBA_API_IS_ACCOUNT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT_SOURCE))
#define TUBA_API_ACCOUNT_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT_SOURCE, TubaAPIAccountSourceClass))

typedef struct _TubaAPIAccountSource TubaAPIAccountSource;
typedef struct _TubaAPIAccountSourceClass TubaAPIAccountSourceClass;

#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;
typedef struct _TubaEntityPrivate TubaEntityPrivate;

#define TUBA_API_TYPE_SEARCH_RESULT (tuba_api_search_result_get_type ())
#define TUBA_API_SEARCH_RESULT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_SEARCH_RESULT, TubaAPISearchResult))
#define TUBA_API_IS_SEARCH_RESULT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_SEARCH_RESULT))
#define TUBA_API_SEARCH_RESULT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_API_TYPE_SEARCH_RESULT, TubaAPISearchResultIface))

typedef struct _TubaAPISearchResult TubaAPISearchResult;
typedef struct _TubaAPISearchResultIface TubaAPISearchResultIface;
typedef struct _TubaAPIAccountPrivate TubaAPIAccountPrivate;

#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;
typedef struct _TubaInstanceAccountPrivate TubaInstanceAccountPrivate;

#define TUBA_INSTANCE_ACCOUNT_TYPE_KIND (tuba_instance_account_kind_get_type ())
typedef struct _TubaInstanceAccountKind TubaInstanceAccountKind;

#define TUBA_TYPE_PLACE (tuba_place_get_type ())
#define TUBA_PLACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_PLACE, TubaPlace))
#define TUBA_PLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_PLACE, TubaPlaceClass))
#define TUBA_IS_PLACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_PLACE))
#define TUBA_IS_PLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_PLACE))
#define TUBA_PLACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_PLACE, TubaPlaceClass))

typedef struct _TubaPlace TubaPlace;
typedef struct _TubaPlaceClass TubaPlaceClass;

#define TUBA_API_TYPE_NOTIFICATION (tuba_api_notification_get_type ())
#define TUBA_API_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_NOTIFICATION, TubaAPINotification))
#define TUBA_API_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_NOTIFICATION, TubaAPINotificationClass))
#define TUBA_API_IS_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_NOTIFICATION))
#define TUBA_API_IS_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_NOTIFICATION))
#define TUBA_API_NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_NOTIFICATION, TubaAPINotificationClass))

typedef struct _TubaAPINotification TubaAPINotification;
typedef struct _TubaAPINotificationClass TubaAPINotificationClass;

#define TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY (tuba_instance_account_visibility_get_type ())
#define TUBA_INSTANCE_ACCOUNT_VISIBILITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, TubaInstanceAccountVisibility))
#define TUBA_INSTANCE_ACCOUNT_VISIBILITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, TubaInstanceAccountVisibilityClass))
#define TUBA_INSTANCE_ACCOUNT_IS_VISIBILITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY))
#define TUBA_INSTANCE_ACCOUNT_IS_VISIBILITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY))
#define TUBA_INSTANCE_ACCOUNT_VISIBILITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_INSTANCE_ACCOUNT_TYPE_VISIBILITY, TubaInstanceAccountVisibilityClass))

typedef struct _TubaInstanceAccountVisibility TubaInstanceAccountVisibility;
typedef struct _TubaInstanceAccountVisibilityClass TubaInstanceAccountVisibilityClass;

#define TUBA_TYPE_OOPSIE (tuba_oopsie_get_type ())
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TubaAccountStoreVerifyCredentialsData TubaAccountStoreVerifyCredentialsData;
typedef enum  {
	TUBA_APPLICATION_QUESTION_ANSWER_YES,
	TUBA_APPLICATION_QUESTION_ANSWER_NO,
	TUBA_APPLICATION_QUESTION_ANSWER_CLOSE
} TubaApplicationQuestionAnswer;

#define TUBA_APPLICATION_TYPE_QUESTION_ANSWER (tuba_application_question_answer_get_type ())

#define TUBA_APPLICATION_TYPE_QUESTION_TEXT (tuba_application_question_text_get_type ())
typedef struct _TubaApplicationQuestionText TubaApplicationQuestionText;

#define TUBA_APPLICATION_TYPE_QUESTION_BUTTONS (tuba_application_question_buttons_get_type ())
typedef struct _TubaApplicationQuestionButtons TubaApplicationQuestionButtons;

#define TUBA_APPLICATION_TYPE_QUESTION_BUTTON (tuba_application_question_button_get_type ())
typedef struct _TubaApplicationQuestionButton TubaApplicationQuestionButton;

#define TUBA_DIALOGS_TYPE_MAIN_WINDOW (tuba_dialogs_main_window_get_type ())
#define TUBA_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindow))
#define TUBA_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))
#define TUBA_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_MAIN_WINDOW))
#define TUBA_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_MAIN_WINDOW, TubaDialogsMainWindowClass))

typedef struct _TubaDialogsMainWindow TubaDialogsMainWindow;
typedef struct _TubaDialogsMainWindowClass TubaDialogsMainWindowClass;

#define TUBA_DIALOGS_TYPE_NEW_ACCOUNT (tuba_dialogs_new_account_get_type ())
#define TUBA_DIALOGS_NEW_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_TYPE_NEW_ACCOUNT, TubaDialogsNewAccount))
#define TUBA_DIALOGS_NEW_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_TYPE_NEW_ACCOUNT, TubaDialogsNewAccountClass))
#define TUBA_DIALOGS_IS_NEW_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_TYPE_NEW_ACCOUNT))
#define TUBA_DIALOGS_IS_NEW_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_TYPE_NEW_ACCOUNT))
#define TUBA_DIALOGS_NEW_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_TYPE_NEW_ACCOUNT, TubaDialogsNewAccountClass))

typedef struct _TubaDialogsNewAccount TubaDialogsNewAccount;
typedef struct _TubaDialogsNewAccountClass TubaDialogsNewAccountClass;
typedef struct _TubaAccountStoreAskRefreshAccountTokenData TubaAccountStoreAskRefreshAccountTokenData;
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 ())
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))

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

#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;
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_API_TYPE_NODEINFO (tuba_api_nodeinfo_get_type ())
#define TUBA_API_NODEINFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_NODEINFO, TubaAPINodeinfo))
#define TUBA_API_NODEINFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_NODEINFO, TubaAPINodeinfoClass))
#define TUBA_API_IS_NODEINFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_NODEINFO))
#define TUBA_API_IS_NODEINFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_NODEINFO))
#define TUBA_API_NODEINFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_NODEINFO, TubaAPINodeinfoClass))

typedef struct _TubaAPINodeinfo TubaAPINodeinfo;
typedef struct _TubaAPINodeinfoClass TubaAPINodeinfoClass;

#define TUBA_API_NODEINFO_TYPE_LINK (tuba_api_nodeinfo_link_get_type ())
#define TUBA_API_NODEINFO_LINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_NODEINFO_TYPE_LINK, TubaAPINodeinfoLink))
#define TUBA_API_NODEINFO_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_NODEINFO_TYPE_LINK, TubaAPINodeinfoLinkClass))
#define TUBA_API_NODEINFO_IS_LINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_NODEINFO_TYPE_LINK))
#define TUBA_API_NODEINFO_IS_LINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_NODEINFO_TYPE_LINK))
#define TUBA_API_NODEINFO_LINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_NODEINFO_TYPE_LINK, TubaAPINodeinfoLinkClass))

typedef struct _TubaAPINodeinfoLink TubaAPINodeinfoLink;
typedef struct _TubaAPINodeinfoLinkClass TubaAPINodeinfoLinkClass;
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))

#define TUBA_API_NODEINFO_TYPE_V20 (tuba_api_nodeinfo_v20_get_type ())
#define TUBA_API_NODEINFO_V20(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_NODEINFO_TYPE_V20, TubaAPINodeinfoV20))
#define TUBA_API_NODEINFO_V20_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_NODEINFO_TYPE_V20, TubaAPINodeinfoV20Class))
#define TUBA_API_NODEINFO_IS_V20(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_NODEINFO_TYPE_V20))
#define TUBA_API_NODEINFO_IS_V20_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_NODEINFO_TYPE_V20))
#define TUBA_API_NODEINFO_V20_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_NODEINFO_TYPE_V20, TubaAPINodeinfoV20Class))

typedef struct _TubaAPINodeinfoV20 TubaAPINodeinfoV20;
typedef struct _TubaAPINodeinfoV20Class TubaAPINodeinfoV20Class;

#define TUBA_API_NODEINFO_V20_TYPE_SOFTWARE (tuba_api_nodeinfo_v20_software_get_type ())
#define TUBA_API_NODEINFO_V20_SOFTWARE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_NODEINFO_V20_TYPE_SOFTWARE, TubaAPINodeinfoV20Software))
#define TUBA_API_NODEINFO_V20_SOFTWARE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_NODEINFO_V20_TYPE_SOFTWARE, TubaAPINodeinfoV20SoftwareClass))
#define TUBA_API_NODEINFO_V20_IS_SOFTWARE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_NODEINFO_V20_TYPE_SOFTWARE))
#define TUBA_API_NODEINFO_V20_IS_SOFTWARE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_NODEINFO_V20_TYPE_SOFTWARE))
#define TUBA_API_NODEINFO_V20_SOFTWARE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_NODEINFO_V20_TYPE_SOFTWARE, TubaAPINodeinfoV20SoftwareClass))

typedef struct _TubaAPINodeinfoV20Software TubaAPINodeinfoV20Software;
typedef struct _TubaAPINodeinfoV20SoftwareClass TubaAPINodeinfoV20SoftwareClass;
typedef struct _TubaAccountStoreGuessBackendData TubaAccountStoreGuessBackendData;

#define TUBA_ACCOUNT_STORE_TYPE_BACKEND_TEST (tuba_account_store_backend_test_get_type ())
#define TUBA_ACCOUNT_STORE_BACKEND_TEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_ACCOUNT_STORE_TYPE_BACKEND_TEST, TubaAccountStoreBackendTest))
#define TUBA_ACCOUNT_STORE_BACKEND_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_ACCOUNT_STORE_TYPE_BACKEND_TEST, TubaAccountStoreBackendTestClass))
#define TUBA_ACCOUNT_STORE_IS_BACKEND_TEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_ACCOUNT_STORE_TYPE_BACKEND_TEST))
#define TUBA_ACCOUNT_STORE_IS_BACKEND_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_ACCOUNT_STORE_TYPE_BACKEND_TEST))
#define TUBA_ACCOUNT_STORE_BACKEND_TEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_ACCOUNT_STORE_TYPE_BACKEND_TEST, TubaAccountStoreBackendTestClass))

typedef struct _TubaAccountStoreBackendTest TubaAccountStoreBackendTest;
typedef struct _TubaAccountStoreBackendTestClass TubaAccountStoreBackendTestClass;
typedef struct _TubaAccountStoreBackendTestPrivate TubaAccountStoreBackendTestPrivate;
enum  {
	TUBA_ACCOUNT_STORE_BACKEND_TEST_0_PROPERTY,
	TUBA_ACCOUNT_STORE_BACKEND_TEST_NUM_PROPERTIES
};
static GParamSpec* tuba_account_store_backend_test_properties[TUBA_ACCOUNT_STORE_BACKEND_TEST_NUM_PROPERTIES];
enum  {
	TUBA_ACCOUNT_STORE_CHANGED_SIGNAL,
	TUBA_ACCOUNT_STORE_SWITCHED_SIGNAL,
	TUBA_ACCOUNT_STORE_CREATE_FOR_BACKEND_SIGNAL,
	TUBA_ACCOUNT_STORE_NUM_SIGNALS
};
static guint tuba_account_store_signals[TUBA_ACCOUNT_STORE_NUM_SIGNALS] = {0};

struct _TubaAccountStore {
	GObject parent_instance;
	TubaAccountStorePrivate * priv;
};

struct _TubaAccountStoreClass {
	GObjectClass parent_class;
	void (*init) (TubaAccountStore* self, GError** error);
	void (*update_account_info) (TubaAccountStore* self, TubaInstanceAccount* account, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*update_account_info_finish) (TubaAccountStore* self, GAsyncResult* _res_);
	void (*update_account) (TubaAccountStore* self, TubaInstanceAccount* account, GError** error);
	void (*load) (TubaAccountStore* self, GError** error);
	void (*save) (TubaAccountStore* self, GError** error);
	void (*revoke_token_dangerous) (TubaAccountStore* self, TubaInstanceAccount* account, gboolean should_handle_error, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*revoke_token_dangerous_finish) (TubaAccountStore* self, GAsyncResult* _res_);
	void (*add) (TubaAccountStore* self, TubaInstanceAccount* account, GError** error);
	void (*remove) (TubaAccountStore* self, TubaInstanceAccount* account, GError** error);
};

struct _TubaAccountStorePrivate {
	GeeArrayList* _saved;
	TubaInstanceAccount* _active;
};

struct _Block48Data {
	int _ref_count_;
	TubaAccountStore* self;
	gchar* uuid;
};

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

struct _TubaEntity {
	GObject parent_instance;
	TubaEntityPrivate * priv;
};

struct _TubaEntityClass {
	GObjectClass parent_class;
	gboolean (*is_local) (TubaEntity* self, TubaInstanceAccount* account);
	GType (*deserialize_array_type) (TubaEntity* self, const gchar* prop);
};

struct _TubaAPISearchResultIface {
	GTypeInterface parent_iface;
	GRegex* (*get_tuba_search_query_regex) (TubaAPISearchResult* self);
	void (*set_tuba_search_query_regex) (TubaAPISearchResult* self, GRegex* value);
};

struct _TubaAPIAccount {
	TubaEntity parent_instance;
	TubaAPIAccountPrivate * priv;
};

struct _TubaAPIAccountClass {
	TubaEntityClass parent_class;
};

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 _TubaInstanceAccountKind {
	gchar* icon;
	gchar* description;
	gchar* url;
};

struct _TubaInstanceAccount {
	TubaAPIAccount parent_instance;
	TubaInstanceAccountPrivate * priv;
	GListStore* known_places;
	GListStore* list_places;
	GListStore* tags_places;
	GeeHashMap* type_overrides;
	GeeHashMap* visibility;
	GListStore* visibility_list;
	GListStore* supported_mime_types;
};

struct _TubaInstanceAccountClass {
	TubaAPIAccountClass parent_class;
	void (*describe_kind) (TubaInstanceAccount* self, const gchar* kind, TubaInstanceAccountKind* _result_, const gchar* actor_name, const gchar* callback_url, const gchar* other_data);
	void (*register_known_places) (TubaInstanceAccount* self, GListStore* places);
	void (*register_extra) (TubaInstanceAccount* self, GListStore* places, TubaPlace** extra, gint extra_length1);
	void (*bump_sidebar_items) (TubaInstanceAccount* self);
	void (*check_notifications) (TubaInstanceAccount* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*check_notifications_finish) (TubaInstanceAccount* self, GAsyncResult* _res_);
	gchar* (*get_stream_url) (TubaInstanceAccount* self);
	void (*on_notification_received) (TubaInstanceAccount* self, TubaAPINotification* entity);
	void (*open_status_url) (TubaInstanceAccount* self, const gchar* url);
	void (*answer_follow_request) (TubaInstanceAccount* self, const gchar* issuer_id, const gchar* fr_id, gboolean accept);
	void (*follow_back) (TubaInstanceAccount* self, const gchar* issuer_id, const gchar* acc_id);
	void (*reply_to_status_uri) (TubaInstanceAccount* self, const gchar* issuer_id, const gchar* uri);
	void (*remove_from_followers) (TubaInstanceAccount* self, const gchar* issuer_id, const gchar* acc_id);
	void (*activated) (TubaInstanceAccount* self);
	void (*deactivated) (TubaInstanceAccount* self);
	void (*added) (TubaInstanceAccount* self);
	void (*removed) (TubaInstanceAccount* self);
};

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 _TubaAccountStoreVerifyCredentialsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaAccountStore* self;
	TubaInstanceAccount* account;
	TubaAPIAccountSource* _tmp0_;
	TubaAPIAccountSource* _tmp1_;
	gboolean _tmp2_;
	TubaAPIAccountSource* _tmp3_;
	TubaAPIAccountSource* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	TubaAPIAccountSource* _tmp7_;
	TubaAPIAccountSource* _tmp8_;
	const gchar* _tmp9_;
	const gchar* _tmp10_;
	TubaSettings* _tmp11_;
	TubaAPIAccountSource* _tmp12_;
	TubaAPIAccountSource* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	gboolean _tmp16_;
	TubaAPIAccountSource* _tmp17_;
	TubaAPIAccountSource* _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	TubaAPIAccountSource* _tmp21_;
	TubaAPIAccountSource* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	TubaSettings* _tmp25_;
	TubaAPIAccountSource* _tmp26_;
	TubaAPIAccountSource* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	gboolean _tmp30_;
	TubaAPIAccountSource* _tmp31_;
	TubaAPIAccountSource* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	TubaAPIAccountSource* _tmp35_;
	TubaAPIAccountSource* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	gchar* visibility_id;
	TubaAPIAccountSource* _tmp39_;
	TubaAPIAccountSource* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	gchar* _tmp43_;
	GeeHashMap* _tmp44_;
	const gchar* _tmp45_;
	TubaSettings* _tmp46_;
	const gchar* _tmp47_;
	TubaAPIAccountSource* _tmp48_;
	TubaAPIAccountSource* _tmp49_;
	gint _tmp50_;
	gint _tmp51_;
	GError* e;
	gchar* _tmp52_;
	gchar* _tmp53_;
	gchar* _tmp54_;
	const gchar* _tmp55_;
	gchar* _tmp56_;
	gchar* _tmp57_;
	GError* _tmp58_;
	const gchar* _tmp59_;
	GError* _vala1_e;
	gchar* _tmp60_;
	gchar* _tmp61_;
	gchar* _tmp62_;
	const gchar* _tmp63_;
	gchar* _tmp64_;
	gchar* _tmp65_;
	GError* _tmp66_;
	const gchar* _tmp67_;
	GError* _inner_error0_;
};

struct _TubaApplicationQuestionText {
	gchar* text;
	gboolean use_markup;
};

struct _TubaApplicationQuestionButton {
	gchar* label;
	AdwResponseAppearance appearance;
};

struct _TubaApplicationQuestionButtons {
	TubaApplicationQuestionButton yes;
	TubaApplicationQuestionButton no;
};

struct _TubaAccountStoreAskRefreshAccountTokenData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaAccountStore* self;
	TubaInstanceAccount* account;
	TubaApplicationQuestionAnswer res;
	TubaApplication* _tmp0_;
	TubaApplicationQuestionText _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	TubaApplicationQuestionText _tmp7_;
	TubaApplication* _tmp8_;
	TubaDialogsMainWindow* _tmp9_;
	TubaDialogsMainWindow* _tmp10_;
	TubaApplicationQuestionButtons _tmp11_;
	TubaApplicationQuestionAnswer _tmp12_;
	TubaDialogsNewAccount* _tmp13_;
	TubaDialogsNewAccount* _tmp14_;
	GError* e;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	const gchar* _tmp18_;
	GError* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	GError* _tmp22_;
	const gchar* _tmp23_;
	const gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	GError* _inner_error0_;
};

struct _TubaAccountStoreGuessBackendData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TubaAccountStore* self;
	TubaInstanceAccount* account;
	TubaRequestV2* req;
	TubaInstanceAccount* _tmp0_;
	TubaRequestV2* _tmp1_;
	GInputStream* in_stream;
	TubaRequestV2* _tmp2_;
	GInputStream* _tmp3_;
	JsonParser* parser;
	GInputStream* _tmp4_;
	JsonParser* _tmp5_;
	JsonNode* node;
	TubaNetwork* _tmp6_;
	JsonParser* _tmp7_;
	JsonNode* _tmp8_;
	TubaAPINodeinfo* known_nodeinfo;
	JsonNode* _tmp9_;
	JsonNode* _tmp10_;
	TubaEntity* _tmp11_;
	gboolean _tmp12_;
	TubaAPINodeinfo* _tmp13_;
	GeeArrayList* _tmp14_;
	GeeArrayList* _tmp15_;
	TubaAPINodeinfo* _tmp16_;
	GeeArrayList* _tmp17_;
	GeeArrayList* _tmp18_;
	gint _tmp19_;
	gint _tmp20_;
	GError* _tmp21_;
	gboolean supports;
	GeeArrayList* _link_list;
	TubaAPINodeinfo* _tmp22_;
	GeeArrayList* _tmp23_;
	GeeArrayList* _tmp24_;
	gint _link_size;
	GeeArrayList* _tmp25_;
	gint _tmp26_;
	gint _tmp27_;
	gint _link_index;
	gint _tmp28_;
	gint _tmp29_;
	TubaAPINodeinfoLink* link;
	GeeArrayList* _tmp30_;
	gpointer _tmp31_;
	TubaAPINodeinfoLink* _tmp32_;
	const gchar* _tmp33_;
	const gchar* _tmp34_;
	gboolean _tmp35_;
	gboolean _tmp36_;
	TubaAPINodeinfoLink* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	TubaAPINodeinfoLink* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	TubaAPINodeinfoLink* _tmp43_;
	const gchar* _tmp44_;
	const gchar* _tmp45_;
	TubaAPINodeinfoLink* _tmp46_;
	const gchar* _tmp47_;
	const gchar* _tmp48_;
	TubaRequestV2* _tmp49_;
	GInputStream* _tmp50_;
	TubaRequestV2* _tmp51_;
	GInputStream* _tmp52_;
	GInputStream* _tmp53_;
	JsonParser* _tmp54_;
	GInputStream* _tmp55_;
	JsonParser* _tmp56_;
	JsonParser* _tmp57_;
	TubaNetwork* _tmp58_;
	JsonParser* _tmp59_;
	JsonNode* _tmp60_;
	TubaAPINodeinfoV20* nodeinfo2;
	JsonNode* _tmp61_;
	JsonNode* _tmp62_;
	TubaEntity* _tmp63_;
	gboolean _tmp64_;
	TubaAPINodeinfoV20* _tmp65_;
	TubaAPINodeinfoV20Software* _tmp66_;
	TubaAPINodeinfoV20Software* _tmp67_;
	TubaAPINodeinfoV20* _tmp68_;
	TubaAPINodeinfoV20Software* _tmp69_;
	TubaAPINodeinfoV20Software* _tmp70_;
	const gchar* _tmp71_;
	const gchar* _tmp72_;
	TubaAPINodeinfoV20* _tmp73_;
	TubaAPINodeinfoV20Software* _tmp74_;
	TubaAPINodeinfoV20Software* _tmp75_;
	const gchar* _tmp76_;
	const gchar* _tmp77_;
	TubaAPINodeinfoV20* _tmp78_;
	TubaAPINodeinfoV20Software* _tmp79_;
	TubaAPINodeinfoV20Software* _tmp80_;
	const gchar* _tmp81_;
	const gchar* _tmp82_;
	TubaInstanceAccountInstanceFeatures _tmp83_;
	TubaInstanceAccountInstanceFeatures _tmp84_;
	TubaAPINodeinfoV20* _tmp85_;
	TubaAPINodeinfoV20Software* _tmp86_;
	TubaAPINodeinfoV20Software* _tmp87_;
	const gchar* _tmp88_;
	const gchar* _tmp89_;
	TubaInstanceAccountInstanceFeatures _tmp90_;
	TubaInstanceAccountInstanceFeatures _tmp91_;
	GError* e;
	TubaAPINodeinfoLink* _tmp92_;
	const gchar* _tmp93_;
	const gchar* _tmp94_;
	const gchar* _tmp95_;
	GError* _tmp96_;
	gchar* _tmp97_;
	gchar* _tmp98_;
	GError* _tmp99_;
	const gchar* _tmp100_;
	const gchar* _tmp101_;
	gchar* _tmp102_;
	gchar* _tmp103_;
	GError* _tmp104_;
	const gchar* _tmp105_;
	const gchar* _tmp106_;
	const gchar* _tmp107_;
	const gchar* _tmp108_;
	const gchar* _tmp109_;
	const gchar* _tmp110_;
	gchar* _tmp111_;
	gchar* _tmp112_;
	GError* _inner_error0_;
};

struct _TubaAccountStoreBackendTest {
	GObject parent_instance;
	TubaAccountStoreBackendTestPrivate * priv;
};

struct _TubaAccountStoreBackendTestClass {
	GObjectClass parent_class;
	gchar* (*get_backend) (TubaAccountStoreBackendTest* self, JsonObject* obj);
};

static gint TubaAccountStore_private_offset;
static gpointer tuba_account_store_parent_class = NULL;
VALA_EXTERN TubaSettings* tuba_settings;
VALA_EXTERN TubaApplication* tuba_app;
VALA_EXTERN TubaNetwork* tuba_network;
VALA_EXTERN TubaAccountStore* tuba_accounts;
static gpointer tuba_account_store_backend_test_parent_class = NULL;

VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, 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 void tuba_account_store_init (TubaAccountStore* self,
                              GError** error);
VALA_EXTERN void tuba_account_store_update_account (TubaAccountStore* self,
                                        TubaInstanceAccount* account,
                                        GError** error);
VALA_EXTERN void tuba_account_store_load (TubaAccountStore* self,
                              GError** error);
VALA_EXTERN void tuba_account_store_save (TubaAccountStore* self,
                              GError** error);
VALA_EXTERN void tuba_account_store_add (TubaAccountStore* self,
                             TubaInstanceAccount* account,
                             GError** error);
VALA_EXTERN void tuba_account_store_remove (TubaAccountStore* self,
                                TubaInstanceAccount* account,
                                GError** error);
VALA_EXTERN gboolean tuba_account_store_ensure_active_account (TubaAccountStore* self);
VALA_EXTERN TubaInstanceAccount* tuba_account_store_find_by_uuid (TubaAccountStore* self,
                                                      const gchar* uuid);
VALA_EXTERN GType tuba_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaSettings, g_object_unref)
VALA_EXTERN const gchar* tuba_settings_get_active_account (TubaSettings* self);
VALA_EXTERN GeeArrayList* tuba_account_store_get_saved (TubaAccountStore* self);
VALA_EXTERN void tuba_account_store_activate (TubaAccountStore* self,
                                  TubaInstanceAccount* account,
                                  gboolean clear_cache);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
VALA_EXTERN void tuba_application_present_window (TubaApplication* self,
                                      gboolean destroy_main);
static void tuba_account_store_real_init (TubaAccountStore* self,
                                   GError** error);
VALA_EXTERN void tuba_mastodon_account_register (TubaAccountStore* store);
VALA_EXTERN void tuba_account_store_update_account_info (TubaAccountStore* self,
                                             TubaInstanceAccount* account,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
VALA_EXTERN void tuba_account_store_update_account_info_finish (TubaAccountStore* self,
                                                    GAsyncResult* _res_);
static void tuba_account_store_real_update_account (TubaAccountStore* self,
                                             TubaInstanceAccount* account,
                                             GError** error);
static void tuba_account_store_real_load (TubaAccountStore* self,
                                   GError** error);
static void tuba_account_store_real_save (TubaAccountStore* self,
                                   GError** error);
VALA_EXTERN void tuba_account_store_revoke_token_dangerous (TubaAccountStore* self,
                                                TubaInstanceAccount* account,
                                                gboolean should_handle_error,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN void tuba_account_store_revoke_token_dangerous_finish (TubaAccountStore* self,
                                                       GAsyncResult* _res_);
static void tuba_account_store_real_add (TubaAccountStore* self,
                                  TubaInstanceAccount* account,
                                  GError** error);
VALA_EXTERN gchar* tuba_instance_account_get_handle (TubaInstanceAccount* self);
static void tuba_account_store_real_remove (TubaAccountStore* self,
                                     TubaInstanceAccount* account,
                                     GError** error);
static Block48Data* block48_data_ref (Block48Data* _data48_);
static void block48_data_unref (void * _userdata_);
static gboolean __lambda200_ (Block48Data* _data48_,
                       TubaInstanceAccount* acc);
VALA_EXTERN const gchar* tuba_instance_account_get_uuid (TubaInstanceAccount* self);
static gboolean ___lambda200__gee_predicate (gconstpointer g,
                                      gpointer self);
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN GType tuba_network_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaNetwork, g_object_unref)
VALA_EXTERN void tuba_network_clear_cache (TubaNetwork* self);
VALA_EXTERN void tuba_settings_set_active_account (TubaSettings* self,
                                       const gchar* value);
VALA_EXTERN void tuba_account_store_verify_credentials (TubaAccountStore* self,
                                            TubaInstanceAccount* account,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
VALA_EXTERN void tuba_account_store_verify_credentials_finish (TubaAccountStore* self,
                                                   GAsyncResult* _res_);
VALA_EXTERN void tuba_account_store_set_active (TubaAccountStore* self,
                                    TubaInstanceAccount* value);
static void tuba_account_store_verify_credentials_data_free (gpointer _data);
static gboolean tuba_account_store_verify_credentials_co (TubaAccountStoreVerifyCredentialsData* _data_);
VALA_EXTERN void tuba_instance_account_verify_credentials (TubaInstanceAccount* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
VALA_EXTERN void tuba_instance_account_verify_credentials_finish (TubaInstanceAccount* self,
                                                      GAsyncResult* _res_,
                                                      GError** error);
static void tuba_account_store_verify_credentials_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_);
VALA_EXTERN GType tuba_api_account_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccountSource, g_object_unref)
VALA_EXTERN TubaAPIAccountSource* tuba_api_account_get_source (TubaAPIAccount* self);
VALA_EXTERN const gchar* tuba_api_account_source_get_quote_policy (TubaAPIAccountSource* self);
VALA_EXTERN void tuba_settings_set_default_quote_policy (TubaSettings* self,
                                             const gchar* value);
VALA_EXTERN const gchar* tuba_api_account_source_get_language (TubaAPIAccountSource* self);
VALA_EXTERN void tuba_settings_set_default_language (TubaSettings* self,
                                         const gchar* value);
VALA_EXTERN const gchar* tuba_api_account_source_get_privacy (TubaAPIAccountSource* self);
VALA_EXTERN GType tuba_widgetizable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetizable, g_object_unref)
VALA_EXTERN GType tuba_api_search_result_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPISearchResult, 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_instance_account_kind_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaInstanceAccountKind* tuba_instance_account_kind_dup (const TubaInstanceAccountKind* self);
VALA_EXTERN void tuba_instance_account_kind_free (TubaInstanceAccountKind* self);
VALA_EXTERN void tuba_instance_account_kind_copy (const TubaInstanceAccountKind* self,
                                      TubaInstanceAccountKind* dest);
VALA_EXTERN void tuba_instance_account_kind_destroy (TubaInstanceAccountKind* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaInstanceAccountKind, tuba_instance_account_kind_destroy)
VALA_EXTERN GType tuba_place_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaPlace, g_object_unref)
VALA_EXTERN GType tuba_api_notification_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPINotification, g_object_unref)
VALA_EXTERN GType tuba_instance_account_visibility_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccountVisibility, g_object_unref)
VALA_EXTERN void tuba_settings_set_default_post_visibility (TubaSettings* self,
                                                const gchar* value);
VALA_EXTERN gint tuba_api_account_source_get_follow_requests_count (TubaAPIAccountSource* self);
VALA_EXTERN void tuba_instance_account_set_unreviewed_follow_requests (TubaInstanceAccount* self,
                                                           gint value);
VALA_EXTERN void tuba_instance_account_set_tuba_verified_credentials (TubaInstanceAccount* self,
                                                          gboolean value);
VALA_EXTERN GQuark tuba_oopsie_quark (void);
VALA_EXTERN GType tuba_oopsie_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void tuba_instance_account_set_tuba_revoked (TubaInstanceAccount* self,
                                             gboolean value);
static void tuba_account_store_ask_refresh_account_token (TubaAccountStore* self,
                                                   TubaInstanceAccount* account,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static void tuba_account_store_ask_refresh_account_token_finish (TubaAccountStore* self,
                                                          GAsyncResult* _res_);
static void tuba_account_store_ask_refresh_account_token_data_free (gpointer _data);
static gboolean tuba_account_store_ask_refresh_account_token_co (TubaAccountStoreAskRefreshAccountTokenData* _data_);
VALA_EXTERN GType tuba_application_question_answer_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_application_question_text_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaApplicationQuestionText* tuba_application_question_text_dup (const TubaApplicationQuestionText* self);
VALA_EXTERN void tuba_application_question_text_free (TubaApplicationQuestionText* self);
VALA_EXTERN void tuba_application_question_text_copy (const TubaApplicationQuestionText* self,
                                          TubaApplicationQuestionText* dest);
VALA_EXTERN void tuba_application_question_text_destroy (TubaApplicationQuestionText* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionText, tuba_application_question_text_destroy)
VALA_EXTERN GType tuba_application_question_buttons_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType tuba_application_question_button_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaApplicationQuestionButton* tuba_application_question_button_dup (const TubaApplicationQuestionButton* self);
VALA_EXTERN void tuba_application_question_button_free (TubaApplicationQuestionButton* self);
VALA_EXTERN void tuba_application_question_button_copy (const TubaApplicationQuestionButton* self,
                                            TubaApplicationQuestionButton* dest);
VALA_EXTERN void tuba_application_question_button_destroy (TubaApplicationQuestionButton* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionButton, tuba_application_question_button_destroy)
VALA_EXTERN TubaApplicationQuestionButtons* tuba_application_question_buttons_dup (const TubaApplicationQuestionButtons* self);
VALA_EXTERN void tuba_application_question_buttons_free (TubaApplicationQuestionButtons* self);
VALA_EXTERN void tuba_application_question_buttons_copy (const TubaApplicationQuestionButtons* self,
                                             TubaApplicationQuestionButtons* dest);
VALA_EXTERN void tuba_application_question_buttons_destroy (TubaApplicationQuestionButtons* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaApplicationQuestionButtons, tuba_application_question_buttons_destroy)
VALA_EXTERN void tuba_application_question (TubaApplication* self,
                                TubaApplicationQuestionText* title,
                                TubaApplicationQuestionText* msg,
                                GtkWidget* win,
                                TubaApplicationQuestionButtons* buttons,
                                GtkWidget* child,
                                gboolean skip,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN TubaApplicationQuestionAnswer tuba_application_question_finish (TubaApplication* self,
                                                                GAsyncResult* _res_);
VALA_EXTERN GType tuba_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsMainWindow, g_object_unref)
VALA_EXTERN TubaDialogsMainWindow* tuba_application_get_main_window (TubaApplication* self);
static void tuba_account_store_ask_refresh_account_token_ready (GObject* source_object,
                                                         GAsyncResult* _res_,
                                                         gpointer _user_data_);
VALA_EXTERN TubaDialogsNewAccount* tuba_dialogs_new_account_new (gboolean can_access_settings,
                                                     TubaInstanceAccount* account_to_update);
VALA_EXTERN TubaDialogsNewAccount* tuba_dialogs_new_account_construct (GType object_type,
                                                           gboolean can_access_settings,
                                                           TubaInstanceAccount* account_to_update);
VALA_EXTERN GType tuba_dialogs_new_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsNewAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_instance_features_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaInstanceAccount* tuba_account_store_create_account (TubaAccountStore* self,
                                                        JsonNode* node,
                                                        TubaInstanceAccountInstanceFeatures* instance_features,
                                                        GError** error);
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 void tuba_api_instance_v2_api_versions_set_mastodon (TubaAPIInstanceV2APIVersions* self,
                                                     gint8 value);
VALA_EXTERN void tuba_api_instance_v2_api_versions_set_chuckya (TubaAPIInstanceV2APIVersions* self,
                                                    gint8 value);
VALA_EXTERN void tuba_instance_account_set_tuba_instance_features (TubaInstanceAccount* self,
                                                       TubaInstanceAccountInstanceFeatures value);
VALA_EXTERN TubaInstanceAccountInstanceFeatures tuba_instance_account_get_tuba_instance_features (TubaInstanceAccount* self);
VALA_EXTERN void tuba_instance_account_set_tuba_iceshrimp_api_key (TubaInstanceAccount* self,
                                                       const gchar* value);
VALA_EXTERN void tuba_instance_account_set_tuba_streaming_url (TubaInstanceAccount* self,
                                                   const gchar* value);
VALA_EXTERN void tuba_instance_account_set_uuid (TubaInstanceAccount* self,
                                     const gchar* value);
static void tuba_account_store_guess_backend_data_free (gpointer _data);
VALA_EXTERN void tuba_account_store_guess_backend (TubaAccountStore* self,
                                       TubaInstanceAccount* account,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_);
VALA_EXTERN void tuba_account_store_guess_backend_finish (TubaAccountStore* self,
                                              GAsyncResult* _res_,
                                              GError** error);
static gboolean tuba_account_store_guess_backend_co (TubaAccountStoreGuessBackendData* _data_);
VALA_EXTERN void tuba_instance_account_set_backend (TubaInstanceAccount* self,
                                        const gchar* value);
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_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_exec (TubaRequestV2* self,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_);
VALA_EXTERN GInputStream* tuba_request_v2_exec_finish (TubaRequestV2* self,
                                           GAsyncResult* _res_,
                                           SoupMessageHeaders** response_headers,
                                           GError** error);
static void tuba_account_store_guess_backend_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 JsonNode* tuba_network_parse_node (TubaNetwork* self,
                                   JsonParser* parser);
VALA_EXTERN GType tuba_api_nodeinfo_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPINodeinfo, g_object_unref)
VALA_EXTERN TubaEntity* tuba_helper_entity_from_json (JsonNode* node,
                                          GType type,
                                          gboolean force);
static JsonNode* _vala_JsonNode_copy (JsonNode* self);
VALA_EXTERN GType tuba_api_nodeinfo_link_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPINodeinfoLink, g_object_unref)
VALA_EXTERN GeeArrayList* tuba_api_nodeinfo_get_links (TubaAPINodeinfo* self);
static void _vala_JsonNode_free (JsonNode* self);
VALA_EXTERN const gchar* tuba_api_nodeinfo_link_get_rel (TubaAPINodeinfoLink* self);
VALA_EXTERN const gchar* tuba_api_nodeinfo_link_get_href (TubaAPINodeinfoLink* self);
VALA_EXTERN GType tuba_api_nodeinfo_v20_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPINodeinfoV20, g_object_unref)
VALA_EXTERN GType tuba_api_nodeinfo_v20_software_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPINodeinfoV20Software, g_object_unref)
VALA_EXTERN TubaAPINodeinfoV20Software* tuba_api_nodeinfo_v20_get_software (TubaAPINodeinfoV20* self);
VALA_EXTERN const gchar* tuba_api_nodeinfo_v20_software_get_name (TubaAPINodeinfoV20Software* self);
VALA_EXTERN const gchar* tuba_instance_account_get_instance (TubaInstanceAccount* self);
VALA_EXTERN const gchar* tuba_instance_account_get_backend (TubaInstanceAccount* self);
VALA_EXTERN TubaAccountStore* tuba_account_store_construct (GType object_type);
VALA_EXTERN void tuba_account_store_set_saved (TubaAccountStore* self,
                                   GeeArrayList* value);
static void g_cclosure_user_marshal_OBJECT__BOXED (GClosure * closure,
                                            GValue * return_value,
                                            guint n_param_values,
                                            const GValue * param_values,
                                            gpointer invocation_hint,
                                            gpointer marshal_data);
VALA_EXTERN GType tuba_account_store_backend_test_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStoreBackendTest, g_object_unref)
VALA_EXTERN gchar* tuba_account_store_backend_test_get_backend (TubaAccountStoreBackendTest* self,
                                                    JsonObject* obj);
static gchar* tuba_account_store_backend_test_real_get_backend (TubaAccountStoreBackendTest* self,
                                                         JsonObject* obj);
VALA_EXTERN TubaAccountStoreBackendTest* tuba_account_store_backend_test_construct (GType object_type);
static GType tuba_account_store_backend_test_get_type_once (void);
static void tuba_account_store_finalize (GObject * obj);
static GType tuba_account_store_get_type_once (void);
static void _vala_tuba_account_store_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);
static void _vala_tuba_account_store_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec);

static inline gpointer
tuba_account_store_get_instance_private (TubaAccountStore* self)
{
	return G_STRUCT_MEMBER_P (self, TubaAccountStore_private_offset);
}

gboolean
tuba_account_store_ensure_active_account (TubaAccountStore* self)
{
	gboolean has_active = FALSE;
	TubaInstanceAccount* account = NULL;
	TubaSettings* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	TubaInstanceAccount* _tmp3_;
	gboolean clear_cache = FALSE;
	gboolean _tmp4_ = FALSE;
	TubaInstanceAccount* _tmp5_;
	TubaInstanceAccount* _tmp11_;
	TubaInstanceAccount* _tmp12_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	has_active = FALSE;
	_tmp0_ = tuba_settings;
	_tmp1_ = tuba_settings_get_active_account (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tuba_account_store_find_by_uuid (self, _tmp2_);
	account = _tmp3_;
	clear_cache = FALSE;
	_tmp5_ = account;
	if (_tmp5_ == NULL) {
		GeeArrayList* _tmp6_;
		gboolean _tmp7_;
		gboolean _tmp8_;
		_tmp6_ = self->priv->_saved;
		_tmp7_ = gee_collection_get_is_empty ((GeeCollection*) _tmp6_);
		_tmp8_ = _tmp7_;
		_tmp4_ = !_tmp8_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		GeeArrayList* _tmp9_;
		gpointer _tmp10_;
		_tmp9_ = self->priv->_saved;
		_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, 0);
		_g_object_unref0 (account);
		account = (TubaInstanceAccount*) _tmp10_;
		clear_cache = TRUE;
	}
	_tmp11_ = account;
	has_active = _tmp11_ != NULL;
	_tmp12_ = account;
	tuba_account_store_activate (self, _tmp12_, clear_cache);
	if (!has_active) {
		TubaApplication* _tmp13_;
		_tmp13_ = tuba_app;
		tuba_application_present_window (_tmp13_, TRUE);
	}
	result = has_active;
	_g_object_unref0 (account);
	return result;
}

static void
tuba_account_store_real_init (TubaAccountStore* self,
                              GError** error)
{
	GError* _inner_error0_ = NULL;
	tuba_mastodon_account_register (self);
	tuba_account_store_load (self, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	tuba_account_store_ensure_active_account (self);
}

void
tuba_account_store_init (TubaAccountStore* self,
                         GError** error)
{
	TubaAccountStoreClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_ACCOUNT_STORE_GET_CLASS (self);
	if (_klass_->init) {
		_klass_->init (self, error);
	}
}

void
tuba_account_store_update_account_info (TubaAccountStore* self,
                                        TubaInstanceAccount* account,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	TubaAccountStoreClass* _klass_;
	_klass_ = TUBA_ACCOUNT_STORE_GET_CLASS (self);
	if (_klass_->update_account_info) {
		_klass_->update_account_info (self, account, _callback_, _user_data_);
	}
}

void
tuba_account_store_update_account_info_finish (TubaAccountStore* self,
                                               GAsyncResult* _res_)
{
	TubaAccountStoreClass* _klass_;
	_klass_ = TUBA_ACCOUNT_STORE_GET_CLASS (self);
	if (_klass_->update_account_info_finish) {
		_klass_->update_account_info_finish (self, _res_);
	}
}

static void
tuba_account_store_real_update_account (TubaAccountStore* self,
                                        TubaInstanceAccount* account,
                                        GError** error)
{
	g_critical ("Type `%s' does not implement abstract method `tuba_account_store_update_account'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
tuba_account_store_update_account (TubaAccountStore* self,
                                   TubaInstanceAccount* account,
                                   GError** error)
{
	TubaAccountStoreClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_ACCOUNT_STORE_GET_CLASS (self);
	if (_klass_->update_account) {
		_klass_->update_account (self, account, error);
	}
}

static void
tuba_account_store_real_load (TubaAccountStore* self,
                              GError** error)
{
	g_critical ("Type `%s' does not implement abstract method `tuba_account_store_load'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
tuba_account_store_load (TubaAccountStore* self,
                         GError** error)
{
	TubaAccountStoreClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_ACCOUNT_STORE_GET_CLASS (self);
	if (_klass_->load) {
		_klass_->load (self, error);
	}
}

static void
tuba_account_store_real_save (TubaAccountStore* self,
                              GError** error)
{
	g_critical ("Type `%s' does not implement abstract method `tuba_account_store_save'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}

void
tuba_account_store_save (TubaAccountStore* self,
                         GError** error)
{
	TubaAccountStoreClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_ACCOUNT_STORE_GET_CLASS (self);
	if (_klass_->save) {
		_klass_->save (self, error);
	}
}

void
tuba_account_store_revoke_token_dangerous (TubaAccountStore* self,
                                           TubaInstanceAccount* account,
                                           gboolean should_handle_error,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	TubaAccountStoreClass* _klass_;
	_klass_ = TUBA_ACCOUNT_STORE_GET_CLASS (self);
	if (_klass_->revoke_token_dangerous) {
		_klass_->revoke_token_dangerous (self, account, should_handle_error, _callback_, _user_data_);
	}
}

void
tuba_account_store_revoke_token_dangerous_finish (TubaAccountStore* self,
                                                  GAsyncResult* _res_)
{
	TubaAccountStoreClass* _klass_;
	_klass_ = TUBA_ACCOUNT_STORE_GET_CLASS (self);
	if (_klass_->revoke_token_dangerous_finish) {
		_klass_->revoke_token_dangerous_finish (self, _res_);
	}
}

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

static void
tuba_account_store_real_add (TubaAccountStore* self,
                             TubaInstanceAccount* account,
                             GError** error)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GeeArrayList* _tmp6_;
	GeeArrayList* _tmp7_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (account != NULL);
	_tmp0_ = tuba_instance_account_get_handle (account);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = string_to_string (_tmp2_);
	_tmp4_ = g_strconcat ("Adding new account: ", _tmp3_, NULL);
	_tmp5_ = _tmp4_;
	g_debug ("AccountStore.vala:51: %s", _tmp5_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp2_);
	_tmp6_ = self->priv->_saved;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp6_, account);
	_tmp7_ = self->priv->_saved;
	g_signal_emit (self, tuba_account_store_signals[TUBA_ACCOUNT_STORE_CHANGED_SIGNAL], 0, _tmp7_);
	tuba_account_store_save (self, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	tuba_account_store_ensure_active_account (self);
}

void
tuba_account_store_add (TubaAccountStore* self,
                        TubaInstanceAccount* account,
                        GError** error)
{
	TubaAccountStoreClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_ACCOUNT_STORE_GET_CLASS (self);
	if (_klass_->add) {
		_klass_->add (self, account, error);
	}
}

static void
tuba_account_store_real_remove (TubaAccountStore* self,
                                TubaInstanceAccount* account,
                                GError** error)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GeeArrayList* _tmp6_;
	GeeArrayList* _tmp7_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (account != NULL);
	_tmp0_ = tuba_instance_account_get_handle (account);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = string_to_string (_tmp2_);
	_tmp4_ = g_strconcat ("Removing account: ", _tmp3_, NULL);
	_tmp5_ = _tmp4_;
	g_debug ("AccountStore.vala:59: %s", _tmp5_);
	_g_free0 (_tmp5_);
	_g_free0 (_tmp2_);
	g_signal_emit_by_name (account, "removed");
	_tmp6_ = self->priv->_saved;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp6_, account);
	_tmp7_ = self->priv->_saved;
	g_signal_emit (self, tuba_account_store_signals[TUBA_ACCOUNT_STORE_CHANGED_SIGNAL], 0, _tmp7_);
	tuba_account_store_save (self, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return;
	}
	tuba_account_store_ensure_active_account (self);
}

void
tuba_account_store_remove (TubaAccountStore* self,
                           TubaInstanceAccount* account,
                           GError** error)
{
	TubaAccountStoreClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_ACCOUNT_STORE_GET_CLASS (self);
	if (_klass_->remove) {
		_klass_->remove (self, account, error);
	}
}

static Block48Data*
block48_data_ref (Block48Data* _data48_)
{
	g_atomic_int_inc (&_data48_->_ref_count_);
	return _data48_;
}

static void
block48_data_unref (void * _userdata_)
{
	Block48Data* _data48_;
	_data48_ = (Block48Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data48_->_ref_count_)) {
		TubaAccountStore* self;
		self = _data48_->self;
		_g_free0 (_data48_->uuid);
		_g_object_unref0 (self);
		g_slice_free (Block48Data, _data48_);
	}
}

static gboolean
__lambda200_ (Block48Data* _data48_,
              TubaInstanceAccount* acc)
{
	TubaAccountStore* self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean result;
	self = _data48_->self;
	g_return_val_if_fail (acc != NULL, FALSE);
	_tmp0_ = tuba_instance_account_get_uuid (acc);
	_tmp1_ = _tmp0_;
	result = g_strcmp0 (_tmp1_, _data48_->uuid) == 0;
	return result;
}

static gboolean
___lambda200__gee_predicate (gconstpointer g,
                             gpointer self)
{
	gboolean result;
	result = __lambda200_ (self, (TubaInstanceAccount*) g);
	return result;
}

TubaInstanceAccount*
tuba_account_store_find_by_uuid (TubaAccountStore* self,
                                 const gchar* uuid)
{
	Block48Data* _data48_;
	gchar* _tmp0_;
	GeeIterator* iter = NULL;
	GeeArrayList* _tmp1_;
	GeeIterator* _tmp2_;
	GeeIterator* _tmp3_;
	GeeIterator* _tmp4_;
	gboolean _tmp5_;
	gboolean _tmp6_;
	TubaInstanceAccount* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (uuid != NULL, NULL);
	_data48_ = g_slice_new0 (Block48Data);
	_data48_->_ref_count_ = 1;
	_data48_->self = g_object_ref (self);
	_tmp0_ = g_strdup (uuid);
	_g_free0 (_data48_->uuid);
	_data48_->uuid = _tmp0_;
	if (!g_uuid_string_is_valid (_data48_->uuid)) {
		result = NULL;
		block48_data_unref (_data48_);
		_data48_ = NULL;
		return result;
	}
	_tmp1_ = self->priv->_saved;
	_tmp2_ = gee_traversable_filter ((GeeTraversable*) _tmp1_, ___lambda200__gee_predicate, block48_data_ref (_data48_), block48_data_unref);
	iter = _tmp2_;
	_tmp3_ = iter;
	gee_iterator_next (_tmp3_);
	_tmp4_ = iter;
	_tmp5_ = gee_iterator_get_valid (_tmp4_);
	_tmp6_ = _tmp5_;
	if (!_tmp6_) {
		result = NULL;
		_g_object_unref0 (iter);
		block48_data_unref (_data48_);
		_data48_ = NULL;
		return result;
	} else {
		GeeIterator* _tmp7_;
		gpointer _tmp8_;
		_tmp7_ = iter;
		_tmp8_ = gee_iterator_get (_tmp7_);
		result = (TubaInstanceAccount*) _tmp8_;
		_g_object_unref0 (iter);
		block48_data_unref (_data48_);
		_data48_ = NULL;
		return result;
	}
}

void
tuba_account_store_activate (TubaAccountStore* self,
                             TubaInstanceAccount* account,
                             gboolean clear_cache)
{
	TubaInstanceAccount* _tmp0_;
	TubaAccountStore* _tmp12_;
	TubaInstanceAccount* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_active;
	if (_tmp0_ != NULL) {
		TubaInstanceAccount* _tmp1_;
		_tmp1_ = self->priv->_active;
		g_signal_emit_by_name (_tmp1_, "deactivated");
	}
	if (account == NULL) {
		g_debug ("AccountStore.vala:85: Reset active account");
		return;
	} else {
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		TubaSettings* _tmp9_;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		_tmp2_ = tuba_instance_account_get_handle (account);
		_tmp3_ = _tmp2_;
		_tmp4_ = _tmp3_;
		_tmp5_ = string_to_string (_tmp4_);
		_tmp6_ = g_strconcat ("Activating ", _tmp5_, "…", NULL);
		_tmp7_ = _tmp6_;
		g_debug ("AccountStore.vala:88: %s", _tmp7_);
		_g_free0 (_tmp7_);
		_g_free0 (_tmp4_);
		if (clear_cache) {
			TubaNetwork* _tmp8_;
			_tmp8_ = tuba_network;
			tuba_network_clear_cache (_tmp8_);
		}
		_tmp9_ = tuba_settings;
		_tmp10_ = tuba_instance_account_get_uuid (account);
		_tmp11_ = _tmp10_;
		tuba_settings_set_active_account (_tmp9_, _tmp11_);
		tuba_account_store_verify_credentials (self, account, NULL, NULL);
	}
	_tmp12_ = tuba_accounts;
	tuba_account_store_set_active (_tmp12_, account);
	_tmp13_ = self->priv->_active;
	g_signal_emit_by_name (_tmp13_, "activated");
	_tmp14_ = self->priv->_active;
	g_signal_emit (self, tuba_account_store_signals[TUBA_ACCOUNT_STORE_SWITCHED_SIGNAL], 0, _tmp14_);
}

static void
tuba_account_store_verify_credentials_data_free (gpointer _data)
{
	TubaAccountStoreVerifyCredentialsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->account);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaAccountStoreVerifyCredentialsData, _data_);
}

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

void
tuba_account_store_verify_credentials (TubaAccountStore* self,
                                       TubaInstanceAccount* account,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	TubaAccountStoreVerifyCredentialsData* _data_;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (account != NULL);
	_data_ = g_slice_new0 (TubaAccountStoreVerifyCredentialsData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_account_store_verify_credentials_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (account);
	_g_object_unref0 (_data_->account);
	_data_->account = _tmp1_;
	tuba_account_store_verify_credentials_co (_data_);
}

void
tuba_account_store_verify_credentials_finish (TubaAccountStore* self,
                                              GAsyncResult* _res_)
{
	TubaAccountStoreVerifyCredentialsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_account_store_verify_credentials_ready (GObject* source_object,
                                             GAsyncResult* _res_,
                                             gpointer _user_data_)
{
	TubaAccountStoreVerifyCredentialsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_account_store_verify_credentials_co (_data_);
}

static gboolean
tuba_account_store_verify_credentials_co (TubaAccountStoreVerifyCredentialsData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_state_ = 1;
		tuba_instance_account_verify_credentials (_data_->account, tuba_account_store_verify_credentials_ready, _data_);
		return FALSE;
		_state_1:
		tuba_instance_account_verify_credentials_finish (_data_->account, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			if (g_error_matches (_data_->_inner_error0_, TUBA_OOPSIE, TUBA_OOPSIE_HTTP_401)) {
				goto __catch0_tuba_oopsie_http_401;
			}
			goto __catch0_g_error;
		}
		_data_->_tmp0_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
		_data_->_tmp1_ = _data_->_tmp0_;
		if (_data_->_tmp1_ != NULL) {
			_data_->_tmp3_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
			_data_->_tmp4_ = _data_->_tmp3_;
			_data_->_tmp5_ = tuba_api_account_source_get_quote_policy (_data_->_tmp4_);
			_data_->_tmp6_ = _data_->_tmp5_;
			if (_data_->_tmp6_ != NULL) {
				_data_->_tmp7_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
				_data_->_tmp8_ = _data_->_tmp7_;
				_data_->_tmp9_ = tuba_api_account_source_get_quote_policy (_data_->_tmp8_);
				_data_->_tmp10_ = _data_->_tmp9_;
				_data_->_tmp2_ = g_strcmp0 (_data_->_tmp10_, "") != 0;
			} else {
				_data_->_tmp2_ = FALSE;
			}
			if (_data_->_tmp2_) {
				_data_->_tmp11_ = tuba_settings;
				_data_->_tmp12_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
				_data_->_tmp13_ = _data_->_tmp12_;
				_data_->_tmp14_ = tuba_api_account_source_get_quote_policy (_data_->_tmp13_);
				_data_->_tmp15_ = _data_->_tmp14_;
				tuba_settings_set_default_quote_policy (_data_->_tmp11_, _data_->_tmp15_);
			}
			_data_->_tmp17_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
			_data_->_tmp18_ = _data_->_tmp17_;
			_data_->_tmp19_ = tuba_api_account_source_get_language (_data_->_tmp18_);
			_data_->_tmp20_ = _data_->_tmp19_;
			if (_data_->_tmp20_ != NULL) {
				_data_->_tmp21_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
				_data_->_tmp22_ = _data_->_tmp21_;
				_data_->_tmp23_ = tuba_api_account_source_get_language (_data_->_tmp22_);
				_data_->_tmp24_ = _data_->_tmp23_;
				_data_->_tmp16_ = g_strcmp0 (_data_->_tmp24_, "") != 0;
			} else {
				_data_->_tmp16_ = FALSE;
			}
			if (_data_->_tmp16_) {
				_data_->_tmp25_ = tuba_settings;
				_data_->_tmp26_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
				_data_->_tmp27_ = _data_->_tmp26_;
				_data_->_tmp28_ = tuba_api_account_source_get_language (_data_->_tmp27_);
				_data_->_tmp29_ = _data_->_tmp28_;
				tuba_settings_set_default_language (_data_->_tmp25_, _data_->_tmp29_);
			}
			_data_->_tmp31_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
			_data_->_tmp32_ = _data_->_tmp31_;
			_data_->_tmp33_ = tuba_api_account_source_get_privacy (_data_->_tmp32_);
			_data_->_tmp34_ = _data_->_tmp33_;
			if (_data_->_tmp34_ != NULL) {
				_data_->_tmp35_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
				_data_->_tmp36_ = _data_->_tmp35_;
				_data_->_tmp37_ = tuba_api_account_source_get_privacy (_data_->_tmp36_);
				_data_->_tmp38_ = _data_->_tmp37_;
				_data_->_tmp30_ = g_strcmp0 (_data_->_tmp38_, "") != 0;
			} else {
				_data_->_tmp30_ = FALSE;
			}
			if (_data_->_tmp30_) {
				_data_->_tmp39_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
				_data_->_tmp40_ = _data_->_tmp39_;
				_data_->_tmp41_ = tuba_api_account_source_get_privacy (_data_->_tmp40_);
				_data_->_tmp42_ = _data_->_tmp41_;
				_data_->_tmp43_ = g_utf8_strdown (_data_->_tmp42_, (gssize) -1);
				_data_->visibility_id = _data_->_tmp43_;
				_data_->_tmp44_ = _data_->account->visibility;
				_data_->_tmp45_ = _data_->visibility_id;
				if (gee_abstract_map_has_key ((GeeAbstractMap*) _data_->_tmp44_, _data_->_tmp45_)) {
					_data_->_tmp46_ = tuba_settings;
					_data_->_tmp47_ = _data_->visibility_id;
					tuba_settings_set_default_post_visibility (_data_->_tmp46_, _data_->_tmp47_);
				}
				_g_free0 (_data_->visibility_id);
			}
			_data_->_tmp48_ = tuba_api_account_get_source ((TubaAPIAccount*) _data_->account);
			_data_->_tmp49_ = _data_->_tmp48_;
			_data_->_tmp50_ = tuba_api_account_source_get_follow_requests_count (_data_->_tmp49_);
			_data_->_tmp51_ = _data_->_tmp50_;
			tuba_instance_account_set_unreviewed_follow_requests (_data_->account, _data_->_tmp51_);
		}
		tuba_instance_account_set_tuba_verified_credentials (_data_->account, TRUE);
	}
	goto __finally0;
	__catch0_tuba_oopsie_http_401:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp52_ = tuba_instance_account_get_handle (_data_->account);
		_data_->_tmp53_ = _data_->_tmp52_;
		_data_->_tmp54_ = _data_->_tmp53_;
		_data_->_tmp55_ = string_to_string (_data_->_tmp54_);
		_data_->_tmp56_ = g_strconcat ("Couldn't activate account ", _data_->_tmp55_, ":", NULL);
		_data_->_tmp57_ = _data_->_tmp56_;
		g_warning ("AccountStore.vala:114: %s", _data_->_tmp57_);
		_g_free0 (_data_->_tmp57_);
		_g_free0 (_data_->_tmp54_);
		_data_->_tmp58_ = _data_->e;
		_data_->_tmp59_ = _data_->_tmp58_->message;
		g_warning ("AccountStore.vala:115: %s", _data_->_tmp59_);
		tuba_instance_account_set_tuba_revoked (_data_->account, TRUE);
		tuba_account_store_ask_refresh_account_token (_data_->self, _data_->account, NULL, NULL);
		_g_error_free0 (_data_->e);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_vala1_e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp60_ = tuba_instance_account_get_handle (_data_->account);
		_data_->_tmp61_ = _data_->_tmp60_;
		_data_->_tmp62_ = _data_->_tmp61_;
		_data_->_tmp63_ = string_to_string (_data_->_tmp62_);
		_data_->_tmp64_ = g_strconcat ("Couldn't activate account ", _data_->_tmp63_, ":", NULL);
		_data_->_tmp65_ = _data_->_tmp64_;
		g_warning ("AccountStore.vala:119: %s", _data_->_tmp65_);
		_g_free0 (_data_->_tmp65_);
		_g_free0 (_data_->_tmp62_);
		_data_->_tmp66_ = _data_->_vala1_e;
		_data_->_tmp67_ = _data_->_tmp66_->message;
		g_warning ("AccountStore.vala:120: %s", _data_->_tmp67_);
		_g_error_free0 (_data_->_vala1_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_account_store_ask_refresh_account_token_data_free (gpointer _data)
{
	TubaAccountStoreAskRefreshAccountTokenData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->account);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaAccountStoreAskRefreshAccountTokenData, _data_);
}

static void
tuba_account_store_ask_refresh_account_token (TubaAccountStore* self,
                                              TubaInstanceAccount* account,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	TubaAccountStoreAskRefreshAccountTokenData* _data_;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (account != NULL);
	_data_ = g_slice_new0 (TubaAccountStoreAskRefreshAccountTokenData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_account_store_ask_refresh_account_token_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (account);
	_g_object_unref0 (_data_->account);
	_data_->account = _tmp1_;
	tuba_account_store_ask_refresh_account_token_co (_data_);
}

static void
tuba_account_store_ask_refresh_account_token_finish (TubaAccountStore* self,
                                                     GAsyncResult* _res_)
{
	TubaAccountStoreAskRefreshAccountTokenData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
tuba_account_store_ask_refresh_account_token_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_)
{
	TubaAccountStoreAskRefreshAccountTokenData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_account_store_ask_refresh_account_token_co (_data_);
}

static gboolean
tuba_account_store_ask_refresh_account_token_co (TubaAccountStoreAskRefreshAccountTokenData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = tuba_app;
	memset (&_data_->_tmp1_, 0, sizeof (TubaApplicationQuestionText));
	_g_free0 (_data_->_tmp1_.text);
	_data_->_tmp1_.text = _ ("Reauthenticate account?");
	_data_->_tmp1_.use_markup = FALSE;
	_data_->_tmp2_ = tuba_instance_account_get_handle (_data_->account);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp5_ = g_strdup_printf (_ ("%s's password expired. To continue using %s, you have to login again."), _data_->_tmp4_, BUILD_NAME);
	_data_->_tmp6_ = _data_->_tmp5_;
	memset (&_data_->_tmp7_, 0, sizeof (TubaApplicationQuestionText));
	_g_free0 (_data_->_tmp7_.text);
	_data_->_tmp7_.text = _data_->_tmp6_;
	_data_->_tmp7_.use_markup = FALSE;
	_data_->_tmp8_ = tuba_app;
	_data_->_tmp9_ = tuba_application_get_main_window (_data_->_tmp8_);
	_data_->_tmp10_ = _data_->_tmp9_;
	memset (&_data_->_tmp11_, 0, sizeof (TubaApplicationQuestionButtons));
	tuba_application_question_button_destroy (&_data_->_tmp11_.yes);
	_data_->_tmp11_.yes = (TubaApplicationQuestionButton) {_ ("Reauthenticate"), ADW_RESPONSE_SUGGESTED};
	tuba_application_question_button_destroy (&_data_->_tmp11_.no);
	_data_->_tmp11_.no = (TubaApplicationQuestionButton) {_ ("Forget Account"), ADW_RESPONSE_DESTRUCTIVE};
	_data_->_state_ = 1;
	tuba_application_question (_data_->_tmp0_, &_data_->_tmp1_, &_data_->_tmp7_, (GtkWidget*) _data_->_tmp10_, &_data_->_tmp11_, NULL, FALSE, tuba_account_store_ask_refresh_account_token_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp12_ = tuba_application_question_finish (_data_->_tmp0_, _data_->_res_);
	_g_free0 (_data_->_tmp6_);
	_g_free0 (_data_->_tmp4_);
	_data_->res = _data_->_tmp12_;
	if (_data_->res == TUBA_APPLICATION_QUESTION_ANSWER_YES) {
		_data_->_tmp13_ = tuba_dialogs_new_account_new (TRUE, _data_->account);
		g_object_ref_sink (_data_->_tmp13_);
		_data_->_tmp14_ = _data_->_tmp13_;
		gtk_window_present ((GtkWindow*) _data_->_tmp14_);
		_g_object_unref0 (_data_->_tmp14_);
	} else {
		if (_data_->res == TUBA_APPLICATION_QUESTION_ANSWER_NO) {
			{
				tuba_account_store_remove (_data_->self, _data_->account, &_data_->_inner_error0_);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
			}
			goto __finally0;
			__catch0_g_error:
			{
				_data_->e = _data_->_inner_error0_;
				_data_->_inner_error0_ = NULL;
				_data_->_tmp15_ = tuba_instance_account_get_handle (_data_->account);
				_data_->_tmp16_ = _data_->_tmp15_;
				_data_->_tmp17_ = _data_->_tmp16_;
				_data_->_tmp18_ = string_to_string (_data_->_tmp17_);
				_data_->_tmp19_ = _data_->e;
				_data_->_tmp20_ = g_strdup_printf ("%i", _data_->_tmp19_->code);
				_data_->_tmp21_ = _data_->_tmp20_;
				_data_->_tmp22_ = _data_->e;
				_data_->_tmp23_ = _data_->_tmp22_->message;
				_data_->_tmp24_ = string_to_string (_data_->_tmp23_);
				_data_->_tmp25_ = g_strconcat ("Couldn't remove account ", _data_->_tmp18_, ": ", _data_->_tmp21_, " ", _data_->_tmp24_, NULL);
				_data_->_tmp26_ = _data_->_tmp25_;
				g_warning ("AccountStore.vala:156: %s", _data_->_tmp26_);
				_g_free0 (_data_->_tmp26_);
				_g_free0 (_data_->_tmp21_);
				_g_free0 (_data_->_tmp17_);
				_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 gpointer
_json_object_ref0 (gpointer self)
{
	return self ? json_object_ref (self) : NULL;
}

TubaInstanceAccount*
tuba_account_store_create_account (TubaAccountStore* self,
                                   JsonNode* node,
                                   TubaInstanceAccountInstanceFeatures* instance_features,
                                   GError** error)
{
	JsonObject* obj = NULL;
	JsonObject* _tmp0_;
	JsonObject* _tmp1_;
	gchar* backend = NULL;
	JsonObject* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* handle = NULL;
	JsonObject* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	TubaInstanceAccount* account = NULL;
	TubaInstanceAccount* _tmp8_ = NULL;
	TubaInstanceAccount* _tmp9_;
	JsonObject* _tmp18_;
	gboolean _tmp33_ = FALSE;
	JsonObject* _tmp34_;
	JsonObject* _tmp46_;
	gboolean _tmp50_ = FALSE;
	TubaInstanceAccount* _tmp51_;
	const gchar* _tmp52_;
	const gchar* _tmp53_;
	GError* _inner_error0_ = NULL;
	TubaInstanceAccount* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (node != NULL, NULL);
	_tmp0_ = json_node_get_object (node);
	_tmp1_ = _json_object_ref0 (_tmp0_);
	obj = _tmp1_;
	_tmp2_ = obj;
	_tmp3_ = json_object_get_string_member (_tmp2_, "backend");
	_tmp4_ = g_strdup (_tmp3_);
	backend = _tmp4_;
	_tmp5_ = obj;
	_tmp6_ = json_object_get_string_member (_tmp5_, "handle");
	_tmp7_ = g_strdup (_tmp6_);
	handle = _tmp7_;
	g_signal_emit (self, tuba_account_store_signals[TUBA_ACCOUNT_STORE_CREATE_FOR_BACKEND_SIGNAL], 0, node, &_tmp8_);
	account = _tmp8_;
	_tmp9_ = account;
	if (_tmp9_ == NULL) {
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		gchar* _tmp15_;
		GError* _tmp16_;
		GError* _tmp17_;
		_tmp10_ = handle;
		_tmp11_ = string_to_string (_tmp10_);
		_tmp12_ = backend;
		_tmp13_ = string_to_string (_tmp12_);
		_tmp14_ = g_strconcat ("Account ", _tmp11_, " has unknown backend: ", _tmp13_, NULL);
		_tmp15_ = _tmp14_;
		_tmp16_ = g_error_new_literal (TUBA_OOPSIE, TUBA_OOPSIE_INTERNAL, _tmp15_);
		_tmp17_ = _tmp16_;
		_g_free0 (_tmp15_);
		_inner_error0_ = _tmp17_;
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (account);
		_g_free0 (handle);
		_g_free0 (backend);
		_json_object_unref0 (obj);
		return NULL;
	}
	_tmp18_ = obj;
	if (json_object_has_member (_tmp18_, "api-versions")) {
		JsonObject* api_versions = NULL;
		JsonObject* _tmp19_;
		JsonObject* _tmp20_;
		JsonObject* _tmp21_;
		JsonObject* _tmp22_;
		_tmp19_ = obj;
		_tmp20_ = json_object_get_object_member (_tmp19_, "api-versions");
		_tmp21_ = _json_object_ref0 (_tmp20_);
		api_versions = _tmp21_;
		_tmp22_ = api_versions;
		if (_tmp22_ != NULL) {
			JsonObject* _tmp23_;
			JsonObject* _tmp28_;
			_tmp23_ = api_versions;
			if (json_object_has_member (_tmp23_, "mastodon")) {
				TubaInstanceAccount* _tmp24_;
				TubaAPIInstanceV2APIVersions* _tmp25_;
				TubaAPIInstanceV2APIVersions* _tmp26_;
				JsonObject* _tmp27_;
				_tmp24_ = account;
				_tmp25_ = tuba_instance_account_get_tuba_api_versions (_tmp24_);
				_tmp26_ = _tmp25_;
				_tmp27_ = api_versions;
				tuba_api_instance_v2_api_versions_set_mastodon (_tmp26_, (gint8) json_object_get_int_member (_tmp27_, "mastodon"));
			}
			_tmp28_ = api_versions;
			if (json_object_has_member (_tmp28_, "chuckya")) {
				TubaInstanceAccount* _tmp29_;
				TubaAPIInstanceV2APIVersions* _tmp30_;
				TubaAPIInstanceV2APIVersions* _tmp31_;
				JsonObject* _tmp32_;
				_tmp29_ = account;
				_tmp30_ = tuba_instance_account_get_tuba_api_versions (_tmp29_);
				_tmp31_ = _tmp30_;
				_tmp32_ = api_versions;
				tuba_api_instance_v2_api_versions_set_chuckya (_tmp31_, (gint8) json_object_get_int_member (_tmp32_, "chuckya"));
			}
		}
		_json_object_unref0 (api_versions);
	}
	_tmp34_ = obj;
	if (json_object_has_member (_tmp34_, "instance-features")) {
		_tmp33_ = TRUE;
	} else {
		_tmp33_ = instance_features != NULL;
	}
	if (_tmp33_) {
		TubaInstanceAccountInstanceFeatures _tmp35_ = 0U;
		TubaInstanceAccount* _tmp37_;
		gboolean _tmp38_ = FALSE;
		TubaInstanceAccount* _tmp39_;
		TubaInstanceAccountInstanceFeatures _tmp40_;
		TubaInstanceAccountInstanceFeatures _tmp41_;
		if (instance_features == NULL) {
			JsonObject* _tmp36_;
			_tmp36_ = obj;
			_tmp35_ = (TubaInstanceAccountInstanceFeatures) json_object_get_int_member (_tmp36_, "instance-features");
		} else {
			_tmp35_ = *instance_features;
		}
		_tmp37_ = account;
		tuba_instance_account_set_tuba_instance_features (_tmp37_, _tmp35_);
		_tmp39_ = account;
		_tmp40_ = tuba_instance_account_get_tuba_instance_features (_tmp39_);
		_tmp41_ = _tmp40_;
		if ((_tmp41_ & TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP) == TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP) {
			JsonObject* _tmp42_;
			_tmp42_ = obj;
			_tmp38_ = json_object_has_member (_tmp42_, "iceshrimp-api-key");
		} else {
			_tmp38_ = FALSE;
		}
		if (_tmp38_) {
			TubaInstanceAccount* _tmp43_;
			JsonObject* _tmp44_;
			const gchar* _tmp45_;
			_tmp43_ = account;
			_tmp44_ = obj;
			_tmp45_ = json_object_get_string_member (_tmp44_, "iceshrimp-api-key");
			tuba_instance_account_set_tuba_iceshrimp_api_key (_tmp43_, _tmp45_);
		}
	}
	_tmp46_ = obj;
	if (json_object_has_member (_tmp46_, "streaming")) {
		TubaInstanceAccount* _tmp47_;
		JsonObject* _tmp48_;
		const gchar* _tmp49_;
		_tmp47_ = account;
		_tmp48_ = obj;
		_tmp49_ = json_object_get_string_member (_tmp48_, "streaming");
		tuba_instance_account_set_tuba_streaming_url (_tmp47_, _tmp49_);
	}
	_tmp51_ = account;
	_tmp52_ = tuba_instance_account_get_uuid (_tmp51_);
	_tmp53_ = _tmp52_;
	if (_tmp53_ == NULL) {
		_tmp50_ = TRUE;
	} else {
		TubaInstanceAccount* _tmp54_;
		const gchar* _tmp55_;
		const gchar* _tmp56_;
		_tmp54_ = account;
		_tmp55_ = tuba_instance_account_get_uuid (_tmp54_);
		_tmp56_ = _tmp55_;
		_tmp50_ = !g_uuid_string_is_valid (_tmp56_);
	}
	if (_tmp50_) {
		TubaInstanceAccount* _tmp57_;
		gchar* _tmp58_;
		gchar* _tmp59_;
		_tmp57_ = account;
		_tmp58_ = g_uuid_string_random ();
		_tmp59_ = _tmp58_;
		tuba_instance_account_set_uuid (_tmp57_, _tmp59_);
		_g_free0 (_tmp59_);
	}
	result = account;
	_g_free0 (handle);
	_g_free0 (backend);
	_json_object_unref0 (obj);
	return result;
}

static void
tuba_account_store_guess_backend_data_free (gpointer _data)
{
	TubaAccountStoreGuessBackendData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->account);
	_g_object_unref0 (_data_->self);
	g_slice_free (TubaAccountStoreGuessBackendData, _data_);
}

void
tuba_account_store_guess_backend (TubaAccountStore* self,
                                  TubaInstanceAccount* account,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_)
{
	TubaAccountStoreGuessBackendData* _data_;
	TubaAccountStore* _tmp0_;
	TubaInstanceAccount* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (account != NULL);
	_data_ = g_slice_new0 (TubaAccountStoreGuessBackendData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, tuba_account_store_guess_backend_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (account);
	_g_object_unref0 (_data_->account);
	_data_->account = _tmp1_;
	tuba_account_store_guess_backend_co (_data_);
}

void
tuba_account_store_guess_backend_finish (TubaAccountStore* self,
                                         GAsyncResult* _res_,
                                         GError** error)
{
	TubaAccountStoreGuessBackendData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
tuba_account_store_guess_backend_ready (GObject* source_object,
                                        GAsyncResult* _res_,
                                        gpointer _user_data_)
{
	TubaAccountStoreGuessBackendData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	tuba_account_store_guess_backend_co (_data_);
}

static JsonNode*
_vala_JsonNode_copy (JsonNode* self)
{
	return g_boxed_copy (json_node_get_type (), self);
}

static gpointer
__vala_JsonNode_copy0 (gpointer self)
{
	return self ? _vala_JsonNode_copy (self) : NULL;
}

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

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static gboolean
tuba_account_store_guess_backend_co (TubaAccountStoreGuessBackendData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	tuba_instance_account_set_backend (_data_->account, "Fediverse");
	_data_->_tmp0_ = _g_object_ref0 (_data_->account);
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = tuba_request_v2_new ("/.well-known/nodeinfo", TUBA_REQUEST_V2_METHOD_GET);
	tuba_request_v2_set_account (_data_->_tmp1_, _data_->_tmp0_);
	_g_object_unref0 (_data_->_tmp0_);
	_data_->req = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->req;
	_data_->_state_ = 1;
	tuba_request_v2_exec (_data_->_tmp2_, tuba_account_store_guess_backend_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp3_ = tuba_request_v2_exec_finish (_data_->_tmp2_, _data_->_res_, NULL, &_data_->_inner_error0_);
	_data_->in_stream = _data_->_tmp3_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->req);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp4_ = _data_->in_stream;
	_data_->_state_ = 2;
	tuba_network_get_parser_from_inputstream_async (_data_->_tmp4_, NULL, tuba_account_store_guess_backend_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp5_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
	_data_->parser = _data_->_tmp5_;
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->req);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp6_ = tuba_network;
	_data_->_tmp7_ = _data_->parser;
	_data_->_tmp8_ = tuba_network_parse_node (_data_->_tmp6_, _data_->_tmp7_);
	_data_->node = _data_->_tmp8_;
	_data_->_tmp9_ = _data_->node;
	_data_->_tmp10_ = __vala_JsonNode_copy0 (_data_->_tmp9_);
	_data_->_tmp11_ = tuba_helper_entity_from_json (_data_->_tmp10_, TUBA_API_TYPE_NODEINFO, FALSE);
	_data_->known_nodeinfo = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp11_, TUBA_API_TYPE_NODEINFO, TubaAPINodeinfo);
	_data_->_tmp13_ = _data_->known_nodeinfo;
	_data_->_tmp14_ = tuba_api_nodeinfo_get_links (_data_->_tmp13_);
	_data_->_tmp15_ = _data_->_tmp14_;
	if (_data_->_tmp15_ == NULL) {
		_data_->_tmp12_ = TRUE;
	} else {
		_data_->_tmp16_ = _data_->known_nodeinfo;
		_data_->_tmp17_ = tuba_api_nodeinfo_get_links (_data_->_tmp16_);
		_data_->_tmp18_ = _data_->_tmp17_;
		_data_->_tmp19_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp18_);
		_data_->_tmp20_ = _data_->_tmp19_;
		_data_->_tmp12_ = _data_->_tmp20_ == 0;
	}
	if (_data_->_tmp12_) {
		_data_->_tmp21_ = g_error_new_literal (TUBA_OOPSIE, TUBA_OOPSIE_INTERNAL, "Instance does not support nodeinfo");
		_data_->_inner_error0_ = _data_->_tmp21_;
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->known_nodeinfo);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->req);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->supports = FALSE;
	{
		_data_->_tmp22_ = _data_->known_nodeinfo;
		_data_->_tmp23_ = tuba_api_nodeinfo_get_links (_data_->_tmp22_);
		_data_->_tmp24_ = _data_->_tmp23_;
		_data_->_link_list = _data_->_tmp24_;
		_data_->_tmp25_ = _data_->_link_list;
		_data_->_tmp26_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _data_->_tmp25_);
		_data_->_tmp27_ = _data_->_tmp26_;
		_data_->_link_size = _data_->_tmp27_;
		_data_->_link_index = -1;
		while (TRUE) {
			_data_->_link_index = _data_->_link_index + 1;
			_data_->_tmp28_ = _data_->_link_index;
			_data_->_tmp29_ = _data_->_link_size;
			if (!(_data_->_tmp28_ < _data_->_tmp29_)) {
				break;
			}
			_data_->_tmp30_ = _data_->_link_list;
			_data_->_tmp31_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp30_, _data_->_link_index);
			_data_->link = (TubaAPINodeinfoLink*) _data_->_tmp31_;
			_data_->_tmp32_ = _data_->link;
			_data_->_tmp33_ = tuba_api_nodeinfo_link_get_rel (_data_->_tmp32_);
			_data_->_tmp34_ = _data_->_tmp33_;
			if (!string_contains (_data_->_tmp34_, "://nodeinfo.diaspora.software/ns/schema/2")) {
				_g_object_unref0 (_data_->link);
				continue;
			}
			_data_->supports = TRUE;
			_data_->_tmp37_ = _data_->link;
			_data_->_tmp38_ = tuba_api_nodeinfo_link_get_rel (_data_->_tmp37_);
			_data_->_tmp39_ = _data_->_tmp38_;
			if (g_str_has_suffix (_data_->_tmp39_, "://nodeinfo.diaspora.software/ns/schema/2.0")) {
				_data_->_tmp40_ = _data_->link;
				_data_->_tmp41_ = tuba_api_nodeinfo_link_get_href (_data_->_tmp40_);
				_data_->_tmp42_ = _data_->_tmp41_;
				_data_->_tmp36_ = _data_->_tmp42_ != NULL;
			} else {
				_data_->_tmp36_ = FALSE;
			}
			if (_data_->_tmp36_) {
				_data_->_tmp43_ = _data_->link;
				_data_->_tmp44_ = tuba_api_nodeinfo_link_get_href (_data_->_tmp43_);
				_data_->_tmp45_ = _data_->_tmp44_;
				_data_->_tmp35_ = g_strcmp0 (_data_->_tmp45_, "") != 0;
			} else {
				_data_->_tmp35_ = FALSE;
			}
			if (_data_->_tmp35_) {
				_data_->_tmp46_ = _data_->link;
				_data_->_tmp47_ = tuba_api_nodeinfo_link_get_href (_data_->_tmp46_);
				_data_->_tmp48_ = _data_->_tmp47_;
				_data_->_tmp49_ = tuba_request_v2_new (_data_->_tmp48_, TUBA_REQUEST_V2_METHOD_GET);
				_g_object_unref0 (_data_->req);
				_data_->req = _data_->_tmp49_;
				{
					_data_->_tmp51_ = _data_->req;
					_data_->_state_ = 3;
					tuba_request_v2_exec (_data_->_tmp51_, tuba_account_store_guess_backend_ready, _data_);
					return FALSE;
					_state_3:
					_data_->_tmp52_ = tuba_request_v2_exec_finish (_data_->_tmp51_, _data_->_res_, NULL, &_data_->_inner_error0_);
					_data_->_tmp50_ = _data_->_tmp52_;
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						goto __catch0_g_error;
					}
					_data_->_tmp53_ = _data_->_tmp50_;
					_data_->_tmp50_ = NULL;
					_g_object_unref0 (_data_->in_stream);
					_data_->in_stream = _data_->_tmp53_;
					_data_->_tmp55_ = _data_->in_stream;
					_data_->_state_ = 4;
					tuba_network_get_parser_from_inputstream_async (_data_->_tmp55_, NULL, tuba_account_store_guess_backend_ready, _data_);
					return FALSE;
					_state_4:
					_data_->_tmp56_ = tuba_network_get_parser_from_inputstream_finish (_data_->_res_, &_data_->_inner_error0_);
					_data_->_tmp54_ = _data_->_tmp56_;
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						_g_object_unref0 (_data_->_tmp50_);
						goto __catch0_g_error;
					}
					_data_->_tmp57_ = _data_->_tmp54_;
					_data_->_tmp54_ = NULL;
					_g_object_unref0 (_data_->parser);
					_data_->parser = _data_->_tmp57_;
					_data_->_tmp58_ = tuba_network;
					_data_->_tmp59_ = _data_->parser;
					_data_->_tmp60_ = tuba_network_parse_node (_data_->_tmp58_, _data_->_tmp59_);
					__vala_JsonNode_free0 (_data_->node);
					_data_->node = _data_->_tmp60_;
					_data_->_tmp61_ = _data_->node;
					_data_->_tmp62_ = __vala_JsonNode_copy0 (_data_->_tmp61_);
					_data_->_tmp63_ = tuba_helper_entity_from_json (_data_->_tmp62_, TUBA_API_NODEINFO_TYPE_V20, FALSE);
					_data_->nodeinfo2 = G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp63_, TUBA_API_NODEINFO_TYPE_V20, TubaAPINodeinfoV20);
					_data_->_tmp65_ = _data_->nodeinfo2;
					_data_->_tmp66_ = tuba_api_nodeinfo_v20_get_software (_data_->_tmp65_);
					_data_->_tmp67_ = _data_->_tmp66_;
					if (_data_->_tmp67_ != NULL) {
						_data_->_tmp68_ = _data_->nodeinfo2;
						_data_->_tmp69_ = tuba_api_nodeinfo_v20_get_software (_data_->_tmp68_);
						_data_->_tmp70_ = _data_->_tmp69_;
						_data_->_tmp71_ = tuba_api_nodeinfo_v20_software_get_name (_data_->_tmp70_);
						_data_->_tmp72_ = _data_->_tmp71_;
						_data_->_tmp64_ = _data_->_tmp72_ != NULL;
					} else {
						_data_->_tmp64_ = FALSE;
					}
					if (_data_->_tmp64_) {
						_data_->_tmp73_ = _data_->nodeinfo2;
						_data_->_tmp74_ = tuba_api_nodeinfo_v20_get_software (_data_->_tmp73_);
						_data_->_tmp75_ = _data_->_tmp74_;
						_data_->_tmp76_ = tuba_api_nodeinfo_v20_software_get_name (_data_->_tmp75_);
						_data_->_tmp77_ = _data_->_tmp76_;
						tuba_instance_account_set_backend (_data_->account, _data_->_tmp77_);
						_data_->_tmp78_ = _data_->nodeinfo2;
						_data_->_tmp79_ = tuba_api_nodeinfo_v20_get_software (_data_->_tmp78_);
						_data_->_tmp80_ = _data_->_tmp79_;
						_data_->_tmp81_ = tuba_api_nodeinfo_v20_software_get_name (_data_->_tmp80_);
						_data_->_tmp82_ = _data_->_tmp81_;
						if (g_strcmp0 (_data_->_tmp82_, "Iceshrimp.NET") == 0) {
							_data_->_tmp83_ = tuba_instance_account_get_tuba_instance_features (_data_->account);
							_data_->_tmp84_ = _data_->_tmp83_;
							tuba_instance_account_set_tuba_instance_features (_data_->account, _data_->_tmp84_ | TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_ICESHRIMP);
						} else {
							_data_->_tmp85_ = _data_->nodeinfo2;
							_data_->_tmp86_ = tuba_api_nodeinfo_v20_get_software (_data_->_tmp85_);
							_data_->_tmp87_ = _data_->_tmp86_;
							_data_->_tmp88_ = tuba_api_nodeinfo_v20_software_get_name (_data_->_tmp87_);
							_data_->_tmp89_ = _data_->_tmp88_;
							if (g_strcmp0 (_data_->_tmp89_, "gotosocial") == 0) {
								_data_->_tmp90_ = tuba_instance_account_get_tuba_instance_features (_data_->account);
								_data_->_tmp91_ = _data_->_tmp90_;
								tuba_instance_account_set_tuba_instance_features (_data_->account, _data_->_tmp91_ | TUBA_INSTANCE_ACCOUNT_INSTANCE_FEATURES_GOTOSOCIAL);
							}
						}
					}
					_g_object_unref0 (_data_->nodeinfo2);
					_g_object_unref0 (_data_->_tmp54_);
					_g_object_unref0 (_data_->_tmp50_);
				}
				goto __finally0;
				__catch0_g_error:
				{
					_data_->e = _data_->_inner_error0_;
					_data_->_inner_error0_ = NULL;
					_data_->_tmp92_ = _data_->link;
					_data_->_tmp93_ = tuba_api_nodeinfo_link_get_rel (_data_->_tmp92_);
					_data_->_tmp94_ = _data_->_tmp93_;
					_data_->_tmp95_ = string_to_string (_data_->_tmp94_);
					_data_->_tmp96_ = _data_->e;
					_data_->_tmp97_ = g_strdup_printf ("%i", _data_->_tmp96_->code);
					_data_->_tmp98_ = _data_->_tmp97_;
					_data_->_tmp99_ = _data_->e;
					_data_->_tmp100_ = _data_->_tmp99_->message;
					_data_->_tmp101_ = string_to_string (_data_->_tmp100_);
					_data_->_tmp102_ = g_strconcat ("Couldn't get Nodeinfo for ", _data_->_tmp95_, ": ", _data_->_tmp98_, " ", _data_->_tmp101_, NULL);
					_data_->_tmp103_ = _data_->_tmp102_;
					g_warning ("AccountStore.vala:239: %s", _data_->_tmp103_);
					_g_free0 (_data_->_tmp103_);
					_g_free0 (_data_->_tmp98_);
					_g_error_free0 (_data_->e);
				}
				__finally0:
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
					_g_object_unref0 (_data_->link);
					_g_object_unref0 (_data_->known_nodeinfo);
					__vala_JsonNode_free0 (_data_->node);
					_g_object_unref0 (_data_->parser);
					_g_object_unref0 (_data_->in_stream);
					_g_object_unref0 (_data_->req);
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
			}
			_g_object_unref0 (_data_->link);
		}
	}
	if (!_data_->supports) {
		_data_->_tmp104_ = g_error_new_literal (TUBA_OOPSIE, TUBA_OOPSIE_INTERNAL, "This instance does not support https://nodeinfo.diaspora.software/sche" \
"ma.html");
		_data_->_inner_error0_ = _data_->_tmp104_;
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		_g_object_unref0 (_data_->known_nodeinfo);
		__vala_JsonNode_free0 (_data_->node);
		_g_object_unref0 (_data_->parser);
		_g_object_unref0 (_data_->in_stream);
		_g_object_unref0 (_data_->req);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp105_ = tuba_instance_account_get_instance (_data_->account);
	_data_->_tmp106_ = _data_->_tmp105_;
	_data_->_tmp107_ = string_to_string (_data_->_tmp106_);
	_data_->_tmp108_ = tuba_instance_account_get_backend (_data_->account);
	_data_->_tmp109_ = _data_->_tmp108_;
	_data_->_tmp110_ = string_to_string (_data_->_tmp109_);
	_data_->_tmp111_ = g_strconcat (_data_->_tmp107_, " is using ", _data_->_tmp110_, NULL);
	_data_->_tmp112_ = _data_->_tmp111_;
	g_debug ("AccountStore.vala:246: %s", _data_->_tmp112_);
	_g_free0 (_data_->_tmp112_);
	_g_object_unref0 (_data_->known_nodeinfo);
	__vala_JsonNode_free0 (_data_->node);
	_g_object_unref0 (_data_->parser);
	_g_object_unref0 (_data_->in_stream);
	_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;
}

TubaAccountStore*
tuba_account_store_construct (GType object_type)
{
	TubaAccountStore * self = NULL;
	self = (TubaAccountStore*) g_object_new (object_type, NULL);
	return self;
}

GeeArrayList*
tuba_account_store_get_saved (TubaAccountStore* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_saved;
	result = _tmp0_;
	return result;
}

void
tuba_account_store_set_saved (TubaAccountStore* self,
                              GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_account_store_get_saved (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_saved);
		self->priv->_saved = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_account_store_properties[TUBA_ACCOUNT_STORE_SAVED_PROPERTY]);
	}
}

TubaInstanceAccount*
tuba_account_store_get_active (TubaAccountStore* self)
{
	TubaInstanceAccount* result;
	TubaInstanceAccount* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_active;
	result = _tmp0_;
	return result;
}

void
tuba_account_store_set_active (TubaAccountStore* self,
                               TubaInstanceAccount* value)
{
	TubaInstanceAccount* old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_account_store_get_active (self);
	if (old_value != value) {
		TubaInstanceAccount* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_active);
		self->priv->_active = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tuba_account_store_properties[TUBA_ACCOUNT_STORE_ACTIVE_PROPERTY]);
	}
}

static void
g_cclosure_user_marshal_OBJECT__BOXED (GClosure * closure,
                                       GValue * return_value,
                                       guint n_param_values,
                                       const GValue * param_values,
                                       gpointer invocation_hint,
                                       gpointer marshal_data)
{
	typedef gpointer (*GMarshalFunc_OBJECT__BOXED) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_OBJECT__BOXED callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gpointer v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 2);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_OBJECT__BOXED) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_boxed (param_values + 1), data2);
	g_value_take_object (return_value, v_return);
}

static gchar*
tuba_account_store_backend_test_real_get_backend (TubaAccountStoreBackendTest* self,
                                                  JsonObject* obj)
{
	g_critical ("Type `%s' does not implement abstract method `tuba_account_store_backend_test_get_backend'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

gchar*
tuba_account_store_backend_test_get_backend (TubaAccountStoreBackendTest* self,
                                             JsonObject* obj)
{
	TubaAccountStoreBackendTestClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = TUBA_ACCOUNT_STORE_BACKEND_TEST_GET_CLASS (self);
	if (_klass_->get_backend) {
		return _klass_->get_backend (self, obj);
	}
	return NULL;
}

TubaAccountStoreBackendTest*
tuba_account_store_backend_test_construct (GType object_type)
{
	TubaAccountStoreBackendTest * self = NULL;
	self = (TubaAccountStoreBackendTest*) g_object_new (object_type, NULL);
	return self;
}

static void
tuba_account_store_backend_test_class_init (TubaAccountStoreBackendTestClass * klass,
                                            gpointer klass_data)
{
	tuba_account_store_backend_test_parent_class = g_type_class_peek_parent (klass);
	((TubaAccountStoreBackendTestClass *) klass)->get_backend = (gchar* (*) (TubaAccountStoreBackendTest*, JsonObject*)) tuba_account_store_backend_test_real_get_backend;
}

static void
tuba_account_store_backend_test_instance_init (TubaAccountStoreBackendTest * self,
                                               gpointer klass)
{
}

 G_GNUC_NO_INLINE static GType
tuba_account_store_backend_test_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaAccountStoreBackendTestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_account_store_backend_test_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaAccountStoreBackendTest), 0, (GInstanceInitFunc) tuba_account_store_backend_test_instance_init, NULL };
	GType tuba_account_store_backend_test_type_id;
	tuba_account_store_backend_test_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaAccountStoreBackendTest", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return tuba_account_store_backend_test_type_id;
}

GType
tuba_account_store_backend_test_get_type (void)
{
	static GType tuba_account_store_backend_test_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_account_store_backend_test_type_id__once)) {
		GType tuba_account_store_backend_test_type_id;
		tuba_account_store_backend_test_type_id = tuba_account_store_backend_test_get_type_once ();
		g_once_init_leave_pointer (&tuba_account_store_backend_test_type_id__once, tuba_account_store_backend_test_type_id);
	}
	return tuba_account_store_backend_test_type_id__once;
}

static void
tuba_account_store_class_init (TubaAccountStoreClass * klass,
                               gpointer klass_data)
{
	tuba_account_store_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaAccountStore_private_offset);
	((TubaAccountStoreClass *) klass)->init = (void (*) (TubaAccountStore*, GError**)) tuba_account_store_real_init;
	((TubaAccountStoreClass *) klass)->update_account = (void (*) (TubaAccountStore*, TubaInstanceAccount*, GError**)) tuba_account_store_real_update_account;
	((TubaAccountStoreClass *) klass)->load = (void (*) (TubaAccountStore*, GError**)) tuba_account_store_real_load;
	((TubaAccountStoreClass *) klass)->save = (void (*) (TubaAccountStore*, GError**)) tuba_account_store_real_save;
	((TubaAccountStoreClass *) klass)->add = (void (*) (TubaAccountStore*, TubaInstanceAccount*, GError**)) tuba_account_store_real_add;
	((TubaAccountStoreClass *) klass)->remove = (void (*) (TubaAccountStore*, TubaInstanceAccount*, GError**)) tuba_account_store_real_remove;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_account_store_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_account_store_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_account_store_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_ACCOUNT_STORE_SAVED_PROPERTY, tuba_account_store_properties[TUBA_ACCOUNT_STORE_SAVED_PROPERTY] = g_param_spec_object ("saved", "saved", "saved", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_ACCOUNT_STORE_ACTIVE_PROPERTY, tuba_account_store_properties[TUBA_ACCOUNT_STORE_ACTIVE_PROPERTY] = g_param_spec_object ("active", "active", "active", TUBA_TYPE_INSTANCE_ACCOUNT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tuba_account_store_signals[TUBA_ACCOUNT_STORE_CHANGED_SIGNAL] = g_signal_new ("changed", TUBA_TYPE_ACCOUNT_STORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GEE_TYPE_ARRAY_LIST);
	tuba_account_store_signals[TUBA_ACCOUNT_STORE_SWITCHED_SIGNAL] = g_signal_new ("switched", TUBA_TYPE_ACCOUNT_STORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, TUBA_TYPE_INSTANCE_ACCOUNT);
	tuba_account_store_signals[TUBA_ACCOUNT_STORE_CREATE_FOR_BACKEND_SIGNAL] = g_signal_new ("create-for-backend", TUBA_TYPE_ACCOUNT_STORE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_OBJECT__BOXED, TUBA_TYPE_INSTANCE_ACCOUNT, 1, json_node_get_type ());
}

static void
tuba_account_store_instance_init (TubaAccountStore * self,
                                  gpointer klass)
{
	GeeArrayList* _tmp0_;
	self->priv = tuba_account_store_get_instance_private (self);
	_tmp0_ = gee_array_list_new (TUBA_TYPE_INSTANCE_ACCOUNT, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	self->priv->_saved = _tmp0_;
	self->priv->_active = NULL;
}

static void
tuba_account_store_finalize (GObject * obj)
{
	TubaAccountStore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore);
	_g_object_unref0 (self->priv->_saved);
	_g_object_unref0 (self->priv->_active);
	G_OBJECT_CLASS (tuba_account_store_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_account_store_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaAccountStoreClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_account_store_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaAccountStore), 0, (GInstanceInitFunc) tuba_account_store_instance_init, NULL };
	GType tuba_account_store_type_id;
	tuba_account_store_type_id = g_type_register_static (G_TYPE_OBJECT, "TubaAccountStore", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	TubaAccountStore_private_offset = g_type_add_instance_private (tuba_account_store_type_id, sizeof (TubaAccountStorePrivate));
	return tuba_account_store_type_id;
}

GType
tuba_account_store_get_type (void)
{
	static GType tuba_account_store_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_account_store_type_id__once)) {
		GType tuba_account_store_type_id;
		tuba_account_store_type_id = tuba_account_store_get_type_once ();
		g_once_init_leave_pointer (&tuba_account_store_type_id__once, tuba_account_store_type_id);
	}
	return tuba_account_store_type_id__once;
}

static void
_vala_tuba_account_store_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	TubaAccountStore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore);
	switch (property_id) {
		case TUBA_ACCOUNT_STORE_SAVED_PROPERTY:
		g_value_set_object (value, tuba_account_store_get_saved (self));
		break;
		case TUBA_ACCOUNT_STORE_ACTIVE_PROPERTY:
		g_value_set_object (value, tuba_account_store_get_active (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_account_store_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec)
{
	TubaAccountStore * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore);
	switch (property_id) {
		case TUBA_ACCOUNT_STORE_SAVED_PROPERTY:
		tuba_account_store_set_saved (self, g_value_get_object (value));
		break;
		case TUBA_ACCOUNT_STORE_ACTIVE_PROPERTY:
		tuba_account_store_set_active (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

