Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > f2adb5ed02e83f2c51981c1b15594e22 > files > 123

libnjb-devel-2.2.7-1.fc14.x86_64.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>libnjb: /builddir/build/BUILD/libnjb-2.2.7/src/songid.c 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.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libnjb&#160;<span id="projectnumber">2.2.7</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_55a6aa4feb4da29582c8781b5e808e47.html">src</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">songid.c File Reference</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="libnjb_8h_source.html">libnjb.h</a>&quot;</code><br/>
<code>#include &quot;base.h&quot;</code><br/>
<code>#include &quot;njb_error.h&quot;</code><br/>
<code>#include &quot;defs.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="protocol3_8h_source.html">protocol3.h</a>&quot;</code><br/>
<code>#include &quot;byteorder.h&quot;</code><br/>
<code>#include &quot;unicode.h&quot;</code><br/>
<code>#include &quot;songid.h&quot;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#a45b5269914f6344786abba0c71be9f9c">UNICODE_ON_NJB1</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#aca3add068262c65430b3ded8522391f4">FR_UNI_TITLE</a>&#160;&#160;&#160;&quot;UNI_TITLE&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#ad3f108464292f93a1d456dea47971d2e">FR_UNI_ALBUM</a>&#160;&#160;&#160;&quot;UNI_ALBUM&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#abe77c2c86a1e4bc8af488aacad287939">FR_UNI_GENRE</a>&#160;&#160;&#160;&quot;UNI_GENRE&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#a2b7618b982e8bc6a07c8a94fd76b83fd">FR_UNI_ARTIST</a>&#160;&#160;&#160;&quot;UNI_ARTIST&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#ae3eb27dfbd7ad393f3c379d01286c659">FR_UNI_FNAME</a>&#160;&#160;&#160;&quot;UNI_FNAME&quot;</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga78703030798af2be6808335c6542aa6d">NJB_Songid_New</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#ab4fd686d31cb66af604ab8cd1b285046">songid_unpack</a> (void *data, size_t nbytes)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#a1dcd88c13e7b209d9a5b6e31e71ff6e6">songid_pack</a> (<a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *song, u_int32_t *tagsize)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#a4a04f572c79d5f5c4b813ba8c1932f6b">songid_pack3</a> (<a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *song, u_int32_t *tagsize)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga0f78d8cde327dd995f7008935e295c37">NJB_Songid_Addframe</a> (<a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *song, <a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a> *frame)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga188d05568998e787366804565e9fcfb5">NJB_Songid_Destroy</a> (<a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *songid)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga8eada6cbbc26c6aa18f3c22a20d38756">NJB_Songid_Reset_Getframe</a> (<a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *song)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga0013c681283968bf65b564beb8109e5b">NJB_Songid_Getframe</a> (<a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *song)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#gae02110b5c20cddfcf92bbdbdeeef4039">NJB_Songid_Findframe</a> (<a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *song, const char *label)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#a4c7679ba70de1bdabcfe90c2e6308008">songid_sanity_check</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb, <a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *songid)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga0423c3d42d53466d75bb9bf903601285">NJB_Songid_Frame_New_String</a> (const char *label, const char *value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#gabcbe1903a855d72b5e2b933c041a98bf">NJB_Songid_Frame_New_Codec</a> (const char *value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga144e0f1fbe75bd301c62dcae56d9d3af">NJB_Songid_Frame_New_Uint16</a> (const char *label, u_int16_t value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga3d4fa0c440b4377a662ff986ba10cddf">NJB_Songid_Frame_New_Uint32</a> (const char *label, u_int32_t value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga3bb4c23e9166574fdb5f25d082a38b84">NJB_Songid_Frame_Destroy</a> (<a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a> *frame)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#a60db410c9e82d9e61b1bf0be607922ed">__sub_depth</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="songid_8c.html#ac04b373ed657c74d96015d8935eb57b0">njb_unicode_flag</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This file contains the functions that are used for manipulating all song/track metadata, such as artist, title etc. </p>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="ad3f108464292f93a1d456dea47971d2e"></a><!-- doxytag: member="songid.c::FR_UNI_ALBUM" ref="ad3f108464292f93a1d456dea47971d2e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FR_UNI_ALBUM&#160;&#160;&#160;&quot;UNI_ALBUM&quot;</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Unicode Album metadata for NJB1 </p>

