~ubuntu-branches/ubuntu/raring/flac/raring

« back to all changes in this revision

Viewing changes to doc/html/api/group__flac__callbacks.html

  • Committer: Bazaar Package Importer
  • Author(s): Joshua Kwan
  • Date: 2007-05-29 22:56:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529225636-ljeff8xxip09qaap
Tags: 1.1.4-1
* New upstream release. closes: #405167, #411311
  - libOggFLAC and libOggFLAC++ have been merged into libFLAC, so
    remove their corresponding packages.
  - Because of the API changes required to effect the above, there has
    been yet another soname bump. libflac7 -> libflac8 and
    libflac++5 -> libflac++6. Emails have been dispatched to the
    maintainers of dependent packages.
* Some notes on patches that were removed:
  - 02_stdin_stdout, 06_manpage_mention_utf8_convert: merged upstream
  - 08_manpage_warnings: Upstream has changed the manpage so it defintely
    can't fit in in 80 cols, so just forget about it. We'll live.
  - 05_eof_warnings_are_errors: Upstream decided to add a -w option to
    flac to treat all warnings as errors. I am going to defer to that
    for now, but if people think it's stupid let me know and I'll port
    the patch forward.
  - 04_stack_smasher: was a backport from 1.1.3, so it's obsolete.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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/callback.h: I/O callback structures</title>
 
3
<title>FLAC: FLAC/callback.h: I/O callback structures</title>
4
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
5
</head><body>
6
 
<!-- Generated by Doxygen 1.2.14 -->
7
 
<center>
8
 
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
9
 
<hr><h1>FLAC/callback.h: I/O callback structures<br>
 
6
<!-- Generated by Doxygen 1.4.2 -->
 
7
<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>
 
8
<h1>FLAC/callback.h: I/O callback structures<br>
10
9
<small>
11
10
[<a class="el" href="group__flac.html">FLAC C API</a>]</small>
12
 
</h1>This module defines the structures for describing I/O callbacks to the other FLAC interfaces. 
13
 
<a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0>
14
 
<tr><td colspan=2><br><h2>Compounds</h2></td></tr>
15
 
<tr><td nowrap align=right valign=top>struct &nbsp;</td><td valign=bottom><a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a></td></tr>
16
 
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
17
 
<tr><td nowrap align=right valign=top><a name="a0" doxytag="flac_callbacks::FLAC__IOHandle"></a>
18
 
typedef void *&nbsp;</td><td valign=bottom><b>FLAC__IOHandle</b></td></tr>
19
 
<tr><td nowrap align=right valign=top>typedef size_t(*&nbsp;</td><td valign=bottom><a class="el" href="group__flac__callbacks.html#a1">FLAC__IOCallback_Read</a> )(void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle)</td></tr>
20
 
<tr><td nowrap align=right valign=top>typedef size_t(*&nbsp;</td><td valign=bottom><a class="el" href="group__flac__callbacks.html#a2">FLAC__IOCallback_Write</a> )(const void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle)</td></tr>
21
 
<tr><td nowrap align=right valign=top>typedef int(*&nbsp;</td><td valign=bottom><a class="el" href="group__flac__callbacks.html#a3">FLAC__IOCallback_Seek</a> )(FLAC__IOHandle handle, FLAC__int64 offset, int whence)</td></tr>
22
 
<tr><td nowrap align=right valign=top>typedef FLAC__int64(*&nbsp;</td><td valign=bottom><a class="el" href="group__flac__callbacks.html#a4">FLAC__IOCallback_Tell</a> )(FLAC__IOHandle handle)</td></tr>
23
 
<tr><td nowrap align=right valign=top>typedef int(*&nbsp;</td><td valign=bottom><a class="el" href="group__flac__callbacks.html#a5">FLAC__IOCallback_Eof</a> )(FLAC__IOHandle handle)</td></tr>
24
 
<tr><td nowrap align=right valign=top>typedef int(*&nbsp;</td><td valign=bottom><a class="el" href="group__flac__callbacks.html#a6">FLAC__IOCallback_Close</a> )(FLAC__IOHandle handle)</td></tr>
25
 
</table>
26
 
