Sophie

Sophie

distrib > Arklinux > devel > x86_64 > media > main > by-pkgid > 0ec239e30e77c6ccf6375bf75d2e8547 > files > 127

flac-1.2.1-1ark.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>FLAC: FLAC/metadata.h: metadata level 2 interface</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>FLAC/metadata.h: metadata level 2 interface<br>
<small>
[<a class="el" href="group__flac__metadata.html">FLAC/metadata.h: metadata interfaces</a>]</small>
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
The level 2 interface provides read-write access to FLAC file metadata; all metadata is read into memory, operated on in memory, and then written to file, which is more efficient than level 1 when editing multiple blocks. 
<p>
Currently Ogg FLAC is supported for read only, via <a class="el" href="group__flac__metadata__level2.html#ga7">FLAC__metadata_chain_read_ogg()</a> but a subsequent <a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a> will fail.<p>
The general usage of this interface is:<p>
<ul>
<li>Create a new chain using <a class="el" href="group__flac__metadata__level2.html#ga3">FLAC__metadata_chain_new()</a>. A chain is a linked list of FLAC metadata blocks.</li><li>Read all metadata into the the chain from a FLAC file using <a class="el" href="group__flac__metadata__level2.html#ga6">FLAC__metadata_chain_read()</a> or <a class="el" href="group__flac__metadata__level2.html#ga7">FLAC__metadata_chain_read_ogg()</a> and check the status.</li><li>Optionally, consolidate the padding using <a class="el" href="group__flac__metadata__level2.html#ga14">FLAC__metadata_chain_merge_padding()</a> or <a class="el" href="group__flac__metadata__level2.html#ga15">FLAC__metadata_chain_sort_padding()</a>.</li><li>Create a new iterator using <a class="el" href="group__flac__metadata__level2.html#ga16">FLAC__metadata_iterator_new()</a></li><li>Initialize the iterator to point to the first element in the chain using <a class="el" href="group__flac__metadata__level2.html#ga18">FLAC__metadata_iterator_init()</a></li><li>Traverse the chain using FLAC__metadata_iterator_next and <a class="el" href="group__flac__metadata__level2.html#ga20">FLAC__metadata_iterator_prev()</a>.</li><li>Get a block for reading or modification using <a class="el" href="group__flac__metadata__level2.html#ga22">FLAC__metadata_iterator_get_block()</a>. The pointer to the object inside the chain is returned, so the block is yours to modify. Changes will be reflected in the FLAC file when you write the chain. You can also add and delete blocks (see functions below).</li><li>When done, write out the chain using <a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a>. Make sure to read the whole comment to the function below.</li><li>Delete the chain using <a class="el" href="group__flac__metadata__level2.html#ga4">FLAC__metadata_chain_delete()</a>.</li></ul>
<p>
<dl compact><dt><b>Note:</b></dt><dd>Even though the FLAC file is not open while the chain is being manipulated, you must not alter the file externally during this time. The chain assumes the FLAC file will not change between the time of <a class="el" href="group__flac__metadata__level2.html#ga6">FLAC__metadata_chain_read()</a>/FLAC__metadata_chain_read_ogg() and <a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a>.<p>
Do not modify the is_last, length, or type fields of returned <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> objects. These are managed automatically.<p>
The metadata objects returned by <a class="el" href="group__flac__metadata__level2.html#ga22">FLAC__metadata_iterator_get_block()</a> are owned by the chain; do not <a class="el" href="group__flac__metadata__object.html#ga2">FLAC__metadata_object_delete()</a> them. In the same way, blocks passed to <a class="el" href="group__flac__metadata__level2.html#ga23">FLAC__metadata_iterator_set_block()</a> become owned by the chain and they will be deleted when the chain is deleted. </dd></dl>

<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a></td></tr>