<p>Referenced by <a class="el" href="songid_8c.html#a1dcd88c13e7b209d9a5b6e31e71ff6e6">songid_pack()</a>, and <a class="el" href="songid_8c.html#ab4fd686d31cb66af604ab8cd1b285046">songid_unpack()</a>.</p>

</div>
</div>
<a class="anchor" id="a2b7618b982e8bc6a07c8a94fd76b83fd"></a><!-- doxytag: member="songid.c::FR_UNI_ARTIST" ref="a2b7618b982e8bc6a07c8a94fd76b83fd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FR_UNI_ARTIST&#160;&#160;&#160;&quot;UNI_ARTIST&quot;</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Unicode Artist metadata for NJB1 </p>

<p>Referenced by <a class="el" href="songid_8c.html#a1dcd88c13e7b209d9a5b6e31e71ff6e6">songid_pack()</a>, and <a class="el" href="songid_8c.html#ab4fd686d31cb66af604ab8cd1b285046">songid_unpack()</a>.</p>

</div>
</div>
<a class="anchor" id="ae3eb27dfbd7ad393f3c379d01286c659"></a><!-- doxytag: member="songid.c::FR_UNI_FNAME" ref="ae3eb27dfbd7ad393f3c379d01286c659" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FR_UNI_FNAME&#160;&#160;&#160;&quot;UNI_FNAME&quot;</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Unicode Filename metadata for NJB1 (not used) </p>

<p>Referenced by <a class="el" href="songid_8c.html#ab4fd686d31cb66af604ab8cd1b285046">songid_unpack()</a>.</p>

</div>
</div>
<a class="anchor" id="abe77c2c86a1e4bc8af488aacad287939"></a><!-- doxytag: member="songid.c::FR_UNI_GENRE" ref="abe77c2c86a1e4bc8af488aacad287939" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FR_UNI_GENRE&#160;&#160;&#160;&quot;UNI_GENRE&quot;</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Unicode Genre metadata for NJB1 </p>

<p>Referenced by <a class="el" href="songid_8c.html#a1dcd88c13e7b209d9a5b6e31e71ff6e6">songid_pack()</a>, and <a class="el" href="songid_8c.html#ab4fd686d31cb66af604ab8cd1b285046">songid_unpack()</a>.</p>

</div>
</div>
<a class="anchor" id="aca3add068262c65430b3ded8522391f4"></a><!-- doxytag: member="songid.c::FR_UNI_TITLE" ref="aca3add068262c65430b3ded8522391f4" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FR_UNI_TITLE&#160;&#160;&#160;&quot;UNI_TITLE&quot;</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Unicode Title metadata for NJB1 </p>

<p>Referenced by <a class="el" href="songid_8c.html#a1dcd88c13e7b209d9a5b6e31e71ff6e6">songid_pack()</a>, and <a class="el" href="songid_8c.html#ab4fd686d31cb66af604ab8cd1b285046">songid_unpack()</a>.</p>

</div>
</div>
<a class="anchor" id="a45b5269914f6344786abba0c71be9f9c"></a><!-- doxytag: member="songid.c::UNICODE_ON_NJB1" ref="a45b5269914f6344786abba0c71be9f9c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UNICODE_ON_NJB1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>We want to use Unicode also on NJB1 </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a1dcd88c13e7b209d9a5b6e31e71ff6e6"></a><!-- doxytag: member="songid.c::songid_pack" ref="a1dcd88c13e7b209d9a5b6e31e71ff6e6" args="(njb_songid_t *song, u_int32_t *tagsize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char* songid_pack </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *&#160;</td>
          <td class="paramname"><em>song</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int32_t *&#160;</td>
          <td class="paramname"><em>tagsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This packs (serialize, marshal) a libnjb song ID into the raw byte structure used by the NJB1.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">song</td><td>the libnjb song ID to pack </td></tr>
    <tr><td class="paramname">tagsize</td><td>a pointer to an integer that will hold the size of the resulting NJB1 songid structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a newly allocated byte array holding the NJB1 representation of the song ID, the memory should be freed by the caller after use </dd></dl>