<hr><a name="_details"></a><h2>Detailed Description</h2>
27
 
This module defines the structures for describing I/O callbacks to the other FLAC interfaces.
28
 
<p>
29
 
 
30
 
<p>
31
 
 The purpose of the I/O callback functions is to create a common way for the metadata interfaces to handle I/O.
32
 
<p>
33
 
Originally the metadata interfaces required filenames as the way of specifying FLAC files to operate on. This is problematic in some environments so there is an additional option to specify a set of callbacks for doing I/O on the FLAC file, instead of the filename.
34
 
<p>
35
 
In addition to the callbacks, a FLAC__IOHandle type is defined as an opaque structure for a data source.
36
 
<p>
37
 
The callback function prototypes are similar (but not identical) to the stdio functions fread, fwrite, fseek, ftell, feof, and fclose. If you use stdio streams to implement the callbacks, you can pass fread, fwrite, and fclose anywhere a FLAC__IOCallback_Read, FLAC__IOCallback_Write, or FLAC__IOCallback_Close is required, and a FILE* anywhere a FLAC__IOHandle is required. <dl compact><dt><b>
38
 
Warning: </b><dd>
39
 
You generally can NOT directly use fseek or ftell for FLAC__IOCallback_Seek or FLAC__IOCallback_Tell since on most systems these use 32-bit offsets and FLAC requires 64-bit offsets to deal with large files. You will have to find an equivalent function (e.g. ftello), or write a wrapper. The same is true for feof() since this is usually implemented as a macro, not as a function whose address can be taken. </dl><hr><h2>Typedef Documentation</h2>
40
 
<a name="a1" doxytag="callback.h::FLAC__IOCallback_Read"></a><p>
41
 
<table width="100%" cellpadding="2" cellspacing="0" border="0">
42
 
  <tr>
43
 
    <td class="md">
44
 
      <table cellpadding="0" cellspacing="0" border="0">
45
 
        <tr>
46
 
          <td class="md" nowrap valign="top"> typedef size_t(* FLAC__IOCallback_Read)(void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle)
47
 
      </table>
48
 
    </td>
49
 
  </tr>
50
 
</table>
51
 
<table cellspacing=5 cellpadding=0 border=0>
52
 
  <tr>
53
 
    <td>
54
 
      &nbsp;
55
 
    </td>
56
 
    <td>
57
 
 
58
 
<p>
59
 
Signature for the read callback. The signature and semantics match POSIX fread() implementations and can generally be used interchangeably.<dl compact><dt><b>
60
 
Parameters: </b><dd>
61
 
<table border=0 cellspacing=2 cellpadding=0>
62
 
<tr><td valign=top><em>ptr</em>&nbsp;</td><td>
63
 
The address of the read buffer. </td></tr>
64
 
<tr><td valign=top><em>size</em>&nbsp;</td><td>
65
 
The size of the records to be read. </td></tr>
66
 
<tr><td valign=top><em>nmemb</em>&nbsp;</td><td>
67
 
The number of records to be read. </td></tr>
68
 
<tr><td valign=top><em>handle</em>&nbsp;</td><td>
69
 
The handle to the data source. </td></tr>
70
 
</table>
71
 
</dl><dl compact><dt><b>
72
 
Return values: </b><dd>
73
 
<table border=0 cellspacing=2 cellpadding=0>
74
 
<tr><td valign=top><em>size_t</em>&nbsp;</td><td>
75
 
The number of records read. </td></tr>
76
 
</table>
77
 
</dl>    </td>
78
 
  </tr>
79
 
</table>
80
 
<a name="a2" doxytag="callback.h::FLAC__IOCallback_Write"></a><p>
81
 
<table width="100%" cellpadding="2" cellspacing="0" border="0">
82
 
  <tr>
83
 
    <td class="md">
84
 
      <table cellpadding="0" cellspacing="0" border="0">
85
 
        <tr>
86
 
          <td class="md" nowrap valign="top"> typedef size_t(* FLAC__IOCallback_Write)(const void *ptr, size_t size, size_t nmemb, FLAC__IOHandle handle)
87
 
      </table>
88
 
    </td>
89
 
  </tr>
90
 
