1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 Nicolas Pennequin
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
23 #include <sys/types.h>
37 bool buffering_init(char *filebuf
, size_t filebuflen
);
39 int bufopen(char *file
, size_t offset
, enum data_type type
);
40 int bufalloc(void *src
, size_t size
, enum data_type type
);
41 int bufclose(int handle_id
);
42 int bufseek(int handle_id
, size_t newpos
);
43 int bufadvance(int handle_id
, off_t offset
);
44 ssize_t
bufread(int handle_id
, size_t size
, char *dest
);
45 ssize_t
bufgetdata(int handle_id
, size_t size
, unsigned char **data
);