<p>References <a class="el" href="group__frames.html#gaba402c823bb371e7b431d9cbba30b5b6">FR_ALBUM</a>, <a class="el" href="group__frames.html#ga3e4027e1f9d6549b511a39c0e2d8a933">FR_ARTIST</a>, <a class="el" href="group__frames.html#ga2733ef8fe874c656f159a77b5a59caa0">FR_GENRE</a>, <a class="el" href="group__frames.html#gad7e2b385e092475e8f0e6e267f22a17a">FR_TITLE</a>, <a class="el" href="songid_8c.html#ad3f108464292f93a1d456dea47971d2e">FR_UNI_ALBUM</a>, <a class="el" href="songid_8c.html#a2b7618b982e8bc6a07c8a94fd76b83fd">FR_UNI_ARTIST</a>, <a class="el" href="songid_8c.html#abe77c2c86a1e4bc8af488aacad287939">FR_UNI_GENRE</a>, <a class="el" href="songid_8c.html#aca3add068262c65430b3ded8522391f4">FR_UNI_TITLE</a>, <a class="el" href="byteorder_8c.html#a922262997ca997a6645fb232e7d6c162">from_16bit_to_njb1_bytes()</a>, <a class="el" href="byteorder_8c.html#a8eb4ff18d984c00c4de64215e8ec56c3">from_32bit_to_njb1_bytes()</a>, <a class="el" href="structnjb__songid__frame__struct.html#af9f57e6c74f947c17062a2d2c56f7824">njb_songid_frame_struct::label</a>, <a class="el" href="structnjb__songid__struct.html#ac569874902b2e8896802993ba0537681">njb_songid_struct::nframes</a>, <a class="el" href="group__tagapi.html#ga0013c681283968bf65b564beb8109e5b">NJB_Songid_Getframe()</a>, <a class="el" href="group__tagapi.html#ga8eada6cbbc26c6aa18f3c22a20d38756">NJB_Songid_Reset_Getframe()</a>, <a class="el" href="group__frametypes.html#gafe891ec1f66cdc1675ddb6080ece5e55">NJB_TYPE_STRING</a>, <a class="el" href="group__frametypes.html#ga5e48833c174ba65895f372a69cc71c8a">NJB_TYPE_UINT16</a>, <a class="el" href="group__frametypes.html#gaca72fa1657385c37845e3b326938a047">NJB_TYPE_UINT32</a>, <a class="el" href="group__unicodeflags.html#ga388e9c70b7a684c777f6b25e2e9d801b">NJB_UC_UTF8</a>, <a class="el" href="unicode_8c.html#a7a77d04f2f0563c9c74d28fca28effdd">strtoucs2()</a>, <a class="el" href="structnjb__songid__frame__struct.html#a6983b7aebbbd036d67da513e85538086">njb_songid_frame_struct::strval</a>, <a class="el" href="structnjb__songid__frame__struct.html#a4f7af50a88a6ea9e9cc52bbed270ba8a">njb_songid_frame_struct::type</a>, <a class="el" href="structnjb__songid__frame__struct.html#a98d92535fac334896663dd3579aa1fd0">njb_songid_frame_struct::u_int16_val</a>, <a class="el" href="structnjb__songid__frame__struct.html#ac9afb2ea3fe140513fcaf6fca394b41d">njb_songid_frame_struct::u_int32_val</a>, <a class="el" href="unicode_8c.html#acd147761736f45b4282bebb6147c440a">ucs2strlen()</a>, and <a class="el" href="unicode_8c.html#a767008fdd0e78d87acbc7f1ad3bf4830">utf8tostr()</a>.</p>

<p>Referenced by <a class="el" href="group__tagapi.html#ga8714367c0e56b681b75a7c7af9b2b739">NJB_Replace_Track_Tag()</a>, and <a class="el" href="group__tagapi.html#gade6296b1920788ae715e8d57d50a9e8a">NJB_Send_Track()</a>.</p>

</div>
</div>
<a class="anchor" id="a4a04f572c79d5f5c4b813ba8c1932f6b"></a><!-- doxytag: member="songid.c::songid_pack3" ref="a4a04f572c79d5f5c4b813ba8c1932f6b" args="(njb_songid_t *song, u_int32_t *tagsize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char* songid_pack3 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *&#160;</td>
          <td class="paramname"><em>song</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int32_t *&#160;</td>
          <td class="paramname"><em>tagsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This packs (serialize, marshal) a libnjb song ID into the raw byte structure used by the series 3 devices.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">song</td><td>the libnjb song ID to pack </td></tr>
    <tr><td class="paramname">tagsize</td><td>a pointer to an integer that will hold the size of the resulting series 3 songid structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a newly allocated byte array holding the series 3 representation of the song ID, the memory should be freed by the caller after use </dd></dl>

