Sophie

Sophie

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

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/entity.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/entity.h File Reference</h1>
<p>MPD client library.  
<a href="#_details">More...</a></p>

<p><a href="entity_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>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397ed">mpd_entity_type</a> { <a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397eda3c216464a1905cd350e91ad7e49c282c">MPD_ENTITY_TYPE_UNKNOWN</a>, 
<a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397eda68df75591c252d4151b1ce2ce2b39dbd">MPD_ENTITY_TYPE_DIRECTORY</a>, 
<a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397eda4c787eea2ad92f45448c6f6a0258ecc1">MPD_ENTITY_TYPE_SONG</a>, 
<a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397edaaea49285dc75e0052c45eab74b872c9d">MPD_ENTITY_TYPE_PLAYLIST</a>
 }</td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="entity_8h.html#aa331a1d77209ccd86d2f69b0caf9925a">mpd_entity_free</a> (struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *entity)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure enum <a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397ed">mpd_entity_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="entity_8h.html#a76161953b2cae7cf8f13389d3d5324ca">mpd_entity_get_type</a> (const struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *entity)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure struct <a class="el" href="structmpd__directory.html">mpd_directory</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="entity_8h.html#aabf146d3191a918ff4e4ae6a8d659c13">mpd_entity_get_directory</a> (const struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *entity)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure struct <a class="el" href="structmpd__song.html">mpd_song</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="entity_8h.html#af77a940652214960dde6810ad7d66008">mpd_entity_get_song</a> (const struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *entity)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_pure struct <a class="el" href="structmpd__playlist.html">mpd_playlist</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="entity_8h.html#a7253d83fc28de301819571d4f7db1c93">mpd_entity_get_playlist</a> (const struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *entity)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_malloc struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="entity_8h.html#a5d6e462411f3e46ea319e1690060ea34">mpd_entity_begin</a> (const struct <a class="el" href="structmpd__pair.html">mpd_pair</a> *pair)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="entity_8h.html#aafd1393de30af8d272208675e3577bcf">mpd_entity_feed</a> (struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *entity, const struct <a class="el" href="structmpd__pair.html">mpd_pair</a> *pair)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">mpd_malloc struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="entity_8h.html#a274a62a5d9d73ce63c509aa8c7eadc6d">mpd_recv_entity</a> (struct <a class="el" href="structmpd__connection.html">mpd_connection</a> *connection)</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="entity_8h_source.html">entity.h</a>.</p>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="a8c8b1c54c845de5fc64e99be73e397ed"></a><!-- doxytag: member="entity.h::mpd_entity_type" ref="a8c8b1c54c845de5fc64e99be73e397ed" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397ed">mpd_entity_type</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The type of a <a class="el" href="structmpd__entity.html">mpd_entity</a> object. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a8c8b1c54c845de5fc64e99be73e397eda3c216464a1905cd350e91ad7e49c282c"></a><!-- doxytag: member="MPD_ENTITY_TYPE_UNKNOWN" ref="a8c8b1c54c845de5fc64e99be73e397eda3c216464a1905cd350e91ad7e49c282c" args="" -->MPD_ENTITY_TYPE_UNKNOWN</em>&nbsp;</td><td>
<p>The type of the entity received from MPD is not implemented in this version of libmpdclient. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a8c8b1c54c845de5fc64e99be73e397eda68df75591c252d4151b1ce2ce2b39dbd"></a><!-- doxytag: member="MPD_ENTITY_TYPE_DIRECTORY" ref="a8c8b1c54c845de5fc64e99be73e397eda68df75591c252d4151b1ce2ce2b39dbd" args="" -->MPD_ENTITY_TYPE_DIRECTORY</em>&nbsp;</td><td>
<p>A directory (<a class="el" href="structmpd__directory.html">mpd_directory</a>) containing more entities. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a8c8b1c54c845de5fc64e99be73e397eda4c787eea2ad92f45448c6f6a0258ecc1"></a><!-- doxytag: member="MPD_ENTITY_TYPE_SONG" ref="a8c8b1c54c845de5fc64e99be73e397eda4c787eea2ad92f45448c6f6a0258ecc1" args="" -->MPD_ENTITY_TYPE_SONG</em>&nbsp;</td><td>
<p>A song file (<a class="el" href="structmpd__song.html">mpd_song</a>) which can be added to the playlist. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a8c8b1c54c845de5fc64e99be73e397edaaea49285dc75e0052c45eab74b872c9d"></a><!-- doxytag: member="MPD_ENTITY_TYPE_PLAYLIST" ref="a8c8b1c54c845de5fc64e99be73e397edaaea49285dc75e0052c45eab74b872c9d" args="" -->MPD_ENTITY_TYPE_PLAYLIST</em>&nbsp;</td><td>
<p>A stored playlist (<a class="el" href="structmpd__playlist.html">mpd_playlist</a>). </p>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="entity_8h_source.html#l00052">52</a> of file <a class="el" href="entity_8h_source.html">entity.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a5d6e462411f3e46ea319e1690060ea34"></a><!-- doxytag: member="entity.h::mpd_entity_begin" ref="a5d6e462411f3e46ea319e1690060ea34" args="(const struct mpd_pair *pair)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_malloc struct <a class="el" href="structmpd__entity.html">mpd_entity</a>* mpd_entity_begin </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__pair.html">mpd_pair</a> *&nbsp;</td>
          <td class="paramname"> <em>pair</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Begins parsing a new entity.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pair</em>&nbsp;</td><td>the first pair in this entity </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the new <a class="el" href="structmpd__entity.html">mpd_entity</a> object, or NULL on error (out of memory) </dd></dl>

