/usr/share/doc/libshout-ocaml-dev/html/Shout.html is in libshout-ocaml-dev 0.2.7-1build8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Shout" rel="Chapter" href="Shout.html"><link title="Types and exceptions." rel="Section" href="#1_Typesandexceptions">
<link title="Initialization and creation functions." rel="Section" href="#1_Initializationandcreationfunctions">
<link title="Setting and retrieving preliminary parameters." rel="Section" href="#1_Settingandretrievingpreliminaryparameters">
<link title="Managing the connection and sending data." rel="Section" href="#1_Managingtheconnectionandsendingdata">
<link title="Connection parameters" rel="Subsection" href="#2_Connectionparameters">
<link title="Directory parameters (optionnal)" rel="Subsection" href="#2_Directoryparametersoptionnal">
<link title="Multicasting" rel="Subsection" href="#2_Multicasting">
<title>Shout</title>
</head>
<body>
<div class="navbar"> <a class="up" href="index.html" title="Index">Up</a>
</div>
<h1>Module <a href="type_Shout.html">Shout</a></h1>
<pre><span class="keyword">module</span> Shout: <code class="code">sig</code> <a href="Shout.html">..</a> <code class="code">end</code></pre><div class="info module top">
Libshout 2 bindings for OCaml.<br>
<b>Author(s):</b> Samuel Mimram<br>
</div>
<hr width="100%">
<br>
<h1 id="1_Typesandexceptions">Types and exceptions.</h1><br>
<pre><span id="TYPEshout"><span class="keyword">type</span> <code class="type"></code>shout</span> </pre>
<div class="info ">
A shout connection.<br>
</div>
<pre><span id="EXCEPTIONInsane"><span class="keyword">exception</span> Insane</span></pre>
<div class="info ">
Bad parameters, either nonsense or not applicable due to the current state of the connection.<br>
</div>
<pre><span id="EXCEPTIONNo_connect"><span class="keyword">exception</span> No_connect</span></pre>
<div class="info ">
A connection with the server could not be established.<br>
</div>
<pre><span id="EXCEPTIONNo_login"><span class="keyword">exception</span> No_login</span></pre>
<div class="info ">
The server refused to accept a login attemp (bad user name or password?).<br>
</div>
<pre><span id="EXCEPTIONSocket"><span class="keyword">exception</span> Socket</span></pre>
<div class="info ">
An error occured while sending or receiving data.<br>
</div>
<pre><span id="EXCEPTIONMalloc"><span class="keyword">exception</span> Malloc</span></pre>
<div class="info ">
A problem occured while trying to allocate memory (no more memory left?). This exception could be raised by most of the functions.<br>
</div>
<pre><span id="EXCEPTIONMetadata"><span class="keyword">exception</span> Metadata</span></pre>
<div class="info ">
An error occured while updating the metadatas on the server.<br>
</div>
<pre><span id="EXCEPTIONConnected"><span class="keyword">exception</span> Connected</span></pre>
<div class="info ">
We are connected to a server.<br>
</div>
<pre><span id="EXCEPTIONUnconnected"><span class="keyword">exception</span> Unconnected</span></pre>
<div class="info ">
We are not connected to a server.<br>
</div>
<pre><span id="EXCEPTIONUnsupported"><span class="keyword">exception</span> Unsupported</span></pre>
<div class="info ">
The operation is not supported.<br>
</div>
<pre><span id="EXCEPTIONSend_error"><span class="keyword">exception</span> Send_error</span></pre>
<div class="info ">
An error occured while sending data.<br>
</div>
<pre><code><span id="TYPEdata_format"><span class="keyword">type</span> <code class="type"></code>data_format</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTdata_format.Format_vorbis"><span class="constructor">Format_vorbis</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
ogg / vorbis<br>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTdata_format.Format_mp3"><span class="constructor">Format_mp3</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
mp3<br>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
<div class="info ">
Format of audio data.<br>
</div>
<pre><code><span id="TYPEprotocol"><span class="keyword">type</span> <code class="type"></code>protocol</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTprotocol.Protocol_http"><span class="constructor">Protocol_http</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
http<br>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTprotocol.Protocol_xaudiocast"><span class="constructor">Protocol_xaudiocast</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
audiocast<br>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTprotocol.Protocol_icy"><span class="constructor">Protocol_icy</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
shoutcast<br>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
<div class="info ">
Kind of protocol to use.<br>
</div>
<br>
<h1 id="1_Initializationandcreationfunctions">Initialization and creation functions.</h1><br>
<pre><span id="VALinit"><span class="keyword">val</span> init</span> : <code class="type">unit -> unit</code></pre><div class="info ">
Initialize the shout library. Must be called before anything else.<br>
</div>
<pre><span id="VALshutdown"><span class="keyword">val</span> shutdown</span> : <code class="type">unit -> unit</code></pre><div class="info ">
Shut down the shout library, deallocating any global storage. Don't call anything afterwards. This function should be called after having finished to use the shout library.<br>
</div>
<pre><span id="VALversion"><span class="keyword">val</span> version</span> : <code class="type">unit -> string * int * int * int</code></pre><div class="info ">
Get a version string as well as the value of the library major, minor, and patch levels, respectively.<br>
</div>
<pre><span id="VALget_error"><span class="keyword">val</span> get_error</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Get a string describing the last shout error to occur. Only valid until the next call to a <code class="code">Shout</code> function.<br>
</div>
<pre><span id="VALget_errno"><span class="keyword">val</span> get_errno</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> int</code></pre><div class="info ">
Get the number of the last error.<br>
</div>
<pre><span id="VALnew_shout"><span class="keyword">val</span> new_shout</span> : <code class="type">unit -> <a href="Shout.html#TYPEshout">shout</a></code></pre><div class="info ">
Create a new <code class="code">shout</code> value.<br>
</div>
<pre><span id="VALis_connected"><span class="keyword">val</span> is_connected</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> bool</code></pre><div class="info ">
Am I connected to a shoutcast server?<br>
</div>
<br>
<h1 id="1_Settingandretrievingpreliminaryparameters">Setting and retrieving preliminary parameters.</h1><br>
<br>
The following parameters may be set only <i>before</i> calling <code class="code">open_shout</code>. They might raise the <code class="code">Malloc</code> exception or the <code class="code">Connected</code> exception when attempting to change a connection attribute while the connection is open.<br>
<br>
<h2 id="2_Connectionparameters">Connection parameters</h2><br>
<pre><span id="VALset_host"><span class="keyword">val</span> set_host</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Set the server's hostname or ip address (default: localhost).<br>
</div>
<pre><span id="VALget_host"><span class="keyword">val</span> get_host</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the server's hostname or ip address.<br>
</div>
<pre><span id="VALset_port"><span class="keyword">val</span> set_port</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> int -> unit</code></pre><div class="info ">
Set the server's port (default: 8000).<br>
</div>
<pre><span id="VALget_port"><span class="keyword">val</span> get_port</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> int</code></pre><div class="info ">
Retrieve the server's port.<br>
</div>
<pre><span id="VALset_user"><span class="keyword">val</span> set_user</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Set the user to authenticate as (default: source).<br>
</div>
<pre><span id="VALget_user"><span class="keyword">val</span> get_user</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the user to authenticate as.<br>
</div>
<pre><span id="VALset_password"><span class="keyword">val</span> set_password</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Set the password to authenticate the server with.<br>
</div>
<pre><span id="VALget_password"><span class="keyword">val</span> get_password</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the server's password.<br>
</div>
<pre><span id="VALset_protocol"><span class="keyword">val</span> set_protocol</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> <a href="Shout.html#TYPEprotocol">protocol</a> -> unit</code></pre><div class="info ">
Set the protocol to connect to the server with (default: Protocol_http).<br>
</div>
<pre><span id="VALget_protocol"><span class="keyword">val</span> get_protocol</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> <a href="Shout.html#TYPEprotocol">protocol</a></code></pre><div class="info ">
Retrieve the protocol used to connect to the server.<br>
</div>
<pre><span id="VALset_format"><span class="keyword">val</span> set_format</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> <a href="Shout.html#TYPEdata_format">data_format</a> -> unit</code></pre><div class="info ">
Set the stream's audio format (default: Format_vorbis).<br>
</div>
<pre><span id="VALget_format"><span class="keyword">val</span> get_format</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> <a href="Shout.html#TYPEdata_format">data_format</a></code></pre><div class="info ">
Retrieve the stream's audio format.<br>
</div>
<pre><span id="VALset_mount"><span class="keyword">val</span> set_mount</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Set the the mountpoint (not supported by the <code class="code">Protocol_icy</code> protocol).<br>
</div>
<pre><span id="VALget_mount"><span class="keyword">val</span> get_mount</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the mountpoint.<br>
</div>
<pre><span id="VALset_dumpfile"><span class="keyword">val</span> set_dumpfile</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Request that your stream be archived on the server under the specified name.<br>
</div>
<pre><span id="VALget_dumpfile"><span class="keyword">val</span> get_dumpfile</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the dumpfile name.<br>
</div>
<pre><span id="VALset_agent"><span class="keyword">val</span> set_agent</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Set the user agent header (default: libshout/VERSION).<br>
</div>
<pre><span id="VALget_agent"><span class="keyword">val</span> get_agent</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the user agent header.<br>
</div>
<br>
<h2 id="2_Directoryparametersoptionnal">Directory parameters (optionnal)</h2><br>
<pre><span id="VALset_public"><span class="keyword">val</span> set_public</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> bool -> unit</code></pre><div class="info ">
Should we ask the server to list the stream in any directories it knows about (default: <code class="code">false</code>)?<br>
</div>
<pre><span id="VALget_public"><span class="keyword">val</span> get_public</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> bool</code></pre><div class="info ">
Should we ask the server to list the stream in any directories it knows about?<br>
</div>
<pre><span id="VALset_name"><span class="keyword">val</span> set_name</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Set the name of the stream.<br>
</div>
<pre><span id="VALget_name"><span class="keyword">val</span> get_name</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the name of the stream.<br>
</div>
<pre><span id="VALset_url"><span class="keyword">val</span> set_url</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Set the url of a site about this stream.<br>
</div>
<pre><span id="VALget_url"><span class="keyword">val</span> get_url</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the url of a site about this stream.<br>
</div>
<pre><span id="VALset_genre"><span class="keyword">val</span> set_genre</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Set the stream genre.<br>
</div>
<pre><span id="VALget_genre"><span class="keyword">val</span> get_genre</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the stream genre.<br>
</div>
<pre><span id="VALset_description"><span class="keyword">val</span> set_description</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Set the stream description.<br>
</div>
<pre><span id="VALget_description"><span class="keyword">val</span> get_description</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the stream description.<br>
</div>
<pre><span id="VALset_audio_info"><span class="keyword">val</span> set_audio_info</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> string -> unit</code></pre><div class="info ">
<code class="code">set_audio_info shout name value</code> sets the stream audio parameter <code class="code">name</code> to the value <code class="code">value</code>.<br>
</div>
<pre><span id="VALget_audio_info"><span class="keyword">val</span> get_audio_info</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> string</code></pre><div class="info ">
Retrieve a stream audio parameter.<br>
</div>
<br>
<h2 id="2_Multicasting">Multicasting</h2><br>
<pre><span id="VALset_multicast_ip"><span class="keyword">val</span> set_multicast_ip</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Set the ip for multicasting the stream.<br>
</div>
<pre><span id="VALget_multicast_ip"><span class="keyword">val</span> get_multicast_ip</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string</code></pre><div class="info ">
Retrieve the ip for multicasting the stream.<br>
</div>
<br>
<h1 id="1_Managingtheconnectionandsendingdata">Managing the connection and sending data.</h1><br>
<pre><span id="VALopen_shout"><span class="keyword">val</span> open_shout</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> unit</code></pre><div class="info ">
Open a connection to the server. All parameters must already be set.<br>
<b>Raises</b><ul><li><code>Insane</code> if host, port or password is unset.</li>
<li><code>Connected</code> if the connection has already been opened.</li>
<li><code>Unsupported</code> if the protocol / format combination is unsupported (e.g. ogg / vobis may only be sent via the http protocol).</li>
<li><code>No_connect</code> if a connection to the server could not be established.</li>
<li><code>Socket</code> if an error occured while talking to the server.</li>
<li><code>No_login</code> if the server refused login (authentication failed).</li>
</ul>
</div>
<pre><span id="VALclose"><span class="keyword">val</span> close</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> unit</code></pre><div class="info ">
Close a connection to the server.<br>
<b>Raises</b> <code>Unconnected</code> if the <code class="code">shout</code> value is not currently connected.<br>
</div>
<pre><span id="VALsend"><span class="keyword">val</span> send</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> unit</code></pre><div class="info ">
Send data to the server, parsing it for format specific timing info.<br>
<b>Raises</b><ul><li><code>Unconnected</code> if the <code class="code">shout</code> value is not currently connected.</li>
<li><code>Socket</code> if an error occured while talking to the server.</li>
</ul>
</div>
<pre><span id="VALsend_raw"><span class="keyword">val</span> send_raw</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> string -> int</code></pre><div class="info ">
<span class="warning">Deprecated.</span>Send unparsed data to the server. Do not use this unless you know what you are doing.<br>
<b>Raises</b><ul><li><code>Unconnected</code> if the <code class="code">shout</code> value is not currently connected.</li>
<li><code>Socket</code> if an error occured while talking to the server.</li>
</ul>
<b>Returns</b> the number of bytes written.<br>
</div>
<pre><span id="VALsync"><span class="keyword">val</span> sync</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> unit</code></pre><div class="info ">
Put caller to sleep until it is time to send more data to the server. Should be called before every call to <code class="code">send</code> (the function <code class="code">delay</code> could also be used to determine the amout of time the caller should wait before sendig data).<br>
</div>
<pre><span id="VALdelay"><span class="keyword">val</span> delay</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> int</code></pre><div class="info ">
Amount of time in miliseconds caller should wait before sending again.<br>
</div>
<pre><span id="VALset_metadata"><span class="keyword">val</span> set_metadata</span> : <code class="type"><a href="Shout.html#TYPEshout">shout</a> -> (string * string) array -> unit</code></pre><div class="info ">
Set metadata for mp3 streams.<br>
<b>Raises</b><ul><li><code>No_connect</code> if the server refused the connection attempt.</li>
<li><code>No_login</code> if the server did not accept your authorization credentials.</li>
<li><code>Socket</code> if an error occured talking to the server.</li>
<li><code>Unsupported</code> if the format is not mp3.</li>
<li><code>Metadata</code> if an other error happened (e.g. bad mount point).</li>
</ul>
</div>
</body></html>
|