<p>References <a class="el" href="group__frames.html#gaba402c823bb371e7b431d9cbba30b5b6">FR_ALBUM</a>, <a class="el" href="group__frames.html#ga3e4027e1f9d6549b511a39c0e2d8a933">FR_ARTIST</a>, <a class="el" href="group__frames.html#gaf9f498755e47084481558a730f59a45a">FR_CODEC</a>, <a class="el" href="group__frames.html#ga772dbf5abd5c80173ac0d4b0844a374b">FR_FNAME</a>, <a class="el" href="group__frames.html#gac14982fdb6b0635b025bd3199acf0022">FR_FOLDER</a>, <a class="el" href="group__frames.html#ga2733ef8fe874c656f159a77b5a59caa0">FR_GENRE</a>, <a class="el" href="group__frames.html#gab299e0f0ac80a5e1615323c7bb9a18f3">FR_LENGTH</a>, <a class="el" href="group__frames.html#ga15482a917e09a3475becd75072806c71">FR_PROTECTED</a>, <a class="el" href="group__frames.html#gab849d03c53f616a47612353a04f196f0">FR_SIZE</a>, <a class="el" href="group__frames.html#gad7e2b385e092475e8f0e6e267f22a17a">FR_TITLE</a>, <a class="el" href="group__frames.html#gabf384e2d13947adf0ffb5634e8363cef">FR_TRACK</a>, <a class="el" href="group__frames.html#ga9aa359c4f2a3fd9e9ecc42e072349b95">FR_YEAR</a>, <a class="el" href="byteorder_8c.html#a3cb7e2df65722e11213de39bb33c1e8e">from_16bit_to_njb3_bytes()</a>, <a class="el" href="byteorder_8c.html#a4380f8c5e2841f39c2f63ce44d64df59">from_32bit_to_njb3_bytes()</a>, <a class="el" href="structnjb__songid__frame__struct.html#af9f57e6c74f947c17062a2d2c56f7824">njb_songid_frame_struct::label</a>, <a class="el" href="structnjb__songid__struct.html#ac569874902b2e8896802993ba0537681">njb_songid_struct::nframes</a>, <a class="el" href="group__codecs.html#gad046249156dccee34e5896f481049e8b">NJB_CODEC_AA</a>, <a class="el" href="group__codecs.html#ga3cb63726f1021513c55a5c6cc838d44d">NJB_CODEC_MP3</a>, <a class="el" href="group__codecs.html#gab01b7a5aea0fe109eca4830c8e7c5d94">NJB_CODEC_WAV</a>, <a class="el" href="group__codecs.html#ga8c555bf122bfd1ff7f91f49431e689ca">NJB_CODEC_WMA</a>, <a class="el" href="group__tagapi.html#ga0013c681283968bf65b564beb8109e5b">NJB_Songid_Getframe()</a>, <a class="el" href="group__tagapi.html#ga8eada6cbbc26c6aa18f3c22a20d38756">NJB_Songid_Reset_Getframe()</a>, <a class="el" href="unicode_8c.html#a7a77d04f2f0563c9c74d28fca28effdd">strtoucs2()</a>, <a class="el" href="structnjb__songid__frame__struct.html#a6983b7aebbbd036d67da513e85538086">njb_songid_frame_struct::strval</a>, <a class="el" href="structnjb__songid__frame__struct.html#a98d92535fac334896663dd3579aa1fd0">njb_songid_frame_struct::u_int16_val</a>, and <a class="el" href="unicode_8c.html#acd147761736f45b4282bebb6147c440a">ucs2strlen()</a>.</p>

<p>Referenced by <a class="el" href="group__tagapi.html#ga8714367c0e56b681b75a7c7af9b2b739">NJB_Replace_Track_Tag()</a>, and <a class="el" href="group__tagapi.html#gade6296b1920788ae715e8d57d50a9e8a">NJB_Send_Track()</a>.</p>

