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

#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <json-glib/json-glib.h>
#include <gio/gio.h>
#include <adwaita.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define TUBA_TYPE_STREAMABLE (tuba_streamable_get_type ())
#define TUBA_STREAMABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_STREAMABLE, TubaStreamable))
#define TUBA_IS_STREAMABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_STREAMABLE))
#define TUBA_STREAMABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_TYPE_STREAMABLE, TubaStreamableIface))

typedef struct _TubaStreamable TubaStreamable;
typedef struct _TubaStreamableIface TubaStreamableIface;

#define TUBA_TYPE_STREAMS (tuba_streams_get_type ())
#define TUBA_STREAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_STREAMS, TubaStreams))
#define TUBA_STREAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_STREAMS, TubaStreamsClass))
#define TUBA_IS_STREAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_STREAMS))
#define TUBA_IS_STREAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_STREAMS))
#define TUBA_STREAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_STREAMS, TubaStreamsClass))

typedef struct _TubaStreams TubaStreams;
typedef struct _TubaStreamsClass TubaStreamsClass;
#define _g_free0(var) (var = (g_free (var), NULL))

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

#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 __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	TUBA_STREAMABLE_STREAM_EVENT_SIGNAL,
	TUBA_STREAMABLE_NUM_SIGNALS
};
static guint tuba_streamable_signals[TUBA_STREAMABLE_NUM_SIGNALS] = {0};

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

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

VALA_EXTERN TubaStreams* tuba_streams;
VALA_EXTERN TubaSettings* tuba_settings;
VALA_EXTERN TubaApplication* tuba_app;

VALA_EXTERN GType tuba_streamable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaStreamable, g_object_unref)
VALA_EXTERN gchar* tuba_streamable_get_stream_url (TubaStreamable* self);
VALA_EXTERN void tuba_streamable_subscribe (TubaStreamable* self);
VALA_EXTERN GType tuba_streams_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaStreams, g_object_unref)
VALA_EXTERN void tuba_streams_unsubscribe (TubaStreams* self,
                               const gchar* url,
                               TubaStreamable* s);
VALA_EXTERN const gchar* tuba_streamable_get_t_connection_url (TubaStreamable* self);
VALA_EXTERN void tuba_streams_subscribe (TubaStreams* self,
                             const gchar* url,
                             TubaStreamable* s);
VALA_EXTERN void tuba_streamable_set_t_connection_url (TubaStreamable* self,
                                           const gchar* value);
VALA_EXTERN void tuba_streamable_unsubscribe (TubaStreamable* self);
VALA_EXTERN GType tuba_streamable_event_get_type (void) G_GNUC_CONST ;
VALA_EXTERN TubaStreamableEvent* tuba_streamable_event_dup (const TubaStreamableEvent* self);
VALA_EXTERN void tuba_streamable_event_free (TubaStreamableEvent* self);
VALA_EXTERN void tuba_streamable_event_copy (const TubaStreamableEvent* self,
                                 TubaStreamableEvent* dest);
VALA_EXTERN void tuba_streamable_event_destroy (TubaStreamableEvent* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (TubaStreamableEvent, tuba_streamable_event_destroy)
VALA_EXTERN void tuba_streamable_forward (TubaStreamable* self,
                              const gchar* url,
                              TubaStreamableEvent* ev);
VALA_EXTERN gboolean tuba_streamable_get_subscribed (TubaStreamable* self);
VALA_EXTERN void tuba_streams_forward (TubaStreams* self,
                           const gchar* url,
                           TubaStreamableEvent* ev);
VALA_EXTERN gchar* tuba_streamable_get_subscriber_name (TubaStreamable* self);
VALA_EXTERN void tuba_streamable_construct_streamable (TubaStreamable* self);
VALA_EXTERN GType tuba_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaSettings, g_object_unref)
VALA_EXTERN void tuba_streamable_on_streaming_policy_changed (TubaStreamable* self);
static void _tuba_streamable_on_streaming_policy_changed_g_object_notify (GObject* _sender,
                                                                   GParamSpec* pspec,
                                                                   gpointer self);
VALA_EXTERN void tuba_streamable_update_stream (TubaStreamable* self);
static void _tuba_streamable_update_stream_g_object_notify (GObject* _sender,
                                                     GParamSpec* pspec,
                                                     gpointer self);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
VALA_EXTERN void tuba_streamable_on_network_change (TubaStreamable* self);
static void _tuba_streamable_on_network_change_g_object_notify (GObject* _sender,
                                                         GParamSpec* pspec,
                                                         gpointer self);
