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

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

#define TOOTLE_TYPE_WIDGETIZABLE (tootle_widgetizable_get_type ())
#define TOOTLE_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_WIDGETIZABLE, TootleWidgetizable))
#define TOOTLE_IS_WIDGETIZABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_WIDGETIZABLE))
#define TOOTLE_WIDGETIZABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TOOTLE_TYPE_WIDGETIZABLE, TootleWidgetizableIface))

typedef struct _TootleWidgetizable TootleWidgetizable;
typedef struct _TootleWidgetizableIface TootleWidgetizableIface;

#define TOOTLE_TYPE_ENTITY (tootle_entity_get_type ())
#define TOOTLE_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_ENTITY, TootleEntity))
#define TOOTLE_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_ENTITY, TootleEntityClass))
#define TOOTLE_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_ENTITY))
#define TOOTLE_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_ENTITY))
#define TOOTLE_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_ENTITY, TootleEntityClass))

typedef struct _TootleEntity TootleEntity;
typedef struct _TootleEntityClass TootleEntityClass;

#define TOOTLE_API_TYPE_ACCOUNT (tootle_api_account_get_type ())
#define TOOTLE_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_API_TYPE_ACCOUNT, TootleAPIAccount))
#define TOOTLE_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_API_TYPE_ACCOUNT, TootleAPIAccountClass))
#define TOOTLE_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_API_TYPE_ACCOUNT))
#define TOOTLE_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_API_TYPE_ACCOUNT))
#define TOOTLE_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_API_TYPE_ACCOUNT, TootleAPIAccountClass))

typedef struct _TootleAPIAccount TootleAPIAccount;
typedef struct _TootleAPIAccountClass TootleAPIAccountClass;

#define TOOTLE_TYPE_INSTANCE_ACCOUNT (tootle_instance_account_get_type ())
#define TOOTLE_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_INSTANCE_ACCOUNT, TootleInstanceAccount))
#define TOOTLE_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_INSTANCE_ACCOUNT, TootleInstanceAccountClass))
#define TOOTLE_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_INSTANCE_ACCOUNT))
#define TOOTLE_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_INSTANCE_ACCOUNT))
#define TOOTLE_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_INSTANCE_ACCOUNT, TootleInstanceAccountClass))

typedef struct _TootleInstanceAccount TootleInstanceAccount;
typedef struct _TootleInstanceAccountClass TootleInstanceAccountClass;
typedef struct _TootleEntityPrivate TootleEntityPrivate;

#define TOOTLE_API_TYPE_STATUS (tootle_api_status_get_type ())
#define TOOTLE_API_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_API_TYPE_STATUS, TootleAPIStatus))
#define TOOTLE_API_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_API_TYPE_STATUS, TootleAPIStatusClass))
#define TOOTLE_API_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_API_TYPE_STATUS))
#define TOOTLE_API_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_API_TYPE_STATUS))
#define TOOTLE_API_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_API_TYPE_STATUS, TootleAPIStatusClass))

typedef struct _TootleAPIStatus TootleAPIStatus;
typedef struct _TootleAPIStatusClass TootleAPIStatusClass;
typedef struct _TootleAPIStatusPrivate TootleAPIStatusPrivate;
typedef enum  {
	TOOTLE_API_VISIBILITY_PUBLIC,
	TOOTLE_API_VISIBILITY_UNLISTED,
	TOOTLE_API_VISIBILITY_PRIVATE,
	TOOTLE_API_VISIBILITY_DIRECT
} TootleAPIVisibility;

#define TOOTLE_API_TYPE_VISIBILITY (tootle_api_visibility_get_type ())

#define TOOTLE_API_TYPE_MENTION (tootle_api_mention_get_type ())
#define TOOTLE_API_MENTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_API_TYPE_MENTION, TootleAPIMention))
#define TOOTLE_API_MENTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_API_TYPE_MENTION, TootleAPIMentionClass))
#define TOOTLE_API_IS_MENTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_API_TYPE_MENTION))
#define TOOTLE_API_IS_MENTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_API_TYPE_MENTION))
#define TOOTLE_API_MENTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_API_TYPE_MENTION, TootleAPIMentionClass))

typedef struct _TootleAPIMention TootleAPIMention;
typedef struct _TootleAPIMentionClass TootleAPIMentionClass;

#define TOOTLE_API_TYPE_ATTACHMENT (tootle_api_attachment_get_type ())
#define TOOTLE_API_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_API_TYPE_ATTACHMENT, TootleAPIAttachment))
#define TOOTLE_API_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_API_TYPE_ATTACHMENT, TootleAPIAttachmentClass))
#define TOOTLE_API_IS_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_API_TYPE_ATTACHMENT))
#define TOOTLE_API_IS_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_API_TYPE_ATTACHMENT))
#define TOOTLE_API_ATTACHMENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_API_TYPE_ATTACHMENT, TootleAPIAttachmentClass))

typedef struct _TootleAPIAttachment TootleAPIAttachment;
typedef struct _TootleAPIAttachmentClass TootleAPIAttachmentClass;
enum  {
	TOOTLE_API_STATUS_0_PROPERTY,
	TOOTLE_API_STATUS_ID_PROPERTY,
	TOOTLE_API_STATUS_ACCOUNT_PROPERTY,
	TOOTLE_API_STATUS_URI_PROPERTY,
	TOOTLE_API_STATUS_SPOILER_TEXT_PROPERTY,
	TOOTLE_API_STATUS_IN_REPLY_TO_ID_PROPERTY,
	TOOTLE_API_STATUS_IN_REPLY_TO_ACCOUNT_ID_PROPERTY,
	TOOTLE_API_STATUS_CONTENT_PROPERTY,
	TOOTLE_API_STATUS_REPLIES_COUNT_PROPERTY,
	TOOTLE_API_STATUS_REBLOGS_COUNT_PROPERTY,
	TOOTLE_API_STATUS_FAVOURITES_COUNT_PROPERTY,
	TOOTLE_API_STATUS_CREATED_AT_PROPERTY,
	TOOTLE_API_STATUS_REBLOGGED_PROPERTY,
	TOOTLE_API_STATUS_FAVOURITED_PROPERTY,
	TOOTLE_API_STATUS_BOOKMARKED_PROPERTY,
	TOOTLE_API_STATUS_SENSITIVE_PROPERTY,
	TOOTLE_API_STATUS_MUTED_PROPERTY,
	TOOTLE_API_STATUS_PINNED_PROPERTY,
	TOOTLE_API_STATUS_VISIBILITY_PROPERTY,
	TOOTLE_API_STATUS_REBLOG_PROPERTY,
	TOOTLE_API_STATUS_MENTIONS_PROPERTY,
	TOOTLE_API_STATUS_MEDIA_ATTACHMENTS_PROPERTY,
	TOOTLE_API_STATUS_URL_PROPERTY,
	TOOTLE_API_STATUS_FORMAL_PROPERTY,
	TOOTLE_API_STATUS_HAS_SPOILER_PROPERTY,
	TOOTLE_API_STATUS_NUM_PROPERTIES
};
static GParamSpec* tootle_api_status_properties[TOOTLE_API_STATUS_NUM_PROPERTIES];

#define TOOTLE_TYPE_SETTINGS (tootle_settings_get_type ())
#define TOOTLE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_SETTINGS, TootleSettings))
#define TOOTLE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_SETTINGS, TootleSettingsClass))
#define TOOTLE_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_SETTINGS))
#define TOOTLE_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_SETTINGS))
#define TOOTLE_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_SETTINGS, TootleSettingsClass))

typedef struct _TootleSettings TootleSettings;
typedef struct _TootleSettingsClass TootleSettingsClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
typedef enum  {
	TOOTLE_API_NOTIFICATION_TYPE_MENTION,
	TOOTLE_API_NOTIFICATION_TYPE_REBLOG,
	TOOTLE_API_NOTIFICATION_TYPE_REBLOG_REMOTE_USER,
	TOOTLE_API_NOTIFICATION_TYPE_FAVOURITE,
	TOOTLE_API_NOTIFICATION_TYPE_FOLLOW,
	TOOTLE_API_NOTIFICATION_TYPE_FOLLOW_REQUEST,
	TOOTLE_API_NOTIFICATION_TYPE_WATCHLIST
} TootleAPINotificationType;

