1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
<title>FLAC/metadata.h: metadata level 1 interface</title>
3
<title>FLAC: FLAC/metadata.h: metadata level 1 interface</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
<!-- Generated by Doxygen 1.2.14 -->
8
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center>
9
<hr><h1>FLAC/metadata.h: metadata level 1 interface<br>
6
<!-- Generated by Doxygen 1.4.2 -->
7
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
8
<h1>FLAC/metadata.h: metadata level 1 interface<br>
11
10
[<a class="el" href="group__flac__metadata.html">FLAC/metadata.h: metadata interfaces</a>]</small>
12
</h1>The level 1 interface provides read-write access to FLAC file metadata and operates directly on the FLAC file.
13
<a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0>
14
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
15
<tr><td nowrap align=right valign=top>typedef FLAC__Metadata_SimpleIterator </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a></td></tr>
16
<tr><td colspan=2><br><h2>Enumerations</h2></td></tr>
17
<tr><td nowrap align=right valign=top>enum </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a14">FLAC__Metadata_SimpleIteratorStatus</a> { <br>
18
<a class="el" href="group__flac__metadata__level1.html#a14a5">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK</a> = 0,
19
<a class="el" href="group__flac__metadata__level1.html#a14a6">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT</a>,
20
<a class="el" href="group__flac__metadata__level1.html#a14a7">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE</a>,
21
<a class="el" href="group__flac__metadata__level1.html#a14a8">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE</a>,
23
<a class="el" href="group__flac__metadata__level1.html#a14a9">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE</a>,
24
<a class="el" href="group__flac__metadata__level1.html#a14a10">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA</a>,
25
<a class="el" href="group__flac__metadata__level1.html#a14a11">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR</a>,
26
<a class="el" href="group__flac__metadata__level1.html#a14a12">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR</a>,
28
<a class="el" href="group__flac__metadata__level1.html#a14a13">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR</a>,
29
<a class="el" href="group__flac__metadata__level1.html#a14a14">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR</a>,
30
<a class="el" href="group__flac__metadata__level1.html#a14a15">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR</a>,
31
<a class="el" href="group__flac__metadata__level1.html#a14a16">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR</a>,
33
<a class="el" href="group__flac__metadata__level1.html#a14a17">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERROR</a>
11
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
12
The level 1 interface provides read-write access to FLAC file metadata and operates directly on the FLAC file.
14
The general usage of this interface is:<p>
16
<li>Create an iterator using <a class="el" href="group__flac__metadata__level1.html#ga2">FLAC__metadata_simple_iterator_new()</a></li><li>Attach it to a file using <a class="el" href="group__flac__metadata__level1.html#ga5">FLAC__metadata_simple_iterator_init()</a> and check the exit code. Call <a class="el" href="group__flac__metadata__level1.html#ga6">FLAC__metadata_simple_iterator_is_writable()</a> to see if the file is writable, or only read access is allowed.</li><li>Use <a class="el" href="group__flac__metadata__level1.html#ga7">FLAC__metadata_simple_iterator_next()</a> and <a class="el" href="group__flac__metadata__level1.html#ga8">FLAC__metadata_simple_iterator_prev()</a> to traverse the blocks. This is does not read the actual blocks themselves. <a class="el" href="group__flac__metadata__level1.html#ga7">FLAC__metadata_simple_iterator_next()</a> is relatively fast. <a class="el" href="group__flac__metadata__level1.html#ga8">FLAC__metadata_simple_iterator_prev()</a> is slower since it needs to search forward from the front of the file.</li><li>Use <a class="el" href="group__flac__metadata__level1.html#ga9">FLAC__metadata_simple_iterator_get_block_type()</a> or <a class="el" href="group__flac__metadata__level1.html#ga10">FLAC__metadata_simple_iterator_get_block()</a> to access the actual data at the current iterator position. The returned object is yours to modify and free.</li><li>Use <a class="el" href="group__flac__metadata__level1.html#ga11">FLAC__metadata_simple_iterator_set_block()</a> to write a modified block back. You must have write permission to the original file. Make sure to read the whole comment to <a class="el" href="group__flac__metadata__level1.html#ga11">FLAC__metadata_simple_iterator_set_block()</a> below.</li><li>Use <a class="el" href="group__flac__metadata__level1.html#ga12">FLAC__metadata_simple_iterator_insert_block_after()</a> to add new blocks. Use the object creation functions from <a class="el" href="group__flac__metadata__object.html">here </a> to generate new objects.</li><li>Use <a class="el" href="group__flac__metadata__level1.html#ga13">FLAC__metadata_simple_iterator_delete_block()</a> to remove the block currently referred to by the iterator, or replace it with padding.</li><li>Destroy the iterator with <a class="el" href="group__flac__metadata__level1.html#ga3">FLAC__metadata_simple_iterator_delete()</a> when finished.</li></ul>
18
<dl compact><dt><b>Note:</b></dt><dd>The FLAC file remains open the whole time between <a class="el" href="group__flac__metadata__level1.html#ga5">FLAC__metadata_simple_iterator_init()</a> and <a class="el" href="group__flac__metadata__level1.html#ga3">FLAC__metadata_simple_iterator_delete()</a>, so make sure you are not altering the file during this time.<p>
19
Do not modify the <em>is_last</em>, <em>length</em>, or <em>type</em> fields of returned <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> objects. These are managed automatically.<p>
20
If any of the modification functions (<a class="el" href="group__flac__metadata__level1.html#ga11">FLAC__metadata_simple_iterator_set_block()</a>, <a class="el" href="group__flac__metadata__level1.html#ga13">FLAC__metadata_simple_iterator_delete_block()</a>, <a class="el" href="group__flac__metadata__level1.html#ga12">FLAC__metadata_simple_iterator_insert_block_after()</a>, etc.) return <code>false</code>, you should delete the iterator as it may no longer be valid. </dd></dl>
23
<table border="0" cellpadding="0" cellspacing="0">
25
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
26
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a></td></tr>
28
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
29
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga14">FLAC__Metadata_SimpleIteratorStatus</a> { <br>
30
<a class="el" href="group__flac__metadata__level1.html#gga14a5">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK</a> = 0,
31
<a class="el" href="group__flac__metadata__level1.html#gga14a6">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT</a>,
32
<a class="el" href="group__flac__metadata__level1.html#gga14a7">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE</a>,
33
<a class="el" href="group__flac__metadata__level1.html#gga14a8">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE</a>,
35
<a class="el" href="group__flac__metadata__level1.html#gga14a9">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE</a>,
36
<a class="el" href="group__flac__metadata__level1.html#gga14a10">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA</a>,
37
<a class="el" href="group__flac__metadata__level1.html#gga14a11">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR</a>,
38
<a class="el" href="group__flac__metadata__level1.html#gga14a12">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR</a>,
40
<a class="el" href="group__flac__metadata__level1.html#gga14a13">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR</a>,
41
<a class="el" href="group__flac__metadata__level1.html#gga14a14">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR</a>,
42
<a class="el" href="group__flac__metadata__level1.html#gga14a15">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR</a>,
43
<a class="el" href="group__flac__metadata__level1.html#gga14a16">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR</a>,
45
<a class="el" href="group__flac__metadata__level1.html#gga14a17">FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERROR</a>
36
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
37
<tr><td nowrap align=right valign=top><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a2">FLAC__metadata_simple_iterator_new</a> ()</td></tr>
38
<tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a3">FLAC__metadata_simple_iterator_delete</a> (<a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
39
<tr><td nowrap align=right valign=top><a class="el" href="group__flac__metadata__level1.html#a14">FLAC__Metadata_SimpleIteratorStatus</a> </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a4">FLAC__metadata_simple_iterator_status</a> (<a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
40
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a5">FLAC__metadata_simple_iterator_init</a> (<a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator, const char *filename, FLAC__bool read_only, FLAC__bool preserve_file_stats)</td></tr>
41
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a6">FLAC__metadata_simple_iterator_is_writable</a> (const <a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
42
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a7">FLAC__metadata_simple_iterator_next</a> (<a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
43
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a8">FLAC__metadata_simple_iterator_prev</a> (<a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
44
<tr><td nowrap align=right valign=top><a class="el" href="group__flac__format.html#a97">FLAC__MetadataType</a> </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a9">FLAC__metadata_simple_iterator_get_block_type</a> (const <a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
45
<tr><td nowrap align=right valign=top><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> * </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a10">FLAC__metadata_simple_iterator_get_block</a> (<a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
46
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a11">FLAC__metadata_simple_iterator_set_block</a> (<a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *block, FLAC__bool use_padding)</td></tr>
47
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a12">FLAC__metadata_simple_iterator_insert_block_after</a> (<a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *block, FLAC__bool use_padding)</td></tr>
48
<tr><td nowrap align=right valign=top>FLAC__bool </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a13">FLAC__metadata_simple_iterator_delete_block</a> (<a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> *iterator, FLAC__bool use_padding)</td></tr>
49
<tr><td colspan=2><br><h2>Variables</h2></td></tr>
50
<tr><td nowrap align=right valign=top>const char *const </td><td valign=bottom><a class="el" href="group__flac__metadata__level1.html#a1">FLAC__Metadata_SimpleIteratorStatusString</a> []</td></tr>
49
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
50
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga2">FLAC__metadata_simple_iterator_new</a> (void)</td></tr>
52
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga3">FLAC__metadata_simple_iterator_delete</a> (<a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
54
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__metadata__level1.html#ga14">FLAC__Metadata_SimpleIteratorStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga4">FLAC__metadata_simple_iterator_status</a> (<a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
56
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga5">FLAC__metadata_simple_iterator_init</a> (<a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator, const char *filename, FLAC__bool read_only, FLAC__bool preserve_file_stats)</td></tr>
58
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga6">FLAC__metadata_simple_iterator_is_writable</a> (const <a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
60
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga7">FLAC__metadata_simple_iterator_next</a> (<a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
62
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga8">FLAC__metadata_simple_iterator_prev</a> (<a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
64
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__flac__format.html#ga109">FLAC__MetadataType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga9">FLAC__metadata_simple_iterator_get_block_type</a> (const <a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
66
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga10">FLAC__metadata_simple_iterator_get_block</a> (<a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator)</td></tr>
68
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga11">FLAC__metadata_simple_iterator_set_block</a> (<a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *block, FLAC__bool use_padding)</td></tr>
70
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga12">FLAC__metadata_simple_iterator_insert_block_after</a> (<a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *block, FLAC__bool use_padding)</td></tr>
72
<tr><td class="memItemLeft" nowrap align="right" valign="top">FLAC__bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga13">FLAC__metadata_simple_iterator_delete_block</a> (<a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> *iterator, FLAC__bool use_padding)</td></tr>
74
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
75
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *const </td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html#ga1">FLAC__Metadata_SimpleIteratorStatusString</a> []</td></tr>
52
<hr><a name="_details"></a><h2>Detailed Description</h2>
53
The level 1 interface provides read-write access to FLAC file metadata and operates directly on the FLAC file.
57
The general usage of this interface is:
60
<li>Create an iterator using <a class="el" href="group__flac__metadata__level1.html#a2">FLAC__metadata_simple_iterator_new</a>()<li>Attach it to a file using <a class="el" href="group__flac__metadata__level1.html#a5">FLAC__metadata_simple_iterator_init</a>() and check the exit code. Call <a class="el" href="group__flac__metadata__level1.html#a6">FLAC__metadata_simple_iterator_is_writable</a>() to see if the file is writable, or read-only access is allowed.<li>Use <a class="el" href="group__flac__metadata__level1.html#a7">FLAC__metadata_simple_iterator_next</a>() and <a class="el" href="group__flac__metadata__level1.html#a8">FLAC__metadata_simple_iterator_prev</a>() to move around the blocks. This is does not read the actual blocks themselves. <a class="el" href="group__flac__metadata__level1.html#a7">FLAC__metadata_simple_iterator_next</a>() is relatively fast. <a class="el" href="group__flac__metadata__level1.html#a8">FLAC__metadata_simple_iterator_prev</a>() is slower since it needs to search forward from the front of the file.<li>Use <a class="el" href="group__flac__metadata__level1.html#a9">FLAC__metadata_simple_iterator_get_block_type</a>() or <a class="el" href="group__flac__metadata__level1.html#a10">FLAC__metadata_simple_iterator_get_block</a>() to access the actual data at the current iterator position. The returned object is yours to modify and free.<li>Use <a class="el" href="group__flac__metadata__level1.html#a11">FLAC__metadata_simple_iterator_set_block</a>() to write a modified block back. You must have write permission to the original file. Make sure to read the whole comment to <a class="el" href="group__flac__metadata__level1.html#a11">FLAC__metadata_simple_iterator_set_block</a>() below.<li>Use <a class="el" href="group__flac__metadata__level1.html#a12">FLAC__metadata_simple_iterator_insert_block_after</a>() to add new blocks. Use the object creation functions from <a class="el" href="group__flac__metadata__object.html">here</a> to generate new objects.<li>Use <a class="el" href="group__flac__metadata__level1.html#a13">FLAC__metadata_simple_iterator_delete_block</a>() to remove the block currently referred to by the iterator, or replace it with padding.<li>Destroy the iterator with <a class="el" href="group__flac__metadata__level1.html#a3">FLAC__metadata_simple_iterator_delete</a>() when finished.</ul>
63
The FLAC file remains open the whole time between <a class="el" href="group__flac__metadata__level1.html#a5">FLAC__metadata_simple_iterator_init</a>() and <a class="el" href="group__flac__metadata__level1.html#a3">FLAC__metadata_simple_iterator_delete</a>(), so make sure you are not altering the file during this time.</dl><dl compact><dt><b>
65
Do not modify the <em>is_last</em>, <em>length</em>, or <em>type</em> fields of returned <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> objects. These are managed automatically.</dl><dl compact><dt><b>
67
If any of the modification functions (<a class="el" href="group__flac__metadata__level1.html#a11">FLAC__metadata_simple_iterator_set_block</a>(), <a class="el" href="group__flac__metadata__level1.html#a13">FLAC__metadata_simple_iterator_delete_block</a>(), <a class="el" href="group__flac__metadata__level1.html#a12">FLAC__metadata_simple_iterator_insert_block_after</a>(), etc.) return <code>false</code>, you should delete the iterator as it may no longer be valid. </dl><hr><h2>Typedef Documentation</h2>
68
<a name="a0" doxytag="metadata.h::FLAC__Metadata_SimpleIterator"></a><p>
69
<table width="100%" cellpadding="2" cellspacing="0" border="0">
78
<hr><h2>Typedef Documentation</h2>
79
<a class="anchor" name="ga0" doxytag="metadata.h::FLAC__Metadata_SimpleIterator"></a><p>
80
<table class="mdTable" cellpadding="2" cellspacing="0">
72
83
<table cellpadding="0" cellspacing="0" border="0">
74
<td class="md" nowrap valign="top"> typedef struct FLAC__Metadata_SimpleIterator FLAC__Metadata_SimpleIterator
85
<td class="md" nowrap valign="top">typedef struct <a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> <a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> </td>
79
<table cellspacing=5 cellpadding=0 border=0>
91
<table cellspacing="5" cellpadding="0" border="0">
146
157
<hr><h2>Function Documentation</h2>
147
<a name="a2" doxytag="metadata.h::FLAC__metadata_simple_iterator_new"></a><p>
148
<table width="100%" cellpadding="2" cellspacing="0" border="0">
151
<table cellpadding="0" cellspacing="0" border="0">
153
<td class="md" nowrap valign="top"> <a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a>* FLAC__metadata_simple_iterator_new </td>
154
<td class="md" valign="top">( </td>
155
<td class="mdname1" valign="top" nowrap> </td>
156
<td class="md" valign="top">) </td>
157
<td class="md" nowrap></td>
164
<table cellspacing=5 cellpadding=0 border=0>
172
Create a new iterator instance.<dl compact><dt><b>
173
Return values: </b><dd>
174
<table border=0 cellspacing=2 cellpadding=0>
175
<tr><td valign=top><em>FLAC__Metadata_SimpleIterator</em> </td><td>
176
* <code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
181
<a name="a3" doxytag="metadata.h::FLAC__metadata_simple_iterator_delete"></a><p>
182
<table width="100%" cellpadding="2" cellspacing="0" border="0">
185
<table cellpadding="0" cellspacing="0" border="0">
187
<td class="md" nowrap valign="top"> void FLAC__metadata_simple_iterator_delete </td>
188
<td class="md" valign="top">( </td>
189
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
190
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
191
<td class="md" valign="top">) </td>
192
<td class="md" nowrap></td>
199
<table cellspacing=5 cellpadding=0 border=0>
207
Free an iterator instance. Deletes the object pointed to by <em>iterator</em>.<dl compact><dt><b>
209
<table border=0 cellspacing=2 cellpadding=0>
210
<tr><td valign=top><em>iterator</em> </td><td>
211
A pointer to an existing iterator. </td></tr>
213
</dl><dl compact><dt><b>
215
<div class="fragment"><pre>iterator != NULL
216
</pre></div> </dl> </td>
219
<a name="a4" doxytag="metadata.h::FLAC__metadata_simple_iterator_status"></a><p>
220
<table width="100%" cellpadding="2" cellspacing="0" border="0">
223
<table cellpadding="0" cellspacing="0" border="0">
225
<td class="md" nowrap valign="top"> <a class="el" href="group__flac__metadata__level1.html#a14">FLAC__Metadata_SimpleIteratorStatus</a> FLAC__metadata_simple_iterator_status </td>
226
<td class="md" valign="top">( </td>
227
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
228
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
229
<td class="md" valign="top">) </td>
230
<td class="md" nowrap></td>
237
<table cellspacing=5 cellpadding=0 border=0>
245
Get the current status of the iterator. Call this after a function returns <code>false</code> to get the reason for the error. Also resets the status to FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.<dl compact><dt><b>
247
<table border=0 cellspacing=2 cellpadding=0>
248
<tr><td valign=top><em>iterator</em> </td><td>
249
A pointer to an existing iterator. </td></tr>
251
</dl><dl compact><dt><b>
253
<div class="fragment"><pre>iterator != NULL
254
</pre></div> </dl><dl compact><dt><b>
255
Return values: </b><dd>
256
<table border=0 cellspacing=2 cellpadding=0>
257
<tr><td valign=top><em>FLAC__Metadata_SimpleIteratorStatus</em> </td><td>
258
The current status of the iterator. </td></tr>
263
<a name="a5" doxytag="metadata.h::FLAC__metadata_simple_iterator_init"></a><p>
264
<table width="100%" cellpadding="2" cellspacing="0" border="0">
267
<table cellpadding="0" cellspacing="0" border="0">
269
<td class="md" nowrap valign="top"> FLAC__bool FLAC__metadata_simple_iterator_init </td>
270
<td class="md" valign="top">( </td>
271
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
272
<td class="mdname" nowrap> <em>iterator</em>, </td>
158
<a class="anchor" name="ga2" doxytag="metadata.h::FLAC__metadata_simple_iterator_new"></a><p>
159
<table class="mdTable" cellpadding="2" cellspacing="0">
162
<table cellpadding="0" cellspacing="0" border="0">
164
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a>* FLAC__metadata_simple_iterator_new </td>
165
<td class="md" valign="top">( </td>
166
<td class="md" nowrap valign="top">void </td>
167
<td class="mdname1" valign="top" nowrap> </td>
168
<td class="md" valign="top"> ) </td>
169
<td class="md" nowrap></td>
175
<table cellspacing="5" cellpadding="0" border="0">
183
Create a new iterator instance.<p>
184
<dl compact><dt><b>Return values:</b></dt><dd>
185
<table border="0" cellspacing="2" cellpadding="0">
186
<tr><td valign="top"></td><td valign="top"><em>FLAC__Metadata_SimpleIterator*</em> </td><td><code>NULL</code> if there was an error allocating memory, else the new instance. </td></tr>
192
<a class="anchor" name="ga3" doxytag="metadata.h::FLAC__metadata_simple_iterator_delete"></a><p>
193
<table class="mdTable" cellpadding="2" cellspacing="0">
196
<table cellpadding="0" cellspacing="0" border="0">
198
<td class="md" nowrap valign="top">void FLAC__metadata_simple_iterator_delete </td>
199
<td class="md" valign="top">( </td>
200
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
201
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
202
<td class="md" valign="top"> ) </td>
203
<td class="md" nowrap></td>
209
<table cellspacing="5" cellpadding="0" border="0">
217
Free an iterator instance. Deletes the object pointed to by <em>iterator</em>.<p>
218
<dl compact><dt><b>Parameters:</b></dt><dd>
219
<table border="0" cellspacing="2" cellpadding="0">
220
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing iterator. </td></tr>
223
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
224
</pre></div> </dd></dl>
228
<a class="anchor" name="ga4" doxytag="metadata.h::FLAC__metadata_simple_iterator_status"></a><p>
229
<table class="mdTable" cellpadding="2" cellspacing="0">
232
<table cellpadding="0" cellspacing="0" border="0">
234
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga14">FLAC__Metadata_SimpleIteratorStatus</a> FLAC__metadata_simple_iterator_status </td>
235
<td class="md" valign="top">( </td>
236
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
237
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
238
<td class="md" valign="top"> ) </td>
239
<td class="md" nowrap></td>
245
<table cellspacing="5" cellpadding="0" border="0">
253
Get the current status of the iterator. Call this after a function returns <code>false</code> to get the reason for the error. Also resets the status to FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK.<p>
254
<dl compact><dt><b>Parameters:</b></dt><dd>
255
<table border="0" cellspacing="2" cellpadding="0">
256
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing iterator. </td></tr>
259
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
260
</pre></div> </dd></dl>
261
<dl compact><dt><b>Return values:</b></dt><dd>
262
<table border="0" cellspacing="2" cellpadding="0">
263
<tr><td valign="top"></td><td valign="top"><em>FLAC__Metadata_SimpleIteratorStatus</em> </td><td>The current status of the iterator. </td></tr>
269
<a class="anchor" name="ga5" doxytag="metadata.h::FLAC__metadata_simple_iterator_init"></a><p>
270
<table class="mdTable" cellpadding="2" cellspacing="0">
273
<table cellpadding="0" cellspacing="0" border="0">
275
<td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_simple_iterator_init </td>
276
<td class="md" valign="top">( </td>
277
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
278
<td class="mdname" nowrap> <em>iterator</em>, </td>
281
<td class="md" nowrap align="right"></td>
277
283
<td class="md" nowrap>const char * </td>
278
<td class="mdname" nowrap> <em>filename</em>, </td>
283
<td class="md" nowrap>FLAC__bool </td>
284
<td class="mdname" nowrap> <em>read_only</em>, </td>
289
<td class="md" nowrap>FLAC__bool </td>
290
<td class="mdname" nowrap> <em>preserve_file_stats</em></td>
294
<td class="md">) </td>
295
<td class="md" colspan="2"></td>
302
<table cellspacing=5 cellpadding=0 border=0>
310
Initialize the iterator to point to the first metadata block in the given FLAC file.<dl compact><dt><b>
312
<table border=0 cellspacing=2 cellpadding=0>
313
<tr><td valign=top><em>iterator</em> </td><td>
314
A pointer to an existing iterator. </td></tr>
315
<tr><td valign=top><em>filename</em> </td><td>
316
The path to the FLAC file. </td></tr>
317
<tr><td valign=top><em>read_only</em> </td><td>
318
If <code>true</code>, the FLAC file will be opened in read-only mode; if <code>false</code>, the FLAC file will be opened for edit even if no edits are performed. </td></tr>
319
<tr><td valign=top><em>preserve_file_stats</em> </td><td>
320
If <code>true</code>, the owner and modification time will be preserved even if the FLAC file is written to. </td></tr>
322
</dl><dl compact><dt><b>
324
<div class="fragment"><pre>iterator != NULL
325
</pre></div> <div class="fragment"><pre>filename != NULL
326
</pre></div> </dl><dl compact><dt><b>
327
Return values: </b><dd>
328
<table border=0 cellspacing=2 cellpadding=0>
329
<tr><td valign=top><em>FLAC__bool</em> </td><td>
330
<code>false</code> if a memory allocation error occurs, the file can't be opened, or another error occurs, else <code>true</code>. </td></tr>
335
<a name="a6" doxytag="metadata.h::FLAC__metadata_simple_iterator_is_writable"></a><p>
336
<table width="100%" cellpadding="2" cellspacing="0" border="0">
339
<table cellpadding="0" cellspacing="0" border="0">
341
<td class="md" nowrap valign="top"> FLAC__bool FLAC__metadata_simple_iterator_is_writable </td>
342
<td class="md" valign="top">( </td>
343
<td class="md" nowrap valign="top">const <a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
344
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
345
<td class="md" valign="top">) </td>
346
<td class="md" nowrap></td>
353
<table cellspacing=5 cellpadding=0 border=0>
361
Returns <code>true</code> if the FLAC file is writable. If <code>false</code>, calls to <a class="el" href="group__flac__metadata__level1.html#a11">FLAC__metadata_simple_iterator_set_block</a>() and <a class="el" href="group__flac__metadata__level1.html#a12">FLAC__metadata_simple_iterator_insert_block_after</a>() will fail.<dl compact><dt><b>
363
<table border=0 cellspacing=2 cellpadding=0>
364
<tr><td valign=top><em>iterator</em> </td><td>
365
A pointer to an existing iterator. </td></tr>
367
</dl><dl compact><dt><b>
369
<div class="fragment"><pre>iterator != NULL
370
</pre></div> </dl><dl compact><dt><b>
371
Return values: </b><dd>
372
<table border=0 cellspacing=2 cellpadding=0>
373
<tr><td valign=top><em>FLAC__bool</em> </td><td>
374
See above. </td></tr>
379
<a name="a7" doxytag="metadata.h::FLAC__metadata_simple_iterator_next"></a><p>
380
<table width="100%" cellpadding="2" cellspacing="0" border="0">
383
<table cellpadding="0" cellspacing="0" border="0">
385
<td class="md" nowrap valign="top"> FLAC__bool FLAC__metadata_simple_iterator_next </td>
386
<td class="md" valign="top">( </td>
387
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
388
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
389
<td class="md" valign="top">) </td>
390
<td class="md" nowrap></td>
397
<table cellspacing=5 cellpadding=0 border=0>
405
Moves the iterator forward one metadata block, returning <code>false</code> if already at the end.<dl compact><dt><b>
407
<table border=0 cellspacing=2 cellpadding=0>
408
<tr><td valign=top><em>iterator</em> </td><td>
409
A pointer to an existing initialized iterator. </td></tr>
411
</dl><dl compact><dt><b>
413
<div class="fragment"><pre>iterator != NULL
414
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#a5">FLAC__metadata_simple_iterator_init</a>() </dl><dl compact><dt><b>
415
Return values: </b><dd>
416
<table border=0 cellspacing=2 cellpadding=0>
417
<tr><td valign=top><em>FLAC__bool</em> </td><td>
418
<code>false</code> if already at the last metadata block of the chain, else <code>true</code>. </td></tr>
423
<a name="a8" doxytag="metadata.h::FLAC__metadata_simple_iterator_prev"></a><p>
424
<table width="100%" cellpadding="2" cellspacing="0" border="0">
427
<table cellpadding="0" cellspacing="0" border="0">
429
<td class="md" nowrap valign="top"> FLAC__bool FLAC__metadata_simple_iterator_prev </td>
430
<td class="md" valign="top">( </td>
431
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
432
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
433
<td class="md" valign="top">) </td>
434
<td class="md" nowrap></td>
441
<table cellspacing=5 cellpadding=0 border=0>
449
Moves the iterator backward one metadata block, returning <code>false</code> if already at the beginning.<dl compact><dt><b>
451
<table border=0 cellspacing=2 cellpadding=0>
452
<tr><td valign=top><em>iterator</em> </td><td>
453
A pointer to an existing initialized iterator. </td></tr>
455
</dl><dl compact><dt><b>
457
<div class="fragment"><pre>iterator != NULL
458
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#a5">FLAC__metadata_simple_iterator_init</a>() </dl><dl compact><dt><b>
459
Return values: </b><dd>
460
<table border=0 cellspacing=2 cellpadding=0>
461
<tr><td valign=top><em>FLAC__bool</em> </td><td>
462
<code>false</code> if already at the first metadata block of the chain, else <code>true</code>. </td></tr>
467
<a name="a9" doxytag="metadata.h::FLAC__metadata_simple_iterator_get_block_type"></a><p>
468
<table width="100%" cellpadding="2" cellspacing="0" border="0">
471
<table cellpadding="0" cellspacing="0" border="0">
473
<td class="md" nowrap valign="top"> <a class="el" href="group__flac__format.html#a97">FLAC__MetadataType</a> FLAC__metadata_simple_iterator_get_block_type </td>
474
<td class="md" valign="top">( </td>
475
<td class="md" nowrap valign="top">const <a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
476
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
477
<td class="md" valign="top">) </td>
478
<td class="md" nowrap></td>
485
<table cellspacing=5 cellpadding=0 border=0>
493
Get the type of the metadata block at the current position. This avoids reading the actual block data which can save time for large blocks.<dl compact><dt><b>
495
<table border=0 cellspacing=2 cellpadding=0>
496
<tr><td valign=top><em>iterator</em> </td><td>
497
A pointer to an existing initialized iterator. </td></tr>
499
</dl><dl compact><dt><b>
501
<div class="fragment"><pre>iterator != NULL
502
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#a5">FLAC__metadata_simple_iterator_init</a>() </dl><dl compact><dt><b>
503
Return values: </b><dd>
504
<table border=0 cellspacing=2 cellpadding=0>
505
<tr><td valign=top><em>FLAC__MetadataType</em> </td><td>
506
The type of the metadata block at the current iterator position. </td></tr>
511
<a name="a10" doxytag="metadata.h::FLAC__metadata_simple_iterator_get_block"></a><p>
512
<table width="100%" cellpadding="2" cellspacing="0" border="0">
515
<table cellpadding="0" cellspacing="0" border="0">
517
<td class="md" nowrap valign="top"> <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a>* FLAC__metadata_simple_iterator_get_block </td>
518
<td class="md" valign="top">( </td>
519
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
520
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
521
<td class="md" valign="top">) </td>
522
<td class="md" nowrap></td>
529
<table cellspacing=5 cellpadding=0 border=0>
537
Get the metadata block at the current position. You can modify the block but must use <a class="el" href="group__flac__metadata__level1.html#a11">FLAC__metadata_simple_iterator_set_block</a>() to write it back to the FLAC file.
539
You must call <a class="el" href="group__flac__metadata__object.html#a2">FLAC__metadata_object_delete</a>() on the returned object when you are finished with it.<dl compact><dt><b>
541
<table border=0 cellspacing=2 cellpadding=0>
542
<tr><td valign=top><em>iterator</em> </td><td>
543
A pointer to an existing initialized iterator. </td></tr>
545
</dl><dl compact><dt><b>
547
<div class="fragment"><pre>iterator != NULL
548
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#a5">FLAC__metadata_simple_iterator_init</a>() </dl><dl compact><dt><b>
549
Return values: </b><dd>
550
<table border=0 cellspacing=2 cellpadding=0>
551
<tr><td valign=top><em><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a></em> </td><td>
552
* The current metadata block. </td></tr>
557
<a name="a11" doxytag="metadata.h::FLAC__metadata_simple_iterator_set_block"></a><p>
558
<table width="100%" cellpadding="2" cellspacing="0" border="0">
561
<table cellpadding="0" cellspacing="0" border="0">
563
<td class="md" nowrap valign="top"> FLAC__bool FLAC__metadata_simple_iterator_set_block </td>
564
<td class="md" valign="top">( </td>
565
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
566
<td class="mdname" nowrap> <em>iterator</em>, </td>
571
<td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> * </td>
572
<td class="mdname" nowrap> <em>block</em>, </td>
577
<td class="md" nowrap>FLAC__bool </td>
578
<td class="mdname" nowrap> <em>use_padding</em></td>
582
<td class="md">) </td>
583
<td class="md" colspan="2"></td>
590
<table cellspacing=5 cellpadding=0 border=0>
598
Write a block back to the FLAC file. This function tries to be as efficient as possible; how the block is actually written is shown by the following:
600
Existing block is a STREAMINFO block and the new block is a STREAMINFO block: the new block is written in place. Make sure you know what you're doing when changing the values of a STREAMINFO block.
602
Existing block is a STREAMINFO block and the new block is a not a STREAMINFO block: this is an error since the first block must be a STREAMINFO block. Returns <code>false</code> without altering the file.
604
Existing block is not a STREAMINFO block and the new block is a STREAMINFO block: this is an error since there may be only one STREAMINFO block. Returns <code>false</code> without altering the file.
606
Existing block and new block are the same length: the existing block will be replaced by the new block, written in place.
608
Existing block is longer than new block: if use_padding is <code>true</code>, the existing block will be overwritten in place with the new block followed by a PADDING block, if possible, to make the total size the same as the existing block. Remember that a padding block requires at least four bytes so if the difference in size between the new block and existing block is less than that, the entire file will have to be rewritten, using the new block's exact size. If use_padding is <code>false</code>, the entire file will be rewritten, replacing the existing block by the new block.
610
Existing block is shorter than new block: if use_padding is <code>true</code>, the function will try and expand the new block into the following PADDING block, if it exists and doing so won't shrink the PADDING block to less than 4 bytes. If there is no following PADDING block, or it will shrink to less than 4 bytes, or use_padding is <code>false</code>, the entire file is rewritten, replacing the existing block with the new block. Note that in this case any following PADDING block is preserved as is.
612
After writing the block, the iterator will remain in the same place, i.e. pointing to the new block.<dl compact><dt><b>
614
<table border=0 cellspacing=2 cellpadding=0>
615
<tr><td valign=top><em>iterator</em> </td><td>
616
A pointer to an existing initialized iterator. </td></tr>
617
<tr><td valign=top><em>block</em> </td><td>
618
The block to set. </td></tr>
619
<tr><td valign=top><em>use_padding</em> </td><td>
620
See above. </td></tr>
622
</dl><dl compact><dt><b>
624
<div class="fragment"><pre>iterator != NULL
625
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#a5">FLAC__metadata_simple_iterator_init</a>() <div class="fragment"><pre>block != NULL
626
</pre></div> </dl><dl compact><dt><b>
627
Return values: </b><dd>
628
<table border=0 cellspacing=2 cellpadding=0>
629
<tr><td valign=top><em>FLAC__bool</em> </td><td>
630
<code>true</code> if successful, else <code>false</code>. </td></tr>
635
<a name="a12" doxytag="metadata.h::FLAC__metadata_simple_iterator_insert_block_after"></a><p>
636
<table width="100%" cellpadding="2" cellspacing="0" border="0">
639
<table cellpadding="0" cellspacing="0" border="0">
641
<td class="md" nowrap valign="top"> FLAC__bool FLAC__metadata_simple_iterator_insert_block_after </td>
642
<td class="md" valign="top">( </td>
643
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
644
<td class="mdname" nowrap> <em>iterator</em>, </td>
649
<td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> * </td>
650
<td class="mdname" nowrap> <em>block</em>, </td>
655
<td class="md" nowrap>FLAC__bool </td>
656
<td class="mdname" nowrap> <em>use_padding</em></td>
660
<td class="md">) </td>
661
<td class="md" colspan="2"></td>
668
<table cellspacing=5 cellpadding=0 border=0>
676
This is similar to <a class="el" href="group__flac__metadata__level1.html#a11">FLAC__metadata_simple_iterator_set_block</a>() except that instead of writing over an existing block, it appends a block after the existing block. <em>use_padding</em> is again used to tell the function to try an expand into following padding in an attempt to avoid rewriting the entire file.
678
This function will fail and return <code>false</code> if given a STREAMINFO block.
680
After writing the block, the iterator will be pointing to the new block.<dl compact><dt><b>
682
<table border=0 cellspacing=2 cellpadding=0>
683
<tr><td valign=top><em>iterator</em> </td><td>
684
A pointer to an existing initialized iterator. </td></tr>
685
<tr><td valign=top><em>block</em> </td><td>
686
The block to set. </td></tr>
687
<tr><td valign=top><em>use_padding</em> </td><td>
688
See above. </td></tr>
690
</dl><dl compact><dt><b>
692
<div class="fragment"><pre>iterator != NULL
693
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#a5">FLAC__metadata_simple_iterator_init</a>() <div class="fragment"><pre>block != NULL
694
</pre></div> </dl><dl compact><dt><b>
695
Return values: </b><dd>
696
<table border=0 cellspacing=2 cellpadding=0>
697
<tr><td valign=top><em>FLAC__bool</em> </td><td>
698
<code>true</code> if successful, else <code>false</code>. </td></tr>
703
<a name="a13" doxytag="metadata.h::FLAC__metadata_simple_iterator_delete_block"></a><p>
704
<table width="100%" cellpadding="2" cellspacing="0" border="0">
707
<table cellpadding="0" cellspacing="0" border="0">
709
<td class="md" nowrap valign="top"> FLAC__bool FLAC__metadata_simple_iterator_delete_block </td>
710
<td class="md" valign="top">( </td>
711
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#a0">FLAC__Metadata_SimpleIterator</a> * </td>
712
<td class="mdname" nowrap> <em>iterator</em>, </td>
717
<td class="md" nowrap>FLAC__bool </td>
718
<td class="mdname" nowrap> <em>use_padding</em></td>
722
<td class="md">) </td>
723
<td class="md" colspan="2"></td>
730
<table cellspacing=5 cellpadding=0 border=0>
738
Deletes the block at the current position. This will cause the entire FLAC file to be rewritten, unless <em>use_padding</em> is <code>true</code>, in which case the block will be replaced by an equal-sized PADDING block. The iterator will be left pointing to the block before the one just deleted.
740
You may not delete the STREAMINFO block.<dl compact><dt><b>
742
<table border=0 cellspacing=2 cellpadding=0>
743
<tr><td valign=top><em>iterator</em> </td><td>
744
A pointer to an existing initialized iterator. </td></tr>
745
<tr><td valign=top><em>use_padding</em> </td><td>
746
See above. </td></tr>
748
</dl><dl compact><dt><b>
750
<div class="fragment"><pre>iterator != NULL
751
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#a5">FLAC__metadata_simple_iterator_init</a>() </dl><dl compact><dt><b>
752
Return values: </b><dd>
753
<table border=0 cellspacing=2 cellpadding=0>
754
<tr><td valign=top><em>FLAC__bool</em> </td><td>
755
<code>true</code> if successful, else <code>false</code>. </td></tr>
284
<td class="mdname" nowrap> <em>filename</em>, </td>
287
<td class="md" nowrap align="right"></td>
289
<td class="md" nowrap>FLAC__bool </td>
290
<td class="mdname" nowrap> <em>read_only</em>, </td>
293
<td class="md" nowrap align="right"></td>
295
<td class="md" nowrap>FLAC__bool </td>
296
<td class="mdname" nowrap> <em>preserve_file_stats</em></td>
300
<td class="md">) </td>
301
<td class="md" colspan="2"></td>
307
<table cellspacing="5" cellpadding="0" border="0">
315
Initialize the iterator to point to the first metadata block in the given FLAC file.<p>
316
<dl compact><dt><b>Parameters:</b></dt><dd>
317
<table border="0" cellspacing="2" cellpadding="0">
318
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing iterator. </td></tr>
319
<tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>The path to the FLAC file. </td></tr>
320
<tr><td valign="top"></td><td valign="top"><em>read_only</em> </td><td>If <code>true</code>, the FLAC file will be opened in read-only mode; if <code>false</code>, the FLAC file will be opened for edit even if no edits are performed. </td></tr>
321
<tr><td valign="top"></td><td valign="top"><em>preserve_file_stats</em> </td><td>If <code>true</code>, the owner and modification time will be preserved even if the FLAC file is written to. </td></tr>
324
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
325
</pre></div> <div class="fragment"><pre class="fragment"> filename != NULL
326
</pre></div> </dd></dl>
327
<dl compact><dt><b>Return values:</b></dt><dd>
328
<table border="0" cellspacing="2" cellpadding="0">
329
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if a memory allocation error occurs, the file can't be opened, or another error occurs, else <code>true</code>. </td></tr>
335
<a class="anchor" name="ga6" doxytag="metadata.h::FLAC__metadata_simple_iterator_is_writable"></a><p>
336
<table class="mdTable" cellpadding="2" cellspacing="0">
339
<table cellpadding="0" cellspacing="0" border="0">
341
<td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_simple_iterator_is_writable </td>
342
<td class="md" valign="top">( </td>
343
<td class="md" nowrap valign="top">const <a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
344
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
345
<td class="md" valign="top"> ) </td>
346
<td class="md" nowrap></td>
352
<table cellspacing="5" cellpadding="0" border="0">
360
Returns <code>true</code> if the FLAC file is writable. If <code>false</code>, calls to <a class="el" href="group__flac__metadata__level1.html#ga11">FLAC__metadata_simple_iterator_set_block()</a> and <a class="el" href="group__flac__metadata__level1.html#ga12">FLAC__metadata_simple_iterator_insert_block_after()</a> will fail.<p>
361
<dl compact><dt><b>Parameters:</b></dt><dd>
362
<table border="0" cellspacing="2" cellpadding="0">
363
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing iterator. </td></tr>
366
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
367
</pre></div> </dd></dl>
368
<dl compact><dt><b>Return values:</b></dt><dd>
369
<table border="0" cellspacing="2" cellpadding="0">
370
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td>See above. </td></tr>
376
<a class="anchor" name="ga7" doxytag="metadata.h::FLAC__metadata_simple_iterator_next"></a><p>
377
<table class="mdTable" cellpadding="2" cellspacing="0">
380
<table cellpadding="0" cellspacing="0" border="0">
382
<td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_simple_iterator_next </td>
383
<td class="md" valign="top">( </td>
384
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
385
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
386
<td class="md" valign="top"> ) </td>
387
<td class="md" nowrap></td>
393
<table cellspacing="5" cellpadding="0" border="0">
401
Moves the iterator forward one metadata block, returning <code>false</code> if already at the end.<p>
402
<dl compact><dt><b>Parameters:</b></dt><dd>
403
<table border="0" cellspacing="2" cellpadding="0">
404
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing initialized iterator. </td></tr>
407
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
408
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#ga5">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
409
<dl compact><dt><b>Return values:</b></dt><dd>
410
<table border="0" cellspacing="2" cellpadding="0">
411
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if already at the last metadata block of the chain, else <code>true</code>. </td></tr>
417
<a class="anchor" name="ga8" doxytag="metadata.h::FLAC__metadata_simple_iterator_prev"></a><p>
418
<table class="mdTable" cellpadding="2" cellspacing="0">
421
<table cellpadding="0" cellspacing="0" border="0">
423
<td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_simple_iterator_prev </td>
424
<td class="md" valign="top">( </td>
425
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
426
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
427
<td class="md" valign="top"> ) </td>
428
<td class="md" nowrap></td>
434
<table cellspacing="5" cellpadding="0" border="0">
442
Moves the iterator backward one metadata block, returning <code>false</code> if already at the beginning.<p>
443
<dl compact><dt><b>Parameters:</b></dt><dd>
444
<table border="0" cellspacing="2" cellpadding="0">
445
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing initialized iterator. </td></tr>
448
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
449
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#ga5">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
450
<dl compact><dt><b>Return values:</b></dt><dd>
451
<table border="0" cellspacing="2" cellpadding="0">
452
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>false</code> if already at the first metadata block of the chain, else <code>true</code>. </td></tr>
458
<a class="anchor" name="ga9" doxytag="metadata.h::FLAC__metadata_simple_iterator_get_block_type"></a><p>
459
<table class="mdTable" cellpadding="2" cellspacing="0">
462
<table cellpadding="0" cellspacing="0" border="0">
464
<td class="md" nowrap valign="top"><a class="el" href="group__flac__format.html#ga109">FLAC__MetadataType</a> FLAC__metadata_simple_iterator_get_block_type </td>
465
<td class="md" valign="top">( </td>
466
<td class="md" nowrap valign="top">const <a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
467
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
468
<td class="md" valign="top"> ) </td>
469
<td class="md" nowrap></td>
475
<table cellspacing="5" cellpadding="0" border="0">
483
Get the type of the metadata block at the current position. This avoids reading the actual block data which can save time for large blocks.<p>
484
<dl compact><dt><b>Parameters:</b></dt><dd>
485
<table border="0" cellspacing="2" cellpadding="0">
486
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing initialized iterator. </td></tr>
489
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
490
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#ga5">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
491
<dl compact><dt><b>Return values:</b></dt><dd>
492
<table border="0" cellspacing="2" cellpadding="0">
493
<tr><td valign="top"></td><td valign="top"><em>FLAC__MetadataType</em> </td><td>The type of the metadata block at the current iterator position. </td></tr>
499
<a class="anchor" name="ga10" doxytag="metadata.h::FLAC__metadata_simple_iterator_get_block"></a><p>
500
<table class="mdTable" cellpadding="2" cellspacing="0">
503
<table cellpadding="0" cellspacing="0" border="0">
505
<td class="md" nowrap valign="top"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a>* FLAC__metadata_simple_iterator_get_block </td>
506
<td class="md" valign="top">( </td>
507
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
508
<td class="mdname1" valign="top" nowrap> <em>iterator</em> </td>
509
<td class="md" valign="top"> ) </td>
510
<td class="md" nowrap></td>
516
<table cellspacing="5" cellpadding="0" border="0">
524
Get the metadata block at the current position. You can modify the block but must use <a class="el" href="group__flac__metadata__level1.html#ga11">FLAC__metadata_simple_iterator_set_block()</a> to write it back to the FLAC file.<p>
525
You must call <a class="el" href="group__flac__metadata__object.html#ga2">FLAC__metadata_object_delete()</a> on the returned object when you are finished with it.<p>
526
<dl compact><dt><b>Parameters:</b></dt><dd>
527
<table border="0" cellspacing="2" cellpadding="0">
528
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing initialized iterator. </td></tr>
531
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
532
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#ga5">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
533
<dl compact><dt><b>Return values:</b></dt><dd>
534
<table border="0" cellspacing="2" cellpadding="0">
535
<tr><td valign="top"></td><td valign="top"><em>FLAC__StreamMetadata*</em> </td><td>The current metadata block. </td></tr>
541
<a class="anchor" name="ga11" doxytag="metadata.h::FLAC__metadata_simple_iterator_set_block"></a><p>
542
<table class="mdTable" cellpadding="2" cellspacing="0">
545
<table cellpadding="0" cellspacing="0" border="0">
547
<td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_simple_iterator_set_block </td>
548
<td class="md" valign="top">( </td>
549
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
550
<td class="mdname" nowrap> <em>iterator</em>, </td>
553
<td class="md" nowrap align="right"></td>
555
<td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> * </td>
556
<td class="mdname" nowrap> <em>block</em>, </td>
559
<td class="md" nowrap align="right"></td>
561
<td class="md" nowrap>FLAC__bool </td>
562
<td class="mdname" nowrap> <em>use_padding</em></td>
566
<td class="md">) </td>
567
<td class="md" colspan="2"></td>
573
<table cellspacing="5" cellpadding="0" border="0">
581
Write a block back to the FLAC file. This function tries to be as efficient as possible; how the block is actually written is shown by the following:<p>
582
Existing block is a STREAMINFO block and the new block is a STREAMINFO block: the new block is written in place. Make sure you know what you're doing when changing the values of a STREAMINFO block.<p>
583
Existing block is a STREAMINFO block and the new block is a not a STREAMINFO block: this is an error since the first block must be a STREAMINFO block. Returns <code>false</code> without altering the file.<p>
584
Existing block is not a STREAMINFO block and the new block is a STREAMINFO block: this is an error since there may be only one STREAMINFO block. Returns <code>false</code> without altering the file.<p>
585
Existing block and new block are the same length: the existing block will be replaced by the new block, written in place.<p>
586
Existing block is longer than new block: if use_padding is <code>true</code>, the existing block will be overwritten in place with the new block followed by a PADDING block, if possible, to make the total size the same as the existing block. Remember that a padding block requires at least four bytes so if the difference in size between the new block and existing block is less than that, the entire file will have to be rewritten, using the new block's exact size. If use_padding is <code>false</code>, the entire file will be rewritten, replacing the existing block by the new block.<p>
587
Existing block is shorter than new block: if use_padding is <code>true</code>, the function will try and expand the new block into the following PADDING block, if it exists and doing so won't shrink the PADDING block to less than 4 bytes. If there is no following PADDING block, or it will shrink to less than 4 bytes, or use_padding is <code>false</code>, the entire file is rewritten, replacing the existing block with the new block. Note that in this case any following PADDING block is preserved as is.<p>
588
After writing the block, the iterator will remain in the same place, i.e. pointing to the new block.<p>
589
<dl compact><dt><b>Parameters:</b></dt><dd>
590
<table border="0" cellspacing="2" cellpadding="0">
591
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing initialized iterator. </td></tr>
592
<tr><td valign="top"></td><td valign="top"><em>block</em> </td><td>The block to set. </td></tr>
593
<tr><td valign="top"></td><td valign="top"><em>use_padding</em> </td><td>See above. </td></tr>
596
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
597
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#ga5">FLAC__metadata_simple_iterator_init()</a> <div class="fragment"><pre class="fragment"> block != NULL
598
</pre></div> </dd></dl>
599
<dl compact><dt><b>Return values:</b></dt><dd>
600
<table border="0" cellspacing="2" cellpadding="0">
601
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>true</code> if successful, else <code>false</code>. </td></tr>
607
<a class="anchor" name="ga12" doxytag="metadata.h::FLAC__metadata_simple_iterator_insert_block_after"></a><p>
608
<table class="mdTable" cellpadding="2" cellspacing="0">
611
<table cellpadding="0" cellspacing="0" border="0">
613
<td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_simple_iterator_insert_block_after </td>
614
<td class="md" valign="top">( </td>
615
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
616
<td class="mdname" nowrap> <em>iterator</em>, </td>
619
<td class="md" nowrap align="right"></td>
621
<td class="md" nowrap><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> * </td>
622
<td class="mdname" nowrap> <em>block</em>, </td>
625
<td class="md" nowrap align="right"></td>
627
<td class="md" nowrap>FLAC__bool </td>
628
<td class="mdname" nowrap> <em>use_padding</em></td>
632
<td class="md">) </td>
633
<td class="md" colspan="2"></td>
639
<table cellspacing="5" cellpadding="0" border="0">
647
This is similar to <a class="el" href="group__flac__metadata__level1.html#ga11">FLAC__metadata_simple_iterator_set_block()</a> except that instead of writing over an existing block, it appends a block after the existing block. <em>use_padding</em> is again used to tell the function to try an expand into following padding in an attempt to avoid rewriting the entire file.<p>
648
This function will fail and return <code>false</code> if given a STREAMINFO block.<p>
649
After writing the block, the iterator will be pointing to the new block.<p>
650
<dl compact><dt><b>Parameters:</b></dt><dd>
651
<table border="0" cellspacing="2" cellpadding="0">
652
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing initialized iterator. </td></tr>
653
<tr><td valign="top"></td><td valign="top"><em>block</em> </td><td>The block to set. </td></tr>
654
<tr><td valign="top"></td><td valign="top"><em>use_padding</em> </td><td>See above. </td></tr>
657
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
658
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#ga5">FLAC__metadata_simple_iterator_init()</a> <div class="fragment"><pre class="fragment"> block != NULL
659
</pre></div> </dd></dl>
660
<dl compact><dt><b>Return values:</b></dt><dd>
661
<table border="0" cellspacing="2" cellpadding="0">
662
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>true</code> if successful, else <code>false</code>. </td></tr>
668
<a class="anchor" name="ga13" doxytag="metadata.h::FLAC__metadata_simple_iterator_delete_block"></a><p>
669
<table class="mdTable" cellpadding="2" cellspacing="0">
672
<table cellpadding="0" cellspacing="0" border="0">
674
<td class="md" nowrap valign="top">FLAC__bool FLAC__metadata_simple_iterator_delete_block </td>
675
<td class="md" valign="top">( </td>
676
<td class="md" nowrap valign="top"><a class="el" href="group__flac__metadata__level1.html#ga0">FLAC__Metadata_SimpleIterator</a> * </td>
677
<td class="mdname" nowrap> <em>iterator</em>, </td>
680
<td class="md" nowrap align="right"></td>
682
<td class="md" nowrap>FLAC__bool </td>
683
<td class="mdname" nowrap> <em>use_padding</em></td>
687
<td class="md">) </td>
688
<td class="md" colspan="2"></td>
694
<table cellspacing="5" cellpadding="0" border="0">
702
Deletes the block at the current position. This will cause the entire FLAC file to be rewritten, unless <em>use_padding</em> is <code>true</code>, in which case the block will be replaced by an equal-sized PADDING block. The iterator will be left pointing to the block before the one just deleted.<p>
703
You may not delete the STREAMINFO block.<p>
704
<dl compact><dt><b>Parameters:</b></dt><dd>
705
<table border="0" cellspacing="2" cellpadding="0">
706
<tr><td valign="top"></td><td valign="top"><em>iterator</em> </td><td>A pointer to an existing initialized iterator. </td></tr>
707
<tr><td valign="top"></td><td valign="top"><em>use_padding</em> </td><td>See above. </td></tr>
710
<dl compact><dt><b>Assertions: </b></dt><dd><div class="fragment"><pre class="fragment"> iterator != NULL
711
</pre></div> <em>iterator</em> has been successfully initialized with <a class="el" href="group__flac__metadata__level1.html#ga5">FLAC__metadata_simple_iterator_init()</a> </dd></dl>
712
<dl compact><dt><b>Return values:</b></dt><dd>
713
<table border="0" cellspacing="2" cellpadding="0">
714
<tr><td valign="top"></td><td valign="top"><em>FLAC__bool</em> </td><td><code>true</code> if successful, else <code>false</code>. </td></tr>
760
720
<hr><h2>Variable Documentation</h2>
761
<a name="a1" doxytag="metadata.h::FLAC__Metadata_SimpleIteratorStatusString"></a><p>
762
<table width="100%" cellpadding="2" cellspacing="0" border="0">
721
<a class="anchor" name="ga1" doxytag="metadata.h::FLAC__Metadata_SimpleIteratorStatusString"></a><p>
722
<table class="mdTable" cellpadding="2" cellspacing="0">
765
725
<table cellpadding="0" cellspacing="0" border="0">
767
<td class="md" nowrap valign="top"> const char* const FLAC__Metadata_SimpleIteratorStatusString[]
727
<td class="md" nowrap valign="top">const char* const <a class="el" href="group__flac__metadata__level1.html#ga1">FLAC__Metadata_SimpleIteratorStatusString</a>[] </td>
772
<table cellspacing=5 cellpadding=0 border=0>
733
<table cellspacing="5" cellpadding="0" border="0">