liboggz: oggz_io.h Source File

liboggz 1.1.1

oggz_io.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2003 Commonwealth Scientific and Industrial Research
3 Organisation (CSIRO) Australia
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions
7 are met:
8
9 - Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11
12 - Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15
16 - Neither the name of CSIRO Australia nor the names of its
17 contributors may be used to endorse or promote products derived from
18 this software without specific prior written permission.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
24 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 #ifndef __OGGZ_IO_H__
34 #define __OGGZ_IO_H__
35
65 typedef size_t (*OggzIORead) (void * user_handle, void * buf, size_t n);
66
78 typedef size_t (*OggzIOWrite) (void * user_handle, void * buf, size_t n);
79
93 typedef int (*OggzIOSeek) (void * user_handle, long offset, int whence);
94
104 typedef long (*OggzIOTell) (void * user_handle);
105
115 typedef int (*OggzIOFlush) (void * user_handle);
116
117
130 int oggz_io_set_read (OGGZ * oggz, OggzIORead read, void * user_handle);
131
139 void * oggz_io_get_read_user_handle (OGGZ * oggz);
140
153 int oggz_io_set_write (OGGZ * oggz, OggzIOWrite write, void * user_handle);
154
162 void * oggz_io_get_write_user_handle (OGGZ * oggz);
163
178 int oggz_io_set_seek (OGGZ * oggz, OggzIOSeek seek, void * user_handle);
179
187 void * oggz_io_get_seek_user_handle (OGGZ * oggz);
188
201 int oggz_io_set_tell (OGGZ * oggz, OggzIOTell tell, void * user_handle);
202
210 void * oggz_io_get_tell_user_handle (OGGZ * oggz);
211
225 int oggz_io_set_flush (OGGZ * oggz, OggzIOFlush flush, void * user_handle);
226
234 void * oggz_io_get_flush_user_handle (OGGZ * oggz);
235
236 #endif /* __OGGZ_IO_H__ */
oggz_io_set_read
int oggz_io_set_read(OGGZ *oggz, OggzIORead read, void *user_handle)
Set a function for Oggz to call when it needs to read input data.
oggz_io_set_flush
int oggz_io_set_flush(OGGZ *oggz, OggzIOFlush flush, void *user_handle)
Set a function for Oggz to call when it needs to flush its output.
OggzIOWrite
size_t(* OggzIOWrite)(void *user_handle, void *buf, size_t n)
This is the signature of a function which you provide for Oggz to call when it needs to output raw da...
Definition: oggz_io.h:78
oggz_io_get_write_user_handle
void * oggz_io_get_write_user_handle(OGGZ *oggz)
Retrieve the user_handle associated with the function you have provided for writing output data.
oggz_io_set_write
int oggz_io_set_write(OGGZ *oggz, OggzIOWrite write, void *user_handle)
Set a function for Oggz to call when it needs to write output data.
oggz_io_get_tell_user_handle
void * oggz_io_get_tell_user_handle(OGGZ *oggz)
Retrieve the user_handle associated with the function you have provided for determining the current o...
OGGZ
void OGGZ
An opaque handle to an Ogg file.
Definition: oggz.h:441
OggzIOSeek
int(* OggzIOSeek)(void *user_handle, long offset, int whence)
This is the signature of a function which you provide for Oggz to call when it needs to seek on the r...
Definition: oggz_io.h:93
oggz_io_set_seek
int oggz_io_set_seek(OGGZ *oggz, OggzIOSeek seek, void *user_handle)
Set a function for Oggz to call when it needs to seek on its raw data.
oggz_io_get_flush_user_handle
void * oggz_io_get_flush_user_handle(OGGZ *oggz)
Retrieve the user_handle associated with the function you have provided for flushing output.
oggz_io_set_tell
int oggz_io_set_tell(OGGZ *oggz, OggzIOTell tell, void *user_handle)
Set a function for Oggz to call when it needs to determine the offset within its input data (if OGGZ_...
oggz_io_get_seek_user_handle
void * oggz_io_get_seek_user_handle(OGGZ *oggz)
Retrieve the user_handle associated with the function you have provided for seeking on input or outpu...
OggzIOFlush
int(* OggzIOFlush)(void *user_handle)
This is the signature of a function which you provide for Oggz to call when it needs to flush the out...
Definition: oggz_io.h:115
oggz_io_get_read_user_handle
void * oggz_io_get_read_user_handle(OGGZ *oggz)
Retrieve the user_handle associated with the function you have provided for reading input data.
OggzIORead
size_t(* OggzIORead)(void *user_handle, void *buf, size_t n)
This is the signature of a function which you provide for Oggz to call when it needs to acquire raw i...
Definition: oggz_io.h:65
OggzIOTell
long(* OggzIOTell)(void *user_handle)
This is the signature of a function which you provide for Oggz to call when it needs to determine the...
Definition: oggz_io.h:104