libisofs 1.5.6
|
Data source used by libisofs for reading an existing image. More...
#include <libisofs.h>
Data Fields | |
int | version |
unsigned int | refcount |
Reference count for the data source. | |
int(* | open )(IsoDataSource *src) |
Opens the given source. | |
int(* | close )(IsoDataSource *src) |
Close a given source, freeing all system resources previously grabbed in open(). | |
int(* | read_block )(IsoDataSource *src, uint32_t lba, uint8_t *buffer) |
Read an arbitrary block (2048 bytes) of data from the source. | |
void(* | free_data )(IsoDataSource *src) |
Clean up the source specific data. | |
void * | data |
Source specific data. | |
Data source used by libisofs for reading an existing image.
It offers homogeneous read access to arbitrary blocks to different sources for images, such as .iso files, CD/DVD drives, etc...
To create a multisession image, libisofs needs a IsoDataSource, that the user must provide. The function iso_data_source_new_from_file() constructs an IsoDataSource that uses POSIX I/O functions to access data. You can use it with regular .iso images, and also with block devices that represent a drive.
Definition at line 412 of file libisofs.h.
int(* iso_data_source::close) (IsoDataSource *src) |
Close a given source, freeing all system resources previously grabbed in open().
Definition at line 442 of file libisofs.h.
void* iso_data_source::data |
Source specific data.
Definition at line 469 of file libisofs.h.
void(* iso_data_source::free_data) (IsoDataSource *src) |
Clean up the source specific data.
Never call this directly, it is automatically called by iso_data_source_unref() when refcount reach 0.
Definition at line 466 of file libisofs.h.
int(* iso_data_source::open) (IsoDataSource *src) |
Opens the given source.
You must open() the source before any attempt to read data from it. The open is the right place for grabbing the underlying resources.
Definition at line 433 of file libisofs.h.
int(* iso_data_source::read_block) (IsoDataSource *src, uint32_t lba, uint8_t *buffer) |
Read an arbitrary block (2048 bytes) of data from the source.
lba | Block to be read. |
buffer | Buffer where the data will be written. It should have at least 2048 bytes. |
Definition at line 459 of file libisofs.h.
unsigned int iso_data_source::refcount |
Reference count for the data source.
Should be 1 when a new source is created. Don't access it directly, but with iso_data_source_ref() and iso_data_source_unref() functions.
Definition at line 423 of file libisofs.h.
int iso_data_source::version |
Definition at line 416 of file libisofs.h.