<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga27">FLAC__Metadata_ChainStatus</a> { <br>
&nbsp;&nbsp;<a class="el" href="group__flac__metadata__level2.html#gga27a18">FLAC__METADATA_CHAIN_STATUS_OK</a> =  0, 
<a class="el" href="group__flac__metadata__level2.html#gga27a19">FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUT</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a20">FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a21">FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILE</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="group__flac__metadata__level2.html#gga27a22">FLAC__METADATA_CHAIN_STATUS_NOT_WRITABLE</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a23">FLAC__METADATA_CHAIN_STATUS_BAD_METADATA</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a24">FLAC__METADATA_CHAIN_STATUS_READ_ERROR</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a25">FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="group__flac__metadata__level2.html#gga27a26">FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a27">FLAC__METADATA_CHAIN_STATUS_RENAME_ERROR</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a28">FLAC__METADATA_CHAIN_STATUS_UNLINK_ERROR</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a29">FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR</a>, 
<br>
&nbsp;&nbsp;<a class="el" href="group__flac__metadata__level2.html#gga27a30">FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a31">FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKS</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a32">FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH</a>, 
<a class="el" href="group__flac__metadata__level2.html#gga27a33">FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL</a>
<br>
 }</td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga3">FLAC__metadata_chain_new</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga4">FLAC__metadata_chain_delete</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__metadata__level2.html#ga27">FLAC__Metadata_ChainStatus</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga5">FLAC__metadata_chain_status</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga6">FLAC__metadata_chain_read</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain, const char *filename)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga7">FLAC__metadata_chain_read_ogg</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain, const char *filename)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga8">FLAC__metadata_chain_read_with_callbacks</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain, <a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle, <a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a> callbacks)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga9">FLAC__metadata_chain_read_ogg_with_callbacks</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain, <a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle, <a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a> callbacks)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga10">FLAC__metadata_chain_check_if_tempfile_needed</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain, FLAC__bool use_padding)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain, FLAC__bool use_padding, FLAC__bool preserve_file_stats)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga12">FLAC__metadata_chain_write_with_callbacks</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain, FLAC__bool use_padding, <a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle, <a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a> callbacks)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga13">FLAC__metadata_chain_write_with_callbacks_and_tempfile</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain, FLAC__bool use_padding, <a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle, <a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a> callbacks, <a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> temp_handle, <a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a> temp_callbacks)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga14">FLAC__metadata_chain_merge_padding</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga15">FLAC__metadata_chain_sort_padding</a> (<a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga16">FLAC__metadata_iterator_new</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga17">FLAC__metadata_iterator_delete</a> (<a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *iterator)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga18">FLAC__metadata_iterator_init</a> (<a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *iterator, <a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *chain)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga19">FLAC__metadata_iterator_next</a> (<a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *iterator)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga20">FLAC__metadata_iterator_prev</a> (<a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *iterator)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__format.html#ga113">FLAC__MetadataType</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga21">FLAC__metadata_iterator_get_block_type</a> (const <a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *iterator)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga22">FLAC__metadata_iterator_get_block</a> (<a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *iterator)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga23">FLAC__metadata_iterator_set_block</a> (<a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *iterator, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *block)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga24">FLAC__metadata_iterator_delete_block</a> (<a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *iterator, FLAC__bool replace_with_padding)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga25">FLAC__metadata_iterator_insert_block_before</a> (<a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *iterator, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *block)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga26">FLAC__metadata_iterator_insert_block_after</a> (<a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *iterator, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *block)</td></tr>

<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level2.html#ga2">FLAC__Metadata_ChainStatusString</a> []</td></tr>

</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga0" doxytag="metadata.h::FLAC__Metadata_Chain"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef struct <a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> <a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The opaque structure definition for the level 2 chain type.     </td>
  </tr>
</table>
<a class="anchor" name="ga1" doxytag="metadata.h::FLAC__Metadata_Iterator"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef struct <a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> <a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The opaque structure definition for the level 2 iterator type.     </td>
  </tr>
