xorriso  1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

iso_data_source Struct Reference

#include <libisofs.h>

Data Fields

int version
 
unsigned int refcount
 
int(* open )(IsoDataSource *src)
 
int(* close )(IsoDataSource *src)
 
int(* read_block )(IsoDataSource *src, uint32_t lba, uint8_t *buffer)
 
void(* free_data )(IsoDataSource *src)
 
void * data
 

Detailed Description

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.

Since
0.6.2

Definition at line 412 of file libisofs.h.

Field Documentation

◆ close

int(* iso_data_source::close) (IsoDataSource *src)

Close a given source, freeing all system resources previously grabbed in open().

Returns
1 if success, < 0 on error (has to be a valid libisofs error code)

Definition at line 442 of file libisofs.h.

Referenced by ifs_fs_close(), ifs_fs_free(), iso_data_source_new_from_file(), iso_interval_reader_destroy(), and isoburn_data_source_new().

◆ data

void* iso_data_source::data

◆ free_data

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.

Referenced by iso_data_source_new_from_file(), iso_data_source_unref(), and isoburn_data_source_new().

◆ open

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.

Returns
1 if success, < 0 on error (has to be a valid libisofs error code)

Definition at line 433 of file libisofs.h.

Referenced by ifs_fs_open(), iso_data_source_new_from_file(), iso_interval_reader_read(), and isoburn_data_source_new().

◆ read_block

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.

Parameters
lbaBlock to be read.
bufferBuffer where the data will be written. It should have at least 2048 bytes.
Returns
1 if success, < 0 if error. This function has to emit a valid libisofs error code. Predefined (but not mandatory) for this purpose are: ISO_DATA_SOURCE_SORRY , ISO_DATA_SOURCE_MISHAP, ISO_DATA_SOURCE_FAILURE , ISO_DATA_SOURCE_FATAL

Definition at line 459 of file libisofs.h.

Referenced by ifs_get_root(), ifs_lseek(), ifs_read(), iso_analyze_gpt_backup(), iso_analyze_partition_offset(), iso_data_source_new_from_file(), iso_image_filesystem_new(), iso_image_import(), iso_impsysa_hdd_emul_size(), iso_interval_reader_read(), iso_record_pvd_blocks(), iso_src_check_sb_tree(), isoburn_data_source_new(), read_dir(), read_el_torito_boot_catalog(), read_pvd_block(), and susp_iter_next().

◆ refcount

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.

Referenced by iso_data_source_new_from_file(), iso_data_source_ref(), iso_data_source_unref(), and isoburn_data_source_new().

◆ version

int iso_data_source::version

Definition at line 416 of file libisofs.h.

Referenced by iso_data_source_new_from_file(), and isoburn_data_source_new().


The documentation for this struct was generated from the following file: