<!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 Struct 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 Page</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>mpd_connection Struct Reference</h1><!-- doxytag: class="mpd_connection" --> <p><code>#include <<a class="el" href="connection_8h_source.html">connection.h</a>></code></p> <table border="0" cellpadding="0" cellspacing="0"> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>This opaque object represents a connection to a MPD server. Call <a class="el" href="connection_8h.html#a3a5a53bf430ef9e698e72cc629712ebb">mpd_connection_new()</a> to create a new instance. To free an instance, call <a class="el" href="connection_8h.html#a59ccf4577a19ad7829dbdc18186b0218">mpd_connection_free()</a>.</p> <p>Error handling: most functions return a "bool" indicating success or failure. In this case, you may query the nature of the error with the functions <a class="el" href="connection_8h.html#a9da4d1e881a20fc06ce0b1efbb27ea97">mpd_connection_get_error()</a>, <a class="el" href="connection_8h.html#a64f743c163557f19d2274ab3ae0f8c7d">mpd_connection_get_error_message()</a>, <a class="el" href="connection_8h.html#a8f7565ce766170d5ece48a0ab249f875">mpd_connection_get_server_error()</a>.</p> <p>Some errors can be cleared by calling mpd_clear_error(), like <a class="el" href="error_8h.html#a89d9378b765eea5f82efd3cbb20b74e4a49122c84c66c5a700e0bfa9d533b1701">MPD_ERROR_SERVER</a>, <a class="el" href="error_8h.html#a89d9378b765eea5f82efd3cbb20b74e4a6bcc7ea28e2e00e7ae09dbea84f0248c">MPD_ERROR_ARGUMENT</a>. Most others are fatal, and cannot be recovered, like <a class="el" href="error_8h.html#a89d9378b765eea5f82efd3cbb20b74e4a03c5af981ae791e3721f5378f32a67d5">MPD_ERROR_CLOSED</a> - mpd_clear_error() returns false.</p> <p>Some functions like <a class="el" href="recv_8h.html#a339f7c67c5527c9b34e0ed31a640dca7">mpd_recv_pair()</a> cannot differentiate between "end of response" and "error". If this function returns NULL, you have to check <a class="el" href="connection_8h.html#a9da4d1e881a20fc06ce0b1efbb27ea97">mpd_connection_get_error()</a>. </p> <p>Definition at line <a class="el" href="connection_8h_source.html#l00048">48</a> of file <a class="el" href="connection_8h_source.html">connection.h</a>.</p> <hr/>The documentation for this struct was generated from the following file:<ul> <li>mpd/<a class="el" href="connection_8h_source.html">connection.h</a></li> </ul> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Sun Aug 8 15:52:36 2010 for libmpdclient by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>