#define TOOTLE_API_TYPE_NOTIFICATION_TYPE (tootle_api_notification_type_get_type ())

#define TOOTLE_WIDGETS_TYPE_STATUS (tootle_widgets_status_get_type ())
#define TOOTLE_WIDGETS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_WIDGETS_TYPE_STATUS, TootleWidgetsStatus))
#define TOOTLE_WIDGETS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_WIDGETS_TYPE_STATUS, TootleWidgetsStatusClass))
#define TOOTLE_WIDGETS_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_WIDGETS_TYPE_STATUS))
#define TOOTLE_WIDGETS_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_WIDGETS_TYPE_STATUS))
#define TOOTLE_WIDGETS_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_WIDGETS_TYPE_STATUS, TootleWidgetsStatusClass))

typedef struct _TootleWidgetsStatus TootleWidgetsStatus;
typedef struct _TootleWidgetsStatusClass TootleWidgetsStatusClass;

#define TOOTLE_VIEWS_TYPE_BASE (tootle_views_base_get_type ())
#define TOOTLE_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBase))
#define TOOTLE_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBaseClass))
#define TOOTLE_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_BASE))
#define TOOTLE_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_BASE))
#define TOOTLE_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBaseClass))

typedef struct _TootleViewsBase TootleViewsBase;
typedef struct _TootleViewsBaseClass TootleViewsBaseClass;

#define TOOTLE_VIEWS_TYPE_THREAD (tootle_views_thread_get_type ())
#define TOOTLE_VIEWS_THREAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_THREAD, TootleViewsThread))
#define TOOTLE_VIEWS_THREAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_THREAD, TootleViewsThreadClass))
#define TOOTLE_VIEWS_IS_THREAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_THREAD))
#define TOOTLE_VIEWS_IS_THREAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_THREAD))
#define TOOTLE_VIEWS_THREAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_THREAD, TootleViewsThreadClass))

typedef struct _TootleViewsThread TootleViewsThread;
typedef struct _TootleViewsThreadClass TootleViewsThreadClass;

#define TOOTLE_DIALOGS_TYPE_MAIN_WINDOW (tootle_dialogs_main_window_get_type ())
#define TOOTLE_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindow))
#define TOOTLE_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))

typedef struct _TootleDialogsMainWindow TootleDialogsMainWindow;
typedef struct _TootleDialogsMainWindowClass TootleDialogsMainWindowClass;

#define TOOTLE_TYPE_ACCOUNTS (tootle_accounts_get_type ())
#define TOOTLE_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_ACCOUNTS, TootleAccounts))
#define TOOTLE_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_ACCOUNTS, TootleAccountsClass))
#define TOOTLE_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_ACCOUNTS))
#define TOOTLE_IS_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_ACCOUNTS))
#define TOOTLE_ACCOUNTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_ACCOUNTS, TootleAccountsClass))

typedef struct _TootleAccounts TootleAccounts;
typedef struct _TootleAccountsClass TootleAccountsClass;

#define TOOTLE_TYPE_REQUEST (tootle_request_get_type ())
#define TOOTLE_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_REQUEST, TootleRequest))
#define TOOTLE_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_REQUEST, TootleRequestClass))
#define TOOTLE_IS_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_REQUEST))
#define TOOTLE_IS_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_REQUEST))
#define TOOTLE_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_REQUEST, TootleRequestClass))

typedef struct _TootleRequest TootleRequest;
typedef struct _TootleRequestClass TootleRequestClass;

typedef enum  {
	TOOTLE_OOPSIE_USER,
	TOOTLE_OOPSIE_PARSING,
	TOOTLE_OOPSIE_INSTANCE,
	TOOTLE_OOPSIE_INTERNAL
} TootleOopsie;
#define TOOTLE_OOPSIE tootle_oopsie_quark ()
struct _TootleWidgetizableIface {
	GTypeInterface parent_iface;
	GtkWidget* (*to_widget) (TootleWidgetizable* self, GError** error);
	void (*open) (TootleWidgetizable* self);
	void (*resolve_open) (TootleWidgetizable* self, TootleInstanceAccount* account);
};

struct _TootleEntity {
	GObject parent_instance;
	TootleEntityPrivate * priv;
};

struct _TootleEntityClass {
	GObjectClass parent_class;
	gboolean (*is_local) (TootleEntity* self, TootleInstanceAccount* account);
};

struct _TootleAPIStatus {
	TootleEntity parent_instance;
	TootleAPIStatusPrivate * priv;
};

struct _TootleAPIStatusClass {
	TootleEntityClass parent_class;
};

struct _TootleAPIStatusPrivate {
	gchar* _id;
	TootleAPIAccount* _account;
	gchar* _uri;
	gchar* _spoiler_text;
	gchar* _in_reply_to_id;
	gchar* _in_reply_to_account_id;
	gchar* _content;
	gint64 _replies_count;
	gint64 _reblogs_count;
	gint64 _favourites_count;
	gchar* _created_at;
	gboolean _reblogged;
	gboolean _favourited;
	gboolean _bookmarked;
	gboolean _sensitive;
	gboolean _muted;
	gboolean _pinned;
	TootleAPIVisibility _visibility;
	TootleAPIStatus* _reblog;
	GeeArrayList* _mentions;
	GeeArrayList* _media_attachments;
	gchar* __url;
};

static gint TootleAPIStatus_private_offset;
static gpointer tootle_api_status_parent_class = NULL;
extern TootleSettings* tootle_settings;
extern TootleDialogsMainWindow* tootle_window;
extern TootleAccounts* tootle_accounts;
static TootleWidgetizableIface * tootle_api_status_tootle_widgetizable_parent_iface = NULL;

GQuark tootle_oopsie_quark (void);
GType tootle_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleEntity, g_object_unref)
GType tootle_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAPIAccount, g_object_unref)
GType tootle_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleInstanceAccount, g_object_unref)
GType tootle_widgetizable_get_type (void) G_GNUC_CONST ;
GType tootle_api_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAPIStatus, g_object_unref)
GType tootle_api_visibility_get_type (void) G_GNUC_CONST ;
GType tootle_api_mention_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAPIMention, g_object_unref)
GType tootle_api_attachment_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAPIAttachment, g_object_unref)
GType tootle_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleSettings, g_object_unref)
TootleAPIVisibility tootle_settings_get_default_post_visibility (TootleSettings* self);
static gchar* tootle_api_status_get_modified_url (TootleAPIStatus* self);
const gchar* tootle_api_status_get__url (TootleAPIStatus* self);
const gchar* tootle_api_status_get_uri (TootleAPIStatus* self);
TootleAPIStatus* tootle_api_status_from (JsonNode* node,
                                         GError** error);
TootleEntity* tootle_entity_from_json (GType type,
                                       JsonNode* node,
                                       GError** error);
TootleAPIStatus* tootle_api_status_new_empty (void);
TootleAPIStatus* tootle_api_status_construct_empty (GType object_type);
TootleAPIStatus* tootle_api_status_new_from_account (TootleAPIAccount* account);
TootleAPIStatus* tootle_api_status_construct_from_account (GType object_type,
                                                           TootleAPIAccount* account);
const gchar* tootle_api_account_get_created_at (TootleAPIAccount* self);
const gchar* tootle_api_account_get_note (TootleAPIAccount* self);
void tootle_api_status_set_content (TootleAPIStatus* self,
                                    const gchar* value);
static GtkWidget* tootle_api_status_real_to_widget (TootleWidgetizable* base,
                                             GError** error);
GType tootle_api_notification_type_get_type (void) G_GNUC_CONST ;
TootleWidgetsStatus* tootle_widgets_status_new (TootleAPIStatus* status,
                                                TootleAPINotificationType* kind);
TootleWidgetsStatus* tootle_widgets_status_construct (GType object_type,
                                                      TootleAPIStatus* status,
                                                      TootleAPINotificationType* kind);
