Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > 12036146830596fff8a6e80859ec761e > files > 81

lib64njb-devel-2.2.6-9.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: The track and tag (song ID metadata) manipulation API</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.3 -->
<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.6</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><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>
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>The track and tag (song ID metadata) manipulation API</h1>  </div>
</div>
<div class="contents">
<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"><a class="anchor" id="gae3c6350dcc11b09516d08907573b54bf"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Title" ref="gae3c6350dcc11b09516d08907573b54bf" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Title</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_String(FR_TITLE, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa8aaf956c66b1419fb61916935b73249"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Album" ref="gaa8aaf956c66b1419fb61916935b73249" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Album</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_String(FR_ALBUM, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaea547f5e83dde7e0f5fe07378f07da7d"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Genre" ref="gaea547f5e83dde7e0f5fe07378f07da7d" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Genre</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_String(FR_GENRE, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gafdd804144d712d9079a164af9054fcf8"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Artist" ref="gafdd804144d712d9079a164af9054fcf8" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Artist</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_String(FR_ARTIST, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga50f5f8b16ade2bff8b2c04c0e09a1d89"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Length" ref="ga50f5f8b16ade2bff8b2c04c0e09a1d89" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Length</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_Uint16(FR_LENGTH, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5984d2f61b12f692f8aef25659968bdd"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Filesize" ref="ga5984d2f61b12f692f8aef25659968bdd" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Filesize</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_Uint32(FR_SIZE, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab7631359a8ad9c2e98859464b49dd482"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Tracknum" ref="gab7631359a8ad9c2e98859464b49dd482" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Tracknum</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_Uint16(FR_TRACK, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga56fd60bb8c8473ae2789b0caa6266b6f"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Year" ref="ga56fd60bb8c8473ae2789b0caa6266b6f" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Year</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_Uint16(FR_YEAR, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8b5108cfa1fb5826552d757d65e60857"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Filename" ref="ga8b5108cfa1fb5826552d757d65e60857" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Filename</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_String(FR_FNAME, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac5256b5aed0c979c4b17b22b7a644ec3"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Protected" ref="gac5256b5aed0c979c4b17b22b7a644ec3" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Protected</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_Uint16(FR_PROTECTED, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae1e2a1de1fb7b937e46e4f5403d869eb"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Bitrate" ref="gae1e2a1de1fb7b937e46e4f5403d869eb" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Bitrate</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_Uint32(FR_BITRATE, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7723a545a63b28125ee1b3d3ded54d15"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Comment" ref="ga7723a545a63b28125ee1b3d3ded54d15" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Comment</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_String(FR_COMMENT, a)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae91a20b96179583ab80273fd69ac206c"></a><!-- doxytag: member="tagapi::NJB_Songid_Frame_New_Folder" ref="gae91a20b96179583ab80273fd69ac206c" args="(a)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>NJB_Songid_Frame_New_Folder</b>(a)&#160;&#160;&#160;NJB_Songid_Frame_New_String(FR_FOLDER, a)</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">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> *song)</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#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"><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#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"><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">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 class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga68e4af147b853116272587a3ab79b608">NJB_Get_Extended_Tags</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb, int extended)</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#ga5b4b2093f4b7adb9ea0e3e34f572bc80">NJB_Reset_Get_Track_Tag</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb)</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#gac1e3781b41ed63473b1808d9578ba1f3">NJB_Get_Track_Tag</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#ga8714367c0e56b681b75a7c7af9b2b739">NJB_Replace_Track_Tag</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb, u_int32_t trackid, <a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *songid)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#gad279e14ab0e254f2e70c3d169b84cbc3">NJB_Get_Track</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb, u_int32_t trackid, u_int32_t size, const char *path, <a class="el" href="libnjb_8h.html#a6efb672d692e39f52eb3589fde051ad2">NJB_Xfer_Callback</a> *callback, void *data)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#gab99507fb41c1527e58a449812a5d99e6">NJB_Get_Track_fd</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb, u_int32_t trackid, u_int32_t size, int fd, <a class="el" href="libnjb_8h.html#a6efb672d692e39f52eb3589fde051ad2">NJB_Xfer_Callback</a> *callback, void *data)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#gade6296b1920788ae715e8d57d50a9e8a">NJB_Send_Track</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb, const char *path, <a class="el" href="structnjb__songid__struct.html">njb_songid_t</a> *songid, <a class="el" href="libnjb_8h.html#a6efb672d692e39f52eb3589fde051ad2">NJB_Xfer_Callback</a> *callback, void *data, u_int32_t *trackid)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tagapi.html#gae454a558a453279a94a0a8406f488bdc">NJB_Delete_Track</a> (<a class="el" href="structnjb__struct.html">njb_t</a> *njb, u_int32_t trackid)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gae454a558a453279a94a0a8406f488bdc"></a><!-- doxytag: member="libnjb.h::NJB_Delete_Track" ref="gae454a558a453279a94a0a8406f488bdc" args="(njb_t *njb, u_int32_t trackid)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NJB_Delete_Track </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">u_int32_t&#160;</td>
          <td class="paramname"><em>trackid</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This deletes a track from the device.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">njb</td><td>a pointer to the <code>njb_t</code> jukebox object to use </td></tr>
    <tr><td class="paramname">trackid</td><td>the track ID for the track to delete </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on failure </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="deltr_8c-example.html#a7">deltr.c</a>.</dd>
</dl>
<p>References <a class="el" href="structnjb__struct.html#a405f9cb824196553362aa8d4ad546c07">njb_struct::device_type</a>, <a class="el" href="group__errors.html#gaa77a4904813cac57221afb5a0374d91c">EO_BADCOUNT</a>, and <a class="el" href="group__njbboxes.html#gad84011f40d11f1eae13f708cdc3c29fb">NJB_DEVICE_NJB1</a>.</p>

</div>
</div>
<a class="anchor" id="ga68e4af147b853116272587a3ab79b608"></a><!-- doxytag: member="libnjb.h::NJB_Get_Extended_Tags" ref="ga68e4af147b853116272587a3ab79b608" args="(njb_t *njb, int extended)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NJB_Get_Extended_Tags </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">int&#160;</td>
          <td class="paramname"><em>extended</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This configures libnjb to retrieve extended tags from the device. For the NJB1 this is the default behaviour anyway so it need not be set, but for the series 3 devices, retrieving the extended tag information is a costly operation that will slow down the initial track scanning by orders of magnitude and irritate the user. Make sure end-users can configure whether they want to use this or not.</p>
<p>The extended tags will include things like the filename and folder that the file used on the host before it was transfered to the device.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">njb</td><td>a pointer to the <code>njb_t</code> object to set this mode for </td></tr>
    <tr><td class="paramname">extended</td><td>use 0 for non-exetended tags (default), 1 for extended tags </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="tracks_8c-example.html#a23">tracks.c</a>.</dd>
</dl>
<p>References <a class="el" href="structnjb__struct.html#a9c34c2b8e18cdf2c494f2cfe2e1e4f5f">njb_struct::protocol_state</a>.</p>

</div>
</div>
<a class="anchor" id="gad279e14ab0e254f2e70c3d169b84cbc3"></a><!-- doxytag: member="libnjb.h::NJB_Get_Track" ref="gad279e14ab0e254f2e70c3d169b84cbc3" args="(njb_t *njb, u_int32_t trackid, u_int32_t size, const char *path, NJB_Xfer_Callback *callback, void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NJB_Get_Track </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">u_int32_t&#160;</td>
          <td class="paramname"><em>fileid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int32_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="libnjb_8h.html#a6efb672d692e39f52eb3589fde051ad2">NJB_Xfer_Callback</a> *&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This retrieves ("uploads") a track from the device to the host computer.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">njb</td><td>a pointer to the <code>njb_t</code> object to get the track from </td></tr>
    <tr><td class="paramname">fileid</td><td>the unique trackid (also known as file ID, they are the same things) as reported by the device from e.g. <code><a class="el" href="group__tagapi.html#gac1e3781b41ed63473b1808d9578ba1f3">NJB_Get_Track_Tag()</a></code>. </td></tr>
    <tr><td class="paramname">size</td><td>the size of the track in bytes. You know this size from previous calls to <code><a class="el" href="group__tagapi.html#gac1e3781b41ed63473b1808d9578ba1f3">NJB_Get_Track_Tag()</a></code> and it is needed among other things for displaying a progress bar and for determining that all bytes have been correctly retrieved. </td></tr>
    <tr><td class="paramname">path</td><td>the path where the resulting file should be written. If this parameter is null, the blocks are delivered via the callback's buf parameter. </td></tr>
    <tr><td class="paramname">callback</td><td>a function that will be called repeatedly to report progress during transfer, used for e.g. displaying progress bars </td></tr>
    <tr><td class="paramname">data</td><td>a voluntary parameter that can associate some user-supplied data with each callback call. It is OK to set this to NULL of course. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on failure </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__tagapi.html#gab99507fb41c1527e58a449812a5d99e6">NJB_Get_Track_fd()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="gettr_8c-example.html#a18">gettr.c</a>.</dd>
</dl>
<p>References <a class="el" href="group__errors.html#ga9f7d729df7f9e35eb4faefddbb7ef275">EO_TMPFILE</a>, and <a class="el" href="group__tagapi.html#gab99507fb41c1527e58a449812a5d99e6">NJB_Get_Track_fd()</a>.</p>

</div>
</div>
<a class="anchor" id="gab99507fb41c1527e58a449812a5d99e6"></a><!-- doxytag: member="libnjb.h::NJB_Get_Track_fd" ref="gab99507fb41c1527e58a449812a5d99e6" args="(njb_t *njb, u_int32_t trackid, u_int32_t size, int fd, NJB_Xfer_Callback *callback, void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NJB_Get_Track_fd </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">u_int32_t&#160;</td>
          <td class="paramname"><em>fileid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int32_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="libnjb_8h.html#a6efb672d692e39f52eb3589fde051ad2">NJB_Xfer_Callback</a> *&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This retrieves ("uploads") a track from the device to the host computer by way of a file descriptor, which is good for e.g. streaming stuff. The daring type can start playing back audio from the file descriptor before it is finished. This is also good for fetching to temporary files, which are often only given as file descriptors.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">njb</td><td>a pointer to the <code>njb_t</code> object to get the track from </td></tr>
    <tr><td class="paramname">fileid</td><td>the unique trackid (also known as file ID, they are the same things) as reported by the device from e.g. <code><a class="el" href="group__tagapi.html#gac1e3781b41ed63473b1808d9578ba1f3">NJB_Get_Track_Tag()</a></code>. </td></tr>
    <tr><td class="paramname">size</td><td>the size of the track in bytes. You know this size from previous calls to <code><a class="el" href="group__tagapi.html#gac1e3781b41ed63473b1808d9578ba1f3">NJB_Get_Track_Tag()</a></code> and it is needed among other things for displaying a progress bar and for determining that all bytes have been correctly retrieved. </td></tr>
    <tr><td class="paramname">fd</td><td>the file descriptor that shall be fed with the track contents. The file descriptor must be writable. On win32 make sure it is a binary descriptor and not textual. </td></tr>
    <tr><td class="paramname">callback</td><td>a function that will be called repeatedly to report progress during transfer, used for e.g. displaying progress bars </td></tr>
    <tr><td class="paramname">data</td><td>a voluntary parameter that can associate some user-supplied data with each callback call. It is OK to set this to NULL of course. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on failure </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__tagapi.html#gad279e14ab0e254f2e70c3d169b84cbc3">NJB_Get_Track()</a> </dd></dl>

<p>References <a class="el" href="structnjb__struct.html#a405f9cb824196553362aa8d4ad546c07">njb_struct::device_type</a>, <a class="el" href="group__errors.html#gaab1302689232242304a90d9180f9d82c">EO_ABORTED</a>, <a class="el" href="group__errors.html#ga2ab3784c31667eb7bd6dbc4296818720">EO_NOMEM</a>, <a class="el" href="group__errors.html#ga8c1d93dc0cee664087ac6524345cc70b">EO_WRFILE</a>, <a class="el" href="group__errors.html#ga810365ab9a25b7a3c2221f91efc9fb72">EO_XFERDENIED</a>, <a class="el" href="group__errors.html#ga8634bf647d807e7c8d7eb38a0aaf42de">EO_XFERERROR</a>, <a class="el" href="protocol3_8c.html#abaa0008a62887dbbd36f6b27a8e740d8">njb3_get_file_block()</a>, <a class="el" href="protocol3_8c.html#a956618fea29be076067bf608190398bf">njb3_request_file_chunk()</a>, <a class="el" href="group__njbboxes.html#gad84011f40d11f1eae13f708cdc3c29fb">NJB_DEVICE_NJB1</a>, <a class="el" href="protocol_8c.html#af1b5132b6c3f0c9f408a77cdc5e64f58">njb_receive_file_block()</a>, <a class="el" href="group__turboflags.html#gab05575fa4841c5cdd2aca216cc349e17">NJB_TURBO_OFF</a>, <a class="el" href="protocol_8c.html#ae5ea9fbb3859ec50540bcd9cf4a3f328">njb_verify_last_command()</a>, <a class="el" href="structnjb__struct.html#a9c34c2b8e18cdf2c494f2cfe2e1e4f5f">njb_struct::protocol_state</a>, and <a class="el" href="structnjb3__state__t.html#a86ba6395f4d2a8f171cc6251ace4b9e1">njb3_state_t::turbo_mode</a>.</p>

<p>Referenced by <a class="el" href="group__tagapi.html#gad279e14ab0e254f2e70c3d169b84cbc3">NJB_Get_Track()</a>.</p>

</div>
</div>
<a class="anchor" id="gac1e3781b41ed63473b1808d9578ba1f3"></a><!-- doxytag: member="libnjb.h::NJB_Get_Track_Tag" ref="gac1e3781b41ed63473b1808d9578ba1f3" args="(njb_t *njb)" -->
<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>* NJB_Get_Track_Tag </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><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This gets a track tag (song ID) from the device. The device should first be rewound using the <code><a class="el" href="group__tagapi.html#ga5b4b2093f4b7adb9ea0e3e34f572bc80">NJB_Reset_Get_Track_Tag()</a></code> function.</p>
<p>Notice that there is no function for getting the tag for a <em>single</em> track, there is just this function that dumps out the entire database in one big go. The recommended approach is to keep an internal track cache of all tracks and use this for getting metadata for single tracks. There is as far as we know no function in the Creative firmwares for getting the metadata of a single track, so access through this function is the only option.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">njb</td><td>a pointer to the <code>njb_t</code> object to reset the track retrieveal pointer for </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a track tag (song ID) or NULL if the last track tag has already been retrieved </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__tagapi.html#ga5b4b2093f4b7adb9ea0e3e34f572bc80">NJB_Reset_Get_Track_Tag()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="gettr_8c-example.html#a9">gettr.c</a>, and <a class="el" href="tracks_8c-example.html#a25">tracks.c</a>.</dd>
</dl>
<p>References <a class="el" href="structnjb__struct.html#a405f9cb824196553362aa8d4ad546c07">njb_struct::device_type</a>, <a class="el" href="group__njbboxes.html#gad84011f40d11f1eae13f708cdc3c29fb">NJB_DEVICE_NJB1</a>, and <a class="el" href="structnjb__struct.html#a9c34c2b8e18cdf2c494f2cfe2e1e4f5f">njb_struct::protocol_state</a>.</p>

</div>
</div>
<a class="anchor" id="ga8714367c0e56b681b75a7c7af9b2b739"></a><!-- doxytag: member="libnjb.h::NJB_Replace_Track_Tag" ref="ga8714367c0e56b681b75a7c7af9b2b739" args="(njb_t *njb, u_int32_t trackid, njb_songid_t *songid)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NJB_Replace_Track_Tag </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">u_int32_t&#160;</td>
          <td class="paramname"><em>trackid</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 routine will replace the track tag or parts of a track tag for a track that already exist on the device. On the NJB1 the whole metadata set must be specified for this routine to work properly, but on the series 3 devices you can specify incremental updates (only parts of the metadata set). Be sure to either specify the full set all the time, or check if we are handling an NJB1 before submitting an incremental update (see example below).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">njb</td><td>a pointer to the jukebox object to use </td></tr>
    <tr><td class="paramname">trackid</td><td>the track ID to replace the tag for </td></tr>
    <tr><td class="paramname">songid</td><td>the new tag</td></tr>
  </table>
  </dd>
</dl>
<p>Typical usage:</p>
<pre>
 njb_t *njb;
 njb_songid_t *songid;
 njb_songid_frame_t *frame;</pre><pre> songid = <a class="el" href="group__tagapi.html#ga78703030798af2be6808335c6542aa6d">NJB_Songid_New()</a>;
 // On NJB1 incremental update is not possible, so a full
 // metadata set must always be specified.
 if (njb-&gt;device_type == NJB_DEVICE_NJB1) {
   frame = NJB_Songid_Frame_New_Codec(meta-&gt;codec);
   NJB_Songid_Addframe(songid, frame);
   frame = NJB_Songid_Frame_New_Filesize(meta-&gt;size);
   NJB_Songid_Addframe(songid, frame);
 }
 frame = NJB_Songid_Frame_New_Codec(NJB_CODEC_MP3);
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Title("MyTitle");
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Album("MyAlbum");
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Artist("MyArtist");
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Genre("MyGenre");
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Year(2004);
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Tracknum(1);
 NJB_Songid_Addframe(songid, frame);
 // The length of the track should typically be given, or such things
 // as progress indicators will stop working. If you absolutely want to
 // upload a file of unknown length and break progress indicators, set
 // length to 1 second.
 frame = NJB_Songid_Frame_New_Length(123);
 NJB_Songid_Addframe(songid, frame);
 // This one is optional, the track will survive without it.
 frame = NJB_Songid_Frame_New_Filename("Foo.mp3");
 NJB_Songid_Addframe(songid, frame);
 if (NJB_Replace_Track_Tag(njb, 123456, songid) == -1) {
    NJB_Error_Dump(stderr);
 }
 NJB_Songid_Destroy(songid);
 </pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="tagtr_8c-example.html#a14">tagtr.c</a>.</dd>
</dl>
<p>References <a class="el" href="structnjb__struct.html#a405f9cb824196553362aa8d4ad546c07">njb_struct::device_type</a>, <a class="el" href="group__errors.html#ga5e9a5cc42da78f16fe11553191d3314b">EO_BAD_NJB1_REPLACE</a>, <a class="el" href="group__errors.html#gaa77a4904813cac57221afb5a0374d91c">EO_BADCOUNT</a>, <a class="el" href="group__frames.html#gaf9f498755e47084481558a730f59a45a">FR_CODEC</a>, <a class="el" href="structnjb__songid__frame__struct.html#af9f57e6c74f947c17062a2d2c56f7824">njb_songid_frame_struct::label</a>, <a class="el" href="protocol3_8c.html#a2ebd3fa717d5de9b1031a4a0afbab84f">njb3_update_tag()</a>, <a class="el" href="group__njbboxes.html#gad84011f40d11f1eae13f708cdc3c29fb">NJB_DEVICE_NJB1</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#ga0013c681283968bf65b564beb8109e5b">NJB_Songid_Getframe()</a>, <a class="el" href="group__tagapi.html#ga78703030798af2be6808335c6542aa6d">NJB_Songid_New()</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="songid_8c.html#a1dcd88c13e7b209d9a5b6e31e71ff6e6">songid_pack()</a>, <a class="el" href="songid_8c.html#a4a04f572c79d5f5c4b813ba8c1932f6b">songid_pack3()</a>, <a class="el" href="songid_8c.html#a4c7679ba70de1bdabcfe90c2e6308008">songid_sanity_check()</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>

</div>
</div>
<a class="anchor" id="ga5b4b2093f4b7adb9ea0e3e34f572bc80"></a><!-- doxytag: member="libnjb.h::NJB_Reset_Get_Track_Tag" ref="ga5b4b2093f4b7adb9ea0e3e34f572bc80" args="(njb_t *njb)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NJB_Reset_Get_Track_Tag </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><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This resets the track tag (song ID) retrieveal function. The track tags can then be retrieved one by one using the <code><a class="el" href="group__tagapi.html#gac1e3781b41ed63473b1808d9578ba1f3">NJB_Get_Track_Tag()</a></code> function.</p>
<p>Typical usage:</p>
<pre>
 njb_t *njb;
 njb_songid_t *song;</pre><pre> NJB_Songid_Reset_Get_Track_Tag(njb);
 while ( (song = NJB_Get_Track_Tag(njb)) != NULL ) {
    // Do something with all the songs...
 }
 </pre><dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">njb</td><td>a pointer to the <code>njb_t</code> object to reset the track retrieveal pointer for </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__tagapi.html#gac1e3781b41ed63473b1808d9578ba1f3">NJB_Get_Track_Tag()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="gettr_8c-example.html#a8">gettr.c</a>, and <a class="el" href="tracks_8c-example.html#a24">tracks.c</a>.</dd>
</dl>
<p>References <a class="el" href="structnjb__struct.html#a405f9cb824196553362aa8d4ad546c07">njb_struct::device_type</a>, <a class="el" href="group__njbboxes.html#gad84011f40d11f1eae13f708cdc3c29fb">NJB_DEVICE_NJB1</a>, and <a class="el" href="structnjb__struct.html#a9c34c2b8e18cdf2c494f2cfe2e1e4f5f">njb_struct::protocol_state</a>.</p>

</div>
</div>
<a class="anchor" id="gade6296b1920788ae715e8d57d50a9e8a"></a><!-- doxytag: member="libnjb.h::NJB_Send_Track" ref="gade6296b1920788ae715e8d57d50a9e8a" args="(njb_t *njb, const char *path, njb_songid_t *songid, NJB_Xfer_Callback *callback, void *data, u_int32_t *trackid)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int NJB_Send_Track </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">const char *&#160;</td>
          <td class="paramname"><em>path</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>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="libnjb_8h.html#a6efb672d692e39f52eb3589fde051ad2">NJB_Xfer_Callback</a> *&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></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">u_int32_t *&#160;</td>
          <td class="paramname"><em>trackid</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This sends ("downloads") a track (playable music file) to the device.</p>
<p>Typical usage:</p>
<pre>
 njb_t *njb;
 njb_songid_t *songid;
 njb_songid_frame_t *frame;
 u_int32_t id;</pre><pre> songid = <a class="el" href="group__tagapi.html#ga78703030798af2be6808335c6542aa6d">NJB_Songid_New()</a>;
 frame = NJB_Songid_Frame_New_Codec(NJB_CODEC_MP3);
 NJB_Songid_Addframe(songid, frame);
 // This one is optional - libnjb will fill it in if not specified
 frame = NJB_Songid_Frame_New_Filesize(12345678);
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Title("MyTitle");
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Album("MyAlbum");
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Artist("MyArtist");
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Genre("MyGenre");
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Year(2004);
 NJB_Songid_Addframe(songid, frame);
 frame = NJB_Songid_Frame_New_Tracknum(1);
 NJB_Songid_Addframe(songid, frame);
 // The length of the track should typically be given, or such things
 // as progress indicators will stop working. If you absolutely want to
 // upload a file of unknown length and break progress indicators, set
 // length to 1 second.
 frame = NJB_Songid_Frame_New_Length(123);
 NJB_Songid_Addframe(songid, frame);
 // This one is optional - libnjb will fill it in if not specified
 frame = NJB_Songid_Frame_New_Filename("Foo.mp3");
 NJB_Songid_Addframe(songid, frame);
 if (NJB_Send_Track (njb, "foo.mp3", songid, NULL, NULL, &amp;id) == -1) {
     NJB_Error_Dump(stderr);
 }
 NJB_Songid_Destroy(songid);
 </pre><dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">njb</td><td>a pointer to the <code>njb_t</code> object to send the track file to. </td></tr>
    <tr><td class="paramname">path</td><td>the filesystem path on the local host to use as indata </td></tr>
    <tr><td class="paramname">songid</td><td>the tag for this track, which has to be built separately before the transfer is started with a call to this function. </td></tr>
    <tr><td class="paramname">callback</td><td>a function that will be called repeatedly to report progress during transfer, used for e.g. displaying progress bars. This may be NULL if you don't want any callbacks. </td></tr>
    <tr><td class="paramname">data</td><td>a voluntary parameter that can associate some user-supplied data with each callback call. It is OK to set this to NULL of course. </td></tr>
    <tr><td class="paramname">trackid</td><td>a pointer to an integer that will hold the resulting track ID after this transfer has commenced successfully. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on failure </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__datatagapi.html#ga31c21abd0c41827557fa14b13b496d5e">NJB_Send_File()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="sendtr_8c-example.html#a14">sendtr.c</a>.</dd>
</dl>
<p>References <a class="el" href="procedure_8c.html#ad7ebab46fa81c69bd52ccc715f183d2e">_file_size()</a>, <a class="el" href="structnjb__struct.html#a405f9cb824196553362aa8d4ad546c07">njb_struct::device_type</a>, <a class="el" href="group__errors.html#ga909b3766a05c3f22ba04e40a39efa581">EO_INVALID</a>, <a class="el" href="group__errors.html#gaccdcb6efe55a82e46b2a702edcc85781">EO_SRCFILE</a>, <a class="el" href="group__errors.html#gac3a1bc8a48d37a7e5266e61a38a9ac47">EO_TOOBIG</a>, <a class="el" href="group__errors.html#ga810365ab9a25b7a3c2221f91efc9fb72">EO_XFERDENIED</a>, <a class="el" href="group__frames.html#ga772dbf5abd5c80173ac0d4b0844a374b">FR_FNAME</a>, <a class="el" href="group__frames.html#gab849d03c53f616a47612353a04f196f0">FR_SIZE</a>, <a class="el" href="group__njbboxes.html#gad84011f40d11f1eae13f708cdc3c29fb">NJB_DEVICE_NJB1</a>, <a class="el" href="group__basic.html#gab45cd3177a295ea8604423080e7e62ed">NJB_Get_Disk_Usage()</a>, <a class="el" href="group__tagapi.html#ga0f78d8cde327dd995f7008935e295c37">NJB_Songid_Addframe()</a>, <a class="el" href="group__tagapi.html#gae02110b5c20cddfcf92bbdbdeeef4039">NJB_Songid_Findframe()</a>, <a class="el" href="songid_8c.html#a1dcd88c13e7b209d9a5b6e31e71ff6e6">songid_pack()</a>, <a class="el" href="songid_8c.html#a4a04f572c79d5f5c4b813ba8c1932f6b">songid_pack3()</a>, and <a class="el" href="songid_8c.html#a4c7679ba70de1bdabcfe90c2e6308008">songid_sanity_check()</a>.</p>

</div>
</div>
<a class="anchor" id="ga0f78d8cde327dd995f7008935e295c37"></a><!-- doxytag: member="libnjb.h::NJB_Songid_Addframe" ref="ga0f78d8cde327dd995f7008935e295c37" args="(njb_songid_t *song, njb_songid_frame_t *frame)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NJB_Songid_Addframe </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"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a> *&#160;</td>
          <td class="paramname"><em>frame</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This adds a song ID frame to a song ID.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">song</td><td>the song ID to add the frame to </td></tr>
    <tr><td class="paramname">frame</td><td>the frame to add to this song ID </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="sendtr_8c-example.html#a13">sendtr.c</a>, and <a class="el" href="tagtr_8c-example.html#a13">tagtr.c</a>.</dd>
</dl>
<p>References <a class="el" href="structnjb__songid__struct.html#ab6ece8ac46f00013e0bf0b9dc3e06c86">njb_songid_struct::cur</a>, <a class="el" href="structnjb__songid__struct.html#ab8f9a377cbdaa06584683066aec19264">njb_songid_struct::first</a>, <a class="el" href="structnjb__songid__struct.html#abbf2693720ac6b4eb161e7595067aa33">njb_songid_struct::last</a>, <a class="el" href="structnjb__songid__frame__struct.html#a17d15940ad910b366cb184b846471b71">njb_songid_frame_struct::next</a>, and <a class="el" href="structnjb__songid__struct.html#ac569874902b2e8896802993ba0537681">njb_songid_struct::nframes</a>.</p>

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

</div>
</div>
<a class="anchor" id="ga188d05568998e787366804565e9fcfb5"></a><!-- doxytag: member="libnjb.h::NJB_Songid_Destroy" ref="ga188d05568998e787366804565e9fcfb5" args="(njb_songid_t *song)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NJB_Songid_Destroy </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></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This destroys an entire song ID structure and free the memory used by it.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">songid</td><td>the song ID structure to destroy </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="gettr_8c-example.html#a16">gettr.c</a>, <a class="el" href="sendtr_8c-example.html#a15">sendtr.c</a>, <a class="el" href="tagtr_8c-example.html#a15">tagtr.c</a>, and <a class="el" href="tracks_8c-example.html#a26">tracks.c</a>.</dd>
</dl>
<p>References <a class="el" href="group__tagapi.html#ga3bb4c23e9166574fdb5f25d082a38b84">NJB_Songid_Frame_Destroy()</a>, <a class="el" href="group__tagapi.html#ga0013c681283968bf65b564beb8109e5b">NJB_Songid_Getframe()</a>, and <a class="el" href="group__tagapi.html#ga8eada6cbbc26c6aa18f3c22a20d38756">NJB_Songid_Reset_Getframe()</a>.</p>

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

</div>
</div>
<a class="anchor" id="gae02110b5c20cddfcf92bbdbdeeef4039"></a><!-- doxytag: member="libnjb.h::NJB_Songid_Findframe" ref="gae02110b5c20cddfcf92bbdbdeeef4039" args="(njb_songid_t *song, const char *label)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a>* NJB_Songid_Findframe </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">const char *&#160;</td>
          <td class="paramname"><em>label</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This locates a particular song ID frame inside a song ID, by using the textual label given.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">song</td><td>the song ID to look in </td></tr>
    <tr><td class="paramname">label</td><td>the textual label of the frame to look for </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the song ID frame if found, else NULL </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="gettr_8c-example.html#a12">gettr.c</a>.</dd>
</dl>
<p>References <a class="el" href="structnjb__songid__frame__struct.html#af9f57e6c74f947c17062a2d2c56f7824">njb_songid_frame_struct::label</a>, <a class="el" href="group__tagapi.html#ga0013c681283968bf65b564beb8109e5b">NJB_Songid_Getframe()</a>, and <a class="el" href="group__tagapi.html#ga8eada6cbbc26c6aa18f3c22a20d38756">NJB_Songid_Reset_Getframe()</a>.</p>

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

</div>
</div>
<a class="anchor" id="ga3bb4c23e9166574fdb5f25d082a38b84"></a><!-- doxytag: member="libnjb.h::NJB_Songid_Frame_Destroy" ref="ga3bb4c23e9166574fdb5f25d082a38b84" args="(njb_songid_frame_t *frame)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NJB_Songid_Frame_Destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a> *&#160;</td>
          <td class="paramname"><em>frame</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This destroys a song ID frame and free any memory used by it.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">frame</td><td>the song ID frame to destroy </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="structnjb__songid__frame__struct.html#af9f57e6c74f947c17062a2d2c56f7824">njb_songid_frame_struct::label</a>, <a class="el" href="group__frametypes.html#gafe891ec1f66cdc1675ddb6080ece5e55">NJB_TYPE_STRING</a>, <a class="el" href="structnjb__songid__frame__struct.html#a6983b7aebbbd036d67da513e85538086">njb_songid_frame_struct::strval</a>, and <a class="el" href="structnjb__songid__frame__struct.html#a4f7af50a88a6ea9e9cc52bbed270ba8a">njb_songid_frame_struct::type</a>.</p>

<p>Referenced by <a class="el" href="group__tagapi.html#ga188d05568998e787366804565e9fcfb5">NJB_Songid_Destroy()</a>.</p>

</div>
</div>
<a class="anchor" id="gabcbe1903a855d72b5e2b933c041a98bf"></a><!-- doxytag: member="libnjb.h::NJB_Songid_Frame_New_Codec" ref="gabcbe1903a855d72b5e2b933c041a98bf" args="(const char *value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a>* NJB_Songid_Frame_New_Codec </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This is a wrapper function to fix a common mistake made when creating codec frames: lowercase codec names and other strange mistakes. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="sendtr_8c-example.html#a12">sendtr.c</a>, and <a class="el" href="tagtr_8c-example.html#a12">tagtr.c</a>.</dd>
</dl>
<p>References <a class="el" href="group__frames.html#gaf9f498755e47084481558a730f59a45a">FR_CODEC</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>, and <a class="el" href="group__tagapi.html#ga0423c3d42d53466d75bb9bf903601285">NJB_Songid_Frame_New_String()</a>.</p>

</div>
</div>
<a class="anchor" id="ga0423c3d42d53466d75bb9bf903601285"></a><!-- doxytag: member="libnjb.h::NJB_Songid_Frame_New_String" ref="ga0423c3d42d53466d75bb9bf903601285" args="(const char *label, const char *value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a>* NJB_Songid_Frame_New_String </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a new string frame.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">label</td><td>the label of this string frame </td></tr>
    <tr><td class="paramname">value</td><td>the string contained in this string frame </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>valid string frame on success, NULL on failure </dd></dl>

<p>References <a class="el" href="structnjb__songid__frame__struct.html#af9f57e6c74f947c17062a2d2c56f7824">njb_songid_frame_struct::label</a>, <a class="el" href="group__frametypes.html#gafe891ec1f66cdc1675ddb6080ece5e55">NJB_TYPE_STRING</a>, <a class="el" href="structnjb__songid__frame__struct.html#a6983b7aebbbd036d67da513e85538086">njb_songid_frame_struct::strval</a>, and <a class="el" href="structnjb__songid__frame__struct.html#a4f7af50a88a6ea9e9cc52bbed270ba8a">njb_songid_frame_struct::type</a>.</p>

<p>Referenced by <a class="el" href="group__tagapi.html#ga8714367c0e56b681b75a7c7af9b2b739">NJB_Replace_Track_Tag()</a>, <a class="el" href="group__tagapi.html#gabcbe1903a855d72b5e2b933c041a98bf">NJB_Songid_Frame_New_Codec()</a>, and <a class="el" href="songid_8c.html#ab4fd686d31cb66af604ab8cd1b285046">songid_unpack()</a>.</p>

</div>
</div>
<a class="anchor" id="ga144e0f1fbe75bd301c62dcae56d9d3af"></a><!-- doxytag: member="libnjb.h::NJB_Songid_Frame_New_Uint16" ref="ga144e0f1fbe75bd301c62dcae56d9d3af" args="(const char *label, u_int16_t value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a>* NJB_Songid_Frame_New_Uint16 </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int16_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a new unsigned 16-bit integer frame.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">label</td><td>the label of this unsigned 16-bit integer frame </td></tr>
    <tr><td class="paramname">value</td><td>the unsigned 16-bit integer contained in this frame </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>valid unsigned 16-bit integer frame on success, NULL on failure </dd></dl>

<p>References <a class="el" href="structnjb__songid__frame__struct.html#af9f57e6c74f947c17062a2d2c56f7824">njb_songid_frame_struct::label</a>, <a class="el" href="group__frametypes.html#ga5e48833c174ba65895f372a69cc71c8a">NJB_TYPE_UINT16</a>, <a class="el" href="structnjb__songid__frame__struct.html#a4f7af50a88a6ea9e9cc52bbed270ba8a">njb_songid_frame_struct::type</a>, and <a class="el" href="structnjb__songid__frame__struct.html#a98d92535fac334896663dd3579aa1fd0">njb_songid_frame_struct::u_int16_val</a>.</p>

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

</div>
</div>
<a class="anchor" id="ga3d4fa0c440b4377a662ff986ba10cddf"></a><!-- doxytag: member="libnjb.h::NJB_Songid_Frame_New_Uint32" ref="ga3d4fa0c440b4377a662ff986ba10cddf" args="(const char *label, u_int32_t value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a>* NJB_Songid_Frame_New_Uint32 </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_int32_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Creates a new unsigned 32-bit integer frame.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">label</td><td>the label of this unsigned 32-bit integer frame </td></tr>
    <tr><td class="paramname">value</td><td>the unsigned 32-bit integer contained in this frame </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>valid unsigned 32-bit integer frame on success, NULL on failure </dd></dl>

<p>References <a class="el" href="structnjb__songid__frame__struct.html#af9f57e6c74f947c17062a2d2c56f7824">njb_songid_frame_struct::label</a>, <a class="el" href="group__frametypes.html#gaca72fa1657385c37845e3b326938a047">NJB_TYPE_UINT32</a>, <a class="el" href="structnjb__songid__frame__struct.html#a4f7af50a88a6ea9e9cc52bbed270ba8a">njb_songid_frame_struct::type</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="songid_8c.html#ab4fd686d31cb66af604ab8cd1b285046">songid_unpack()</a>.</p>

</div>
</div>
<a class="anchor" id="ga0013c681283968bf65b564beb8109e5b"></a><!-- doxytag: member="libnjb.h::NJB_Songid_Getframe" ref="ga0013c681283968bf65b564beb8109e5b" args="(njb_songid_t *song)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structnjb__songid__frame__struct.html">njb_songid_frame_t</a>* NJB_Songid_Getframe </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><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This gets the next song ID frame from a song ID structure.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">song</td><td>the song ID to get frames from </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a song ID frame, or NULL if the last frame has already been returned. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__tagapi.html#ga8eada6cbbc26c6aa18f3c22a20d38756">NJB_Songid_Reset_Getframe()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="tracks_8c-example.html#a13">tracks.c</a>.</dd>
</dl>
<p>References <a class="el" href="structnjb__songid__struct.html#ab6ece8ac46f00013e0bf0b9dc3e06c86">njb_songid_struct::cur</a>, and <a class="el" href="structnjb__songid__frame__struct.html#a17d15940ad910b366cb184b846471b71">njb_songid_frame_struct::next</a>.</p>

<p>Referenced by <a class="el" href="group__tagapi.html#ga8714367c0e56b681b75a7c7af9b2b739">NJB_Replace_Track_Tag()</a>, <a class="el" href="group__tagapi.html#ga188d05568998e787366804565e9fcfb5">NJB_Songid_Destroy()</a>, <a class="el" href="group__tagapi.html#gae02110b5c20cddfcf92bbdbdeeef4039">NJB_Songid_Findframe()</a>, <a class="el" href="songid_8c.html#a1dcd88c13e7b209d9a5b6e31e71ff6e6">songid_pack()</a>, <a class="el" href="songid_8c.html#a4a04f572c79d5f5c4b813ba8c1932f6b">songid_pack3()</a>, and <a class="el" href="songid_8c.html#a4c7679ba70de1bdabcfe90c2e6308008">songid_sanity_check()</a>.</p>

</div>
</div>
<a class="anchor" id="ga78703030798af2be6808335c6542aa6d"></a><!-- doxytag: member="libnjb.h::NJB_Songid_New" ref="ga78703030798af2be6808335c6542aa6d" args="(void)" -->
<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>* NJB_Songid_New </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This creates a new song ID holder structure. (A songid in turn contains several frames represening different metadata.)</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>a new song ID structure </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="sendtr_8c-example.html#a11">sendtr.c</a>, and <a class="el" href="tagtr_8c-example.html#a11">tagtr.c</a>.</dd>
</dl>
<p>References <a class="el" href="structnjb__songid__struct.html#a88bc27b45de8e9803303987697fdbcdd">njb_songid_struct::next</a>.</p>

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

</div>
</div>
<a class="anchor" id="ga8eada6cbbc26c6aa18f3c22a20d38756"></a><!-- doxytag: member="libnjb.h::NJB_Songid_Reset_Getframe" ref="ga8eada6cbbc26c6aa18f3c22a20d38756" args="(njb_songid_t *song)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NJB_Songid_Reset_Getframe </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><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This resets the internal pointer in the song ID so that it points to the first frame of the song ID. It should typically be called before subsequent calls to <code><a class="el" href="group__tagapi.html#ga0013c681283968bf65b564beb8109e5b">NJB_Songid_Getframe()</a></code>.</p>
<p>Typical usage:</p>
<pre>
 njb_songid_t *song;
 njb_songid_frame_t *frame;</pre><pre> // Get a song ID into "song"...
 NJB_Songid_Reset_Getframe(song);
 while ( (frame = NJB_Songid_Getframe(song)) != NULL ) {
    // Do something with all the frames...
 }
 </pre><dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">song</td><td>the song ID structure whose internal frame pointer shall be reset. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__tagapi.html#ga0013c681283968bf65b564beb8109e5b">NJB_Songid_Getframe()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="tracks_8c-example.html#a11">tracks.c</a>.</dd>
</dl>
<p>References <a class="el" href="structnjb__songid__struct.html#ab6ece8ac46f00013e0bf0b9dc3e06c86">njb_songid_struct::cur</a>, and <a class="el" href="structnjb__songid__struct.html#ab8f9a377cbdaa06584683066aec19264">njb_songid_struct::first</a>.</p>

<p>Referenced by <a class="el" href="group__tagapi.html#ga8714367c0e56b681b75a7c7af9b2b739">NJB_Replace_Track_Tag()</a>, <a class="el" href="group__tagapi.html#ga188d05568998e787366804565e9fcfb5">NJB_Songid_Destroy()</a>, <a class="el" href="group__tagapi.html#gae02110b5c20cddfcf92bbdbdeeef4039">NJB_Songid_Findframe()</a>, <a class="el" href="songid_8c.html#a1dcd88c13e7b209d9a5b6e31e71ff6e6">songid_pack()</a>, <a class="el" href="songid_8c.html#a4a04f572c79d5f5c4b813ba8c1932f6b">songid_pack3()</a>, and <a class="el" href="songid_8c.html#a4c7679ba70de1bdabcfe90c2e6308008">songid_sanity_check()</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Mon May 2 2011 06:05:24 for libnjb by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>