<!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/recv.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 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 List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>mpd/recv.h File Reference</h1> <p>MPD client library. <a href="#_details">More...</a></p> <p><a href="recv_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__pair.html">mpd_pair</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="recv_8h.html#a339f7c67c5527c9b34e0ed31a640dca7">mpd_recv_pair</a> (struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">mpd_malloc struct <a class="el" href="structmpd__pair.html">mpd_pair</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="recv_8h.html#aa7a5a26852b97f72c9f31fa742f6b7eb">mpd_recv_pair_named</a> (struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection, const char *name)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="recv_8h.html#ac86994a4fdd677e8d3e4aec23c6a865f">mpd_return_pair</a> (struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection, struct <a class="el" href="structmpd__pair.html">mpd_pair</a> *pair)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="recv_8h.html#a008aed23e8f62b29e5eaf42b901c9fe6">mpd_enqueue_pair</a> (struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection, struct <a class="el" href="structmpd__pair.html">mpd_pair</a> *pair)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>MPD client library. </p> <p>Receiving response lines from MPD.</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="recv_8h_source.html">recv.h</a>.</p> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a008aed23e8f62b29e5eaf42b901c9fe6"></a><!-- doxytag: member="recv.h::mpd_enqueue_pair" ref="a008aed23e8f62b29e5eaf42b901c9fe6" args="(struct mpd_connection *connection, struct mpd_pair *pair)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mpd_enqueue_pair </td> <td>(</td> <td class="paramtype">struct <a class="el" href="structmpd__connection.html">mpd_connection</a> * </td> <td class="paramname"> <em>connection</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct <a class="el" href="structmpd__pair.html">mpd_pair</a> * </td> <td class="paramname"> <em>pair</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Unreads a <a class="el" href="structmpd__pair.html">mpd_pair</a>. You may unread only the one pair you just got from <a class="el" href="recv_8h.html#a339f7c67c5527c9b34e0ed31a640dca7">mpd_recv_pair()</a>. Unreading the "NULL" pair is allowed, to allow you to call <a class="el" href="recv_8h.html#a339f7c67c5527c9b34e0ed31a640dca7">mpd_recv_pair()</a> again at the end of a response. </p> </div> </div> <a class="anchor" id="a339f7c67c5527c9b34e0ed31a640dca7"></a><!-- doxytag: member="recv.h::mpd_recv_pair" ref="a339f7c67c5527c9b34e0ed31a640dca7" args="(struct mpd_connection *connection)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">mpd_malloc struct <a class="el" href="structmpd__pair.html">mpd_pair</a>* mpd_recv_pair </td> <td>(</td> <td class="paramtype">struct <a class="el" href="structmpd__connection.html">mpd_connection</a> * </td> <td class="paramname"> <em>connection</em></td> <td> ) </td> <td><code> [read]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Reads the next <a class="el" href="structmpd__pair.html">mpd_pair</a> from the server. Returns NULL if there are no more pairs.</p> <p>The caller must dispose the pair with either <a class="el" href="recv_8h.html#ac86994a4fdd677e8d3e4aec23c6a865f">mpd_return_pair()</a> or <a class="el" href="recv_8h.html#a008aed23e8f62b29e5eaf42b901c9fe6">mpd_enqueue_pair()</a>. </p> </div> </div> <a class="anchor" id="aa7a5a26852b97f72c9f31fa742f6b7eb"></a><!-- doxytag: member="recv.h::mpd_recv_pair_named" ref="aa7a5a26852b97f72c9f31fa742f6b7eb" args="(struct mpd_connection *connection, const char *name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">mpd_malloc struct <a class="el" href="structmpd__pair.html">mpd_pair</a>* mpd_recv_pair_named </td> <td>(</td> <td class="paramtype">struct <a class="el" href="structmpd__connection.html">mpd_connection</a> * </td> <td class="paramname"> <em>connection</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [read]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Same as <a class="el" href="recv_8h.html#a339f7c67c5527c9b34e0ed31a640dca7">mpd_recv_pair()</a>, but discards all pairs not matching the specified name. </p> </div> </div> <a class="anchor" id="ac86994a4fdd677e8d3e4aec23c6a865f"></a><!-- doxytag: member="recv.h::mpd_return_pair" ref="ac86994a4fdd677e8d3e4aec23c6a865f" args="(struct mpd_connection *connection, struct mpd_pair *pair)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void mpd_return_pair </td> <td>(</td> <td class="paramtype">struct <a class="el" href="structmpd__connection.html">mpd_connection</a> * </td> <td class="paramname"> <em>connection</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct <a class="el" href="structmpd__pair.html">mpd_pair</a> * </td> <td class="paramname"> <em>pair</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Indicates that the pair object is not needed anymore, and can be freed. You must free the previous <a class="el" href="structmpd__pair.html">mpd_pair</a> object before calling <a class="el" href="recv_8h.html#a339f7c67c5527c9b34e0ed31a640dca7">mpd_recv_pair()</a> again. </p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Sun Aug 8 15:52:35 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>