VALA_EXTERN void tuba_streamable_destruct_streamable (TubaStreamable* self);
VALA_EXTERN gboolean tuba_application_get_is_online (TubaApplication* self);
VALA_EXTERN void tuba_streams_force_reconnect (TubaStreams* self,
                                   const gchar* url);
static void tuba_streamable_real_on_streaming_policy_changed (TubaStreamable* self);
VALA_EXTERN void tuba_streamable_set_subscribed (TubaStreamable* self,
                                     gboolean value);
static void _vala_JsonNode_free (JsonNode* self);
VALA_EXTERN gchar* tuba_streamable_event_get_string (TubaStreamableEvent *self,
                                         GError** error);
VALA_EXTERN JsonNode* tuba_streamable_event_get_node (TubaStreamableEvent *self,
                                          GError** error);
VALA_EXTERN JsonObject* tuba_streamable_event_get_object (TubaStreamableEvent *self,
                                              GError** error);
static JsonNode* _vala_JsonNode_copy (JsonNode* self);
static GType tuba_streamable_get_type_once (void);

gchar*
tuba_streamable_get_stream_url (TubaStreamable* self)
{
	TubaStreamableIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = TUBA_STREAMABLE_GET_INTERFACE (self);
	if (_iface_->get_stream_url) {
		return _iface_->get_stream_url (self);
	}
	return NULL;
}

void
tuba_streamable_subscribe (TubaStreamable* self)
{
	TubaStreams* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	TubaStreams* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	_tmp0_ = tuba_streams;
	_tmp1_ = tuba_streamable_get_t_connection_url (self);
	_tmp2_ = _tmp1_;
	tuba_streams_unsubscribe (_tmp0_, _tmp2_, self);
	_tmp3_ = tuba_streams;
	_tmp4_ = tuba_streamable_get_stream_url (self);
	_tmp5_ = _tmp4_;
	tuba_streams_subscribe (_tmp3_, _tmp5_, self);
	_g_free0 (_tmp5_);
	_tmp6_ = tuba_streamable_get_stream_url (self);
	_tmp7_ = _tmp6_;
	tuba_streamable_set_t_connection_url (self, _tmp7_);
	_g_free0 (_tmp7_);
}

void
tuba_streamable_unsubscribe (TubaStreamable* self)
{
	TubaStreams* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	_tmp0_ = tuba_streams;
	_tmp1_ = tuba_streamable_get_t_connection_url (self);
	_tmp2_ = _tmp1_;
	tuba_streams_unsubscribe (_tmp0_, _tmp2_, self);
	tuba_streamable_set_t_connection_url (self, NULL);
}

void
tuba_streamable_forward (TubaStreamable* self,
                         const gchar* url,
                         TubaStreamableEvent* ev)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	TubaStreams* _tmp2_;
	TubaStreamableEvent _tmp3_;
	g_return_if_fail (url != NULL);
	g_return_if_fail (ev != NULL);
	_tmp0_ = tuba_streamable_get_subscribed (self);
	_tmp1_ = _tmp0_;
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = tuba_streams;
	_tmp3_ = *ev;
	tuba_streams_forward (_tmp2_, url, &_tmp3_);
}

gchar*
tuba_streamable_get_subscriber_name (TubaStreamable* self)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	_tmp0_ = g_type_name (G_TYPE_FROM_INSTANCE ((GObject*) self));
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
_tuba_streamable_on_streaming_policy_changed_g_object_notify (GObject* _sender,
                                                              GParamSpec* pspec,
                                                              gpointer self)
{
	tuba_streamable_on_streaming_policy_changed ((TubaStreamable*) self);
}

static void
_tuba_streamable_update_stream_g_object_notify (GObject* _sender,
                                                GParamSpec* pspec,
                                                gpointer self)
{
	tuba_streamable_update_stream ((TubaStreamable*) self);
}

static void
_tuba_streamable_on_network_change_g_object_notify (GObject* _sender,
                                                    GParamSpec* pspec,
                                                    gpointer self)
{
	tuba_streamable_on_network_change ((TubaStreamable*) self);
}