GType tootle_widgets_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleWidgetsStatus, g_object_unref)
static void tootle_api_status_real_open (TootleWidgetizable* base);
GType tootle_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsBase, g_object_unref)
GType tootle_views_thread_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsThread, g_object_unref)
TootleAPIStatus* tootle_api_status_get_formal (TootleAPIStatus* self);
TootleViewsThread* tootle_views_thread_new (TootleAPIStatus* status);
TootleViewsThread* tootle_views_thread_construct (GType object_type,
                                                  TootleAPIStatus* status);
GType tootle_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsMainWindow, g_object_unref)
TootleViewsBase* tootle_dialogs_main_window_open_view (TootleDialogsMainWindow* self,
                                                       TootleViewsBase* view);
gboolean tootle_api_status_is_owned (TootleAPIStatus* self);
TootleAPIAccount* tootle_api_status_get_account (TootleAPIStatus* self);
const gchar* tootle_api_account_get_id (TootleAPIAccount* self);
GType tootle_accounts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAccounts, g_object_unref)
TootleInstanceAccount* tootle_accounts_get_active (TootleAccounts* self);
gboolean tootle_api_status_has_media (TootleAPIStatus* self);
GeeArrayList* tootle_api_status_get_media_attachments (TootleAPIStatus* self);
gchar* tootle_api_status_get_reply_mentions (TootleAPIStatus* self);
const gchar* tootle_api_account_get_acct (TootleAPIAccount* self);
gchar* tootle_api_account_get_handle (TootleAPIAccount* self);
GeeArrayList* tootle_api_status_get_mentions (TootleAPIStatus* self);
const gchar* tootle_api_mention_get_acct (TootleAPIMention* self);
gchar* tootle_api_mention_get_handle (TootleAPIMention* self);
GType tootle_request_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleRequest, g_object_unref)
TootleRequest* tootle_api_status_action (TootleAPIStatus* self,
                                         const gchar* action);
const gchar* tootle_api_status_get_id (TootleAPIStatus* self);
TootleRequest* tootle_request_new_POST (const gchar* url);
TootleRequest* tootle_request_construct_POST (GType object_type,
                                              const gchar* url);
TootleRequest* tootle_request_with_account (TootleRequest* self,
                                            TootleInstanceAccount* account);
TootleRequest* tootle_api_status_annihilate (TootleAPIStatus* self);
TootleRequest* tootle_request_new_DELETE (const gchar* url);
TootleRequest* tootle_request_construct_DELETE (GType object_type,
                                                const gchar* url);
TootleAPIStatus* tootle_api_status_new (void);
TootleAPIStatus* tootle_api_status_construct (GType object_type);
TootleEntity* tootle_entity_new (void);
TootleEntity* tootle_entity_construct (GType object_type);
void tootle_api_status_set_id (TootleAPIStatus* self,
                               const gchar* value);
void tootle_api_status_set_account (TootleAPIStatus* self,
                                    TootleAPIAccount* value);
void tootle_api_status_set_uri (TootleAPIStatus* self,
                                const gchar* value);
const gchar* tootle_api_status_get_spoiler_text (TootleAPIStatus* self);
void tootle_api_status_set_spoiler_text (TootleAPIStatus* self,
                                         const gchar* value);
const gchar* tootle_api_status_get_in_reply_to_id (TootleAPIStatus* self);
void tootle_api_status_set_in_reply_to_id (TootleAPIStatus* self,
                                           const gchar* value);
const gchar* tootle_api_status_get_in_reply_to_account_id (TootleAPIStatus* self);
void tootle_api_status_set_in_reply_to_account_id (TootleAPIStatus* self,
                                                   const gchar* value);
const gchar* tootle_api_status_get_content (TootleAPIStatus* self);
gint64 tootle_api_status_get_replies_count (TootleAPIStatus* self);
void tootle_api_status_set_replies_count (TootleAPIStatus* self,
                                          gint64 value);
gint64 tootle_api_status_get_reblogs_count (TootleAPIStatus* self);
void tootle_api_status_set_reblogs_count (TootleAPIStatus* self,
                                          gint64 value);
gint64 tootle_api_status_get_favourites_count (TootleAPIStatus* self);
void tootle_api_status_set_favourites_count (TootleAPIStatus* self,
                                             gint64 value);
const gchar* tootle_api_status_get_created_at (TootleAPIStatus* self);
void tootle_api_status_set_created_at (TootleAPIStatus* self,
                                       const gchar* value);
gboolean tootle_api_status_get_reblogged (TootleAPIStatus* self);
void tootle_api_status_set_reblogged (TootleAPIStatus* self,
                                      gboolean value);
gboolean tootle_api_status_get_favourited (TootleAPIStatus* self);
void tootle_api_status_set_favourited (TootleAPIStatus* self,
                                       gboolean value);
gboolean tootle_api_status_get_bookmarked (TootleAPIStatus* self);
void tootle_api_status_set_bookmarked (TootleAPIStatus* self,
                                       gboolean value);
gboolean tootle_api_status_get_sensitive (TootleAPIStatus* self);
void tootle_api_status_set_sensitive (TootleAPIStatus* self,
                                      gboolean value);
gboolean tootle_api_status_get_muted (TootleAPIStatus* self);
void tootle_api_status_set_muted (TootleAPIStatus* self,
                                  gboolean value);
gboolean tootle_api_status_get_pinned (TootleAPIStatus* self);
void tootle_api_status_set_pinned (TootleAPIStatus* self,
                                   gboolean value);
TootleAPIVisibility tootle_api_status_get_visibility (TootleAPIStatus* self);
void tootle_api_status_set_visibility (TootleAPIStatus* self,
                                       TootleAPIVisibility value);
TootleAPIStatus* tootle_api_status_get_reblog (TootleAPIStatus* self);
void tootle_api_status_set_reblog (TootleAPIStatus* self,
                                   TootleAPIStatus* value);
void tootle_api_status_set_mentions (TootleAPIStatus* self,
                                     GeeArrayList* value);
void tootle_api_status_set_media_attachments (TootleAPIStatus* self,
                                              GeeArrayList* value);
void tootle_api_status_set__url (TootleAPIStatus* self,
                                 const gchar* value);
gchar* tootle_api_status_get_url (TootleAPIStatus* self);
void tootle_api_status_set_url (TootleAPIStatus* self,
                                const gchar* value);
gboolean tootle_api_status_get_has_spoiler (TootleAPIStatus* self);
GtkWidget* tootle_widgetizable_to_widget (TootleWidgetizable* self,
                                          GError** error);
void tootle_widgetizable_open (TootleWidgetizable* self);
static void tootle_api_status_finalize (GObject * obj);
static GType tootle_api_status_get_type_once (void);
static void _vala_tootle_api_status_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_tootle_api_status_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gint array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gint array_length,
                       GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
tootle_api_status_get_instance_private (TootleAPIStatus* self)
{
	return G_STRUCT_MEMBER_P (self, TootleAPIStatus_private_offset);
}

static gchar*
string_replace (const gchar* self,
                const gchar* old,
                const gchar* replacement)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	GError* _inner_error0_ = NULL;
	gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	if ((*((gchar*) self)) == '\0') {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = (*((gchar*) old)) == '\0';
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (old, replacement) == 0;
	}
	if (_tmp0_) {
		gchar* _tmp2_;
		_tmp2_ = g_strdup (self);
		result = _tmp2_;
		return result;
	}
	{
		GRegex* regex = NULL;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GRegex* _tmp5_;
		GRegex* _tmp6_;
		gchar* _tmp7_ = NULL;
		GRegex* _tmp8_;
		gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp3_ = g_regex_escape_string (old, -1);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error0_);
		_tmp6_ = _tmp5_;
		_g_free0 (_tmp4_);
		regex = _tmp6_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp8_ = regex;
		_tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error0_);
		_tmp7_ = _tmp9_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_regex_unref0 (regex);
			if (_inner_error0_->domain == G_REGEX_ERROR) {
				goto __catch0_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return NULL;
		}
		_tmp10_ = _tmp7_;
		_tmp7_ = NULL;
		result = _tmp10_;
		_g_free0 (_tmp7_);
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally0;
	__catch0_g_regex_error:
	{
		g_clear_error (&_inner_error0_);
		g_assert_not_reached ();
	}
	__finally0:
	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
	g_clear_error (&_inner_error0_);
	return NULL;
}

