Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > by-pkgid > 110b7614098f68585a9812e7161c059a > files > 55

libmpdclient-devel-2.3-1mdv2011.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libmpdclient: mpd/connection.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>mpd/connection.h File Reference</h1>
<p>MPD client library.  
<a href="#_details">More...</a></p>

<p><a href="connection_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_malloc struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a3a5a53bf430ef9e698e72cc629712ebb">mpd_connection_new</a> (const char *host, unsigned port, unsigned timeout_ms)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_malloc struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a50d6f780683dcb4e03cff0986ff0ab1b">mpd_connection_new_async</a> (struct <a class="el" href="structmpd__async.html">mpd_async</a> *async, const char *welcome)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a59ccf4577a19ad7829dbdc18186b0218">mpd_connection_free</a> (struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#aba4d70da6e9fb8508008281c725e275f">mpd_connection_set_timeout</a> (struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection, unsigned timeout_ms)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a7bb008d200c6ec1a92d834f03060d154">mpd_connection_get_fd</a> (const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure struct <a class="el" href="structmpd__async.html">mpd_async</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a8ac8e8973c900cb25da20a2b2061b605">mpd_connection_get_async</a> (struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure enum <a class="el" href="error_8h.html#a89d9378b765eea5f82efd3cbb20b74e4">mpd_error</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a9da4d1e881a20fc06ce0b1efbb27ea97">mpd_connection_get_error</a> (const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a64f743c163557f19d2274ab3ae0f8c7d">mpd_connection_get_error_message</a> (const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure enum <a class="el" href="protocol_8h.html#ae6a8b8b538b04a5fc22a063f83634c84">mpd_server_error</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a8f7565ce766170d5ece48a0ab249f875">mpd_connection_get_server_error</a> (const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a9e043de340aca8680fc171b37b6def5a">mpd_connection_get_system_error</a> (const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#ae920ded4cf6bc611230f8b67937c7bfd">mpd_connection_clear_error</a> (struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure const unsigned *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a808b3a4818107fbf97a7c99ec42acca3">mpd_connection_get_server_version</a> (const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="connection_8h.html#a214b8951f08eb57c486711ec524081c4">mpd_connection_cmp_server_version</a> (const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection, unsigned major, unsigned minor, unsigned patch)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>MPD client library. </p>
<p>Do not include this header directly. Use <a class="el" href="client_8h.html" title="MPD client library.">mpd/client.h</a> instead. </p>

<p>Definition in file <a class="el" href="connection_8h_source.html">connection.h</a>.</p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ae920ded4cf6bc611230f8b67937c7bfd"></a><!-- doxytag: member="connection.h::mpd_connection_clear_error" ref="ae920ded4cf6bc611230f8b67937c7bfd" args="(struct mpd_connection *connection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mpd_connection_clear_error </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Attempts to recover from an error condition. This function must be called after a non-fatal error before you can continue using this object.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, false if the error is fatal and cannot be recovered </dd></dl>

</div>
</div>
<a class="anchor" id="a214b8951f08eb57c486711ec524081c4"></a><!-- doxytag: member="connection.h::mpd_connection_cmp_server_version" ref="a214b8951f08eb57c486711ec524081c4" args="(const struct mpd_connection *connection, unsigned major, unsigned minor, unsigned patch)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure int mpd_connection_cmp_server_version </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>major</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>minor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>patch</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Compares the MPD protocol version with the specified triple.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>-1 if the server is older, 1 if it is newer, 0 if it is equal </dd></dl>

</div>
</div>
<a class="anchor" id="a59ccf4577a19ad7829dbdc18186b0218"></a><!-- doxytag: member="connection.h::mpd_connection_free" ref="a59ccf4577a19ad7829dbdc18186b0218" args="(struct mpd_connection *connection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mpd_connection_free </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Close the connection and free all memory.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>connection</em>&nbsp;</td><td>the connection to MPD </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8ac8e8973c900cb25da20a2b2061b605"></a><!-- doxytag: member="connection.h::mpd_connection_get_async" ref="a8ac8e8973c900cb25da20a2b2061b605" args="(struct mpd_connection *connection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure struct <a class="el" href="structmpd__async.html">mpd_async</a>* mpd_connection_get_async </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the underlying <a class="el" href="structmpd__async.html">mpd_async</a> object. This can be used to send commands asynchronously. During an asynchronous command, you must not use synchronous <a class="el" href="structmpd__connection.html">mpd_connection</a> functions until the asynchronous response has been finished.</p>
<p>If an error occurs while using <a class="el" href="structmpd__async.html">mpd_async</a>, you must close the <a class="el" href="structmpd__connection.html">mpd_connection</a>. </p>

</div>
</div>
<a class="anchor" id="a9da4d1e881a20fc06ce0b1efbb27ea97"></a><!-- doxytag: member="connection.h::mpd_connection_get_error" ref="a9da4d1e881a20fc06ce0b1efbb27ea97" args="(const struct mpd_connection *connection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure enum <a class="el" href="error_8h.html#a89d9378b765eea5f82efd3cbb20b74e4">mpd_error</a> mpd_connection_get_error </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the libmpdclient error code. MPD_ERROR_SUCCESS means no error occurred. </p>

</div>
</div>
<a class="anchor" id="a64f743c163557f19d2274ab3ae0f8c7d"></a><!-- doxytag: member="connection.h::mpd_connection_get_error_message" ref="a64f743c163557f19d2274ab3ae0f8c7d" args="(const struct mpd_connection *connection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure const char* mpd_connection_get_error_message </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the human-readable (English) libmpdclient error message. Calling this function is only valid if an error really occurred. Check with <a class="el" href="connection_8h.html#a9da4d1e881a20fc06ce0b1efbb27ea97">mpd_connection_get_error()</a>.</p>
<p>For <a class="el" href="error_8h.html#a89d9378b765eea5f82efd3cbb20b74e4a49122c84c66c5a700e0bfa9d533b1701">MPD_ERROR_SERVER</a>, the error message is encoded in UTF-8. <a class="el" href="error_8h.html#a89d9378b765eea5f82efd3cbb20b74e4ab53446dd6be580a1ca61bef2b253f707">MPD_ERROR_SYSTEM</a> obtains its error message from the operating system, and thus the locale's character set (and probably language) is used. Keep that in mind when you print error messages. </p>

</div>
</div>
<a class="anchor" id="a7bb008d200c6ec1a92d834f03060d154"></a><!-- doxytag: member="connection.h::mpd_connection_get_fd" ref="a7bb008d200c6ec1a92d834f03060d154" args="(const struct mpd_connection *connection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure int mpd_connection_get_fd </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the file descriptor which should be polled by the caller. Do not use the file descriptor for anything except polling! The file descriptor never changes during the lifetime of this <a class="el" href="structmpd__connection.html">mpd_connection</a> object. </p>

</div>
</div>
<a class="anchor" id="a8f7565ce766170d5ece48a0ab249f875"></a><!-- doxytag: member="connection.h::mpd_connection_get_server_error" ref="a8f7565ce766170d5ece48a0ab249f875" args="(const struct mpd_connection *connection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure enum <a class="el" href="protocol_8h.html#ae6a8b8b538b04a5fc22a063f83634c84">mpd_server_error</a> mpd_connection_get_server_error </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the error code returned from the server. Calling this function is only valid if <a class="el" href="connection_8h.html#a9da4d1e881a20fc06ce0b1efbb27ea97">mpd_connection_get_error()</a> returned <a class="el" href="error_8h.html#a89d9378b765eea5f82efd3cbb20b74e4a49122c84c66c5a700e0bfa9d533b1701">MPD_ERROR_SERVER</a>. </p>

</div>
</div>
<a class="anchor" id="a808b3a4818107fbf97a7c99ec42acca3"></a><!-- doxytag: member="connection.h::mpd_connection_get_server_version" ref="a808b3a4818107fbf97a7c99ec42acca3" args="(const struct mpd_connection *connection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure const unsigned* mpd_connection_get_server_version </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns a three-tuple containing the major, minor and patch version of the MPD protocol. </p>

</div>
</div>
<a class="anchor" id="a9e043de340aca8680fc171b37b6def5a"></a><!-- doxytag: member="connection.h::mpd_connection_get_system_error" ref="a9e043de340aca8680fc171b37b6def5a" args="(const struct mpd_connection *connection)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure int mpd_connection_get_system_error </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the error code from the operating system; on most operating systems, this is the errno value. Calling this function is only valid if <a class="el" href="connection_8h.html#a9da4d1e881a20fc06ce0b1efbb27ea97">mpd_connection_get_error()</a> returned <a class="el" href="error_8h.html#a89d9378b765eea5f82efd3cbb20b74e4ab53446dd6be580a1ca61bef2b253f707">MPD_ERROR_SYSTEM</a>.</p>
<p>May be 0 if the operating system did not specify an error code. </p>

</div>
</div>
<a class="anchor" id="a3a5a53bf430ef9e698e72cc629712ebb"></a><!-- doxytag: member="connection.h::mpd_connection_new" ref="a3a5a53bf430ef9e698e72cc629712ebb" args="(const char *host, unsigned port, unsigned timeout_ms)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_malloc struct <a class="el" href="structmpd__connection.html">mpd_connection</a>* mpd_connection_new </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>timeout_ms</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Opens a new connection to a MPD server. Both the name server lookup and the connect() call are done synchronously. After this function has returned, you should check if the connection was successful with <a class="el" href="connection_8h.html#a9da4d1e881a20fc06ce0b1efbb27ea97">mpd_connection_get_error()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>host</em>&nbsp;</td><td>the server's host name, IP address or Unix socket path. If the resolver returns more than one IP address for a host name, this functions tries all of them until one accepts the connection. NULL is allowed here, which will connect to the default host (using the MPD_HOST environment variable if present). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>port</em>&nbsp;</td><td>the TCP port to connect to, 0 for default port (using the MPD_PORT environment variable if present). If "host" is a Unix socket path, this parameter is ignored. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout_ms</em>&nbsp;</td><td>the timeout in milliseconds, 0 for the default timeout (the environment variable MPD_TIMEOUT may specify a timeout in seconds); you may modify it later with <a class="el" href="connection_8h.html#aba4d70da6e9fb8508008281c725e275f">mpd_connection_set_timeout()</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a <a class="el" href="structmpd__connection.html">mpd_connection</a> object (which may have failed to connect), or NULL on out-of-memory </dd></dl>

</div>
</div>
<a class="anchor" id="a50d6f780683dcb4e03cff0986ff0ab1b"></a><!-- doxytag: member="connection.h::mpd_connection_new_async" ref="a50d6f780683dcb4e03cff0986ff0ab1b" args="(struct mpd_async *async, const char *welcome)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_malloc struct <a class="el" href="structmpd__connection.html">mpd_connection</a>* mpd_connection_new_async </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmpd__async.html">mpd_async</a> *&nbsp;</td>
          <td class="paramname"> <em>async</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>welcome</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a <a class="el" href="structmpd__connection.html">mpd_connection</a> object based on an existing asynchronous MPD connection. You should not continue to use the <a class="el" href="structmpd__async.html">mpd_async</a> object. Note that <a class="el" href="connection_8h.html#a59ccf4577a19ad7829dbdc18186b0218">mpd_connection_free()</a> also frees your <a class="el" href="structmpd__async.html">mpd_async</a> object!</p>
<p>This function does not block at all, which is why you have to pass the welcome message to it.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>async</em>&nbsp;</td><td>a <a class="el" href="structmpd__async.html">mpd_async</a> instance </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>welcome</em>&nbsp;</td><td>the first line sent by MPD (the welcome message) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a <a class="el" href="structmpd__connection.html">mpd_connection</a> object, or NULL on out-of-memory </dd></dl>

</div>
</div>
<a class="anchor" id="aba4d70da6e9fb8508008281c725e275f"></a><!-- doxytag: member="connection.h::mpd_connection_set_timeout" ref="aba4d70da6e9fb8508008281c725e275f" args="(struct mpd_connection *connection, unsigned timeout_ms)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mpd_connection_set_timeout </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *&nbsp;</td>
          <td class="paramname"> <em>connection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>timeout_ms</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the timeout for synchronous operations. If the MPD server does not send a response during this time span, the operation is aborted by libmpdclient.</p>
<p>The initial value is the one passed to <a class="el" href="connection_8h.html#a3a5a53bf430ef9e698e72cc629712ebb">mpd_connection_new()</a>. If you have used <a class="el" href="connection_8h.html#a50d6f780683dcb4e03cff0986ff0ab1b">mpd_connection_new_async()</a>, then the default value is 30 seconds.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>connection</em>&nbsp;</td><td>the connection to MPD </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout_ms</em>&nbsp;</td><td>the desired timeout in milliseconds; must not be 0 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Sun Aug 8 15:52:35 2010 for libmpdclient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>