void
tuba_streamable_construct_streamable (TubaStreamable* self)
{
	TubaSettings* _tmp0_;
	TubaSettings* _tmp1_;
	TubaApplication* _tmp2_;
	_tmp0_ = tuba_settings;
	g_signal_connect_object ((GObject*) _tmp0_, "notify::live-updates", (GCallback) _tuba_streamable_on_streaming_policy_changed_g_object_notify, self, 0);
	_tmp1_ = tuba_settings;
	g_signal_connect_object ((GObject*) _tmp1_, "notify::public-live-updates", (GCallback) _tuba_streamable_on_streaming_policy_changed_g_object_notify, self, 0);
	tuba_streamable_on_streaming_policy_changed (self);
	g_signal_connect_object ((GObject*) self, "notify::subscribed", (GCallback) _tuba_streamable_update_stream_g_object_notify, self, 0);
	g_signal_connect_object ((GObject*) self, "notify::stream_url", (GCallback) _tuba_streamable_update_stream_g_object_notify, self, 0);
	_tmp2_ = tuba_app;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::is-online", (GCallback) _tuba_streamable_on_network_change_g_object_notify, self, 0);
	tuba_streamable_update_stream (self);
}

void
tuba_streamable_destruct_streamable (TubaStreamable* self)
{
	tuba_streamable_unsubscribe (self);
}

void
tuba_streamable_on_network_change (TubaStreamable* self)
{
	TubaApplication* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp0_ = tuba_app;
	_tmp1_ = tuba_application_get_is_online (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		TubaStreams* _tmp3_;
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		tuba_streamable_update_stream (self);
		_tmp3_ = tuba_streams;
		_tmp4_ = tuba_streamable_get_t_connection_url (self);
		_tmp5_ = _tmp4_;
		tuba_streams_force_reconnect (_tmp3_, _tmp5_);
	} else {
		tuba_streamable_unsubscribe (self);
	}
}

void
tuba_streamable_update_stream (TubaStreamable* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	tuba_streamable_unsubscribe (self);
	_tmp0_ = tuba_streamable_get_subscribed (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		tuba_streamable_subscribe (self);
	}
}

static void
tuba_streamable_real_on_streaming_policy_changed (TubaStreamable* self)
{
}

void
tuba_streamable_on_streaming_policy_changed (TubaStreamable* self)
{
	TubaStreamableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = TUBA_STREAMABLE_GET_INTERFACE (self);
	if (_iface_->on_streaming_policy_changed) {
		_iface_->on_streaming_policy_changed (self);
	}
}

const gchar*
tuba_streamable_get_t_connection_url (TubaStreamable* self)
{
	TubaStreamableIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = TUBA_STREAMABLE_GET_INTERFACE (self);
	if (_iface_->get_t_connection_url) {
		return _iface_->get_t_connection_url (self);
	}
	return NULL;
}

void
tuba_streamable_set_t_connection_url (TubaStreamable* self,
                                      const gchar* value)
{
	TubaStreamableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = TUBA_STREAMABLE_GET_INTERFACE (self);
	if (_iface_->set_t_connection_url) {
		_iface_->set_t_connection_url (self, value);
	}
}

gboolean
tuba_streamable_get_subscribed (TubaStreamable* self)
{
	TubaStreamableIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = TUBA_STREAMABLE_GET_INTERFACE (self);
	if (_iface_->get_subscribed) {
		return _iface_->get_subscribed (self);
	}
	return FALSE;
}

void
tuba_streamable_set_subscribed (TubaStreamable* self,
                                gboolean value)
{
	TubaStreamableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = TUBA_STREAMABLE_GET_INTERFACE (self);
	if (_iface_->set_subscribed) {
		_iface_->set_subscribed (self, value);
	}
}

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

gchar*
tuba_streamable_event_get_string (TubaStreamableEvent *self,
                                  GError** error)
{
	JsonNode* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* result;
	_tmp0_ = (*self).payload;
	_tmp1_ = json_node_get_string (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	result = _tmp2_;
	return result;
}

JsonNode*
tuba_streamable_event_get_node (TubaStreamableEvent *self,
                                GError** error)
{
	JsonParser* parser = NULL;
	JsonParser* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
	JsonParser* _tmp3_;
	JsonParser* _tmp4_;
	JsonNode* _tmp5_;
	GError* _inner_error0_ = NULL;
	JsonNode* result;
	_tmp0_ = json_parser_new ();
	parser = _tmp0_;
	_tmp2_ = tuba_streamable_event_get_string (&(*self), &_inner_error0_);
	_tmp1_ = _tmp2_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_object_unref0 (parser);
		return NULL;
	}
	_tmp3_ = parser;
	json_parser_load_from_data (_tmp3_, _tmp1_, (gssize) -1, &_inner_error0_);
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		_g_free0 (_tmp1_);
		_g_object_unref0 (parser);
		return NULL;
	}
	_tmp4_ = parser;
	_tmp5_ = json_parser_steal_root (_tmp4_);
	result = _tmp5_;
	_g_free0 (_tmp1_);
	_g_object_unref0 (parser);
	return result;
}