static gchar*
tootle_api_status_get_modified_url (TootleAPIStatus* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->__url;
	if (_tmp0_ == NULL) {
		const gchar* _tmp1_;
		gchar* _tmp2_;
		_tmp1_ = self->priv->_uri;
		_tmp2_ = string_replace (_tmp1_, "/activity", "");
		result = _tmp2_;
		return result;
	}
	_tmp3_ = self->priv->__url;
	_tmp4_ = g_strdup (_tmp3_);
	result = _tmp4_;
	return result;
}

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

TootleAPIStatus*
tootle_api_status_from (JsonNode* node,
                        GError** error)
{
	TootleEntity* _tmp0_ = NULL;
	TootleEntity* _tmp1_;
	TootleAPIStatus* _tmp2_;
	GError* _inner_error0_ = NULL;
	TootleAPIStatus* result = NULL;
	g_return_val_if_fail (node != NULL, NULL);
	_tmp1_ = tootle_entity_from_json (TOOTLE_API_TYPE_STATUS, node, &_inner_error0_);
	_tmp0_ = _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp2_ = _g_object_ref0 (TOOTLE_API_IS_STATUS (_tmp0_) ? ((TootleAPIStatus*) _tmp0_) : NULL);
	result = _tmp2_;
	_g_object_unref0 (_tmp0_);
	return result;
}

TootleAPIStatus*
tootle_api_status_construct_empty (GType object_type)
{
	TootleAPIStatus * self = NULL;
	TootleSettings* _tmp0_;
	TootleAPIVisibility _tmp1_;
	TootleAPIVisibility _tmp2_;
	_tmp0_ = tootle_settings;
	_tmp1_ = tootle_settings_get_default_post_visibility (_tmp0_);
	_tmp2_ = _tmp1_;
	self = (TootleAPIStatus*) g_object_new (object_type, "id", "", "visibility", _tmp2_, NULL);
	return self;
}

TootleAPIStatus*
tootle_api_status_new_empty (void)
{
	return tootle_api_status_construct_empty (TOOTLE_API_TYPE_STATUS);
}

static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result = FALSE;
	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;
}

TootleAPIStatus*
tootle_api_status_construct_from_account (GType object_type,
                                          TootleAPIAccount* account)
{
	TootleAPIStatus * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	g_return_val_if_fail (account != NULL, NULL);
	_tmp0_ = tootle_api_account_get_created_at (account);
	_tmp1_ = _tmp0_;
	self = (TootleAPIStatus*) g_object_new (object_type, "id", "", "account", account, "created-at", _tmp1_, NULL);
	_tmp2_ = tootle_api_account_get_note (account);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (_tmp3_, "") == 0) {
		tootle_api_status_set_content (self, "");
	} else {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		_tmp4_ = tootle_api_account_get_note (account);
		_tmp5_ = _tmp4_;
		if (string_contains (_tmp5_, "\n")) {
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			gchar** _tmp8_;
			gchar** _tmp9_;
			gchar** _tmp10_;
			gint _tmp10__length1;
			const gchar* _tmp11_;
			_tmp6_ = tootle_api_account_get_note (account);
			_tmp7_ = _tmp6_;
			_tmp9_ = _tmp8_ = g_strsplit (_tmp7_, "\n", 0);
			_tmp10_ = _tmp9_;
			_tmp10__length1 = _vala_array_length (_tmp8_);
			_tmp11_ = _tmp10_[0];
			tootle_api_status_set_content (self, _tmp11_);
			_tmp10_ = (_vala_array_free (_tmp10_, _tmp10__length1, (GDestroyNotify) g_free), NULL);
		} else {
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			_tmp12_ = tootle_api_account_get_note (account);
			_tmp13_ = _tmp12_;
			tootle_api_status_set_content (self, _tmp13_);
		}
	}
	return self;
}

TootleAPIStatus*
tootle_api_status_new_from_account (TootleAPIAccount* account)
{
	return tootle_api_status_construct_from_account (TOOTLE_API_TYPE_STATUS, account);
}

static GtkWidget*
tootle_api_status_real_to_widget (TootleWidgetizable* base,
                                  GError** error)
{
	TootleAPIStatus * self;
	TootleAPIStatus* _tmp0_;
	TootleWidgetsStatus* _tmp1_;
	GtkWidget* result = NULL;
	self = (TootleAPIStatus*) base;
	_tmp0_ = _g_object_ref0 (self);
	_tmp1_ = tootle_widgets_status_new (_tmp0_, NULL);
	g_object_ref_sink (_tmp1_);
	result = (GtkWidget*) _tmp1_;
	return result;
}