</div>
</div>
<a class="anchor" id="a4c7679ba70de1bdabcfe90c2e6308008"></a><!-- doxytag: member="songid.c::songid_sanity_check" ref="a4c7679ba70de1bdabcfe90c2e6308008" args="(njb_t *njb, njb_songid_t *songid)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int songid_sanity_check </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnjb__struct.html">njb_t</a> *&#160;</td>
          <td class="paramname"><em>njb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *&#160;</td>
          <td class="paramname"><em>songid</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This function checks that a tag has all compulsory elements, i.e.: size, codec and track number</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">songid</td><td>the song ID to be checked for sanity </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if the tag is sane, -1 if it is insane </dd></dl>

<p>References <a class="el" href="group__frames.html#gaf9f498755e47084481558a730f59a45a">FR_CODEC</a>, <a class="el" href="group__frames.html#gab299e0f0ac80a5e1615323c7bb9a18f3">FR_LENGTH</a>, <a class="el" href="group__frames.html#ga15482a917e09a3475becd75072806c71">FR_PROTECTED</a>, <a class="el" href="group__frames.html#gab849d03c53f616a47612353a04f196f0">FR_SIZE</a>, <a class="el" href="group__frames.html#gad7e2b385e092475e8f0e6e267f22a17a">FR_TITLE</a>, <a class="el" href="group__frames.html#gabf384e2d13947adf0ffb5634e8363cef">FR_TRACK</a>, <a class="el" href="group__frames.html#ga9aa359c4f2a3fd9e9ecc42e072349b95">FR_YEAR</a>, <a class="el" href="structnjb__songid__frame__struct.html#af9f57e6c74f947c17062a2d2c56f7824">njb_songid_frame_struct::label</a>, <a class="el" href="group__codecs.html#ga3cb63726f1021513c55a5c6cc838d44d">NJB_CODEC_MP3</a>, <a class="el" href="group__codecs.html#gab01b7a5aea0fe109eca4830c8e7c5d94">NJB_CODEC_WAV</a>, <a class="el" href="group__codecs.html#ga8c555bf122bfd1ff7f91f49431e689ca">NJB_CODEC_WMA</a>, <a class="el" href="group__tagapi.html#ga0f78d8cde327dd995f7008935e295c37">NJB_Songid_Addframe()</a>, <a class="el" href="group__tagapi.html#ga0013c681283968bf65b564beb8109e5b">NJB_Songid_Getframe()</a>, <a class="el" href="group__tagapi.html#ga8eada6cbbc26c6aa18f3c22a20d38756">NJB_Songid_Reset_Getframe()</a>, <a class="el" href="group__frametypes.html#gafe891ec1f66cdc1675ddb6080ece5e55">NJB_TYPE_STRING</a>, <a class="el" href="group__frametypes.html#ga5e48833c174ba65895f372a69cc71c8a">NJB_TYPE_UINT16</a>, <a class="el" href="group__frametypes.html#gaca72fa1657385c37845e3b326938a047">NJB_TYPE_UINT32</a>, <a class="el" href="structnjb__songid__frame__struct.html#a6983b7aebbbd036d67da513e85538086">njb_songid_frame_struct::strval</a>, <a class="el" href="structnjb__songid__frame__struct.html#a4f7af50a88a6ea9e9cc52bbed270ba8a">njb_songid_frame_struct::type</a>, <a class="el" href="structnjb__songid__frame__struct.html#a98d92535fac334896663dd3579aa1fd0">njb_songid_frame_struct::u_int16_val</a>, and <a class="el" href="structnjb__songid__frame__struct.html#ac9afb2ea3fe140513fcaf6fca394b41d">njb_songid_frame_struct::u_int32_val</a>.</p>

<p>Referenced by <a class="el" href="group__tagapi.html#ga8714367c0e56b681b75a7c7af9b2b739">NJB_Replace_Track_Tag()</a>, and <a class="el" href="group__tagapi.html#gade6296b1920788ae715e8d57d50a9e8a">NJB_Send_Track()</a>.</p>

</div>
</div>
<a class="anchor" id="ab4fd686d31cb66af604ab8cd1b285046"></a><!-- doxytag: member="songid.c::songid_unpack" ref="ab4fd686d31cb66af604ab8cd1b285046" args="(void *data, size_t nbytes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnjb__songid__struct.html">njb_songid_t</a>* songid_unpack </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nbytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This takes a raw chunk of memory representing a song ID as used by the NJB1 and convert it into a song ID structure as used by libnjb.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>the raw bytes from the NJB1 </td></tr>
    <tr><td class="paramname">nbytes</td><td>the size of the NJB1 byte array </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a newly allocated song ID that shall be freed by the caller after use </dd></dl>