static gpointer
_json_object_ref0 (gpointer self)
{
	return self ? json_object_ref (self) : NULL;
}

JsonObject*
tuba_streamable_event_get_object (TubaStreamableEvent *self,
                                  GError** error)
{
	JsonNode* _tmp0_ = NULL;
	JsonNode* _tmp1_;
	JsonObject* _tmp2_;
	JsonObject* _tmp3_;
	GError* _inner_error0_ = NULL;
	JsonObject* result;
	_tmp1_ = tuba_streamable_event_get_node (&(*self), &_inner_error0_);
	_tmp0_ = _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_propagate_error (error, _inner_error0_);
		return NULL;
	}
	_tmp2_ = json_node_get_object (_tmp0_);
	_tmp3_ = _json_object_ref0 (_tmp2_);
	result = _tmp3_;
	__vala_JsonNode_free0 (_tmp0_);
	return result;
}

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

void
tuba_streamable_event_copy (const TubaStreamableEvent* self,
                            TubaStreamableEvent* dest)
{
	const gchar* _tmp0_;
	gchar* _tmp1_;
	JsonNode* _tmp2_;
	JsonNode* _tmp3_;
	_tmp0_ = (*self).type;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 ((*dest).type);
	(*dest).type = _tmp1_;
	_tmp2_ = (*self).payload;
	_tmp3_ = __vala_JsonNode_copy0 (_tmp2_);
	__vala_JsonNode_free0 ((*dest).payload);
	(*dest).payload = _tmp3_;
}

void
tuba_streamable_event_destroy (TubaStreamableEvent* self)
{
	_g_free0 ((*self).type);
	__vala_JsonNode_free0 ((*self).payload);
}

TubaStreamableEvent*
tuba_streamable_event_dup (const TubaStreamableEvent* self)
{
	TubaStreamableEvent* dup;
	dup = g_new0 (TubaStreamableEvent, 1);
	tuba_streamable_event_copy (self, dup);
	return dup;
}

void
tuba_streamable_event_free (TubaStreamableEvent* self)
{
	tuba_streamable_event_destroy (self);
	g_free (self);
}

 G_GNUC_NO_INLINE static GType
tuba_streamable_event_get_type_once (void)
{
	GType tuba_streamable_event_type_id;
	tuba_streamable_event_type_id = g_boxed_type_register_static ("TubaStreamableEvent", (GBoxedCopyFunc) tuba_streamable_event_dup, (GBoxedFreeFunc) tuba_streamable_event_free);
	return tuba_streamable_event_type_id;
}

GType
tuba_streamable_event_get_type (void)
{
	static GType tuba_streamable_event_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_streamable_event_type_id__once)) {
		GType tuba_streamable_event_type_id;
		tuba_streamable_event_type_id = tuba_streamable_event_get_type_once ();
		g_once_init_leave_pointer (&tuba_streamable_event_type_id__once, tuba_streamable_event_type_id);
	}
	return tuba_streamable_event_type_id__once;
}

static void
tuba_streamable_default_init (TubaStreamableIface * iface,
                              gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_string ("t-connection-url", "t-connection-url", "t-connection-url", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("subscribed", "subscribed", "subscribed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tuba_streamable_signals[TUBA_STREAMABLE_STREAM_EVENT_SIGNAL] = g_signal_new ("stream-event", TUBA_TYPE_STREAMABLE, G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, 0, NULL, NULL, g_cclosure_marshal_VOID__BOXED, G_TYPE_NONE, 1, TUBA_STREAMABLE_TYPE_EVENT);
	iface->on_streaming_policy_changed = tuba_streamable_real_on_streaming_policy_changed;
}

 G_GNUC_NO_INLINE static GType
tuba_streamable_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaStreamableIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_streamable_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType tuba_streamable_type_id;
	tuba_streamable_type_id = g_type_register_static (G_TYPE_INTERFACE, "TubaStreamable", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_interface_add_prerequisite (tuba_streamable_type_id, G_TYPE_OBJECT);
	return tuba_streamable_type_id;
}

GType
tuba_streamable_get_type (void)
{
	static GType tuba_streamable_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_streamable_type_id__once)) {
		GType tuba_streamable_type_id;
		tuba_streamable_type_id = tuba_streamable_get_type_once ();
		g_once_init_leave_pointer (&tuba_streamable_type_id__once, tuba_streamable_type_id);
	}
	return tuba_streamable_type_id__once;
}