</table>
91
 
<table cellspacing=5 cellpadding=0 border=0>
92
 
  <tr>
93
 
    <td>
94
 
      &nbsp;
95
 
    </td>
96
 
    <td>
97
 
 
98
 
<p>
99
 
Signature for the write callback. The signature and semantics match POSIX fwrite() implementations and can generally be used interchangeably.<dl compact><dt><b>
100
 
Parameters: </b><dd>
101
 
<table border=0 cellspacing=2 cellpadding=0>
102
 
<tr><td valign=top><em>ptr</em>&nbsp;</td><td>
103
 
The address of the write buffer. </td></tr>
104
 
<tr><td valign=top><em>size</em>&nbsp;</td><td>
105
 
The size of the records to be written. </td></tr>
106
 
<tr><td valign=top><em>nmemb</em>&nbsp;</td><td>
107
 
The number of records to be written. </td></tr>
108
 
<tr><td valign=top><em>handle</em>&nbsp;</td><td>
109
 
The handle to the data source. </td></tr>
110
 
</table>
111
 
</dl><dl compact><dt><b>
112
 
Return values: </b><dd>
113
 
<table border=0 cellspacing=2 cellpadding=0>
114
 
<tr><td valign=top><em>size_t</em>&nbsp;</td><td>
115
 
The number of records written. </td></tr>
116
 
</table>
117
 
</dl>    </td>
118
 
  </tr>
119
 
</table>
120
 
<a name="a3" doxytag="callback.h::FLAC__IOCallback_Seek"></a><p>
121
 
<table width="100%" cellpadding="2" cellspacing="0" border="0">
122
 
  <tr>
123
 
    <td class="md">
124
 
      <table cellpadding="0" cellspacing="0" border="0">
125
 
        <tr>
126
 
          <td class="md" nowrap valign="top"> typedef int(* FLAC__IOCallback_Seek)(FLAC__IOHandle handle, FLAC__int64 offset, int whence)
127
 
      </table>
128
 
    </td>
129
 
  </tr>
130
 
</table>
131
 
<table cellspacing=5 cellpadding=0 border=0>
132
 
  <tr>
133
 
    <td>
134
 
      &nbsp;
135
 
    </td>
136
 
    <td>
137
 
 
138
 
<p>
139
 
Signature for the seek callback. The signature and semantics mostly match POSIX fseek() WITH ONE IMPORTANT EXCEPTION: the offset is a 64-bit type whereas fseek() is generally 'long' and 32-bits wide.<dl compact><dt><b>
140
 
Parameters: </b><dd>
141
 
<table border=0 cellspacing=2 cellpadding=0>
142
 
<tr><td valign=top><em>handle</em>&nbsp;</td><td>
143
 
The handle to the data source. </td></tr>
144
 
<tr><td valign=top><em>offset</em>&nbsp;</td><td>
145
 
The new position, relative to <em>whence</em> </td></tr>
146
 
<tr><td valign=top><em>whence</em>&nbsp;</td><td>
147
 
<code>SEEK_SET</code>, <code>SEEK_CUR</code>, or <code>SEEK_END</code> </td></tr>
148
 
</table>
149
 
</dl><dl compact><dt><b>
150
 
Return values: </b><dd>
151
 
<table border=0 cellspacing=2 cellpadding=0>
152
 
<tr><td valign=top><em>int</em>&nbsp;</td><td>
153
 
<code>0</code> on success, <code>-1</code> on error. </td></tr>
154
 
</table>
155
 
</dl>    </td>
156
 
  </tr>
157
 
</table>
158
 
<a name="a4" doxytag="callback.h::FLAC__IOCallback_Tell"></a><p>
159
 
<table width="100%" cellpadding="2" cellspacing="0" border="0">
160
 
  <tr>
161
 
    <td class="md">
162
 
      <table cellpadding="0" cellspacing="0" border="0">
163
 
        <tr>
164
 
          <td class="md" nowrap valign="top"> typedef FLAC__int64(* FLAC__IOCallback_Tell)(FLAC__IOHandle handle)
165
 
      </table>
166
 
    </td>
167
 
  </tr>
168
 
</table>
169
 