<p>References <a class="el" href="group__frames.html#gaba402c823bb371e7b431d9cbba30b5b6">FR_ALBUM</a>, <a class="el" href="group__frames.html#ga3e4027e1f9d6549b511a39c0e2d8a933">FR_ARTIST</a>, <a class="el" href="group__frames.html#ga772dbf5abd5c80173ac0d4b0844a374b">FR_FNAME</a>, <a class="el" href="group__frames.html#ga2733ef8fe874c656f159a77b5a59caa0">FR_GENRE</a>, <a class="el" href="group__frames.html#gab299e0f0ac80a5e1615323c7bb9a18f3">FR_LENGTH</a>, <a class="el" href="group__frames.html#gad7e2b385e092475e8f0e6e267f22a17a">FR_TITLE</a>, <a class="el" href="group__frames.html#gabf384e2d13947adf0ffb5634e8363cef">FR_TRACK</a>, <a class="el" href="songid_8c.html#ad3f108464292f93a1d456dea47971d2e">FR_UNI_ALBUM</a>, <a class="el" href="songid_8c.html#a2b7618b982e8bc6a07c8a94fd76b83fd">FR_UNI_ARTIST</a>, <a class="el" href="songid_8c.html#ae3eb27dfbd7ad393f3c379d01286c659">FR_UNI_FNAME</a>, <a class="el" href="songid_8c.html#abe77c2c86a1e4bc8af488aacad287939">FR_UNI_GENRE</a>, <a class="el" href="songid_8c.html#aca3add068262c65430b3ded8522391f4">FR_UNI_TITLE</a>, <a class="el" href="group__frames.html#ga9aa359c4f2a3fd9e9ecc42e072349b95">FR_YEAR</a>, <a class="el" href="byteorder_8c.html#a77340c095fa6b6b32bea9f4132fc4081">njb1_bytes_to_16bit()</a>, <a class="el" href="byteorder_8c.html#afc49aa397ec35bd1d608d2afbdfeded1">njb1_bytes_to_32bit()</a>, <a class="el" href="group__tagapi.html#ga0f78d8cde327dd995f7008935e295c37">NJB_Songid_Addframe()</a>, <a class="el" href="group__tagapi.html#ga188d05568998e787366804565e9fcfb5">NJB_Songid_Destroy()</a>, <a class="el" href="group__tagapi.html#ga0423c3d42d53466d75bb9bf903601285">NJB_Songid_Frame_New_String()</a>, <a class="el" href="group__tagapi.html#ga144e0f1fbe75bd301c62dcae56d9d3af">NJB_Songid_Frame_New_Uint16()</a>, <a class="el" href="group__tagapi.html#ga3d4fa0c440b4377a662ff986ba10cddf">NJB_Songid_Frame_New_Uint32()</a>, <a class="el" href="group__tagapi.html#ga78703030798af2be6808335c6542aa6d">NJB_Songid_New()</a>, <a class="el" href="group__unicodeflags.html#ga388e9c70b7a684c777f6b25e2e9d801b">NJB_UC_UTF8</a>, <a class="el" href="unicode_8c.html#a4b1829345b6bf2af61d6dbbb1b02726b">strtoutf8()</a>, and <a class="el" href="unicode_8c.html#a841f6472d66d10714cb565821cdb627f">ucs2tostr()</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a60db410c9e82d9e61b1bf0be607922ed"></a><!-- doxytag: member="songid.c::__sub_depth" ref="a60db410c9e82d9e61b1bf0be607922ed" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="usb__io_8c.html#a60db410c9e82d9e61b1bf0be607922ed">__sub_depth</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The current subroutine depth for all of libnjb (global) </p>

</div>
</div>
<a class="anchor" id="ac04b373ed657c74d96015d8935eb57b0"></a><!-- doxytag: member="songid.c::njb_unicode_flag" ref="ac04b373ed657c74d96015d8935eb57b0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="unicode_8c.html#ac04b373ed657c74d96015d8935eb57b0">njb_unicode_flag</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>A flag for if unicode is used or not (global) </p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sat Jun 25 2011 for libnjb by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>