/* gtuber-plugin-devel-0.0.vapi generated by vapigen, do not modify. */

[CCode (cprefix = "Gtuber", gir_namespace = "GtuberPluginDevel", gir_version = "0.0", lower_case_cprefix = "gtuber_")]
namespace Gtuber {
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", type_id = "gtuber_adaptive_stream_get_type ()")]
	public class AdaptiveStream : Gtuber.Stream {
		[CCode (has_construct_function = false)]
		public AdaptiveStream ();
		public bool get_index_range (out uint64 start, out uint64 end);
		public bool get_init_range (out uint64 start, out uint64 end);
		public Gtuber.AdaptiveStreamManifest get_manifest_type ();
		public void set_index_range (uint64 start, uint64 end);
		public void set_init_range (uint64 start, uint64 end);
		public void set_manifest_type (Gtuber.AdaptiveStreamManifest type);
		public Gtuber.AdaptiveStreamManifest manifest_type { get; }
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", type_id = "gtuber_client_get_type ()")]
	public class Client : GLib.Object {
		[CCode (has_construct_function = false)]
		public Client ();
		public Gtuber.MediaInfo fetch_media_info (string uri, GLib.Cancellable? cancellable = null) throws GLib.Error;
		public async Gtuber.MediaInfo fetch_media_info_async (string uri, GLib.Cancellable? cancellable) throws GLib.Error;
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", type_id = "gtuber_heartbeat_get_type ()")]
	public class Heartbeat : GLib.Object {
		[CCode (has_construct_function = false)]
		protected Heartbeat ();
		[NoWrapper]
		public virtual Gtuber.Flow ping (Soup.Message msg) throws GLib.Error;
		[NoWrapper]
		public virtual Gtuber.Flow pong (Soup.Message msg, GLib.InputStream stream) throws GLib.Error;
		public void set_interval (uint interval);
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", type_id = "gtuber_manifest_generator_get_type ()")]
	public class ManifestGenerator : GLib.Object {
		[CCode (has_construct_function = false)]
		public ManifestGenerator ();
		public uint get_indent ();
		public Gtuber.AdaptiveStreamManifest get_manifest_type ();
		public bool get_pretty ();
		public void set_filter_func (owned Gtuber.AdaptiveStreamFilter? filter);
		public void set_indent (uint indent);
		public void set_manifest_type (Gtuber.AdaptiveStreamManifest type);
		public void set_media_info (Gtuber.MediaInfo info);
		public void set_pretty (bool pretty);
		public string to_data ();
		public bool to_file (string filename) throws GLib.Error;
		public uint indent { get; set; }
		public Gtuber.AdaptiveStreamManifest manifest_type { get; set; }
		public bool pretty { get; set; }
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", type_id = "gtuber_media_info_get_type ()")]
	public class MediaInfo : GLib.Object {
		[CCode (has_construct_function = false)]
		protected MediaInfo ();
		public void add_adaptive_stream (Gtuber.AdaptiveStream stream);
		public void add_stream (Gtuber.Stream stream);
		public unowned GLib.GenericArray<Gtuber.AdaptiveStream> get_adaptive_streams ();
		public unowned GLib.HashTable<void*,void*> get_chapters ();
		public unowned string get_description ();
		public uint get_duration ();
		public bool get_has_adaptive_streams ();
		public bool get_has_streams ();
		public unowned string get_id ();
		public unowned GLib.HashTable<void*,void*> get_request_headers ();
		public unowned GLib.GenericArray<Gtuber.Stream> get_streams ();
		public unowned string get_title ();
		public void insert_chapter (uint64 start, string name);
		public void set_description (string description);
		public void set_duration (uint duration);
		public void set_id (string id);
		public void set_title (string title);
		public void take_heartbeat (owned Gtuber.Heartbeat heartbeat);
		public string description { get; }
		public uint duration { get; }
		public bool has_adaptive_streams { get; }
		public bool has_streams { get; }
		public string id { get; }
		public string title { get; }
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", type_id = "gtuber_stream_get_type ()")]
	public class Stream : GLib.Object {
		[CCode (has_construct_function = false)]
		public Stream ();
		public unowned string get_audio_codec ();
		public uint get_bitrate ();
		public Gtuber.CodecFlags get_codec_flags ();
		public uint get_fps ();
		public uint get_height ();
		public uint get_itag ();
		public Gtuber.StreamMimeType get_mime_type ();
		public unowned string get_uri ();
		public unowned string get_video_codec ();
		public uint get_width ();
		public string obtain_codecs_string ();
		public void set_audio_codec (string acodec);
		public void set_bitrate (uint bitrate);
		public void set_codecs (string vcodec, string acodec);
		public void set_fps (uint fps);
		public void set_height (uint height);
		public void set_itag (uint itag);
		public void set_mime_type (Gtuber.StreamMimeType mime_type);
		public void set_uri (string uri);
		public void set_video_codec (string vcodec);
		public void set_width (uint width);
		public string audio_codec { get; }
		public uint bitrate { get; }
		public Gtuber.CodecFlags codec_flags { get; }
		public uint fps { get; }
		public uint height { get; }
		public uint itag { get; }
		public Gtuber.StreamMimeType mime_type { get; }
		public string uri { get; }
		public string video_codec { get; }
		public uint width { get; }
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", type_id = "gtuber_website_get_type ()")]
	public class Website : GLib.Object {
		[CCode (has_construct_function = false)]
		protected Website ();
		[NoWrapper]
		public virtual Gtuber.Flow create_request (Gtuber.MediaInfo info, Soup.Message msg) throws GLib.Error;
		public unowned Soup.CookieJar? get_cookies_jar ();
		public unowned GLib.Uri get_uri ();
		public unowned string get_uri_string ();
		[NoWrapper]
		public virtual Gtuber.Flow parse_input_stream (GLib.InputStream stream, Gtuber.MediaInfo info) throws GLib.Error;
		[NoWrapper]
		public virtual void prepare ();
		[NoWrapper]
		public virtual Gtuber.Flow read_response (Soup.Message msg) throws GLib.Error;
		public void set_uri (GLib.Uri uri);
		public bool set_uri_from_string (string uri_str) throws GLib.Error;
		[NoWrapper]
		public virtual Gtuber.Flow set_user_req_headers (Soup.MessageHeaders req_headers, GLib.HashTable<void*,void*> user_headers) throws GLib.Error;
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cprefix = "GTUBER_ADAPTIVE_STREAM_MANIFEST_", type_id = "gtuber_adaptive_stream_manifest_get_type ()")]
	public enum AdaptiveStreamManifest {
		UNKNOWN,
		DASH,
		HLS
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cprefix = "GTUBER_CODEC_", type_id = "gtuber_codec_flags_get_type ()")]
	[Flags]
	public enum CodecFlags {
		UNKNOWN_VIDEO,
		AVC,
		HEVC,
		VP9,
		AV1,
		UNKNOWN_AUDIO,
		MP4A,
		OPUS
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cprefix = "GTUBER_FLOW_", type_id = "gtuber_flow_get_type ()")]
	public enum Flow {
		OK,
		ERROR,
		RESTART,
		RECONFIGURE
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cprefix = "GTUBER_STREAM_MIME_TYPE_", type_id = "gtuber_stream_mime_type_get_type ()")]
	public enum StreamMimeType {
		UNKNOWN,
		VIDEO_MP4,
		AUDIO_MP4,
		VIDEO_WEBM,
		AUDIO_WEBM
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cprefix = "GTUBER_CLIENT_ERROR_", type_id = "gtuber_client_error_get_type ()")]
	public errordomain ClientError {
		NO_PLUGIN,
		MISSING_INFO;
		public static GLib.Quark quark ();
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cprefix = "GTUBER_HEARTBEAT_ERROR_", type_id = "gtuber_heartbeat_error_get_type ()")]
	public errordomain HeartbeatError {
		PING_FAILED,
		PONG_FAILED,
		OTHER;
		public static GLib.Quark quark ();
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cprefix = "GTUBER_MANIFEST_GENERATOR_ERROR_NO_", type_id = "gtuber_manifest_generator_error_get_type ()")]
	public errordomain ManifestGeneratorError {
		DATA;
		public static GLib.Quark quark ();
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cprefix = "GTUBER_WEBSITE_ERROR_", type_id = "gtuber_website_error_get_type ()")]
	public errordomain WebsiteError {
		REQUEST_CREATE_FAILED,
		PARSE_FAILED,
		OTHER;
		public static GLib.Quark quark ();
	}
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", instance_pos = 1.9)]
	public delegate bool AdaptiveStreamFilter (Gtuber.AdaptiveStream stream);
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", instance_pos = 2.9)]
	public delegate void Func (void* src, void* data);
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cname = "GTUBER_MAJOR_VERSION")]
	public const int MAJOR_VERSION;
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cname = "GTUBER_MICRO_VERSION")]
	public const int MICRO_VERSION;
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cname = "GTUBER_MINOR_VERSION")]
	public const int MINOR_VERSION;
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h", cname = "GTUBER_VERSION_S")]
	public const string VERSION_S;
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	public static string cache_plugin_read (string plugin_name, string key);
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	public static void cache_plugin_write (string plugin_name, string key, string? val, int64 exp);
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	public static void cache_plugin_write_epoch (string plugin_name, string key, string? val, int64 epoch);
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	[Version (replacement = "ClientError.quark")]
	public static GLib.Quark client_error_quark ();
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	public static GLib.File config_obtain_config_dir ();
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	public static GLib.File config_obtain_config_dir_file (string file_name);
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	public static string config_obtain_config_dir_path ();
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	public static string config_obtain_config_file_path (string file_name);
	[CCode (array_length = false, array_null_terminated = true, cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	public static string[] config_read_plugin_hosts_file (string file_name);
	[CCode (array_length = false, array_null_terminated = true, cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	public static unowned string[] get_supported_schemes ();
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	public static bool has_plugin_for_uri (string uri, out string filename);
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	[Version (replacement = "HeartbeatError.quark")]
	public static GLib.Quark heartbeat_error_quark ();
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	[Version (replacement = "ManifestGeneratorError.quark")]
	public static GLib.Quark manifest_generator_error_quark ();
	[CCode (cheader_filename = "gtuber/gtuber-plugin-devel.h")]
	[Version (replacement = "WebsiteError.quark")]
	public static GLib.Quark website_error_quark ();
}
