|
libopenraw
0.3.7
|
API called internally for IO. More...
Classes | |
| class | OpenRaw::IO::File |
| File IO stream. More... | |
| class | OpenRaw::IO::MemStream |
| Memory based stream to read memory like a file IO. More... | |
| class | OpenRaw::IO::Stream |
| base virtual class for IO More... | |
| class | OpenRaw::IO::StreamClone |
| cloned stream. Allow reading from a different offset More... | |
Functions | |
| struct io_methods * | get_default_io_methods (void) |
| Get the default IO methods. More... | |
| IOFileRef | raw_open (struct io_methods *methods, const char *path, int mode) |
| Raw open function. More... | |
| int | raw_close (IOFileRef f) |
| int | raw_seek (IOFileRef f, off_t offset, int whence) |
| int | raw_read (IOFileRef f, void *buf, size_t count) |
| off_t | raw_filesize (IOFileRef f) |
| void * | raw_mmap (IOFileRef f, size_t l, off_t offset) |
| int | raw_munmap (IOFileRef f, void *addr, size_t l) |
| int | raw_get_error (IOFileRef f) |
| char * | raw_get_path (IOFileRef f) |
API called internally for IO.
| struct io_methods* get_default_io_methods | ( | void | ) |
Get the default IO methods.
| int raw_close | ( | IOFileRef | f | ) |
close the file
| f | the file to close |
The implement should free the private data is at will free the file ref. f will be invalid on return
Definition at line 64 of file io.c.
References io_methods::close, and _IOFile::methods.
Referenced by OpenRaw::IO::File::close().
| int raw_get_error | ( | IOFileRef | f | ) |
get the error for the file
| f | the file |
Definition at line 126 of file io.c.
References _IOFile::error.
| char* raw_get_path | ( | IOFileRef | f | ) |
get the real path of the file
This function is needed because libtiff needs a pathname to open TIFF files.
| f | the file |
Definition at line 141 of file io.c.
References _IOFile::path.
| IOFileRef raw_open | ( | struct io_methods * | methods, |
| const char * | path, | ||
| int | mode | ||
| ) |
Raw open function.
| methods | The IO methods to use for this file. |
| path | The file path to open. |
| mode | The open mode. |
open a file
| methods | the io_methods instance to use |
| path | the file path |
| mode | the POSIX file mode |
Definition at line 49 of file io.c.
References io_methods::open.
Referenced by OpenRaw::IO::File::open().
| int raw_read | ( | IOFileRef | f, |
| void * | buf, | ||
| size_t | count | ||
| ) |
read in the file
| f | the file to readk |
| buf | the buffer to read in |
| count | the number of byte to read |
Definition at line 95 of file io.c.
References _IOFile::methods, and io_methods::read.
Referenced by OpenRaw::IO::File::read().
| int raw_seek | ( | IOFileRef | f, |
| off_t | offset, | ||
| int | whence | ||
| ) |
seek in the file
| f | the file to seek |
| offset | the offset to seek |
| whence | the the directive for seek. See lseek(2) man page |
Definition at line 81 of file io.c.
References _IOFile::methods, and io_methods::seek.
Referenced by OpenRaw::IO::File::seek().