liboggz 1.1.3
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_HEADER
34#define OGGZ_IO_HEADER
35
65typedef size_t (*OggzIORead) (void * user_handle, void * buf, size_t n);
66
78typedef size_t (*OggzIOWrite) (void * user_handle, void * buf, size_t n);
79
93typedef int (*OggzIOSeek) (void * user_handle, long offset, int whence);
94
104typedef long (*OggzIOTell) (void * user_handle);
105
115typedef int (*OggzIOFlush) (void * user_handle);
116
117
130int oggz_io_set_read (OGGZ * oggz, OggzIORead read, void * user_handle);
131
140
153int oggz_io_set_write (OGGZ * oggz, OggzIOWrite write, void * user_handle);
154
163
178int oggz_io_set_seek (OGGZ * oggz, OggzIOSeek seek, void * user_handle);
179
188
201int oggz_io_set_tell (OGGZ * oggz, OggzIOTell tell, void * user_handle);
202
211
225int oggz_io_set_flush (OGGZ * oggz, OggzIOFlush flush, void * user_handle);
226
235
236#endif /* OGGZ_IO_HEADER */
void OGGZ
An opaque handle to an Ogg file.
Definition: oggz.h:441
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
void * oggz_io_get_flush_user_handle(OGGZ *oggz)
Retrieve the user_handle associated with the function you have provided for flushing output.
void * oggz_io_get_read_user_handle(OGGZ *oggz)
Retrieve the user_handle associated with the function you have provided for reading input data.
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
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.
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.
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
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...
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_...
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
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
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.
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...
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.
void * oggz_io_get_write_user_handle(OGGZ *oggz)
Retrieve the user_handle associated with the function you have provided for writing output data.