static void
tootle_api_status_real_open (TootleWidgetizable* base)
{
	TootleAPIStatus * self;
	TootleViewsThread* view = NULL;
	TootleAPIStatus* _tmp0_;
	TootleAPIStatus* _tmp1_;
	TootleViewsThread* _tmp2_;
	TootleDialogsMainWindow* _tmp3_;
	TootleViewsBase* _tmp4_;
	TootleViewsBase* _tmp5_;
	self = (TootleAPIStatus*) base;
	_tmp0_ = tootle_api_status_get_formal (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = tootle_views_thread_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	view = _tmp2_;
	_tmp3_ = tootle_window;
	_tmp4_ = tootle_dialogs_main_window_open_view (_tmp3_, (TootleViewsBase*) view);
	_tmp5_ = _tmp4_;
	_g_object_unref0 (_tmp5_);
	_g_object_unref0 (view);
}

gboolean
tootle_api_status_is_owned (TootleAPIStatus* self)
{
	TootleAPIStatus* _tmp0_;
	TootleAPIStatus* _tmp1_;
	TootleAPIAccount* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	TootleAccounts* _tmp5_;
	TootleInstanceAccount* _tmp6_;
	TootleInstanceAccount* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = tootle_api_status_get_formal (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->priv->_account;
	_tmp3_ = tootle_api_account_get_id (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = tootle_accounts;
	_tmp6_ = tootle_accounts_get_active (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = tootle_api_account_get_id ((TootleAPIAccount*) _tmp7_);
	_tmp9_ = _tmp8_;
	result = g_strcmp0 (_tmp4_, _tmp9_) == 0;
	return result;
}

gboolean
tootle_api_status_has_media (TootleAPIStatus* self)
{
	gboolean _tmp0_ = FALSE;
	GeeArrayList* _tmp1_;
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = self->priv->_media_attachments;
	if (_tmp1_ != NULL) {
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp2_ = self->priv->_media_attachments;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ > 0;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

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

gchar*
tootle_api_status_get_reply_mentions (TootleAPIStatus* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	TootleAPIAccount* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	TootleAccounts* _tmp4_;
	TootleInstanceAccount* _tmp5_;
	TootleInstanceAccount* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GeeArrayList* _tmp15_;
	gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("");
	_result_ = _tmp0_;
	_tmp1_ = self->priv->_account;
	_tmp2_ = tootle_api_account_get_acct (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = tootle_accounts;
	_tmp5_ = tootle_accounts_get_active (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = tootle_api_account_get_acct ((TootleAPIAccount*) _tmp6_);
	_tmp8_ = _tmp7_;
	if (g_strcmp0 (_tmp3_, _tmp8_) != 0) {
		TootleAPIAccount* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		gchar* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		_tmp9_ = self->priv->_account;
		_tmp10_ = tootle_api_account_get_handle (_tmp9_);
		_tmp11_ = _tmp10_;
		_tmp12_ = _tmp11_;
		_tmp13_ = string_to_string (_tmp12_);
		_tmp14_ = g_strconcat (_tmp13_, " ", NULL);
		_g_free0 (_result_);
		_result_ = _tmp14_;
		_g_free0 (_tmp12_);
	}
	_tmp15_ = self->priv->_mentions;
	if (_tmp15_ != NULL) {
		{
			GeeArrayList* _mention_list = NULL;
			GeeArrayList* _tmp16_;
			gint _mention_size = 0;
			GeeArrayList* _tmp17_;
			gint _tmp18_;
			gint _tmp19_;
			gint _mention_index = 0;
			_tmp16_ = self->priv->_mentions;
			_mention_list = _tmp16_;
			_tmp17_ = _mention_list;
			_tmp18_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp17_);
			_tmp19_ = _tmp18_;
			_mention_size = _tmp19_;
			_mention_index = -1;
			while (TRUE) {
				gint _tmp20_;
				gint _tmp21_;
				TootleAPIMention* mention = NULL;
				GeeArrayList* _tmp22_;
				gpointer _tmp23_;
				gboolean equals_current = FALSE;
				TootleAPIMention* _tmp24_;
				const gchar* _tmp25_;
				const gchar* _tmp26_;
				TootleAccounts* _tmp27_;
				TootleInstanceAccount* _tmp28_;
				TootleInstanceAccount* _tmp29_;
				const gchar* _tmp30_;
				const gchar* _tmp31_;
				gboolean already_mentioned = FALSE;
				const gchar* _tmp32_;
				TootleAPIMention* _tmp33_;
				const gchar* _tmp34_;
				const gchar* _tmp35_;
				gboolean _tmp36_ = FALSE;
				_mention_index = _mention_index + 1;
				_tmp20_ = _mention_index;
				_tmp21_ = _mention_size;
				if (!(_tmp20_ < _tmp21_)) {
					break;
				}
				_tmp22_ = _mention_list;
				_tmp23_ = gee_abstract_list_get ((GeeAbstractList*) _tmp22_, _mention_index);
				mention = (TootleAPIMention*) _tmp23_;
				_tmp24_ = mention;
				_tmp25_ = tootle_api_mention_get_acct (_tmp24_);
				_tmp26_ = _tmp25_;
				_tmp27_ = tootle_accounts;
				_tmp28_ = tootle_accounts_get_active (_tmp27_);
				_tmp29_ = _tmp28_;
				_tmp30_ = tootle_api_account_get_acct ((TootleAPIAccount*) _tmp29_);
				_tmp31_ = _tmp30_;
				equals_current = g_strcmp0 (_tmp26_, _tmp31_) == 0;
				_tmp32_ = _result_;
				_tmp33_ = mention;
				_tmp34_ = tootle_api_mention_get_acct (_tmp33_);
				_tmp35_ = _tmp34_;
				already_mentioned = string_contains (_tmp32_, _tmp35_);
				if (!equals_current) {
					_tmp36_ = !already_mentioned;
				} else {
					_tmp36_ = FALSE;
				}
				if (_tmp36_) {
					const gchar* _tmp37_;
					TootleAPIMention* _tmp38_;
					gchar* _tmp39_;
					gchar* _tmp40_;
					gchar* _tmp41_;
					const gchar* _tmp42_;
					gchar* _tmp43_;
					gchar* _tmp44_;
					gchar* _tmp45_;
					_tmp37_ = _result_;
					_tmp38_ = mention;
					_tmp39_ = tootle_api_mention_get_handle (_tmp38_);
					_tmp40_ = _tmp39_;
					_tmp41_ = _tmp40_;
					_tmp42_ = string_to_string (_tmp41_);
					_tmp43_ = g_strconcat (_tmp42_, " ", NULL);
					_tmp44_ = _tmp43_;
					_tmp45_ = g_strconcat (_tmp37_, _tmp44_, NULL);
					_g_free0 (_result_);
					_result_ = _tmp45_;
					_g_free0 (_tmp44_);
					_g_free0 (_tmp41_);
				}
				_g_object_unref0 (mention);
			}
		}
	}
	result = _result_;
	return result;
}

TootleRequest*
tootle_api_status_action (TootleAPIStatus* self,
                          const gchar* action)
{
	TootleAPIStatus* _tmp0_;
	TootleAPIStatus* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	TootleRequest* _tmp7_;
	TootleRequest* _tmp8_;
	TootleAccounts* _tmp9_;
	TootleInstanceAccount* _tmp10_;
	TootleInstanceAccount* _tmp11_;
	TootleRequest* _tmp12_;
	TootleRequest* _tmp13_;
	TootleRequest* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (action != NULL, NULL);
	_tmp0_ = tootle_api_status_get_formal (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_->priv->_id;
	_tmp3_ = string_to_string (_tmp2_);
	_tmp4_ = string_to_string (action);
	_tmp5_ = g_strconcat ("/api/v1/statuses/", _tmp3_, "/", _tmp4_, NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = tootle_request_new_POST (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = tootle_accounts;
	_tmp10_ = tootle_accounts_get_active (_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp12_ = tootle_request_with_account (_tmp8_, _tmp11_);
	_tmp13_ = _tmp12_;
	_g_object_unref0 (_tmp8_);
	_g_free0 (_tmp6_);
	result = _tmp13_;
	return result;
}

TootleRequest*
tootle_api_status_annihilate (TootleAPIStatus* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	TootleRequest* _tmp4_;
	TootleRequest* _tmp5_;
	TootleAccounts* _tmp6_;
	TootleInstanceAccount* _tmp7_;
	TootleInstanceAccount* _tmp8_;
	TootleRequest* _tmp9_;
	TootleRequest* _tmp10_;
	TootleRequest* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	_tmp1_ = string_to_string (_tmp0_);
	_tmp2_ = g_strconcat ("/api/v1/statuses/", _tmp1_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = tootle_request_new_DELETE (_tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = tootle_accounts;
	_tmp7_ = tootle_accounts_get_active (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = tootle_request_with_account (_tmp5_, _tmp8_);
	_tmp10_ = _tmp9_;
	_g_object_unref0 (_tmp5_);
	_g_free0 (_tmp3_);
	result = _tmp10_;
	return result;
}

TootleAPIStatus*
tootle_api_status_construct (GType object_type)
{
	TootleAPIStatus * self = NULL;
	self = (TootleAPIStatus*) tootle_entity_construct (object_type);
	return self;
}

TootleAPIStatus*
tootle_api_status_new (void)
{
	return tootle_api_status_construct (TOOTLE_API_TYPE_STATUS);
}

const gchar*
tootle_api_status_get_id (TootleAPIStatus* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_id (TootleAPIStatus* self,
                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_id);
		self->priv->_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_ID_PROPERTY]);
	}
}

TootleAPIAccount*
tootle_api_status_get_account (TootleAPIStatus* self)
{
	TootleAPIAccount* result;
	TootleAPIAccount* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_account;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_account (TootleAPIStatus* self,
                               TootleAPIAccount* value)
{
	TootleAPIAccount* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_account (self);
	if (old_value != value) {
		TootleAPIAccount* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_account);
		self->priv->_account = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_ACCOUNT_PROPERTY]);
	}
}

const gchar*
tootle_api_status_get_uri (TootleAPIStatus* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_uri;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_uri (TootleAPIStatus* self,
                           const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_uri (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_uri);
		self->priv->_uri = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_URI_PROPERTY]);
	}
}

const gchar*
tootle_api_status_get_spoiler_text (TootleAPIStatus* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_spoiler_text;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_spoiler_text (TootleAPIStatus* self,
                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_spoiler_text (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_spoiler_text);
		self->priv->_spoiler_text = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_SPOILER_TEXT_PROPERTY]);
	}
}

const gchar*
tootle_api_status_get_in_reply_to_id (TootleAPIStatus* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_in_reply_to_id;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_in_reply_to_id (TootleAPIStatus* self,
                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_in_reply_to_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_in_reply_to_id);
		self->priv->_in_reply_to_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_IN_REPLY_TO_ID_PROPERTY]);
	}
}

const gchar*
tootle_api_status_get_in_reply_to_account_id (TootleAPIStatus* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_in_reply_to_account_id;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_in_reply_to_account_id (TootleAPIStatus* self,
                                              const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_in_reply_to_account_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_in_reply_to_account_id);
		self->priv->_in_reply_to_account_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_IN_REPLY_TO_ACCOUNT_ID_PROPERTY]);
	}
}