<table cellspacing=5 cellpadding=0 border=0>
170
 
  <tr>
171
 
    <td>
172
 
      &nbsp;
173
 
    </td>
174
 
    <td>
175
 
 
176
 
<p>
177
 
Signature for the tell callback. The signature and semantics mostly match POSIX ftell() WITH ONE IMPORTANT EXCEPTION: the offset is a 64-bit type whereas ftell() is generally 'long' and 32-bits wide.<dl compact><dt><b>
178
 
Parameters: </b><dd>
179
 
<table border=0 cellspacing=2 cellpadding=0>
180
 
<tr><td valign=top><em>handle</em>&nbsp;</td><td>
181
 
The handle to the data source. </td></tr>
182
 
</table>
183
 
</dl><dl compact><dt><b>
184
 
Return values: </b><dd>
185
 
<table border=0 cellspacing=2 cellpadding=0>
186
 
<tr><td valign=top><em>FLAC__int64</em>&nbsp;</td><td>
187
 
The current position on success, <code>-1</code> on error. </td></tr>
188
 
</table>
189
 
</dl>    </td>
190
 
  </tr>
191
 
</table>
192
 
<a name="a5" doxytag="callback.h::FLAC__IOCallback_Eof"></a><p>
193
 
<table width="100%" cellpadding="2" cellspacing="0" border="0">
194
 
  <tr>
195
 
    <td class="md">
196
 
      <table cellpadding="0" cellspacing="0" border="0">
197
 
        <tr>
198
 
          <td class="md" nowrap valign="top"> typedef int(* FLAC__IOCallback_Eof)(FLAC__IOHandle handle)
199
 
      </table>
200
 
    </td>
201
 
  </tr>
202
 
</table>
203
 
<table cellspacing=5 cellpadding=0 border=0>
204
 
  <tr>
205
 
    <td>
206
 
      &nbsp;
207
 
    </td>
208
 
    <td>
209
 
 
210
 
<p>
211
 
Signature for the EOF callback. The signature and semantics mostly match POSIX feof() but WATCHOUT: on many systems, feof() is a macro, so in this case a wrapper function must be provided instead.<dl compact><dt><b>
212
 
Parameters: </b><dd>
213
 
<table border=0 cellspacing=2 cellpadding=0>
214
 
<tr><td valign=top><em>handle</em>&nbsp;</td><td>
215
 
The handle to the data source. </td></tr>
216
 
</table>
217
 
</dl><dl compact><dt><b>
218
 
Return values: </b><dd>
219
 
<table border=0 cellspacing=2 cellpadding=0>
220
 
<tr><td valign=top><em>int</em>&nbsp;</td><td>
221
 
<code>0</code> if not at end of file, nonzero if at end of file. </td></tr>
222
 
</table>
223
 
</dl>    </td>
224
 
  </tr>
225
 
</table>
226
 
<a name="a6" doxytag="callback.h::FLAC__IOCallback_Close"></a><p>
227
 
<table width="100%" cellpadding="2" cellspacing="0" border="0">
228
 
  <tr>
229
 
    <td class="md">
230
 
      <table cellpadding="0" cellspacing="0" border="0">
231
 
        <tr>
232
 
          <td class="md" nowrap valign="top"> typedef int(* FLAC__IOCallback_Close)(FLAC__IOHandle handle)
233
 
      </table>
234
 
    </td>
235
 
  </tr>
236
 
</table>
237
 
<table cellspacing=5 cellpadding=0 border=0>
238
 
  <tr>
239
 
    <td>
240
 
      &nbsp;
241
 
    </td>
242
 
    <td>
243
 
 
244
 
<p>
245
 
Signature for the close callback. The signature and semantics match POSIX fclose() implementations and can generally be used interchangeably.<dl compact><dt><b>
246
 
Parameters: </b><dd>
247
 
<table border=0 cellspacing=2 cellpadding=0>
248
 
<tr><td valign=top><em>handle</em>&nbsp;</td><td>
249
 
The handle to the data source. </td></tr>
250
 
</table>
251
 
</dl><dl compact><dt><b>
252
 
Return values: </b><dd>
253
 