</table>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="ga27" doxytag="metadata.h::FLAC__Metadata_ChainStatus"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">enum <a class="el" href="group__flac__metadata__level2.html#ga27">FLAC__Metadata_ChainStatus</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt><b>Enumeration values: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="gga27a18" doxytag="FLAC__METADATA_CHAIN_STATUS_OK"></a>FLAC__METADATA_CHAIN_STATUS_OK</em>&nbsp;</td><td>
The chain is in the normal OK state </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a19" doxytag="FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUT"></a>FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUT</em>&nbsp;</td><td>
The data passed into a function violated the function's usage criteria </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a20" doxytag="FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE"></a>FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE</em>&nbsp;</td><td>
The chain could not open the target file </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a21" doxytag="FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILE"></a>FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILE</em>&nbsp;</td><td>
The chain could not find the FLAC signature at the start of the file </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a22" doxytag="FLAC__METADATA_CHAIN_STATUS_NOT_WRITABLE"></a>FLAC__METADATA_CHAIN_STATUS_NOT_WRITABLE</em>&nbsp;</td><td>
The chain tried to write to a file that was not writable </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a23" doxytag="FLAC__METADATA_CHAIN_STATUS_BAD_METADATA"></a>FLAC__METADATA_CHAIN_STATUS_BAD_METADATA</em>&nbsp;</td><td>
The chain encountered input that does not conform to the FLAC metadata specification </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a24" doxytag="FLAC__METADATA_CHAIN_STATUS_READ_ERROR"></a>FLAC__METADATA_CHAIN_STATUS_READ_ERROR</em>&nbsp;</td><td>
The chain encountered an error while reading the FLAC file </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a25" doxytag="FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR"></a>FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR</em>&nbsp;</td><td>
The chain encountered an error while seeking in the FLAC file </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a26" doxytag="FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR"></a>FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR</em>&nbsp;</td><td>
The chain encountered an error while writing the FLAC file </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a27" doxytag="FLAC__METADATA_CHAIN_STATUS_RENAME_ERROR"></a>FLAC__METADATA_CHAIN_STATUS_RENAME_ERROR</em>&nbsp;</td><td>
The chain encountered an error renaming the FLAC file </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a28" doxytag="FLAC__METADATA_CHAIN_STATUS_UNLINK_ERROR"></a>FLAC__METADATA_CHAIN_STATUS_UNLINK_ERROR</em>&nbsp;</td><td>
The chain encountered an error removing the temporary file </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a29" doxytag="FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR"></a>FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR</em>&nbsp;</td><td>
Memory allocation failed </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a30" doxytag="FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR"></a>FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR</em>&nbsp;</td><td>
The caller violated an assertion or an unexpected error occurred </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a31" doxytag="FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKS"></a>FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKS</em>&nbsp;</td><td>
One or more of the required callbacks was NULL </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a32" doxytag="FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH"></a>FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH</em>&nbsp;</td><td>
<a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a> was called on a chain read by <a class="el" href="group__flac__metadata__level2.html#ga8">FLAC__metadata_chain_read_with_callbacks()</a>/FLAC__metadata_chain_read_ogg_with_callbacks(), or <a class="el" href="group__flac__metadata__level2.html#ga12">FLAC__metadata_chain_write_with_callbacks()</a>/FLAC__metadata_chain_write_with_callbacks_and_tempfile() was called on a chain read by <a class="el" href="group__flac__metadata__level2.html#ga6">FLAC__metadata_chain_read()</a>/FLAC__metadata_chain_read_ogg(). Matching read/write methods must always be used. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="gga27a33" doxytag="FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL"></a>FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL</em>&nbsp;</td><td>
<a class="el" href="group__flac__metadata__level2.html#ga12">FLAC__metadata_chain_write_with_callbacks()</a> was called when the chain write requires a tempfile; use <a class="el" href="group__flac__metadata__level2.html#ga13">FLAC__metadata_chain_write_with_callbacks_and_tempfile()</a> instead. Or, <a class="el" href="group__flac__metadata__level2.html#ga13">FLAC__metadata_chain_write_with_callbacks_and_tempfile()</a> was called when the chain write does not require a tempfile; use <a class="el" href="group__flac__metadata__level2.html#ga12">FLAC__metadata_chain_write_with_callbacks()</a> instead. Always check <a class="el" href="group__flac__metadata__level2.html#ga10">FLAC__metadata_chain_check_if_tempfile_needed()</a> before writing via callbacks. </td></tr>
</table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga3" doxytag="metadata.h::FLAC__metadata_chain_new"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a>* FLAC__metadata_chain_new           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a new chain instance.<p>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__Metadata_Chain*</em>&nbsp;</td><td><code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga4" doxytag="metadata.h::FLAC__metadata_chain_delete"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void FLAC__metadata_chain_delete           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>chain</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Free a chain instance. Deletes the object pointed to by <em>chain</em>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga5" doxytag="metadata.h::FLAC__metadata_chain_status"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga27">FLAC__Metadata_ChainStatus</a> FLAC__metadata_chain_status           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>chain</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the current status of the chain. Call this after a function returns <code>false</code> to get the reason for the error. Also resets the status to FLAC__METADATA_CHAIN_STATUS_OK.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__Metadata_ChainStatus</em>&nbsp;</td><td>The current status of the chain. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga6" doxytag="metadata.h::FLAC__metadata_chain_read"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_chain_read           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>chain</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read all metadata from a FLAC file into the chain.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>The path to the FLAC file to read. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> filename != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>true</code> if a valid list of metadata blocks was read from <em>filename</em>, else <code>false</code>. On failure, check the status with <a class="el" href="group__flac__metadata__level2.html#ga5">FLAC__metadata_chain_status()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga7" doxytag="metadata.h::FLAC__metadata_chain_read_ogg"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_chain_read_ogg           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>chain</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read all metadata from an Ogg FLAC file into the chain.<p>
<dl compact><dt><b>Note:</b></dt><dd>Ogg FLAC metadata data writing is not supported yet and <a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a> will fail.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>The path to the Ogg FLAC file to read. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> filename != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>true</code> if a valid list of metadata blocks was read from <em>filename</em>, else <code>false</code>. On failure, check the status with <a class="el" href="group__flac__metadata__level2.html#ga5">FLAC__metadata_chain_status()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga8" doxytag="metadata.h::FLAC__metadata_chain_read_with_callbacks"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_chain_read_with_callbacks           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>chain</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>handle</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>callbacks</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read all metadata from a FLAC stream into the chain via I/O callbacks.<p>
The <em>handle</em> need only be open for reading, but must be seekable. The equivalent minimum stdio fopen() file mode is <code>"r"</code> (or <code>"rb"</code> for Windows).<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The I/O handle of the FLAC stream to read. The handle will NOT be closed after the metadata is read; that is the duty of the caller. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callbacks</em>&nbsp;</td><td>A set of callbacks to use for I/O. The mandatory callbacks are <em>read</em>, <em>seek</em>, and <em>tell</em>. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>true</code> if a valid list of metadata blocks was read from <em>handle</em>, else <code>false</code>. On failure, check the status with <a class="el" href="group__flac__metadata__level2.html#ga5">FLAC__metadata_chain_status()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga9" doxytag="metadata.h::FLAC__metadata_chain_read_ogg_with_callbacks"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_chain_read_ogg_with_callbacks           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>chain</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>handle</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>callbacks</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read all metadata from an Ogg FLAC stream into the chain via I/O callbacks.<p>
The <em>handle</em> need only be open for reading, but must be seekable. The equivalent minimum stdio fopen() file mode is <code>"r"</code> (or <code>"rb"</code> for Windows).<p>
<dl compact><dt><b>Note:</b></dt><dd>Ogg FLAC metadata data writing is not supported yet and <a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a> will fail.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The I/O handle of the Ogg FLAC stream to read. The handle will NOT be closed after the metadata is read; that is the duty of the caller. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callbacks</em>&nbsp;</td><td>A set of callbacks to use for I/O. The mandatory callbacks are <em>read</em>, <em>seek</em>, and <em>tell</em>. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>true</code> if a valid list of metadata blocks was read from <em>handle</em>, else <code>false</code>. On failure, check the status with <a class="el" href="group__flac__metadata__level2.html#ga5">FLAC__metadata_chain_status()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga10" doxytag="metadata.h::FLAC__metadata_chain_check_if_tempfile_needed"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_chain_check_if_tempfile_needed           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>chain</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>use_padding</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Checks if writing the given chain would require the use of a temporary file, or if it could be written in place.<p>
Under certain conditions, padding can be utilized so that writing edited metadata back to the FLAC file does not require rewriting the entire file. If rewriting is required, then a temporary workfile is required. When writing metadata using callbacks, you must check this function to know whether to call <a class="el" href="group__flac__metadata__level2.html#ga12">FLAC__metadata_chain_write_with_callbacks()</a> or <a class="el" href="group__flac__metadata__level2.html#ga13">FLAC__metadata_chain_write_with_callbacks_and_tempfile()</a>. When writing with <a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a>, the temporary file is handled internally.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>use_padding</em>&nbsp;</td><td>Whether or not padding will be allowed to be used during the write. The value of <em>use_padding</em> given here must match the value later passed to <a class="el" href="group__flac__metadata__level2.html#ga12">FLAC__metadata_chain_write_with_callbacks()</a> or FLAC__metadata_chain_write_with_callbacks_with_tempfile(). </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>true</code> if writing the current chain would require a tempfile, or <code>false</code> if metadata can be written in place. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga11" doxytag="metadata.h::FLAC__metadata_chain_write"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_chain_write           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>chain</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>use_padding</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>preserve_file_stats</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write all metadata out to the FLAC file. This function tries to be as efficient as possible; how the metadata is actually written is shown by the following:<p>
If the current chain is the same size as the existing metadata, the new data is written in place.<p>
If the current chain is longer than the existing metadata, and <em>use_padding</em> is <code>true</code>, and the last block is a PADDING block of sufficient length, the function will truncate the final padding block so that the overall size of the metadata is the same as the existing metadata, and then just rewrite the metadata. Otherwise, if not all of the above conditions are met, the entire FLAC file must be rewritten. If you want to use padding this way it is a good idea to call <a class="el" href="group__flac__metadata__level2.html#ga15">FLAC__metadata_chain_sort_padding()</a> first so that you have the maximum amount of padding to work with, unless you need to preserve ordering of the PADDING blocks for some reason.<p>
If the current chain is shorter than the existing metadata, and <em>use_padding</em> is <code>true</code>, and the final block is a PADDING block, the padding is extended to make the overall size the same as the existing data. If <em>use_padding</em> is <code>true</code> and the last block is not a PADDING block, a new PADDING block is added to the end of the new data to make it the same size as the existing data (if possible, see the note to <a class="el" href="group__flac__metadata__level1.html#ga15">FLAC__metadata_simple_iterator_set_block()</a> about the four byte limit) and the new data is written in place. If none of the above apply or <em>use_padding</em> is <code>false</code>, the entire FLAC file is rewritten.<p>
If <em>preserve_file_stats</em> is <code>true</code>, the owner and modification time will be preserved even if the FLAC file is written.<p>
For this write function to be used, the chain must have been read with <a class="el" href="group__flac__metadata__level2.html#ga6">FLAC__metadata_chain_read()</a>/FLAC__metadata_chain_read_ogg(), not <a class="el" href="group__flac__metadata__level2.html#ga8">FLAC__metadata_chain_read_with_callbacks()</a>/FLAC__metadata_chain_read_ogg_with_callbacks().<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>use_padding</em>&nbsp;</td><td>See above. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>preserve_file_stats</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>true</code> if the write succeeded, else <code>false</code>. On failure, check the status with <a class="el" href="group__flac__metadata__level2.html#ga5">FLAC__metadata_chain_status()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga12" doxytag="metadata.h::FLAC__metadata_chain_write_with_callbacks"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_chain_write_with_callbacks           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>chain</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>use_padding</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>handle</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>callbacks</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write all metadata out to a FLAC stream via callbacks.<p>
(See <a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a> for the details on how padding is used to write metadata in place if possible.)<p>
The <em>handle</em> must be open for updating and be seekable. The equivalent minimum stdio fopen() file mode is <code>"r+"</code> (or <code>"r+b"</code> for Windows).<p>
For this write function to be used, the chain must have been read with <a class="el" href="group__flac__metadata__level2.html#ga8">FLAC__metadata_chain_read_with_callbacks()</a>/FLAC__metadata_chain_read_ogg_with_callbacks(), not <a class="el" href="group__flac__metadata__level2.html#ga6">FLAC__metadata_chain_read()</a>/FLAC__metadata_chain_read_ogg(). Also, <a class="el" href="group__flac__metadata__level2.html#ga10">FLAC__metadata_chain_check_if_tempfile_needed()</a> must have returned <code>false</code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>use_padding</em>&nbsp;</td><td>See <a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The I/O handle of the FLAC stream to write. The handle will NOT be closed after the metadata is written; that is the duty of the caller. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callbacks</em>&nbsp;</td><td>A set of callbacks to use for I/O. The mandatory callbacks are <em>write</em> and <em>seek</em>. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>true</code> if the write succeeded, else <code>false</code>. On failure, check the status with <a class="el" href="group__flac__metadata__level2.html#ga5">FLAC__metadata_chain_status()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga13" doxytag="metadata.h::FLAC__metadata_chain_write_with_callbacks_and_tempfile"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_chain_write_with_callbacks_and_tempfile           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>chain</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>use_padding</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>handle</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>callbacks</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>temp_handle</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>temp_callbacks</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write all metadata out to a FLAC stream via callbacks.<p>
(See <a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a> for the details on how padding is used to write metadata in place if possible.)<p>
This version of the write-with-callbacks function must be used when <a class="el" href="group__flac__metadata__level2.html#ga10">FLAC__metadata_chain_check_if_tempfile_needed()</a> returns true. In this function, you must supply an I/O handle corresponding to the FLAC file to edit, and a temporary handle to which the new FLAC file will be written. It is the caller's job to move this temporary FLAC file on top of the original FLAC file to complete the metadata edit.<p>
The <em>handle</em> must be open for reading and be seekable. The equivalent minimum stdio fopen() file mode is <code>"r"</code> (or <code>"rb"</code> for Windows).<p>
The <em>temp_handle</em> must be open for writing. The equivalent minimum stdio fopen() file mode is <code>"w"</code> (or <code>"wb"</code> for Windows). It should be an empty stream, or at least positioned at the start-of-file (in which case it is the caller's duty to truncate it on return).<p>
For this write function to be used, the chain must have been read with <a class="el" href="group__flac__metadata__level2.html#ga8">FLAC__metadata_chain_read_with_callbacks()</a>/FLAC__metadata_chain_read_ogg_with_callbacks(), not <a class="el" href="group__flac__metadata__level2.html#ga6">FLAC__metadata_chain_read()</a>/FLAC__metadata_chain_read_ogg(). Also, <a class="el" href="group__flac__metadata__level2.html#ga10">FLAC__metadata_chain_check_if_tempfile_needed()</a> must have returned <code>true</code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>use_padding</em>&nbsp;</td><td>See <a class="el" href="group__flac__metadata__level2.html#ga11">FLAC__metadata_chain_write()</a> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The I/O handle of the original FLAC stream to read. The handle will NOT be closed after the metadata is written; that is the duty of the caller. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callbacks</em>&nbsp;</td><td>A set of callbacks to use for I/O on <em>handle</em>. The mandatory callbacks are <em>read</em>, <em>seek</em>, and <em>eof</em>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>temp_handle</em>&nbsp;</td><td>The I/O handle of the FLAC stream to write. The handle will NOT be closed after the metadata is written; that is the duty of the caller. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>temp_callbacks</em>&nbsp;</td><td>A set of callbacks to use for I/O on temp_handle. The only mandatory callback is <em>write</em>. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>true</code> if the write succeeded, else <code>false</code>. On failure, check the status with <a class="el" href="group__flac__metadata__level2.html#ga5">FLAC__metadata_chain_status()</a>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga14" doxytag="metadata.h::FLAC__metadata_chain_merge_padding"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void FLAC__metadata_chain_merge_padding           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>chain</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Merge adjacent PADDING blocks into a single block.<p>
<dl compact><dt><b>Note:</b></dt><dd>This function does not write to the FLAC file, it only modifies the chain.</dd></dl>
<dl compact><dt><b>Warning:</b></dt><dd>Any iterator on the current chain will become invalid after this call. You should delete the iterator and get a new one.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga15" doxytag="metadata.h::FLAC__metadata_chain_sort_padding"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void FLAC__metadata_chain_sort_padding           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>chain</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This function will move all PADDING blocks to the end on the metadata, then merge them into a single block.<p>
<dl compact><dt><b>Note:</b></dt><dd>This function does not write to the FLAC file, it only modifies the chain.</dd></dl>
<dl compact><dt><b>Warning:</b></dt><dd>Any iterator on the current chain will become invalid after this call. You should delete the iterator and get a new one.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing chain. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga16" doxytag="metadata.h::FLAC__metadata_iterator_new"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a>* FLAC__metadata_iterator_new           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a new iterator instance.<p>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__Metadata_Iterator*</em>&nbsp;</td><td><code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga17" doxytag="metadata.h::FLAC__metadata_iterator_delete"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void FLAC__metadata_iterator_delete           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iterator</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Free an iterator instance. Deletes the object pointed to by <em>iterator</em>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iterator</em>&nbsp;</td><td>A pointer to an existing iterator. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL 
</pre></div> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga18" doxytag="metadata.h::FLAC__metadata_iterator_init"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void FLAC__metadata_iterator_init           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>iterator</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__flac__metadata__level2.html#ga0">FLAC__Metadata_Chain</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>chain</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Initialize the iterator to point to the first metadata block in the given chain.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iterator</em>&nbsp;</td><td>A pointer to an existing iterator. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>chain</em>&nbsp;</td><td>A pointer to an existing and initialized (read) chain. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL 
</pre></div> <div class="fragment"><pre class="fragment"> chain != NULL 
</pre></div> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga19" doxytag="metadata.h::FLAC__metadata_iterator_next"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_iterator_next           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iterator</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Moves the iterator forward one metadata block, returning <code>false</code> if already at the end.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iterator</em>&nbsp;</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL 
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level2.html#ga18">FLAC__metadata_iterator_init()</a> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if already at the last metadata block of the chain, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga20" doxytag="metadata.h::FLAC__metadata_iterator_prev"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_iterator_prev           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iterator</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Moves the iterator backward one metadata block, returning <code>false</code> if already at the beginning.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iterator</em>&nbsp;</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL 
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level2.html#ga18">FLAC__metadata_iterator_init()</a> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if already at the first metadata block of the chain, else <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga21" doxytag="metadata.h::FLAC__metadata_iterator_get_block_type"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__format.html#ga113">FLAC__MetadataType</a> FLAC__metadata_iterator_get_block_type           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iterator</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the type of the metadata block at the current position.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iterator</em>&nbsp;</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL 
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level2.html#ga18">FLAC__metadata_iterator_init()</a> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__MetadataType</em>&nbsp;</td><td>The type of the metadata block at the current iterator position. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga22" doxytag="metadata.h::FLAC__metadata_iterator_get_block"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a>* FLAC__metadata_iterator_get_block           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>iterator</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the metadata block at the current position. You can modify the block in place but must write the chain before the changes are reflected to the FLAC file. You do not need to call <a class="el" href="group__flac__metadata__level2.html#ga23">FLAC__metadata_iterator_set_block()</a> to reflect the changes; the pointer returned by <a class="el" href="group__flac__metadata__level2.html#ga22">FLAC__metadata_iterator_get_block()</a> points directly into the chain.<p>
<dl compact><dt><b>Warning:</b></dt><dd>Do not call <a class="el" href="group__flac__metadata__object.html#ga2">FLAC__metadata_object_delete()</a> on the returned object; to delete a block use <a class="el" href="group__flac__metadata__level2.html#ga24">FLAC__metadata_iterator_delete_block()</a>.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iterator</em>&nbsp;</td><td>A pointer to an existing initialized iterator. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL 
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level2.html#ga18">FLAC__metadata_iterator_init()</a> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__StreamMetadata*</em>&nbsp;</td><td>The current metadata block. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga23" doxytag="metadata.h::FLAC__metadata_iterator_set_block"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_iterator_set_block           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>iterator</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>block</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the metadata block at the current position, replacing the existing block. The new block passed in becomes owned by the chain and it will be deleted when the chain is deleted.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iterator</em>&nbsp;</td><td>A pointer to an existing initialized iterator. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>block</em>&nbsp;</td><td>A pointer to a metadata block. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL 
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level2.html#ga18">FLAC__metadata_iterator_init()</a> <div class="fragment"><pre class="fragment"> block != NULL 
</pre></div> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the conditions in the above description are not met, or a memory allocation error occurs, otherwise <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga24" doxytag="metadata.h::FLAC__metadata_iterator_delete_block"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_iterator_delete_block           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>iterator</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>FLAC__bool&nbsp;</td>
          <td class="mdname" nowrap> <em>replace_with_padding</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Removes the current block from the chain. If <em>replace_with_padding</em> is <code>true</code>, the block will instead be replaced with a padding block of equal size. You can not delete the STREAMINFO block. The iterator will be left pointing to the block before the one just "deleted", even if <em>replace_with_padding</em> is <code>true</code>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iterator</em>&nbsp;</td><td>A pointer to an existing initialized iterator. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>replace_with_padding</em>&nbsp;</td><td>See above. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL 
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level2.html#ga18">FLAC__metadata_iterator_init()</a> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the conditions in the above description are not met, otherwise <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga25" doxytag="metadata.h::FLAC__metadata_iterator_insert_block_before"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_iterator_insert_block_before           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>iterator</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>block</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Insert a new block before the current block. You cannot insert a block before the first STREAMINFO block. You cannot insert a STREAMINFO block as there can be only one, the one that already exists at the head when you read in a chain. The chain takes ownership of the new block and it will be deleted when the chain is deleted. The iterator will be left pointing to the new block.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iterator</em>&nbsp;</td><td>A pointer to an existing initialized iterator. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>block</em>&nbsp;</td><td>A pointer to a metadata block to insert. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL 
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level2.html#ga18">FLAC__metadata_iterator_init()</a> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the conditions in the above description are not met, or a memory allocation error occurs, otherwise <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga26" doxytag="metadata.h::FLAC__metadata_iterator_insert_block_after"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_iterator_insert_block_after           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level2.html#ga1">FLAC__Metadata_Iterator</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>iterator</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>block</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Insert a new block after the current block. You cannot insert a STREAMINFO block as there can be only one, the one that already exists at the head when you read in a chain. The chain takes ownership of the new block and it will be deleted when the chain is deleted. The iterator will be left pointing to the new block.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iterator</em>&nbsp;</td><td>A pointer to an existing initialized iterator. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>block</em>&nbsp;</td><td>A pointer to a metadata block to insert. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL 
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level2.html#ga18">FLAC__metadata_iterator_init()</a> </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em>&nbsp;</td><td><code>false</code> if the conditions in the above description are not met, or a memory allocation error occurs, otherwise <code>true</code>. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="ga2" doxytag="metadata.h::FLAC__Metadata_ChainStatusString"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__metadata__level2.html#ga2">FLAC__Metadata_ChainStatusString</a>[]          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maps a FLAC__Metadata_ChainStatus to a C string.<p>
Using a FLAC__Metadata_ChainStatus as the index to this array will give the string equivalent. The contents should not be modified.     </td>
  </tr>
</table>

<hr size="1">
<div class="copyright">
	<!-- @@@ oh so hacky -->
	<table>
		<tr>
			<td align="left">
				Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
			</td>
			<td width="1%" align="right">
				<a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=13478&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
			</td>
		</tr>
	</table>
</div>
<!-- Copyright (c)  2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson -->
<!-- Permission is granted to copy, distribute and/or modify this document -->
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
<!-- or any later version published by the Free Software Foundation; -->
<!-- with no invariant sections. -->
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
</body>
</html>