const gchar*
tootle_api_status_get_content (TootleAPIStatus* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_content;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_content (TootleAPIStatus* self,
                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_content (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_content);
		self->priv->_content = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_CONTENT_PROPERTY]);
	}
}

gint64
tootle_api_status_get_replies_count (TootleAPIStatus* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, 0LL);
	result = self->priv->_replies_count;
	return result;
}

void
tootle_api_status_set_replies_count (TootleAPIStatus* self,
                                     gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_replies_count (self);
	if (old_value != value) {
		self->priv->_replies_count = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_REPLIES_COUNT_PROPERTY]);
	}
}

gint64
tootle_api_status_get_reblogs_count (TootleAPIStatus* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, 0LL);
	result = self->priv->_reblogs_count;
	return result;
}

void
tootle_api_status_set_reblogs_count (TootleAPIStatus* self,
                                     gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_reblogs_count (self);
	if (old_value != value) {
		self->priv->_reblogs_count = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_REBLOGS_COUNT_PROPERTY]);
	}
}

gint64
tootle_api_status_get_favourites_count (TootleAPIStatus* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, 0LL);
	result = self->priv->_favourites_count;
	return result;
}

void
tootle_api_status_set_favourites_count (TootleAPIStatus* self,
                                        gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_favourites_count (self);
	if (old_value != value) {
		self->priv->_favourites_count = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_FAVOURITES_COUNT_PROPERTY]);
	}
}

const gchar*
tootle_api_status_get_created_at (TootleAPIStatus* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_created_at;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_created_at (TootleAPIStatus* self,
                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_created_at (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_created_at);
		self->priv->_created_at = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_CREATED_AT_PROPERTY]);
	}
}

gboolean
tootle_api_status_get_reblogged (TootleAPIStatus* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_reblogged;
	return result;
}

void
tootle_api_status_set_reblogged (TootleAPIStatus* self,
                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_reblogged (self);
	if (old_value != value) {
		self->priv->_reblogged = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_REBLOGGED_PROPERTY]);
	}
}

gboolean
tootle_api_status_get_favourited (TootleAPIStatus* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_favourited;
	return result;
}

void
tootle_api_status_set_favourited (TootleAPIStatus* self,
                                  gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_favourited (self);
	if (old_value != value) {
		self->priv->_favourited = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_FAVOURITED_PROPERTY]);
	}
}

gboolean
tootle_api_status_get_bookmarked (TootleAPIStatus* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_bookmarked;
	return result;
}

void
tootle_api_status_set_bookmarked (TootleAPIStatus* self,
                                  gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_bookmarked (self);
	if (old_value != value) {
		self->priv->_bookmarked = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_BOOKMARKED_PROPERTY]);
	}
}

gboolean
tootle_api_status_get_sensitive (TootleAPIStatus* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_sensitive;
	return result;
}

void
tootle_api_status_set_sensitive (TootleAPIStatus* self,
                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_sensitive (self);
	if (old_value != value) {
		self->priv->_sensitive = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_SENSITIVE_PROPERTY]);
	}
}

gboolean
tootle_api_status_get_muted (TootleAPIStatus* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_muted;
	return result;
}

void
tootle_api_status_set_muted (TootleAPIStatus* self,
                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_muted (self);
	if (old_value != value) {
		self->priv->_muted = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_MUTED_PROPERTY]);
	}
}

gboolean
tootle_api_status_get_pinned (TootleAPIStatus* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_pinned;
	return result;
}

void
tootle_api_status_set_pinned (TootleAPIStatus* self,
                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_pinned (self);
	if (old_value != value) {
		self->priv->_pinned = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_PINNED_PROPERTY]);
	}
}

TootleAPIVisibility
tootle_api_status_get_visibility (TootleAPIStatus* self)
{
	TootleAPIVisibility result;
	TootleAPIVisibility _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_visibility;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_visibility (TootleAPIStatus* self,
                                  TootleAPIVisibility value)
{
	TootleAPIVisibility old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_visibility (self);
	if (old_value != value) {
		self->priv->_visibility = value;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_VISIBILITY_PROPERTY]);
	}
}

TootleAPIStatus*
tootle_api_status_get_reblog (TootleAPIStatus* self)
{
	TootleAPIStatus* result;
	TootleAPIStatus* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_reblog;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_reblog (TootleAPIStatus* self,
                              TootleAPIStatus* value)
{
	TootleAPIStatus* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_reblog (self);
	if (old_value != value) {
		TootleAPIStatus* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_reblog);
		self->priv->_reblog = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_REBLOG_PROPERTY]);
	}
}

GeeArrayList*
tootle_api_status_get_mentions (TootleAPIStatus* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_mentions;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_mentions (TootleAPIStatus* self,
                                GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_mentions (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_mentions);
		self->priv->_mentions = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_MENTIONS_PROPERTY]);
	}
}

GeeArrayList*
tootle_api_status_get_media_attachments (TootleAPIStatus* self)
{
	GeeArrayList* result;
	GeeArrayList* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_media_attachments;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_media_attachments (TootleAPIStatus* self,
                                         GeeArrayList* value)
{
	GeeArrayList* old_value;
	g_return_if_fail (self != NULL);
	old_value = tootle_api_status_get_media_attachments (self);
	if (old_value != value) {
		GeeArrayList* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_media_attachments);
		self->priv->_media_attachments = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_MEDIA_ATTACHMENTS_PROPERTY]);
	}
}

const gchar*
tootle_api_status_get__url (TootleAPIStatus* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->__url;
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set__url (TootleAPIStatus* self,
                            const gchar* value)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_strdup (value);
	_g_free0 (self->priv->__url);
	self->priv->__url = _tmp0_;
}

gchar*
tootle_api_status_get_url (TootleAPIStatus* self)
{
	gchar* result;
	gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = tootle_api_status_get_modified_url (self);
	result = _tmp0_;
	return result;
}

void
tootle_api_status_set_url (TootleAPIStatus* self,
                           const gchar* value)
{
	g_return_if_fail (self != NULL);
	tootle_api_status_set__url (self, value);
	g_object_notify_by_pspec ((GObject *) self, tootle_api_status_properties[TOOTLE_API_STATUS_URL_PROPERTY]);
}

TootleAPIStatus*
tootle_api_status_get_formal (TootleAPIStatus* self)
{
	TootleAPIStatus* result;
	TootleAPIStatus* _tmp0_ = NULL;
	TootleAPIStatus* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_reblog;
	_tmp0_ = _tmp1_;
	if (_tmp0_ == NULL) {
		_tmp0_ = self;
	}
	result = _tmp0_;
	return result;
}

gboolean
tootle_api_status_get_has_spoiler (TootleAPIStatus* self)
{
	gboolean result;
	gboolean _tmp0_ = FALSE;
	TootleAPIStatus* _tmp1_;
	TootleAPIStatus* _tmp2_;
	gboolean _tmp3_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = tootle_api_status_get_formal (self);
	_tmp2_ = _tmp1_;
	_tmp3_ = _tmp2_->priv->_sensitive;
	if (_tmp3_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp4_ = FALSE;
		TootleAPIStatus* _tmp5_;
		TootleAPIStatus* _tmp6_;
		const gchar* _tmp7_;
		_tmp5_ = tootle_api_status_get_formal (self);
		_tmp6_ = _tmp5_;
		_tmp7_ = _tmp6_->priv->_spoiler_text;
		if (_tmp7_ == NULL) {
			_tmp4_ = TRUE;
		} else {
			TootleAPIStatus* _tmp8_;
			TootleAPIStatus* _tmp9_;
			const gchar* _tmp10_;
			_tmp8_ = tootle_api_status_get_formal (self);
			_tmp9_ = _tmp8_;
			_tmp10_ = _tmp9_->priv->_spoiler_text;
			_tmp4_ = g_strcmp0 (_tmp10_, "") == 0;
		}
		_tmp0_ = !_tmp4_;
	}
	result = _tmp0_;
	return result;
}

