21 #ifndef LIBOPENRAW_IO_H_
22 #define LIBOPENRAW_IO_H_
24 #include <sys/types.h>
66 void* (*mmap) (
IOFileRef f,
size_t l, off_t offset);
98 extern void *raw_mmap(
IOFileRef f,
size_t l, off_t offset);
99 extern int raw_munmap(
IOFileRef f,
void *addr,
size_t l);
struct _IOFile * IOFileRef
A file reference.
IOFileRef raw_open(struct io_methods *methods, const char *path, int mode)
Raw open function.
int raw_close(IOFileRef f)
int raw_get_error(IOFileRef f)
char * raw_get_path(IOFileRef f)
struct io_methods * get_default_io_methods(void)
Get the default IO methods.
int raw_seek(IOFileRef f, off_t offset, int whence)
int raw_read(IOFileRef f, void *buf, size_t count)
IO methods for the IO subsystem.
off_t(* filesize)(IOFileRef f)
filesize method
int(* seek)(IOFileRef f, off_t offset, int whence)
seek in the file
IOFileRef(* open)(const char *path, int mode)
open method
int(* close)(IOFileRef f)
close method
int(* read)(IOFileRef f, void *buf, size_t count)
read method
int(* munmap)(IOFileRef f, void *addr, size_t l)
munmap method