|
|
|
@ -23,13 +23,13 @@ The priciple of this frontend is that you may use any call of libisofs or
|
|
|
|
|
libburn unless it has a isoburn_*() wrapper listed in the following function
|
|
|
|
|
documentation.
|
|
|
|
|
|
|
|
|
|
E.g. call isoburn_initialize() rather than iso_init(); burn_initialize()
|
|
|
|
|
E.g. call isoburn_initialize() rather than iso_init(); burn_initialize();
|
|
|
|
|
and call isoburn_drive_scan_and_grab() rather than burn_drive_scan_and_grab().
|
|
|
|
|
But you may call burn_disc_get_profile() directly if you want to display
|
|
|
|
|
the media type.
|
|
|
|
|
|
|
|
|
|
The wrappers will transparently provide the necessary emulations which
|
|
|
|
|
are appropriate for particular target "drives" and media states.
|
|
|
|
|
are appropriate for particular target drives and media states.
|
|
|
|
|
To learn about them you have to read both API descriptions: the one of
|
|
|
|
|
the wrapper and the one of the underlying libburn or libisofs call.
|
|
|
|
|
|
|
|
|
@ -45,26 +45,24 @@ Both drive roles can be fulfilled by the same drive.
|
|
|
|
|
Input can be a random access readable libburn drive:
|
|
|
|
|
optical media, regular files, block devices.
|
|
|
|
|
Output can be any writeable libburn drive:
|
|
|
|
|
writeable optical media in burner, writeable file objects (no directories).\
|
|
|
|
|
writeable optical media in burner, writeable file objects (no directories).
|
|
|
|
|
|
|
|
|
|
libburn needs rw-permissions to drive device file resp. file object.
|
|
|
|
|
libburn demands rw-permissions to drive device file resp. file object.
|
|
|
|
|
|
|
|
|
|
If the input drive provides a suitable ISO RockRidge image, then its tree
|
|
|
|
|
may be loaded into memory and can then be manipulated by libisofs API calls.
|
|
|
|
|
The loading is done by isoburn_read_image() under control of
|
|
|
|
|
struct isoburn_read_opts
|
|
|
|
|
|
|
|
|
|
>>> which the application obtains from libisoburn.
|
|
|
|
|
|
|
|
|
|
struct isoburn_read_opts which the application obtains from libisoburn.
|
|
|
|
|
It may be manipulated by the family of isoburn_ropt_set_*() functions.
|
|
|
|
|
|
|
|
|
|
Writing of result images is controlled by libisofs related parameters
|
|
|
|
|
in struct isoburn_imgen_opts
|
|
|
|
|
|
|
|
|
|
>>> which the application obtains from libisoburn.
|
|
|
|
|
in a struct isoburn_imgen_opts which the application obtains from libisoburn.
|
|
|
|
|
It may be manipulated by the family of isoburn_igopt_set_*() functions.
|
|
|
|
|
|
|
|
|
|
All multi-session aspects are handled by libisoburn according to these
|
|
|
|
|
settings. The application does not have to analyze media state and write
|
|
|
|
|
job parameters.
|
|
|
|
|
job parameters. It rather states its desires which libisoburn tries to
|
|
|
|
|
fulfill, or else will refuse to start the write run.
|
|
|
|
|
|
|
|
|
|
Setup for Growing or Modifying
|
|
|
|
|
|
|
|
|
@ -174,57 +172,112 @@ int isoburn_disc_erasable(struct burn_drive *d);
|
|
|
|
|
void isoburn_disc_erase(struct burn_drive *drive, int fast);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* >>> this goes to isoburn.h */
|
|
|
|
|
|
|
|
|
|
/* >>> Opaque definition of isoburn_read_opts */
|
|
|
|
|
/* >>> Constructor, destructor, getters, setters. */
|
|
|
|
|
/* ----------------------------------------------------------------------- */
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Options for image reading.
|
|
|
|
|
*/
|
|
|
|
|
struct isoburn_read_opts {
|
|
|
|
|
unsigned int norock:1; /*< Do not read Rock Ridge extensions */
|
|
|
|
|
unsigned int nojoliet:1; /*< Do not read Joliet extensions */
|
|
|
|
|
unsigned int noiso1999:1; /*< Do not read ISO 9660:1999 enhanced tree */
|
|
|
|
|
unsigned int preferjoliet:1;
|
|
|
|
|
/*< When both Joliet and RR extensions are present, the RR
|
|
|
|
|
* tree is used. If you prefer using Joliet, set this to 1. */
|
|
|
|
|
uid_t uid; /**< Default uid when no RR */
|
|
|
|
|
gid_t gid; /**< Default uid when no RR */
|
|
|
|
|
mode_t mode; /**< Default mode when no RR (only permissions) */
|
|
|
|
|
Options for image reading.
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Input charset for RR file names. NULL to use default locale charset.
|
|
|
|
|
*/
|
|
|
|
|
char *input_charset;
|
|
|
|
|
An application shall create an option set object by isoburn_ropt_new(),
|
|
|
|
|
program it by isoburn_ropt_set_*(), use it with isoburn_read_image(),
|
|
|
|
|
and finally delete it by isoburn_ropt_destroy().
|
|
|
|
|
|
|
|
|
|
/* modified by the function isoburn_read_image */
|
|
|
|
|
unsigned int hasRR:1; /*< It will be set to 1 if RR extensions are present,
|
|
|
|
|
to 0 if not. */
|
|
|
|
|
unsigned int hasJoliet:1; /*< It will be set to 1 if Joliet extensions are
|
|
|
|
|
present, to 0 if not. */
|
|
|
|
|
*/
|
|
|
|
|
/* ----------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* It will be set to 1 if the image is an ISO 9660:1999, i.e. it has
|
|
|
|
|
* a version 2 Enhanced Volume Descriptor.
|
|
|
|
|
*/
|
|
|
|
|
unsigned int hasIso1999:1;
|
|
|
|
|
struct isoburn_read_opts;
|
|
|
|
|
|
|
|
|
|
/** It will be set to 1 if El-Torito boot record is present, to 0 if not.*/
|
|
|
|
|
unsigned int hasElTorito:1;
|
|
|
|
|
/** Produces a set of image read options, initialized with default values.
|
|
|
|
|
@param o the newly created option set object
|
|
|
|
|
@return 1=ok , <0 = failure
|
|
|
|
|
*/
|
|
|
|
|
int isoburn_ropt_new(struct isoburn_read_opts **o, int flag);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Deletes an option set which was created by isoburn_ropt_new().
|
|
|
|
|
@return 1= **o destroyed , 0= *o was already NULL (harmless)
|
|
|
|
|
*/
|
|
|
|
|
int isoburn_ropt_destroy(struct isoburn_read_opts **o, int flag);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Which existing ISO 9660 extensions in the image to read or not to read.
|
|
|
|
|
Whether to read the content of an existing image at all.
|
|
|
|
|
The bits can be combined by | resp. inquired by &.
|
|
|
|
|
@param ext Bitfield:
|
|
|
|
|
bit0= norock
|
|
|
|
|
Do not read Rock Ridge extensions
|
|
|
|
|
bit1= nojoliet
|
|
|
|
|
Do not read Joliet extensions
|
|
|
|
|
bit2= noiso1999
|
|
|
|
|
Do not read ISO 9660:1999 enhanced tree
|
|
|
|
|
bit3= preferjoliet
|
|
|
|
|
When both Joliet and RR extensions are present, the RR
|
|
|
|
|
tree is used. If you prefer using Joliet, set this to 1.
|
|
|
|
|
bit4= pretend_blank
|
|
|
|
|
Always create empty image.Ignore any image on input drive.
|
|
|
|
|
*/
|
|
|
|
|
#define isoburn_ropt_norock 1
|
|
|
|
|
#define isoburn_ropt_nojoliet 2
|
|
|
|
|
#define isoburn_ropt_noiso1999 4
|
|
|
|
|
#define isoburn_ropt_preferjoliet 8
|
|
|
|
|
#define isoburn_ropt_pretend_blank 16
|
|
|
|
|
int isoburn_ropt_set_extensions(struct isoburn_read_opts *o, int ext);
|
|
|
|
|
int isoburn_ropt_get_extensions(struct isoburn_read_opts *o, int *ext);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Default attributes to use if no RockRidge extension gets loaded.
|
|
|
|
|
@param uid user id number (see /etc/passwd)
|
|
|
|
|
@param gid group id number (see /etc/group)
|
|
|
|
|
@param mode permissions (not file type) as of man 2 stat.
|
|
|
|
|
*/
|
|
|
|
|
int isoburn_ropt_set_default_perms(struct isoburn_read_opts *o,
|
|
|
|
|
uid_t uid, gid_t gid, mode_t mode);
|
|
|
|
|
int isoburn_ropt_get_default_perms(struct isoburn_read_opts *o,
|
|
|
|
|
uid_t *uid, gid_t *gid, mode_t *mode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Input charset for RR file names. NULL to use default locale charset.
|
|
|
|
|
>>> what if not NULL ?
|
|
|
|
|
*/
|
|
|
|
|
int isoburn_ropt_set_input_charset(struct isoburn_read_opts *o,
|
|
|
|
|
char *input_charset);
|
|
|
|
|
int isoburn_ropt_get_input_charset(struct isoburn_read_opts *o,
|
|
|
|
|
char **input_charset);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** After calling function isoburn_read_image() there are informations
|
|
|
|
|
available in the option set.
|
|
|
|
|
This info can be obtained as bits in parameter has_what. Like:
|
|
|
|
|
joliet_available = (has_what & isoburn_ropt_has_joliet);
|
|
|
|
|
@param size Number of image data blocks, 2048 bytes each.
|
|
|
|
|
@param has_what Bitfield:
|
|
|
|
|
bit0= has_rockridge
|
|
|
|
|
RockRidge extension info is available (POSIX filesystem)
|
|
|
|
|
bit1= has_joliet
|
|
|
|
|
Joliet extension info is available (suitable for MS-Windows)
|
|
|
|
|
bit2= has_iso1999
|
|
|
|
|
ISO version 2 Enhanced Volume Descriptor is available
|
|
|
|
|
>>> what is ISO 1999 good for ?
|
|
|
|
|
bit3= has_el_torito
|
|
|
|
|
El-Torito boot record is present
|
|
|
|
|
*/
|
|
|
|
|
#define isoburn_ropt_has_rockridge 1
|
|
|
|
|
#define isoburn_ropt_has_joliet 2
|
|
|
|
|
#define isoburn_ropt_has_iso1999 4
|
|
|
|
|
#define isoburn_ropt_has_el_torito 8
|
|
|
|
|
int isoburn_ropt_get_size_what(struct isoburn_read_opts *o,
|
|
|
|
|
uint32_t *size, int *has_what);
|
|
|
|
|
|
|
|
|
|
uint32_t size; /**< Will be filled with the size (in 2048 byte block) of
|
|
|
|
|
* the image, as reported in the PVM. */
|
|
|
|
|
unsigned int pretend_blank:1; /* always create empty image */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------- */
|
|
|
|
|
/* End of Options for image reading */
|
|
|
|
|
/* ----------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------- */
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
Options for image generation by libisofs and image transport to libburn.
|
|
|
|
|
|
|
|
|
|
An application shall create an option set object by isoburn_igopt_new(),
|
|
|
|
|
An application shall create an option set by isoburn_igopt_new(),
|
|
|
|
|
program it by isoburn_igopt_set_*(), use it with either
|
|
|
|
|
isoburn_prepare_new_image() or isoburn_prepare_disc(), and finally delete
|
|
|
|
|
it by isoburn_igopt_destroy().
|
|
|
|
@ -243,7 +296,7 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **o, int flag);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Deletes an option set which was created by isoburn_igopt_new().
|
|
|
|
|
It is harmless to submit *o == NULL.
|
|
|
|
|
@return 1= **o destroyed , 0= *o was already NULL (harmless)
|
|
|
|
|
*/
|
|
|
|
|
int isoburn_igopt_destroy(struct isoburn_imgen_opts **o, int flag);
|
|
|
|
|
|
|
|
|
|