<table border=0 cellspacing=2 cellpadding=0>
254
 
<tr><td valign=top><em>int</em>&nbsp;</td><td>
255
 
<code>0</code> on success, <code>EOF</code> on error. </td></tr>
256
 
</table>
257
 
</dl>    </td>
258
 
  </tr>
259
 
</table>
260
 
<hr><address><small>Generated on Fri Feb 4 18:39:14 2005 for FLAC by
261
 
<a href="http://www.doxygen.org/index.html">
262
 
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
263
 
width=110 height=53></a>1.2.14 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
264
 
 &copy;&nbsp;1997-2002</small></address>
 
11
</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
 
12
This module defines the structures for describing I/O callbacks to the other FLAC interfaces. 
 
13
<p>
 
14
The purpose of the I/O callback functions is to create a common way for the metadata interfaces to handle I/O.<p>
 
15
Originally the metadata interfaces required filenames as the way of specifying FLAC files to operate on. This is problematic in some environments so there is an additional option to specify a set of callbacks for doing I/O on the FLAC file, instead of the filename.<p>
 
16
In addition to the callbacks, a FLAC__IOHandle type is defined as an opaque structure for a data source.<p>
 
17
The callback function prototypes are similar (but not identical) to the stdio functions fread, fwrite, fseek, ftell, feof, and fclose. If you use stdio streams to implement the callbacks, you can pass fread, fwrite, and fclose anywhere a FLAC__IOCallback_Read, FLAC__IOCallback_Write, or FLAC__IOCallback_Close is required, and a FILE* anywhere a FLAC__IOHandle is required. <dl compact><dt><b>Warning:</b></dt><dd>You generally CANNOT directly use fseek or ftell for FLAC__IOCallback_Seek or FLAC__IOCallback_Tell since on most systems these use 32-bit offsets and FLAC requires 64-bit offsets to deal with large files. You will have to find an equivalent function (e.g. ftello), or write a wrapper. The same is true for feof() since this is usually implemented as a macro, not as a function whose address can be taken. </dd></dl>
 
18
 
 
19
<p>
 
20
<table border="0" cellpadding="0" cellspacing="0">
 
21
<tr><td></td></tr>
 
22
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
 
23
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structFLAC____IOCallbacks.html">FLAC__IOCallbacks</a></td></tr>
 
24
 
 
25
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
 
26
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a></td></tr>
 
27
 
 
28
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef size_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__callbacks.html#ga1">FLAC__IOCallback_Read</a> )(void *ptr, size_t size, size_t nmemb, <a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle)</td></tr>
 
29
 
 
30
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef size_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__callbacks.html#ga2">FLAC__IOCallback_Write</a> )(const void *ptr, size_t size, size_t nmemb, <a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle)</td></tr>
 
31
 
 
32
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__callbacks.html#ga3">FLAC__IOCallback_Seek</a> )(<a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle, FLAC__int64 offset, int whence)</td></tr>
 