static void
tootle_api_status_class_init (TootleAPIStatusClass * klass,
                              gpointer klass_data)
{
	TootleSettings* _tmp0_;
	TootleAPIVisibility _tmp1_;
	TootleAPIVisibility _tmp2_;
	tootle_api_status_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TootleAPIStatus_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_tootle_api_status_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tootle_api_status_set_property;
	G_OBJECT_CLASS (klass)->finalize = tootle_api_status_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_ID_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_ACCOUNT_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_ACCOUNT_PROPERTY] = g_param_spec_object ("account", "account", "account", TOOTLE_API_TYPE_ACCOUNT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_URI_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_URI_PROPERTY] = g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_SPOILER_TEXT_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_SPOILER_TEXT_PROPERTY] = g_param_spec_string ("spoiler-text", "spoiler-text", "spoiler-text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_IN_REPLY_TO_ID_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_IN_REPLY_TO_ID_PROPERTY] = g_param_spec_string ("in-reply-to-id", "in-reply-to-id", "in-reply-to-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_IN_REPLY_TO_ACCOUNT_ID_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_IN_REPLY_TO_ACCOUNT_ID_PROPERTY] = g_param_spec_string ("in-reply-to-account-id", "in-reply-to-account-id", "in-reply-to-account-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_CONTENT_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_CONTENT_PROPERTY] = g_param_spec_string ("content", "content", "content", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_REPLIES_COUNT_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_REPLIES_COUNT_PROPERTY] = g_param_spec_int64 ("replies-count", "replies-count", "replies-count", G_MININT64, G_MAXINT64, (gint64) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_REBLOGS_COUNT_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_REBLOGS_COUNT_PROPERTY] = g_param_spec_int64 ("reblogs-count", "reblogs-count", "reblogs-count", G_MININT64, G_MAXINT64, (gint64) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_FAVOURITES_COUNT_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_FAVOURITES_COUNT_PROPERTY] = g_param_spec_int64 ("favourites-count", "favourites-count", "favourites-count", G_MININT64, G_MAXINT64, (gint64) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_CREATED_AT_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_CREATED_AT_PROPERTY] = g_param_spec_string ("created-at", "created-at", "created-at", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_REBLOGGED_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_REBLOGGED_PROPERTY] = g_param_spec_boolean ("reblogged", "reblogged", "reblogged", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_FAVOURITED_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_FAVOURITED_PROPERTY] = g_param_spec_boolean ("favourited", "favourited", "favourited", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_BOOKMARKED_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_BOOKMARKED_PROPERTY] = g_param_spec_boolean ("bookmarked", "bookmarked", "bookmarked", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_SENSITIVE_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_SENSITIVE_PROPERTY] = g_param_spec_boolean ("sensitive", "sensitive", "sensitive", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_MUTED_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_MUTED_PROPERTY] = g_param_spec_boolean ("muted", "muted", "muted", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_PINNED_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_PINNED_PROPERTY] = g_param_spec_boolean ("pinned", "pinned", "pinned", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	_tmp0_ = tootle_settings;
	_tmp1_ = tootle_settings_get_default_post_visibility (_tmp0_);
	_tmp2_ = _tmp1_;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_VISIBILITY_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_VISIBILITY_PROPERTY] = g_param_spec_enum ("visibility", "visibility", "visibility", TOOTLE_API_TYPE_VISIBILITY, _tmp2_, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_REBLOG_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_REBLOG_PROPERTY] = g_param_spec_object ("reblog", "reblog", "reblog", TOOTLE_API_TYPE_STATUS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_MENTIONS_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_MENTIONS_PROPERTY] = g_param_spec_object ("mentions", "mentions", "mentions", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_MEDIA_ATTACHMENTS_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_MEDIA_ATTACHMENTS_PROPERTY] = g_param_spec_object ("media-attachments", "media-attachments", "media-attachments", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_URL_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_URL_PROPERTY] = g_param_spec_string ("url", "url", "url", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_FORMAL_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_FORMAL_PROPERTY] = g_param_spec_object ("formal", "formal", "formal", TOOTLE_API_TYPE_STATUS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_API_STATUS_HAS_SPOILER_PROPERTY, tootle_api_status_properties[TOOTLE_API_STATUS_HAS_SPOILER_PROPERTY] = g_param_spec_boolean ("has-spoiler", "has-spoiler", "has-spoiler", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
tootle_api_status_tootle_widgetizable_interface_init (TootleWidgetizableIface * iface,
                                                      gpointer iface_data)
{
	tootle_api_status_tootle_widgetizable_parent_iface = g_type_interface_peek_parent (iface);
	iface->to_widget = (GtkWidget* (*) (TootleWidgetizable*, GError**)) tootle_api_status_real_to_widget;
	iface->open = (void (*) (TootleWidgetizable*)) tootle_api_status_real_open;
}

static void
tootle_api_status_instance_init (TootleAPIStatus * self,
                                 gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	TootleSettings* _tmp2_;
	TootleAPIVisibility _tmp3_;
	TootleAPIVisibility _tmp4_;
	self->priv = tootle_api_status_get_instance_private (self);
	self->priv->_spoiler_text = NULL;
	self->priv->_in_reply_to_id = NULL;
	self->priv->_in_reply_to_account_id = NULL;
	_tmp0_ = g_strdup ("");
	self->priv->_content = _tmp0_;
	self->priv->_replies_count = (gint64) 0;
	self->priv->_reblogs_count = (gint64) 0;
	self->priv->_favourites_count = (gint64) 0;
	_tmp1_ = g_strdup ("0");
	self->priv->_created_at = _tmp1_;
	self->priv->_reblogged = FALSE;
	self->priv->_favourited = FALSE;
	self->priv->_bookmarked = FALSE;
	self->priv->_sensitive = FALSE;
	self->priv->_muted = FALSE;
	self->priv->_pinned = FALSE;
	_tmp2_ = tootle_settings;
	_tmp3_ = tootle_settings_get_default_post_visibility (_tmp2_);
	_tmp4_ = _tmp3_;
	self->priv->_visibility = _tmp4_;
	self->priv->_reblog = NULL;
	self->priv->_mentions = NULL;
	self->priv->_media_attachments = NULL;
}

static void
tootle_api_status_finalize (GObject * obj)
{
	TootleAPIStatus * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_API_TYPE_STATUS, TootleAPIStatus);
	_g_free0 (self->priv->_id);
	_g_object_unref0 (self->priv->_account);
	_g_free0 (self->priv->_uri);
	_g_free0 (self->priv->_spoiler_text);
	_g_free0 (self->priv->_in_reply_to_id);
	_g_free0 (self->priv->_in_reply_to_account_id);
	_g_free0 (self->priv->_content);
	_g_free0 (self->priv->_created_at);
	_g_object_unref0 (self->priv->_reblog);
	_g_object_unref0 (self->priv->_mentions);
	_g_object_unref0 (self->priv->_media_attachments);
	_g_free0 (self->priv->__url);
	G_OBJECT_CLASS (tootle_api_status_parent_class)->finalize (obj);
}

static GType
tootle_api_status_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TootleAPIStatusClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tootle_api_status_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TootleAPIStatus), 0, (GInstanceInitFunc) tootle_api_status_instance_init, NULL };
	static const GInterfaceInfo tootle_widgetizable_info = { (GInterfaceInitFunc) tootle_api_status_tootle_widgetizable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tootle_api_status_type_id;
	tootle_api_status_type_id = g_type_register_static (TOOTLE_TYPE_ENTITY, "TootleAPIStatus", &g_define_type_info, 0);
	g_type_add_interface_static (tootle_api_status_type_id, TOOTLE_TYPE_WIDGETIZABLE, &tootle_widgetizable_info);
	TootleAPIStatus_private_offset = g_type_add_instance_private (tootle_api_status_type_id, sizeof (TootleAPIStatusPrivate));
	return tootle_api_status_type_id;
}

GType
tootle_api_status_get_type (void)
{
	static volatile gsize tootle_api_status_type_id__volatile = 0;
	if (g_once_init_enter (&tootle_api_status_type_id__volatile)) {
		GType tootle_api_status_type_id;
		tootle_api_status_type_id = tootle_api_status_get_type_once ();
		g_once_init_leave (&tootle_api_status_type_id__volatile, tootle_api_status_type_id);
	}
	return tootle_api_status_type_id__volatile;
}