</div>
</div>
<a class="anchor" id="aafd1393de30af8d272208675e3577bcf"></a><!-- doxytag: member="entity.h::mpd_entity_feed" ref="aafd1393de30af8d272208675e3577bcf" args="(struct mpd_entity *entity, const struct mpd_pair *pair)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool mpd_entity_feed </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *&nbsp;</td>
          <td class="paramname"> <em>entity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct <a class="el" href="structmpd__pair.html">mpd_pair</a> *&nbsp;</td>
          <td class="paramname"> <em>pair</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Parses the pair, adding its information to the specified <a class="el" href="structmpd__entity.html">mpd_entity</a> object.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the pair was parsed and added to the entity (or if the pair was not understood and ignored), false if this pair is the beginning of the next entity </dd></dl>

</div>
</div>
<a class="anchor" id="aa331a1d77209ccd86d2f69b0caf9925a"></a><!-- doxytag: member="entity.h::mpd_entity_free" ref="aa331a1d77209ccd86d2f69b0caf9925a" args="(struct mpd_entity *entity)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mpd_entity_free </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *&nbsp;</td>
          <td class="paramname"> <em>entity</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Releases an entity. This also frees the wrapped object. </p>

</div>
</div>
<a class="anchor" id="aabf146d3191a918ff4e4ae6a8d659c13"></a><!-- doxytag: member="entity.h::mpd_entity_get_directory" ref="aabf146d3191a918ff4e4ae6a8d659c13" args="(const struct mpd_entity *entity)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure struct <a class="el" href="structmpd__directory.html">mpd_directory</a>* mpd_entity_get_directory </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *&nbsp;</td>
          <td class="paramname"> <em>entity</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Obtains a pointer to the <a class="el" href="structmpd__directory.html">mpd_directory</a> object enclosed by this <a class="el" href="structmpd__entity.html">mpd_entity</a>. Calling this function is only allowed of <a class="el" href="entity_8h.html#a76161953b2cae7cf8f13389d3d5324ca">mpd_entity_get_type()</a> has returned <a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397eda68df75591c252d4151b1ce2ce2b39dbd">MPD_ENTITY_TYPE_DIRECTORY</a>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the directory object </dd></dl>

</div>
</div>
<a class="anchor" id="a7253d83fc28de301819571d4f7db1c93"></a><!-- doxytag: member="entity.h::mpd_entity_get_playlist" ref="a7253d83fc28de301819571d4f7db1c93" args="(const struct mpd_entity *entity)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure struct <a class="el" href="structmpd__playlist.html">mpd_playlist</a>* mpd_entity_get_playlist </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *&nbsp;</td>
          <td class="paramname"> <em>entity</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Obtains a pointer to the <a class="el" href="structmpd__playlist.html">mpd_playlist</a> object enclosed by this <a class="el" href="structmpd__entity.html">mpd_entity</a>. Calling this function is only allowed of <a class="el" href="entity_8h.html#a76161953b2cae7cf8f13389d3d5324ca">mpd_entity_get_type()</a> has returned <a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397edaaea49285dc75e0052c45eab74b872c9d">MPD_ENTITY_TYPE_PLAYLIST</a>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the directory object </dd></dl>

</div>
</div>
<a class="anchor" id="af77a940652214960dde6810ad7d66008"></a><!-- doxytag: member="entity.h::mpd_entity_get_song" ref="af77a940652214960dde6810ad7d66008" args="(const struct mpd_entity *entity)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure struct <a class="el" href="structmpd__song.html">mpd_song</a>* mpd_entity_get_song </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *&nbsp;</td>
          <td class="paramname"> <em>entity</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [read]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Obtains a pointer to the <a class="el" href="structmpd__song.html">mpd_song</a> object enclosed by this <a class="el" href="structmpd__entity.html">mpd_entity</a>. Calling this function is only allowed of <a class="el" href="entity_8h.html#a76161953b2cae7cf8f13389d3d5324ca">mpd_entity_get_type()</a> has returned <a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397eda4c787eea2ad92f45448c6f6a0258ecc1">MPD_ENTITY_TYPE_SONG</a>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the song object </dd></dl>

</div>
</div>
<a class="anchor" id="a76161953b2cae7cf8f13389d3d5324ca"></a><!-- doxytag: member="entity.h::mpd_entity_get_type" ref="a76161953b2cae7cf8f13389d3d5324ca" args="(const struct mpd_entity *entity)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mpd_pure enum <a class="el" href="entity_8h.html#a8c8b1c54c845de5fc64e99be73e397ed">mpd_entity_type</a> mpd_entity_get_type </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structmpd__entity.html">mpd_entity</a> *&nbsp;</td>
          <td class="paramname"> <em>entity</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd>the type of this entity. </dd></dl>

</div>
</div>
<a class="anchor" id="a274a62a5d9d73ce63c509aa8c7eadc6d"></a><!-- doxytag: member="entity.h::mpd_recv_entity" ref="a274a62a5d9d73ce63c509aa8c7eadc6d" 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__entity.html">mpd_entity</a>* mpd_recv_entity </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>Receives the next entity from the MPD server.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>an entity object, or NULL on error or if the entity list is finished </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>