33
 
 
34
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef FLAC__int64(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__callbacks.html#ga4">FLAC__IOCallback_Tell</a> )(<a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle)</td></tr>
 
35
 
 
36
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__callbacks.html#ga5">FLAC__IOCallback_Eof</a> )(<a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle)</td></tr>
 
37
 
 
38
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__callbacks.html#ga6">FLAC__IOCallback_Close</a> )(<a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle)</td></tr>
 
39
 
 
40
</table>
 
41
<hr><h2>Typedef Documentation</h2>
 
42
<a class="anchor" name="ga0" doxytag="callback.h::FLAC__IOHandle"></a><p>
 
43
<table class="mdTable" cellpadding="2" cellspacing="0">
 
44
  <tr>
 
45
    <td class="mdRow">
 
46
      <table cellpadding="0" cellspacing="0" border="0">
 
47
        <tr>
 
48
          <td class="md" nowrap valign="top">typedef void* <a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a>          </td>
 
49
        </tr>
 
50
      </table>
 
51
    </td>
 
52
  </tr>
 
53
</table>
 
54
<table cellspacing="5" cellpadding="0" border="0">
 
55
  <tr>
 
56
    <td>
 
57
      &nbsp;
 
58
    </td>
 
59
    <td>
 
60
 
 
61
<p>
 
62
This is the opaque handle type used by the callbacks. Typically this is a <code>FILE*</code> or address of a file descriptor.     </td>
 
63
  </tr>
 
64
</table>
 
65
<a class="anchor" name="ga1" doxytag="callback.h::FLAC__IOCallback_Read"></a><p>
 
66
<table class="mdTable" cellpadding="2" cellspacing="0">
 
67
  <tr>
 
68
    <td class="mdRow">
 
69
      <table cellpadding="0" cellspacing="0" border="0">
 
70
        <tr>
 
71
          <td class="md" nowrap valign="top">typedef size_t(* <a class="el" href="group__flac__callbacks.html#ga1">FLAC__IOCallback_Read</a>)(void *ptr, size_t size, size_t nmemb, <a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle)          </td>
 
72
        </tr>
 
73
      </table>
 
74
    </td>
 
75
  </tr>
 
76
</table>
 
77
<table cellspacing="5" cellpadding="0" border="0">
 
78
  <tr>
 
79
    <td>
 
80
      &nbsp;
 
81
    </td>
 
82
    <td>
 
83
 
 
84
<p>
 
85
Signature for the read callback. The signature and semantics match POSIX fread() implementations and can generally be used interchangeably.<p>
 
86
<dl compact><dt><b>Parameters:</b></dt><dd>
 
87
  <table border="0" cellspacing="2" cellpadding="0">
 
88
    <tr><td valign="top"></td><td valign="top"><em>ptr</em>&nbsp;</td><td>The address of the read buffer. </td></tr>
 
89
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The size of the records to be read. </td></tr>
 
90
    <tr><td valign="top"></td><td valign="top"><em>nmemb</em>&nbsp;</td><td>The number of records to be read. </td></tr>
 
91
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle to the data source. </td></tr>
 
92
  </table>
 
93
</dl>
 
94
<dl compact><dt><b>Return values:</b></dt><dd>
 
95
  <table border="0" cellspacing="2" cellpadding="0">
 
96
    <tr><td valign="top"></td><td valign="top"><em>size_t</em>&nbsp;</td><td>The number of records read. </td></tr>
 
97
  </table>
 
98
</dl>
 
99
    </td>
 
100
  </tr>
 
101
</table>
 
102
<a class="anchor" name="ga2" doxytag="callback.h::FLAC__IOCallback_Write"></a><p>
 
103
<table class="mdTable" cellpadding="2" cellspacing="0">
 
104
  <tr>
 
105
    <td class="mdRow">
 
106
      <table cellpadding="0" cellspacing="0" border="0">
 
107
        <tr>
 
108
          <td class="md" nowrap valign="top">typedef size_t(* <a class="el" href="group__flac__callbacks.html#ga2">FLAC__IOCallback_Write</a>)(const void *ptr, size_t size, size_t nmemb, <a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle)          </td>
 
109
        </tr>
 
110
      </table>
 
111
    </td>
 
112
  </tr>
 
113
</table>
 
114
<table cellspacing="5" cellpadding="0" border="0">
 
115
  <tr>
 
116
    <td>
 
117
      &nbsp;
 
118
    </td>
 
119
    <td>
 
120
 
 
121
<p>
 
122
Signature for the write callback. The signature and semantics match POSIX fwrite() implementations and can generally be used interchangeably.<p>
 
123
<dl compact><dt><b>Parameters:</b></dt><dd>
 
124
  <table border="0" cellspacing="2" cellpadding="0">
 
125
    <tr><td valign="top"></td><td valign="top"><em>ptr</em>&nbsp;</td><td>The address of the write buffer. </td></tr>
 
126
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The size of the records to be written. </td></tr>
 
127
    <tr><td valign="top"></td><td valign="top"><em>nmemb</em>&nbsp;</td><td>The number of records to be written. </td></tr>
 
128
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle to the data source. </td></tr>
 
129
  </table>
 
130
</dl>
 
131
<dl compact><dt><b>Return values:</b></dt><dd>
 
132
  <table border="0" cellspacing="2" cellpadding="0">
 
133
    <tr><td valign="top"></td><td valign="top"><em>size_t</em>&nbsp;</td><td>The number of records written. </td></tr>
 
134
  </table>
 
135
</dl>
 
136
    </td>
 
137
  </tr>
 
138
</table>
 
139
<a class="anchor" name="ga3" doxytag="callback.h::FLAC__IOCallback_Seek"></a><p>
 
140
<table class="mdTable" cellpadding="2" cellspacing="0">
 
141
  <tr>
 
142
    <td class="mdRow">
 
143
      <table cellpadding="0" cellspacing="0" border="0">
 
144
        <tr>
 
145
          <td class="md" nowrap valign="top">typedef int(* <a class="el" href="group__flac__callbacks.html#ga3">FLAC__IOCallback_Seek</a>)(<a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle, FLAC__int64 offset, int whence)          </td>
 
146
        </tr>
 
147
      </table>
 
148
    </td>
 
149
  </tr>
 
150
</table>
 
151
<table cellspacing="5" cellpadding="0" border="0">
 
152
  <tr>
 
153
    <td>
 
154
      &nbsp;
 
155
    </td>
 
156
    <td>
 
157
 
 
158
<p>
 
159
Signature for the seek callback. The signature and semantics mostly match POSIX fseek() WITH ONE IMPORTANT EXCEPTION: the offset is a 64-bit type whereas fseek() is generally 'long' and 32-bits wide.<p>
 
160
<dl compact><dt><b>Parameters:</b></dt><dd>
 
161
  <table border="0" cellspacing="2" cellpadding="0">
 
162
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle to the data source. </td></tr>
 
163
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>The new position, relative to <em>whence</em> </td></tr>
 
164
    <tr><td valign="top"></td><td valign="top"><em>whence</em>&nbsp;</td><td><code>SEEK_SET</code>, <code>SEEK_CUR</code>, or <code>SEEK_END</code> </td></tr>
 
165
  </table>
 
166
</dl>
 
167
<dl compact><dt><b>Return values:</b></dt><dd>
 
168
  <table border="0" cellspacing="2" cellpadding="0">
 
169
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td><code>0</code> on success, <code>-1</code> on error. </td></tr>
 
170
  </table>
 
171
</dl>
 
172
    </td>
 
173
  </tr>
 
174
</table>
 
175
<a class="anchor" name="ga4" doxytag="callback.h::FLAC__IOCallback_Tell"></a><p>
 
176
<table class="mdTable" cellpadding="2" cellspacing="0">
 
177
  <tr>
 
178
    <td class="mdRow">
 
179
      <table cellpadding="0" cellspacing="0" border="0">
 
180
        <tr>
 
181
          <td class="md" nowrap valign="top">typedef FLAC__int64(* <a class="el" href="group__flac__callbacks.html#ga4">FLAC__IOCallback_Tell</a>)(<a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle)          </td>
 
182
        </tr>
 
183
      </table>
 
184
    </td>
 
185
  </tr>
 
186
</table>
 
187
<table cellspacing="5" cellpadding="0" border="0">
 
188
  <tr>
 
189
    <td>
 
190
      &nbsp;
 
191
    </td>
 
192
    <td>
 
193
 
 
194
<p>
 
195
Signature for the tell callback. The signature and semantics mostly match POSIX ftell() WITH ONE IMPORTANT EXCEPTION: the offset is a 64-bit type whereas ftell() is generally 'long' and 32-bits wide.<p>
 
196
<dl compact><dt><b>Parameters:</b></dt><dd>
 
197
  <table border="0" cellspacing="2" cellpadding="0">
 
198
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle to the data source. </td></tr>
 
199
  </table>
 
200
</dl>
 
201
<dl compact><dt><b>Return values:</b></dt><dd>
 
202
  <table border="0" cellspacing="2" cellpadding="0">
 
203
    <tr><td valign="top"></td><td valign="top"><em>FLAC__int64</em>&nbsp;</td><td>The current position on success, <code>-1</code> on error. </td></tr>
 
204
  </table>
 
205
</dl>
 
206
    </td>
 
207
  </tr>
 
208
</table>
 
209
<a class="anchor" name="ga5" doxytag="callback.h::FLAC__IOCallback_Eof"></a><p>
 
210
<table class="mdTable" cellpadding="2" cellspacing="0">
 
211
  <tr>
 
212
    <td class="mdRow">
 
213
      <table cellpadding="0" cellspacing="0" border="0">
 
214
        <tr>
 
215
          <td class="md" nowrap valign="top">typedef int(* <a class="el" href="group__flac__callbacks.html#ga5">FLAC__IOCallback_Eof</a>)(<a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle)          </td>
 
216
        </tr>
 
217
      </table>
 
218
    </td>
 
219
  </tr>
 
220
</table>
 
221
<table cellspacing="5" cellpadding="0" border="0">
 
222
  <tr>
 
223
    <td>
 
224
      &nbsp;
 
225
    </td>
 
226
    <td>
 
227
 
 
228
<p>
 
229
Signature for the EOF callback. The signature and semantics mostly match POSIX feof() but WATCHOUT: on many systems, feof() is a macro, so in this case a wrapper function must be provided instead.<p>
 
230
<dl compact><dt><b>Parameters:</b></dt><dd>
 
231
  <table border="0" cellspacing="2" cellpadding="0">
 
232
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle to the data source. </td></tr>
 
233
  </table>
 
234
</dl>
 
235
<dl compact><dt><b>Return values:</b></dt><dd>
 
236
  <table border="0" cellspacing="2" cellpadding="0">
 
237
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td><code>0</code> if not at end of file, nonzero if at end of file. </td></tr>
 
238
  </table>
 
239
</dl>
 
240
    </td>
 
241
  </tr>
 
242
</table>
 
243
<a class="anchor" name="ga6" doxytag="callback.h::FLAC__IOCallback_Close"></a><p>
 
244
<table class="mdTable" cellpadding="2" cellspacing="0">
 
245
  <tr>
 
246
    <td class="mdRow">
 
247
      <table cellpadding="0" cellspacing="0" border="0">
 
248
        <tr>
 
249
          <td class="md" nowrap valign="top">typedef int(* <a class="el" href="group__flac__callbacks.html#ga6">FLAC__IOCallback_Close</a>)(<a class="el" href="group__flac__callbacks.html#ga0">FLAC__IOHandle</a> handle)          </td>
 
250
        </tr>
 
251
      </table>
 
252
    </td>
 
253
  </tr>
 
254
</table>
 
255
<table cellspacing="5" cellpadding="0" border="0">
 
256
  <tr>
 
257
    <td>
 
258
      &nbsp;
 
259
    </td>
 
260
    <td>
 
261
 
 
262
<p>
 
263
Signature for the close callback. The signature and semantics match POSIX fclose() implementations and can generally be used interchangeably.<p>
 
264
<dl compact><dt><b>Parameters:</b></dt><dd>
 
265
  <table border="0" cellspacing="2" cellpadding="0">
 
266
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td>The handle to the data source. </td></tr>
 
267
  </table>
 
268
</dl>
 
269
<dl compact><dt><b>Return values:</b></dt><dd>
 
270
  <table border="0" cellspacing="2" cellpadding="0">
 
271
    <tr><td valign="top"></td><td valign="top"><em>int</em>&nbsp;</td><td><code>0</code> on success, <code>EOF</code> on error. </td></tr>
 
272
  </table>
 
273
</dl>
 
274
    </td>
 
275
  </tr>
 
276
</table>
 
277
 
 
278
<hr size="1">
 
279
<div class="copyright">
 
280
        <!-- @@@ oh so hacky -->
 
281
        <table>
 
282
                <tr>
 
283
                        <td align="left">
 
284
                                Copyright (c) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
 
285
                        </td>
 
286
                        <td width="1%" align="right">
 
287
                                <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>
 
288
                        </td>
 
289
                </tr>
 
290
        </table>
 
291
</div>
 
292
<!-- Copyright (c)  2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson -->
 
293
<!-- Permission is granted to copy, distribute and/or modify this document -->
 
294
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
 
295
<!-- or any later version published by the Free Software Foundation; -->
 
296
<!-- with no invariant sections. -->
 
297
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
265
298
</body>
266
299
</html>