sig
type error =
Create
| Connect
| Close
| Write
| Read
| 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 : Cry.error -> string
type protocol = Icy | Http
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;
}
type audio_info = (string, string) Hashtbl.t
type metadata = (string, string) Hashtbl.t
type status = Connected of Cry.connection | Disconnected
type t
val create : ?ipv6:bool -> ?timeout:float -> ?bind:string -> unit -> Cry.t
val get_status : Cry.t -> Cry.status
val get_icy_cap : Cry.t -> bool
val get_socket : Cry.t -> Unix.file_descr
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 : Cry.t -> Cry.metadata -> unit
val manual_update_metadata :
host:string ->
port:int ->
protocol:Cry.protocol ->
user:string ->
password:string ->
mount:string ->
?headers:(string, string) Hashtbl.t ->
?ipv6:bool -> ?bind:string -> Cry.metadata -> unit
val send : Cry.t -> string -> unit
val close : Cry.t -> unit
end