static void
_vala_tootle_api_status_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	TootleAPIStatus * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TOOTLE_API_TYPE_STATUS, TootleAPIStatus);
	switch (property_id) {
		case TOOTLE_API_STATUS_ID_PROPERTY:
		g_value_set_string (value, tootle_api_status_get_id (self));
		break;
		case TOOTLE_API_STATUS_ACCOUNT_PROPERTY:
		g_value_set_object (value, tootle_api_status_get_account (self));
		break;
		case TOOTLE_API_STATUS_URI_PROPERTY:
		g_value_set_string (value, tootle_api_status_get_uri (self));
		break;
		case TOOTLE_API_STATUS_SPOILER_TEXT_PROPERTY:
		g_value_set_string (value, tootle_api_status_get_spoiler_text (self));
		break;
		case TOOTLE_API_STATUS_IN_REPLY_TO_ID_PROPERTY:
		g_value_set_string (value, tootle_api_status_get_in_reply_to_id (self));
		break;
		case TOOTLE_API_STATUS_IN_REPLY_TO_ACCOUNT_ID_PROPERTY:
		g_value_set_string (value, tootle_api_status_get_in_reply_to_account_id (self));
		break;
		case TOOTLE_API_STATUS_CONTENT_PROPERTY:
		g_value_set_string (value, tootle_api_status_get_content (self));
		break;
		case TOOTLE_API_STATUS_REPLIES_COUNT_PROPERTY:
		g_value_set_int64 (value, tootle_api_status_get_replies_count (self));
		break;
		case TOOTLE_API_STATUS_REBLOGS_COUNT_PROPERTY:
		g_value_set_int64 (value, tootle_api_status_get_reblogs_count (self));
		break;
		case TOOTLE_API_STATUS_FAVOURITES_COUNT_PROPERTY:
		g_value_set_int64 (value, tootle_api_status_get_favourites_count (self));
		break;
		case TOOTLE_API_STATUS_CREATED_AT_PROPERTY:
		g_value_set_string (value, tootle_api_status_get_created_at (self));
		break;
		case TOOTLE_API_STATUS_REBLOGGED_PROPERTY:
		g_value_set_boolean (value, tootle_api_status_get_reblogged (self));
		break;
		case TOOTLE_API_STATUS_FAVOURITED_PROPERTY:
		g_value_set_boolean (value, tootle_api_status_get_favourited (self));
		break;
		case TOOTLE_API_STATUS_BOOKMARKED_PROPERTY:
		g_value_set_boolean (value, tootle_api_status_get_bookmarked (self));
		break;
		case TOOTLE_API_STATUS_SENSITIVE_PROPERTY:
		g_value_set_boolean (value, tootle_api_status_get_sensitive (self));
		break;
		case TOOTLE_API_STATUS_MUTED_PROPERTY:
		g_value_set_boolean (value, tootle_api_status_get_muted (self));
		break;
		case TOOTLE_API_STATUS_PINNED_PROPERTY:
		g_value_set_boolean (value, tootle_api_status_get_pinned (self));
		break;
		case TOOTLE_API_STATUS_VISIBILITY_PROPERTY:
		g_value_set_enum (value, tootle_api_status_get_visibility (self));
		break;
		case TOOTLE_API_STATUS_REBLOG_PROPERTY:
		g_value_set_object (value, tootle_api_status_get_reblog (self));
		break;
		case TOOTLE_API_STATUS_MENTIONS_PROPERTY:
		g_value_set_object (value, tootle_api_status_get_mentions (self));
		break;
		case TOOTLE_API_STATUS_MEDIA_ATTACHMENTS_PROPERTY:
		g_value_set_object (value, tootle_api_status_get_media_attachments (self));
		break;
		case TOOTLE_API_STATUS_URL_PROPERTY:
		g_value_take_string (value, tootle_api_status_get_url (self));
		break;
		case TOOTLE_API_STATUS_FORMAL_PROPERTY:
		g_value_set_object (value, tootle_api_status_get_formal (self));
		break;
		case TOOTLE_API_STATUS_HAS_SPOILER_PROPERTY:
		g_value_set_boolean (value, tootle_api_status_get_has_spoiler (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tootle_api_status_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	TootleAPIStatus * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TOOTLE_API_TYPE_STATUS, TootleAPIStatus);
	switch (property_id) {
		case TOOTLE_API_STATUS_ID_PROPERTY:
		tootle_api_status_set_id (self, g_value_get_string (value));
		break;
		case TOOTLE_API_STATUS_ACCOUNT_PROPERTY:
		tootle_api_status_set_account (self, g_value_get_object (value));
		break;
		case TOOTLE_API_STATUS_URI_PROPERTY:
		tootle_api_status_set_uri (self, g_value_get_string (value));
		break;
		case TOOTLE_API_STATUS_SPOILER_TEXT_PROPERTY:
		tootle_api_status_set_spoiler_text (self, g_value_get_string (value));
		break;
		case TOOTLE_API_STATUS_IN_REPLY_TO_ID_PROPERTY:
		tootle_api_status_set_in_reply_to_id (self, g_value_get_string (value));
		break;
		case TOOTLE_API_STATUS_IN_REPLY_TO_ACCOUNT_ID_PROPERTY:
		tootle_api_status_set_in_reply_to_account_id (self, g_value_get_string (value));
		break;
		case TOOTLE_API_STATUS_CONTENT_PROPERTY:
		tootle_api_status_set_content (self, g_value_get_string (value));
		break;
		case TOOTLE_API_STATUS_REPLIES_COUNT_PROPERTY:
		tootle_api_status_set_replies_count (self, g_value_get_int64 (value));
		break;
		case TOOTLE_API_STATUS_REBLOGS_COUNT_PROPERTY:
		tootle_api_status_set_reblogs_count (self, g_value_get_int64 (value));
		break;
		case TOOTLE_API_STATUS_FAVOURITES_COUNT_PROPERTY:
		tootle_api_status_set_favourites_count (self, g_value_get_int64 (value));
		break;
		case TOOTLE_API_STATUS_CREATED_AT_PROPERTY:
		tootle_api_status_set_created_at (self, g_value_get_string (value));
		break;
		case TOOTLE_API_STATUS_REBLOGGED_PROPERTY:
		tootle_api_status_set_reblogged (self, g_value_get_boolean (value));
		break;
		case TOOTLE_API_STATUS_FAVOURITED_PROPERTY:
		tootle_api_status_set_favourited (self, g_value_get_boolean (value));
		break;
		case TOOTLE_API_STATUS_BOOKMARKED_PROPERTY:
		tootle_api_status_set_bookmarked (self, g_value_get_boolean (value));
		break;
		case TOOTLE_API_STATUS_SENSITIVE_PROPERTY:
		tootle_api_status_set_sensitive (self, g_value_get_boolean (value));
		break;
		case TOOTLE_API_STATUS_MUTED_PROPERTY:
		tootle_api_status_set_muted (self, g_value_get_boolean (value));
		break;
		case TOOTLE_API_STATUS_PINNED_PROPERTY:
		tootle_api_status_set_pinned (self, g_value_get_boolean (value));
		break;
		case TOOTLE_API_STATUS_VISIBILITY_PROPERTY:
		tootle_api_status_set_visibility (self, g_value_get_enum (value));
		break;
		case TOOTLE_API_STATUS_REBLOG_PROPERTY:
		tootle_api_status_set_reblog (self, g_value_get_object (value));
		break;
		case TOOTLE_API_STATUS_MENTIONS_PROPERTY:
		tootle_api_status_set_mentions (self, g_value_get_object (value));
		break;
		case TOOTLE_API_STATUS_MEDIA_ATTACHMENTS_PROPERTY:
		tootle_api_status_set_media_attachments (self, g_value_get_object (value));
		break;
		case TOOTLE_API_STATUS_URL_PROPERTY:
		tootle_api_status_set_url (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

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

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

