sig
type error =
Create of exn
| Connect of exn
| Close of exn
| Write of exn
| Read of exn
| Busy
| Not_connected
| Invalid_usage
| Bad_answer of string option
| Http_answer of int * string * string
exception Error of Cry.error
val string_of_error : exn -> string
type protocol = Icy | Http
val string_of_protocol : Cry.protocol -> string
type content_type
val ogg_application : Cry.content_type
val ogg_audio : Cry.content_type
val ogg_video : Cry.content_type
val mpeg : Cry.content_type
val content_type_of_string : string -> Cry.content_type
val string_of_content_type : Cry.content_type -> string
type connection = {
mount : string;
user : string;
password : string;
host : string;
port : int;
content_type : Cry.content_type;
protocol : Cry.protocol;
headers : (string, string) Hashtbl.t;
}
val string_of_connection : Cry.connection -> string
type audio_info = (string, string) Hashtbl.t
type metadata = (string, string) Hashtbl.t
type connection_data = {
connection : Cry.connection;
data_socket : Unix.file_descr;
}
type status = Connected of Cry.connection_data | Disconnected
type t
val create :
?ipv6:bool ->
?bind:string ->
?connection_timeout:float -> ?timeout:float -> unit -> Cry.t
val get_status : Cry.t -> Cry.status
val get_icy_cap : Cry.t -> bool
val get_connection_data : Cry.t -> Cry.connection_data
val audio_info :
?samplerate:int ->
?channels:int -> ?quality:float -> ?bitrate:int -> unit -> Cry.audio_info
val connection :
?user_agent:string ->
?name:string ->
?genre:string ->
?url:string ->
?public:bool ->
?audio_info:Cry.audio_info ->
?description:string ->
?host:string ->
?port:int ->
?password:string ->
?protocol:Cry.protocol ->
?user:string ->
mount:string -> content_type:Cry.content_type -> unit -> Cry.connection
val connect : Cry.t -> Cry.connection -> unit
val update_metadata : ?charset:string -> Cry.t -> Cry.metadata -> unit
val manual_update_metadata :
host:string ->
port:int ->
protocol:Cry.protocol ->
user:string ->
password:string ->
mount:string ->
?connection_timeout:float ->
?timeout:float ->
?headers:(string, string) Hashtbl.t ->
?ipv6:bool -> ?bind:string -> ?charset:string -> Cry.metadata -> unit
val send : Cry.t -> string -> unit
val close : Cry.t -> unit
end