libisoburn 1.5.8
libisoburn.h
Go to the documentation of this file.
1
2#ifndef LIBISOBURN_LIBISOBURN_H_
3#define LIBISOBURN_LIBISOBURN_H_
4
5/*
6 Lower level API definition of libisoburn.
7
8 Copyright 2007-2009 Vreixo Formoso Lopes <metalpain2002@yahoo.es>
9 Copyright 2007-2026 Thomas Schmitt <scdbackup@gmx.net>
10 Provided under GPL version 2 or later.
11*/
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17/** Overview
18
19libisoburn is a frontend for libraries libburn and libisofs which enables
20creation and expansion of ISO-9660 filesystems on all CD/DVD/BD media supported
21by libburn. This includes media like DVD+RW, which do not support multi-session
22management on media level and even plain disk files or block devices.
23
24The price for that is thorough specialization on data files in ISO-9660
25filesystem images. So libisoburn is not suitable for audio (CD-DA) or any
26other CD layout which does not entirely consist of ISO-9660 sessions.
27
28Note that there is a higher level of API: xorriso.h. One should not mix it
29with the API calls of libisoburn.h, libisofs.h, and libburn.h.
30
31
32 Connector functions
33
34libisofs and libburn do not depend on each other but share some interfaces
35by which they can cooperate.
36libisoburn establishes the connection between both modules by creating the
37necessary interface objects and attaching them to the right places.
38
39
40 Wrapper functions
41
42The principle of this frontend is that you may use any call of libisofs or
43libburn unless it has a isoburn_*() wrapper listed in the following function
44documentation.
45
46E.g. call isoburn_initialize() rather than iso_init(); burn_initialize();
47and call isoburn_drive_scan_and_grab() rather than burn_drive_scan_and_grab().
48But you may call burn_disc_get_profile() directly if you want to display
49the media type.
50
51The wrappers will transparently provide the necessary emulations which
52are appropriate for particular target drives and media states.
53To learn about them you have to read both API descriptions: the one of
54the wrapper and the one of the underlying libburn or libisofs call.
55
56Macros BURN_* and functions burn_*() are documented in <libburn/libburn.h>
57Macros ISO_* and functions iso_*() are documented in <libisofs/libisofs.h>
58
59
60 Usage model
61
62There may be an input drive and an output drive. Either of them may be missing
63with the consequence that no reading or no writing is possible.
64Both drive roles can be fulfilled by the same drive.
65
66Input can be a random access readable libburn drive:
67 optical media, regular files, block devices.
68Output can be any writeable libburn drive:
69 writeable optical media in burner, writeable file objects (no directories).
70
71libburn demands rw-permissions to drive device file or file object.
72
73If the input drive provides a suitable ISO RockRidge image, then its tree
74may be loaded into memory and can then be manipulated by libisofs API calls.
75The loading is done by isoburn_read_image() under control of
76struct isoburn_read_opts which the application obtains from libisoburn
77and manipulates by the family of isoburn_ropt_set_*() functions.
78
79Writing of result images is controlled by libisofs related parameters
80in a struct isoburn_imgen_opts which the application obtains from libisoburn
81and manipulates by the family of isoburn_igopt_set_*() functions.
82
83All multi-session aspects are handled by libisoburn according to these
84settings. The application does not have to analyze media state and write
85job parameters. It rather states its desires which libisoburn tries to
86fulfill, or else will refuse to start the write run.
87
88
89 Setup for Growing, Modifying or Blind Growing
90
91The connector function family offers alternative API calls for performing
92the setup for several alternative image generation strategies.
93
94Growing:
95If input and output drive are the same, then isoburn_prepare_disc() is to
96be used. It will lead to an add-on session on appendable or overwritable
97media with existing ISO image. With blank media it will produce a first
98session.
99
100Modifying:
101If the output drive is not the input drive, and if it bears blank media
102or overwritable without a valid ISO image, then one may produce a consolidated
103image with old and new data. This will copy file data from an eventual input
104drive with valid image, add any newly introduced data from the local
105filesystem, and produce a first session on output media.
106To prepare for such an image generation run, use isoburn_prepare_new_image().
107
108Blind Growing:
109This method reads the old image from one drive and writes the add-on session
110to a different drive. That output drive is nevertheless supposed to
111finally lead to the same medium from where the session was loaded. Usually it
112will be stdio:/dev/fd/1 (i.e. stdout) being piped into some burn program
113like with this classic gesture:
114 mkisofs -M $dev -C $msc1,$nwa | cdrecord -waiti dev=$dev
115Blind growing is prepared by the call isoburn_prepare_blind_grow().
116The input drive should be released immediately after this call in order
117to allow the consumer of the output stream to access that drive for writing.
118
119After either of these setups, some peripheral libburn drive parameter settings
120like burn_write_opts_set_simulate(), burn_write_opts_set_multi(),
121 burn_drive_set_speed(), burn_write_opts_set_underrun_proof() should be made.
122Do not set the write mode. It will be chosen by libisoburn so it matches job
123and media state.
124
125 Writing the image
126
127Then one may start image generation and write threads by isoburn_disc_write().
128Progress may be watched at the output drive by burn_drive_get_status() and
129isoburn_get_fifo_status().
130
131At some time, the output drive will be BURN_DRIVE_IDLE indicating that
132writing has ended.
133One should inquire isoburn_drive_wrote_well() to learn about overall success.
134
135Finally one must call isoburn_activate_session() which will complete any
136eventual multi-session emulation.
137
138
139 Application Constraints
140
141Applications shall include libisofs/libisofs.h , libburn/libburn.h and this
142file itself: libisoburn/libisoburn.h .
143They shall link with -lisofs -lburn -lisoburn or with the .o files emerging
144from building those libraries from their sources.
145
146Applications must use 64 bit off_t.
147E.g. on 32-bit GNU/Linux by defining
148 #define _LARGEFILE_SOURCE
149 #define _FILE_OFFSET_BITS 64
150The minimum requirement is to interface with the library by 64 bit signed
151integers where libisofs.h or libisoburn.h prescribe off_t.
152Failure to do so may result in surprising malfunction or memory faults.
153
154Application files which include libisofs/libisofs.h or libisoburn/libisoburn.h
155must provide definitions for uint32_t and uint8_t.
156This can be achieved either:
157- by using autotools which will define HAVE_STDINT_H or HAVE_INTTYPES_H
158 according to its ./configure tests,
159- or by defining the macros HAVE_STDINT_H or HAVE_INTTYPES_H according
160 to the local situation,
161- or by appropriately defining uint32_t and uint8_t by other means,
162 e.g. by including inttypes.h before including libisofs.h and libisoburn.h
163
164*/
165#ifdef HAVE_STDINT_H
166#include <stdint.h>
167#else
168#ifdef HAVE_INTTYPES_H
169#include <inttypes.h>
170#endif
171#endif
172
173
174/* Important: If you add a public API function then add its name to file
175 libisoburn/libisoburn.ver
176 in the node LIBISOBURN1_Major.Minor.Micro with the numbers of
177 the next release version.
178*/
179
180
181 /* API functions */
182
183
184/** Initialize libisoburn, libisofs and libburn.
185 Wrapper for : iso_init() and burn_initialize()
186 @since 0.1.0
187 @param msg A character array for eventual messages (e.g. with errors)
188 @param flag Bitfield for control purposes (unused yet, submit 0)
189 @return 1 indicates success, 0 is failure
190*/
191int isoburn_initialize(char msg[1024], int flag);
192
193
194/** Check whether all features of header file libisoburn.h from the given
195 major.minor.micro revision triple can be delivered by the library version
196 which is performing this call.
197 An application of libisoburn can easily memorize the version of the
198 libisoburn.h header in its own code. Immediately after isoburn_initialize()
199 it should simply do this check:
200 if (! isoburn_is_compatible(isoburn_header_version_major,
201 isoburn_header_version_minor,
202 isoburn_header_version_micro, 0))
203 ...refuse to start the program with this dynamic library version...
204 @since 0.1.0
205 @param major obtained at build time
206 @param minor obtained at build time
207 @param micro obtained at build time
208 @param flag Bitfield for control purposes. Unused yet. Submit 0.
209 @return 1= library can work for caller
210 0= library is not usable in some aspects. Caller must restrict
211 itself to an earlier API version or must not use this library
212 at all.
213*/
214int isoburn_is_compatible(int major, int minor, int micro, int flag);
215
216
217/** Obtain the three release version numbers of the library. These are the
218 numbers encountered by the application when linking with libisoburn,
219 i.e. possibly not before run time.
220 Better do not base the fundamental compatibility decision of an application
221 on these numbers. For a reliable check use isoburn_is_compatible().
222 @since 0.1.0
223 @param major The maturity version (0 for now, as we are still learning)
224 @param minor The development goal version.
225 @param micro The development step version. This has an additional meaning:
226
227 Pare numbers indicate a version with frozen API. I.e. you can
228 rely on the same set of features to be present in all
229 published releases with that major.minor.micro combination.
230 Features of a pare release will stay available and ABI
231 compatible as long as the SONAME of libisoburn stays "1".
232 Currently there are no plans to ever change the SONAME.
233
234 Odd numbers indicate that API upgrades are in progress.
235 I.e. new features might be already present or they might
236 be still missing. Newly introduced features may be changed
237 incompatibly or even be revoked before release of a pare
238 version.
239 So micro revisions {1,3,5,7,9} should never be used for
240 dynamic linking unless the proper library match can be
241 guaranteed by external circumstances.
242*/
243void isoburn_version(int *major, int *minor, int *micro);
244
245
246/** The minimum version of libisofs to be used with this version of libisoburn
247 at compile time.
248 @since 0.1.0
249*/
250#define isoburn_libisofs_req_major 1
251#define isoburn_libisofs_req_minor 5
252#define isoburn_libisofs_req_micro 8
253
254/** The minimum version of libburn to be used with this version of libisoburn
255 at compile time.
256 @since 0.1.0
257*/
258#define isoburn_libburn_req_major 1
259#define isoburn_libburn_req_minor 5
260#define isoburn_libburn_req_micro 8
261
262/** The minimum compile time requirements of libisoburn towards libjte are
263 the same as of a suitable libisofs towards libjte.
264 So use these macros from libisofs.h :
265 iso_libjte_req_major
266 iso_libjte_req_minor
267 iso_libjte_req_micro
268 @since 0.6.4
269*/
270
271/** The minimum version of libisofs to be used with this version of libisoburn
272 at runtime. This is checked already in isoburn_initialize() which will
273 refuse on outdated version. So this call is for information purposes after
274 successful startup only.
275 @since 0.1.0
276 @param major isoburn_libisofs_req_major as seen at build time
277 @param minor as seen at build time
278 @param micro as seen at build time
279 @return 1 success, <=0 might in future become an error indication
280*/
281int isoburn_libisofs_req(int *major, int *minor, int *micro);
282
283
284/** The minimum version of libjte to be used with this version of libisoburn
285 at runtime. The use of libjte is optional and depends on configure
286 tests. It can be prevented by ./configure option --disable-libjte .
287 This is checked already in isoburn_initialize() which will refuse on
288 outdated version. So this call is for information purposes after
289 successful startup only.
290 @since 0.6.4
291*/
292int isoburn_libjte_req(int *major, int *minor, int *micro);
293
294
295/** The minimum version of libburn to be used with this version of libisoburn
296 at runtime. This is checked already in isoburn_initialize() which will
297 refuse on outdated version. So this call is for information purposes after
298 successful startup only.
299 @since 0.1.0
300 @param major isoburn_libburn_req_major as seen at build time
301 @param minor as seen at build time
302 @param micro as seen at build time
303 @return 1 success, <=0 might in future become an error indication
304*/
305int isoburn_libburn_req(int *major, int *minor, int *micro);
306
307
308/** These three release version numbers tell the revision of this header file
309 and of the API it describes. They are memorized by applications at build
310 time.
311 @since 0.1.0
312*/
313#define isoburn_header_version_major 1
314#define isoburn_header_version_minor 5
315#define isoburn_header_version_micro 8
316/** Note:
317 Above version numbers are also recorded in configure.ac because libtool
318 wants them as parameters at build time.
319 For the library compatibility check, ISOBURN_*_VERSION in configure.ac
320 are not decisive. Only the three numbers here do matter.
321*/
322/** Usage discussion:
323
324Some developers of the libburnia project have differing
325opinions how to ensure the compatibility of libraries
326and applications.
327
328It is about whether to use at compile time and at runtime
329the version numbers isoburn_header_version_* provided here.
330Thomas Schmitt advises to use them.
331Vreixo Formoso advises to use other means.
332
333At compile time:
334
335Vreixo Formoso advises to leave proper version matching
336to properly programmed checks in the the application's
337build system, which will eventually refuse compilation.
338
339Thomas Schmitt advises to use the macros defined here
340for comparison with the application's requirements of
341library revisions and to eventually break compilation.
342
343Both advises are combinable. I.e. be master of your
344build system and have #if checks in the source code
345of your application, nevertheless.
346
347At runtime (via *_is_compatible()):
348
349Vreixo Formoso advises to compare the application's
350requirements of library revisions with the runtime
351library. This is to allow runtime libraries which are
352young enough for the application but too old for
353the lib*.h files seen at compile time.
354
355Thomas Schmitt advises to compare the header
356revisions defined here with the runtime library.
357This is to enforce a strictly monotonous chain
358of revisions from app to header to library,
359at the cost of excluding some older libraries.
360
361These two advises are mutually exclusive.
362
363-----------------------------------------------------
364
365For an implementation of the Thomas Schmitt approach,
366see libisoburn/burn_wrap.c : isoburn_initialize()
367This connects libisoburn as "application" with libisofs
368as "library".
369
370The compatible part of Vreixo Formoso's approach is implemented
371in configure.ac LIBBURN_REQUIRED, LIBISOFS_REQUIRED.
372In isoburn_initialize() it would rather test by
373 iso_lib_is_compatible(isoburn_libisofs_req_major,...
374than by
375 iso_lib_is_compatible(iso_lib_header_version_major,...
376and would leave out the ugly compile time traps.
377
378*/
379
380
381/** Announce to the library an application provided method for immediate
382 delivery of messages. It is used when no drive is affected directly or
383 if the drive has no own msgs_submit() method attached by
384 isoburn_drive_set_msgs_submit.
385 If no method is preset or if the method is set to NULL then libisoburn
386 delivers its messages through the message queue of libburn.
387 @param msgs_submit The function call which implements the method
388 @param submit_handle Handle to be used as first argument of msgs_submit
389 @param submit_flag Flag to be used as last argument of msgs_submit
390 @param flag Unused yet, submit 0
391 @since 0.2.0
392*/
393int isoburn_set_msgs_submit(int (*msgs_submit)(void *handle, int error_code,
394 char msg_text[], int os_errno,
395 char severity[], int flag),
396 void *submit_handle, int submit_flag, int flag);
397
398
399/** Acquire a target drive by its filesystem path or libburn persistent
400 address.
401 Wrapper for: burn_drive_scan_and_grab()
402 @since 0.1.0
403 @param drive_infos On success returns a one element array with the drive
404 (cdrom/burner). Thus use with driveno 0 only. On failure
405 the array has no valid elements at all.
406 The returned array should be freed via burn_drive_info_free()
407 when the drive is no longer needed. But before this is done
408 one has to call isoburn_drive_release(drive_infos[0].drive).
409 @param adr The persistent address of the desired drive or the path
410 to a file object.
411 @param load 1 attempt to load the disc tray. 0 no attempt,rather failure.
412 @return 1 = success , 0 = drive not found , <0 = other error
413*/
414int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[],
415 char* adr, int load);
416
417
418/** Acquire a target drive by its filesystem path or libburn persistent
419 address. This is a modern successor of isoburn_drive_scan_and_grab().
420 Wrapper for: burn_drive_scan_and_grab()
421 @since 0.1.2
422 @param drive_infos On success returns a one element array with the drive
423 (cdrom/burner). Thus use with driveno 0 only. On failure
424 the array has no valid elements at all.
425 The returned array should be freed via burn_drive_info_free()
426 when the drive is no longer needed. But before this is done
427 one has to call isoburn_drive_release(drive_infos[0].drive).
428 @param adr The persistent address of the desired drive or the path
429 to a file object.
430 @param flag bit0= attempt to load the disc tray.
431 Else: failure if not loaded.
432 bit1= regard overwritable media as blank
433 bit2= if the drive is a regular disk file:
434 truncate it to the write start address when writing
435 begins
436 bit3= if the drive reports a read-only profile try to read
437 table of content by scanning for ISO image headers.
438 (depending on media type and drive this might
439 help or it might make the resulting toc even worse)
440 bit4= do not emulate table of content on overwritable media
441 bit5= ignore ACL from external filesystems.
442 This can later be overriden by isoburn_read_image()
443 according to its isoburn_read_opts.
444 bit6= ignore POSIX Extended Attributes from external
445 filesystems (xattr)
446 This can later be overriden by isoburn_read_image()
447 according to its isoburn_read_opts.
448 bit7= pretend read-only profile and scan for table of content
449 bit8= re-assess already acquired (*drive_infos)[0] rather
450 than acquiring adr
451 @since 1.1.8
452 bit9= when scanning for ISO 9660 sessions by bit3:
453 Do not demand a valid superblock at LBA 0, ignore it in
454 favor of one at LBA 32, and scan until end of medium.
455 @since 1.2.6
456 bit10= if not bit6: accept all xattr namespaces from external
457 filesystems, not only "user.".
458 @since 1.5.0
459 bit11= do not ignore Linux-like file attributes (chattr) from
460 external filesystems. See occurences of "lfa_flags"
461 and "chattr" in libisofs.h.
462 This can later be overriden by isoburn_read_image()
463 according to its isoburn_read_opts.
464 @since 1.5.8
465 bit12= do not ignore XFS-style project ids from external
466 filesystems.
467 This can later be overriden by isoburn_read_image()
468 according to its isoburn_read_opts.
469 @since 1.5.8
470 bit15= ignore non-settable lfa_flags when importing files from
471 disk and do not record "isofs.fa" if the other flags
472 are all zero
473 @return 1 = success , 0 = drive not found , <0 = other error
474
475 Please excuse the typo "aquire" in the function name.
476*/
477int isoburn_drive_aquire(struct burn_drive_info *drive_infos[],
478 char* adr, int flag);
479
480/** Acquire a drive from the burn_drive_info[] array which was obtained by
481 a previous call of burn_drive_scan().
482 Wrapper for: burn_drive_grab()
483 @since 0.1.0
484 @param drive The drive to grab. E.g. drive_infos[1].drive .
485 Call isoburn_drive_release(drive) when it it no longer needed.
486 @param load 1 attempt to load the disc tray. 0 no attempt, rather failure.
487 @return 1 success, <=0 failure
488*/
489int isoburn_drive_grab(struct burn_drive *drive, int load);
490
491
492/** Attach to a drive an application provided method for immediate
493 delivery of messages.
494 If no method is set or if the method is set to NULL then libisoburn
495 delivers messages of the drive through the global msgs_submit() method
496 set by isoburn_set_msgs_submiti() or by the message queue of libburn.
497 @since 0.2.0
498 @param d The drive to which this function, handle and flag shall apply
499 @param msgs_submit The function call which implements the method
500 @param submit_handle Handle to be used as first argument of msgs_submit
501 @param submit_flag Flag to be used as last argument of msgs_submit
502 @param flag Unused yet, submit 0
503*/
504int isoburn_drive_set_msgs_submit(struct burn_drive *d,
505 int (*msgs_submit)(void *handle, int error_code,
506 char msg_text[], int os_errno,
507 char severity[], int flag),
508 void *submit_handle, int submit_flag, int flag);
509
510
511/** Inquire the medium status. Expect the whole spectrum of libburn BURN_DISC_*
512 with multi-session media. Emulated states with random access media are
513 BURN_DISC_BLANK and BURN_DISC_APPENDABLE.
514 Wrapper for: burn_disc_get_status()
515 @since 0.1.0
516 @param drive The drive to inquire.
517 @return The status of the drive, or what kind of disc is in it.
518 Note: BURN_DISC_UNGRABBED indicates wrong API usage
519*/
520#ifdef __cplusplus
521enum burn::burn_disc_status isoburn_disc_get_status(struct burn_drive *drive);
522#else
523enum burn_disc_status isoburn_disc_get_status(struct burn_drive *drive);
524#endif
525
526
527/** Sets the medium status to BURN_DISC_FULL unconditionally.
528 @since 1.3.8
529 @param drive The drive with the medium to be handled as if it was closed.
530 @
531*/
532int isoburn_disc_pretend_full_uncond(struct burn_drive *drive);
533
534
535/** Tells whether the medium can be treated by isoburn_disc_erase().
536 Wrapper for: burn_disc_erasable()
537 @since 0.1.0
538 @param d The drive to inquire.
539 @return 0=not erasable , else erasable
540*/
541int isoburn_disc_erasable(struct burn_drive *d);
542
543
544/** Mark the medium as blank. With multi-session media this will call
545 burn_disc_erase(). With random access media, an eventual ISO-9660
546 filesystem will get invalidated by altering its start blocks on the medium.
547 In case of success, the medium is in status BURN_DISC_BLANK afterwards.
548 Wrapper for: burn_disc_erase()
549 @since 0.1.0
550 @param drive The drive with the medium to erase.
551 @param fast 1=fast erase, 0=thorough erase
552 With DVD-RW, fast erase yields media incapable of multi-session.
553*/
554void isoburn_disc_erase(struct burn_drive *drive, int fast);
555
556
557/** Set up isoburn_disc_get_msc1() to return a fabricated value.
558 This makes only sense between acquiring the drive and reading the
559 image. After isoburn_read_image() it will confuse the coordination
560 of libisoburn and libisofs.
561 Note: Sessions and tracks are counted beginning with 1, not with 0.
562 @since 0.1.6
563 @param d The drive where msc1 is to be set
564 @param adr_mode Determines how to interpret adr_value and to set msc1.
565 If adr_value shall represent a number then decimal ASCII
566 digits are expected.
567 0= start lba of last session in TOC, ignore adr_value
568 1= start lba of session number given by adr_value
569 2= start lba of track number given by adr_value
570 3= adr_value itself is the lba to be used
571 4= start lba of last session with volume id
572 given by adr_value
573 @since 1.5.8 :
574 5= start lba of last session with modification time
575 exactly as given by adr_value. adr_value is seconds
576 since 1970 GMT (i.e. time_t as decimal number string)
577 6= start lba of last session with modification time
578 not after adr_value (seconds after 1970 GMT)
579 7= start lba of first session with modification time
580 not before adr_value (seconds after 1970 GMT)
581 8= start lba of last session with modification time
582 before but not at adr_value (seconds after 1970 GMT)
583 9= start lba of first session with modification time
584 after but not at adr_value (seconds after 1970 GMT
585 @param adr_value A string describing the value to be eventually used.
586 @param flag Bitfield for control purposes.
587 bit0= @since 0.2.2
588 with adr_mode 3: adr_value might be 16 blocks too high
589 (e.g. -C stemming from growisofs). Probe for ISO head
590 at adr_value-16 and eventually adjust setting.
591 bit1= insist in seeing a disc object with at least one session
592 bit2= with adr_mode 4: use adr_value as regular expression
593 with adr_mode 5 to 9: use creation time rather than
594 modification time
595*/
596int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value,
597 int flag);
598
599
600/* ----------------------------------------------------------------------- */
601/*
602
603 Wrappers for emulation of TOC on overwritable media
604
605 Media which match the overwritable usage model lack of a history of sessions
606 and tracks. libburn will not even hand out a burn_disc object for them and
607 always declare them blank. libisoburn checks for a valid ISO filesystem
608 header at LBA 0 and eventually declares them appendable.
609 Nevertheless one can only determine an upper limit of the size of the overall
610 image (by isoburn_get_min_start_byte()) but not a list of stored sessions
611 and their LBAs, as it is possible with true multi-session media.
612
613 The following wrappers add the capability to obtain a session and track TOC
614 from emulated multi-session images on overwritables if the first session
615 was written by libisoburn-0.1.6 or later (i.e. with a header copy at LBA 32).
616
617 Be aware that the structs emitted by these isoburn calls are not compatible
618 with the libburn structs. I.e. you may use them only with isoburn_toc_*
619 calls.
620 isoburn_toc_disc needs to be freed after use. isoburn_toc_session and
621 isoburn_toc_track vanish together with their isoburn_toc_disc.
622*/
623
624/* Opaque handles to media, session, track */
625struct isoburn_toc_disc;
626struct isoburn_toc_session;
627struct isoburn_toc_track;
628
629
630/** Obtain a master handle for the table of content.
631 This handle governs allocated resources which have to be released by
632 isoburn_toc_disc_free() when no longer needed.
633 Wrapper for: burn_drive_get_disc()
634 @since 0.1.6
635 @param d The drive with the medium to inspect
636 @return NULL in case there is no content info, else it is a valid handle
637*/
638struct isoburn_toc_disc *isoburn_toc_drive_get_disc(struct burn_drive *d);
639
640
641/** Tell the number of 2048 byte blocks covered by the table of content.
642 This number includes the eventual gaps between sessions and tracks.
643 So this call is not really a wrapper for burn_disc_get_sectors().
644 @since 0.1.6
645 @param disc The master handle of the medium
646 @return Number of blocks, <=0 indicates unknown or unreadable state
647*/
648int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc);
649
650/** Like isoburn_toc_disc_get_sectors(), but with off_t return value.
651 @since 1.5.8
652*/
653off_t isoburn_toc_disc_get_sectors_v2(struct isoburn_toc_disc *disc);
654
655
656/** Get the array of session handles and the number of complete sessions
657 from the table of content.
658 The result array contains *num + isoburn_toc_disc_get_incmpl_sess()
659 elements. All above *num are incomplete sessions.
660 Typically there is at most one incomplete session with no track.
661 Wrapper for: burn_disc_get_sessions()
662 @since 0.1.6
663 @param disc The master handle of the medium
664 @param num returns the number of sessions in the array
665 @return the address of the array of session handles
666*/
667struct isoburn_toc_session **isoburn_toc_disc_get_sessions(
668 struct isoburn_toc_disc *disc, int *num);
669
670
671/** Obtain the number of incomplete sessions which are recorded in the
672 result array of isoburn_toc_disc_get_sessions() after the complete
673 sessions. See above.
674 @since 1.2.8
675 @param disc The master handle of the medium
676 @return the number of incomplete sessions
677*/
678int isoburn_toc_disc_get_incmpl_sess(struct isoburn_toc_disc *disc);
679
680
681/** Tell the number of 2048 byte blocks covered by a particular session.
682 Wrapper for: burn_session_get_sectors()
683 @since 0.1.6
684 @param s The session handle
685 @return number of blocks, <=0 indicates unknown or unreadable state
686*/
687int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s);
688
689/** Like isoburn_toc_session_get_sectors(), but with off_t return value.
690 @since 1.5.8
691*/
692off_t isoburn_toc_session_get_sectors_v2(struct isoburn_toc_session *s);
693
694
695/** Obtain a copy of the entry which describes the end of a particular session.
696 Wrapper for: burn_session_get_leadout_entry()
697 @since 0.1.6
698 @param s The session handle
699 @param entry A pointer to memory provided by the caller. It will be filled
700 with info according to struct burn_toc_entry as defined
701 in libburn.h
702*/
703void isoburn_toc_session_get_leadout_entry(struct isoburn_toc_session *s,
704 struct burn_toc_entry *entry);
705
706
707/** Get the array of track handles from a particular session.
708 Wrapper for: burn_session_get_tracks()
709 @since 0.1.6
710 @param s The session handle
711 @param num returns the number of tracks in the array
712 @return the address of the array of track handles,
713 NULL if no tracks are registered with session s
714*/
715struct isoburn_toc_track **isoburn_toc_session_get_tracks(
716 struct isoburn_toc_session *s, int *num);
717
718
719/** Obtain a copy of the entry which describes a particular track.
720 Wrapper for: burn_track_get_entry()
721 @since 0.1.6
722 @param t The track handle
723 @param entry A pointer to memory provided by the caller. It will be filled
724 with info according to struct burn_toc_entry as defined
725 in libburn.h
726*/
727void isoburn_toc_track_get_entry(struct isoburn_toc_track *t,
728 struct burn_toc_entry *entry);
729
730
731/** Obtain eventual ISO image parameters of an emulated track. This info was
732 gained with much effort and thus gets cached in the track object.
733 If this call returns 1 then one can save a call of isoburn_read_iso_head()
734 with return mode 1 which could cause an expensive read operation.
735 @since 0.4.0
736 @param t The track handle
737 @param start_lba Returns the start address of the ISO session
738 @param image_blocks Returns the number of 2048 bytes blocks
739 @param volid Caller provided memory for the volume id
740 @param flag unused yet, submit 0
741 @return 0= not an emulated ISO session , 1= reply is valid
742*/
743int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba,
744 int *image_blocks, char volid[33], int flag);
745
746/** Like isoburn_toc_track_get_emul() but with off_t reply type.
747 @since 1.5.8
748*/
749int isoburn_toc_track_get_emul_v2(struct isoburn_toc_track *t,
750 off_t *start_lba, off_t *image_blocks,
751 char volid[33], int flag);
752
753
754/** Release the memory associated with a master handle of a medium.
755 The handle is invalid afterwards and may not be used any more.
756 Wrapper for: burn_disc_free()
757 @since 0.1.6
758 @param disc The master handle of the medium
759*/
760void isoburn_toc_disc_free(struct isoburn_toc_disc *disc);
761
762
763/** Try whether the data at the given address look like a ISO 9660
764 image header and obtain its alleged size. Depending on the info mode
765 one string of text information or data can be retrieved too.
766 @since 0.1.6
767 @param d The drive with the medium to inspect
768 @param lba The block number from where to read
769 @param image_blocks Returns the number of 2048 bytes blocks in the session
770 @param info Caller provided memory, enough to take possible info reply
771 @param flag bit0-7: info return mode
772 0= do not return anything in info (do not even touch it)
773 1= copy volume id to info (info needs 33 bytes)
774 2= @since 0.2.2 :
775 copy 64 kB header to info (needs 65536 bytes) .
776 No trailing zero gets appended.
777 3= @since 1.5.8 :
778 copy creation time to info (info needs 18 bytes).
779 info[16] is the binary timezone offset x 15 minutes east
780 4= @since 1.5.8 :
781 copy modification time to info (info needs 18 bytes).
782 info[16] is the binary timezone offset x 15 minutes east
783 bit12= @since 1.5.6 :
784 Read even if the start of multi-session emulation
785 yielded a read error
786 bit13= @since 0.2.2:
787 Do not read head from medium but use first 64 kB from
788 info.
789 In this case it is permissible to submit d == NULL.
790 bit14= check both half buffers (not only second)
791 return 2 if found in first block
792 bit15= return -1 on read error
793 @return >0 seems to be a valid ISO image, 0 format not recognized, <0 error
794*/
795int isoburn_read_iso_head(struct burn_drive *d, int lba,
796 int *image_blocks, char *info, int flag);
797
798/** Like isoburn_read_iso_head() but with off_t block address and count.
799 @since 1.5.8
800*/
801int isoburn_read_iso_head_v2(struct burn_drive *d, off_t lba,
802 off_t *image_blocks, char *info, int flag);
803
804
805/** Try to convert the given entity address into various entity addresses
806 which would describe it.
807 Note: Sessions and tracks are counted beginning with 1, not with 0.
808 @since 0.3.2
809 @param d The drive where msc1 is to be set
810 @param adr_mode Determines how to interpret the input adr_value.
811 If adr_value shall represent a number then decimal ASCII
812 digits are expected.
813 0= start lba of last session in TOC, ignore adr_value
814 1= start lba of session number given by adr_value
815 2= start lba of track given number by adr_value
816 3= adr_value itself is the lba to be used
817 4= start lba of last session with volume id
818 given by adr_value
819 @since 1.5.8 :
820 5= start lba of last session with modification time
821 exactly as given by adr_value. adr_value is seconds
822 since 1970 GMT (i.e. time_t as decimal number string)
823 6= start lba of last session with modification time
824 not after adr_value (seconds after 1970 GMT)
825 7= start lba of first session with modification time
826 not before adr_value (seconds after 1970 GMT)
827 8= start lba of last session with modification time
828 before but not at adr_value (seconds after 1970 GMT)
829 9= start lba of first session with modification time
830 after but not at adr_value (seconds after 1970 GMT
831 @param adr_value A string describing the value to be eventually used.
832 @param lba returns the block address of the entity, -1 means invalid
833 @param track returns the track number of the entity, -1 means invalid
834 @param session returns the session number of the entity, -1 means invalid
835 @param volid returns the volume id of the entity if it is a ISO session
836 @param flag Bitfield for control purposes.
837 bit2= with adr_mode 4: use adr_value as regular expression
838 with adr_mode 5 to 9: use creation time rather than
839 modification time
840 @return <=0 error , 1 ok, ISO session, 2 ok, not an ISO session
841*/
842int isoburn_get_mount_params(struct burn_drive *d,
843 int adr_mode, char *adr_value,
844 int *lba, int *track, int *session,
845 char volid[33], int flag);
846
847/** Like isoburn_get_mount_params() but with off_t block address type.
848 @since 1.5.8
849*/
850int isoburn_get_mount_params_v2(struct burn_drive *d,
851 int adr_mode, char *adr_value,
852 off_t *lba, int *track, int *session,
853 char volid[33], int flag);
854
855
856/* ----------------------------------------------------------------------- */
857/*
858
859 Options for image reading.
860
861 An application shall create an option set object by isoburn_ropt_new(),
862 program it by isoburn_ropt_set_*(), use it with isoburn_read_image(),
863 and finally delete it by isoburn_ropt_destroy().
864
865*/
866/* ----------------------------------------------------------------------- */
867
868struct isoburn_read_opts;
869
870/** Produces a set of image read options, initialized with default values.
871 @since 0.1.0
872 @param o the newly created option set object
873 @param flag Bitfield for control purposes. Submit 0 for now.
874 @return 1=ok , <0 = failure
875*/
876int isoburn_ropt_new(struct isoburn_read_opts **o, int flag);
877
878
879/** Deletes an option set which was created by isoburn_ropt_new().
880 @since 0.1.0
881 @param o The option set to work on
882 @param flag Bitfield for control purposes. Submit 0 for now.
883 @return 1= **o destroyed , 0= *o was already NULL (harmless)
884*/
885int isoburn_ropt_destroy(struct isoburn_read_opts **o, int flag);
886
887/** Sets the size and granularity of the cache which libisoburn provides to
888 libisofs for reading of ISO image data. This cache consists of several
889 tiles which are buffers of a given size. The ISO image is divided into
890 virtual tiles of that size. A cache tile may hold an in-memory copy
891 of such a virtual image tile.
892 When libisofs requests to read a block, then first the cache is inquired
893 whether it holds that block. If not, then the block is read via libburn
894 together with its neighbors in their virtual image tile into a free
895 cache tile. If no cache tile is free, then the one will be re-used which
896 has the longest time of not being hit by a read attempt.
897
898 A larger cache might speed up image loading by reducing the number of
899 libburn read calls on the directory tree. It might also help with
900 reading the content of many small files, if for some reason it is not an
901 option to sort access by LBA.
902 Caching will not provide much benefit with libburn "stdio:" drives,
903 because the operating system is supposed to provide the same speed-up
904 in a more flexible way.
905
906 @since 1.2.2
907 @param o The option set to work on.
908 It is permissible to submit NULL in order to just
909 have the parameters tested.
910 @param cache_tiles Number of tiles in the cache. Not less than 1.
911 Default is 32.
912 @param tile_blocks Number of blocks per tile. Must be a power of 2.
913 Default is 32.
914 cache_tiles * tile_blocks * 2048 must not exceed
915 1073741824 (= 1 GiB).
916 @param flag Bitfield for control purposes. Unused yet. Submit 0.
917 @return <=0 error , >0 ok
918*/
919int isoburn_ropt_set_data_cache(struct isoburn_read_opts *o,
920 int cache_tiles, int tile_blocks, int flag);
921
922/** Inquire the current settings of isoburn_set_data_cache().
923 @since 1.2.2
924 @param o The option set to work on.
925 NULL has the same effect as flag bit0.
926 @param cache_tiles Will return the number of tiles in the cache.
927 @param tile_blocks Will return the number of blocks per tile.
928 @param set_flag Will return control bits. None are defined yet.
929 @param flag Bitfield for control purposes
930 bit0= return default values rather than current ones
931 @return <=0 error , >0 reply is valid
932*/
933int isoburn_ropt_get_data_cache(struct isoburn_read_opts *o,
934 int *cache_tiles, int *tile_blocks,
935 int *set_flag, int flag);
936
937
938/** Which existing ISO 9660 extensions in the image or in external filesystems
939 to read or not to read, and whether to read the content of an existing
940 image at all.
941 The bits can be combined by | and inquired by &.
942 @since 0.1.0
943 @param ext Bitfield:
944 bit0= norock
945 Do not read Rock Ridge extensions
946 bit1= nojoliet
947 Do not read Joliet extensions
948 bit2= noiso1999
949 Do not read tree of an Enhanced Volume Descriptor as of
950 ECMA-119 4th Edition (aka ISO 9660:1999)
951 bit3= preferjoliet
952 When both Joliet and RR extensions are present, the RR
953 tree is used. If you prefer using Joliet, set this to 1.
954 bit4= pretend_blank
955 Always create empty image.Ignore any image on input drive.
956 bit5= noaaip
957 @since 0.3.4
958 Do not load AAIP information from image. This information
959 eventually contains ACL or XFS-style Extended Attributes.
960 bit6= noacl
961 @since 0.3.4
962 Do not obtain ACL from external filesystem objects (e.g.
963 local filesystem files).
964 This overrides the setting by isoburn_drive_aquire().
965 bit7= noea
966 @since 0.3.4
967 Do not obtain XFS-style Extended Attributes (xattr) from
968 external filesystem objects (e.g. local filesystem files).
969 This overrides the setting by isoburn_drive_aquire().
970 bit8= noino
971 @since 0.4.0
972 Do not load eventual inode numbers from RRIP entry PX,
973 but generate a new unique inode number for each imported
974 IsoNode object.
975 PX inode numbers mark families of hardlinks by giving all
976 family members the same inode number. libisofs keeps the
977 PX inode numbers unaltered when IsoNode objects get
978 written into an ISO image.
979 bit9= nomd5
980 @since 0.4.2
981 Do not load the possibly present MD5 checksum array.
982 Do not check possibly present session_md5 tags.
983 bit10= nomd5tag
984 @since 1.0.4
985 Do not check session_md5 tags although bit9
986 is not set.
987 bit11= do_ecma119_map
988 @since 1.4.2
989 Set iso_read_opts_set_ecma119_map() to map_mode rather
990 than relying on the default setting of libisofs.
991 bit12 - bit13= map_mode
992 @since 1.4.2
993 How to convert file names if neither Rock Ridge nor
994 Joliet names are present and acceptable.
995 0 = unmapped: Take name as recorded in ECMA-119 directory
996 record (not suitable for writing them to
997 a new ISO filesystem)
998 1 = stripped: Like unmapped, but strip off trailing ";1"
999 or ".;1"
1000 2 = uppercase: Like stripped, but map {a-z} to {A-Z}
1001 3 = lowercase: Like stripped, but map {A-Z} to {a-z}
1002 bit14= do_joliet_map
1003 @since 1.5.4
1004 Set iso_read_opts_set_joliet_map() to joliet_map_mode
1005 rather than relying on the default setting of libisofs.
1006 bit15= joliet_map_mode
1007 @since 1.5.4
1008 How to convert Joliet file names.
1009 0 = unmapped: Take name as recorded in Joliet directory
1010 record (not suitable for writing them to
1011 a new ISO filesystem)
1012 1 = stripped: strip off trailing ";1" or ".;1"
1013 bit16= lfa_flags
1014 Obtain Linux file attribute flags (chattr) from
1015 external filesystem objects (e.g. local filesystem files).
1016 This overrides the setting by isoburn_drive_aquire().
1017 @since 1.5.8
1018 bit17= lfa_only_settable
1019 Ignore non-settable lfa_flags when importing files from
1020 external filesystem objects (e.g. local filesystem files).
1021 This overrides the setting by isoburn_drive_aquire().
1022 @since 1.5.8
1023 bit18= projid
1024 Obtain XFS-style project ids from
1025 external filesystem objects (e.g. local filesystem files).
1026 This overrides the setting by isoburn_drive_aquire().
1027 @since 1.5.8
1028 @return 1 success, <=0 failure
1029*/
1030#define isoburn_ropt_norock 1
1031#define isoburn_ropt_nojoliet 2
1032#define isoburn_ropt_noiso1999 4
1033#define isoburn_ropt_preferjoliet 8
1034#define isoburn_ropt_pretend_blank 16
1035#define isoburn_ropt_noaaip 32
1036#define isoburn_ropt_noacl 64
1037#define isoburn_ropt_noea 128
1038#define isoburn_ropt_noino 256
1039#define isoburn_ropt_nomd5 512
1040#define isoburn_ropt_nomd5tag 1024
1041#define isoburn_ropt_map_unmapped ( 2048 | 0 )
1042#define isoburn_ropt_map_stripped ( 2048 | 4096 )
1043#define isoburn_ropt_map_uppercase ( 2048 | 8192 )
1044#define isoburn_ropt_map_lowercase ( 2048 | 12288 )
1045#define isoburn_ropt_joliet_unmapped ( 16384 | 0)
1046#define isoburn_ropt_joliet_stripped ( 16384 | 32768)
1047#define isoburn_ropt_lfa_flags (1 << 16)
1048#define isoburn_ropt_lfa_only_settable (1 << 17)
1049#define isoburn_ropt_projid (1 << 18)
1050
1051int isoburn_ropt_set_extensions(struct isoburn_read_opts *o, int ext);
1052int isoburn_ropt_get_extensions(struct isoburn_read_opts *o, int *ext);
1053
1054
1055/** Default attributes to use if no RockRidge extension gets loaded.
1056 @since 0.1.0
1057 @param o The option set to work on
1058 @param uid user id number (see /etc/passwd)
1059 @param gid group id number (see /etc/group)
1060 @param mode permissions (not file type) as of man 2 stat.
1061 With directories, r-permissions will automatically imply
1062 x-permissions. See isoburn_ropt_set_default_dirperms() below.
1063 @return 1 success, <=0 failure
1064*/
1065int isoburn_ropt_set_default_perms(struct isoburn_read_opts *o,
1066 uid_t uid, gid_t gid, mode_t mode);
1067int isoburn_ropt_get_default_perms(struct isoburn_read_opts *o,
1068 uid_t *uid, gid_t *gid, mode_t *mode);
1069
1070/** Default attributes to use on directories if no RockRidge extension
1071 gets loaded.
1072 Above call isoburn_ropt_set_default_perms() automatically adds
1073 x-permissions to r-permissions for directories. This call here may
1074 be done afterwards to set independent permissions for directories,
1075 especially to override the automatically added x-permissions.
1076 @since 0.1.0
1077 @param o The option set to work on
1078 @param mode permissions (not file type) as of man 2 stat.
1079 @return 1 success, <=0 failure
1080*/
1081int isoburn_ropt_set_default_dirperms(struct isoburn_read_opts *o,
1082 mode_t mode);
1083int isoburn_ropt_get_default_dirperms(struct isoburn_read_opts *o,
1084 mode_t *mode);
1085
1086
1087/** Set the character set for reading RR file names from ISO images.
1088 @since 0.1.0
1089 @param o The option set to work on
1090 @param input_charset Set this to NULL to use the default locale charset
1091 For selecting a particular character set, submit its
1092 name, e.g. as listed by program iconv -l.
1093 Example: "UTF-8".
1094 @return 1 success, <=0 failure
1095*/
1096int isoburn_ropt_set_input_charset(struct isoburn_read_opts *o,
1097 char *input_charset);
1098int isoburn_ropt_get_input_charset(struct isoburn_read_opts *o,
1099 char **input_charset);
1100
1101
1102/**
1103 Enable or disable methods to automatically choose an input charset.
1104 This eventually overrides the name set via isoburn_ropt_set_input_charset()
1105 @since 0.3.8
1106 @param o The option set to work on
1107 @param mode Bitfield for control purposes:
1108 bit0= set the input character set automatically from
1109 attribute "isofs.cs" of root directory.
1110 Submit any other bits with value 0.
1111 @return 1 success, <=0 failure
1112 */
1113int isoburn_ropt_set_auto_incharset(struct isoburn_read_opts *o, int mode);
1114int isoburn_ropt_get_auto_incharset(struct isoburn_read_opts *o, int *mode);
1115
1116
1117/** Control an offset to be applied to all block address pointers in the ISO
1118 image in order to compensate for an eventual displacement of the image
1119 relative to the start block address for which it was produced.
1120 E.g. if track number 2 from CD gets copied into a disk file and shall then
1121 be loaded as ISO filesystem, then the directory tree and all data file
1122 content of the track copy will become readable by setting the track start
1123 address as displacement and -1 as displacement_sign.
1124 Data file content outside the track will of course not be accessible and
1125 eventually produce read errors.
1126 @since 0.6.6
1127 @param o The option set to work on
1128 @param displacement 0 or a positive number
1129 @param displacement_sign Determines whether to add or subtract
1130 displacement to block addresses before applying
1131 them to the storage object for reading:
1132 +1 = add , -1= subtract , else keep unaltered
1133*/
1134int isoburn_ropt_set_displacement(struct isoburn_read_opts *o,
1135 uint32_t displacement, int displacement_sign);
1136int isoburn_ropt_get_displacement(struct isoburn_read_opts *o,
1137 uint32_t *displacement, int *displacement_sign);
1138
1139/* If you get here because of a compilation error like
1140
1141 /usr/include/libisoburn/libisoburn.h:895: error:
1142 expected declaration specifiers or '...' before 'uint32_t'
1143
1144 then see above paragraph "Application Constraints" about the definition
1145 of uint32_t.
1146*/
1147
1148/** Set the name truncation mode and the maximum name length for imported
1149 file objects.
1150 @since 1.4.2
1151 @param o The option set to work on
1152 @param mode 0= Do not truncate but throw error
1153 ISO_RR_NAME_TOO_LONG if a file name
1154 is longer than parameter length.
1155 1= Truncate to length and overwrite the last
1156 32 bytes of that length by the hex
1157 representation of the MD5 of the whole
1158 oversized name.
1159 Potential incomplete UTF-8 characters will
1160 get their leading bytes replaced by '_'.
1161 This is the default.
1162 @param length Maximum byte count of a file name. Permissible
1163 values are 64 to 255. Default is 255.
1164
1165*/
1166int isoburn_ropt_set_truncate_mode(struct isoburn_read_opts *o,
1167 int mode, int length);
1168int isoburn_ropt_get_truncate_mode(struct isoburn_read_opts *o,
1169 int *mode, int *length);
1170
1171
1172/** After calling function isoburn_read_image() there are information
1173 available in the option set about the size and the available extra trees
1174 and extensions in the ISO filesystem.
1175 This info can be obtained as bits in parameter has_what. Like:
1176 joliet_available = (has_what & isoburn_ropt_has_joliet);
1177 @since 0.1.0
1178 @param o The option set to work on
1179 @param size Number of image data blocks, 2048 bytes each.
1180 @param has_what Bitfield:
1181 bit0= has_rockridge
1182 RockRidge extension info is available in the ISO 9660 tree
1183 (POSIX filesystem)
1184 bit1= has_joliet
1185 Joliet tree is available (suitable for MS-Windows)
1186 bit2= has_iso1999
1187 Enhanced Volume Descriptor as of ECMA-119 4th Edition
1188 and its tree is available (aka ISO 9660:1999).
1189 This is rather exotic.
1190 bit3= has_el_torito
1191 El-Torito boot record is present
1192 @return 1 success, <=0 failure
1193*/
1194#define isoburn_ropt_has_rockridge 1
1195#define isoburn_ropt_has_joliet 2
1196#define isoburn_ropt_has_iso1999 4
1197#define isoburn_ropt_has_el_torito 8
1198
1199int isoburn_ropt_get_size_what(struct isoburn_read_opts *o,
1200 uint32_t *size, int *has_what);
1201
1202/* ts A90122 */
1203/* >>> to be implemented:
1204#define isoburn_ropt_has_acl 64
1205#define isoburn_ropt_has_ea 128
1206*/
1207
1208
1209/** After calling function isoburn_read_image() there are information
1210 available in the option set about which tree was used for image loading
1211 and whether Rock Ridge information was actually used.
1212 @since 1.5.4
1213 @param o The option set to work on
1214 @param tree The tree which was loaded:
1215 0= ISO 9660 , 1 = Joliet ,
1216 2 = Enhanced Volume Descriptor tree as of ECMA-119 4th Edition
1217 (aka ISO 9660:1999)
1218 @param rr 1= Rock Ridge information was used, 0 = No Rock Ridge was used
1219 @return 1 success, <=0 failure
1220*/
1221int isoburn_ropt_get_tree_loaded(struct isoburn_read_opts *o,
1222 int *tree, int *rr);
1223
1224
1225/* ----------------------------------------------------------------------- */
1226/* End of Options for image reading */
1227/* ----------------------------------------------------------------------- */
1228
1229/* ----------------------------------------------------------------------- */
1230/*
1231
1232 Options for image generation by libisofs and image transport to libburn.
1233
1234 An application shall create an option set by isoburn_igopt_new(),
1235 program it by isoburn_igopt_set_*(), use it with either
1236 isoburn_prepare_new_image() or isoburn_prepare_disc(), and finally delete
1237 it by isoburn_igopt_destroy().
1238
1239*/
1240/* ----------------------------------------------------------------------- */
1241
1242struct isoburn_imgen_opts;
1243
1244/** Produces a set of generation and transfer options, initialized with default
1245 values.
1246 @since 0.1.0
1247 @param o the newly created option set object
1248 @param flag Bitfield for control purposes. Submit 0 for now.
1249 @return 1=ok , <0 = failure
1250*/
1251int isoburn_igopt_new(struct isoburn_imgen_opts **o, int flag);
1252
1253
1254/** Deletes an option set which was created by isoburn_igopt_new().
1255 @since 0.1.0
1256 @param o The option set to give up
1257 @param flag Bitfield for control purposes. Submit 0 for now.
1258 @return 1= **o destroyed , 0= *o was already NULL (harmless)
1259*/
1260int isoburn_igopt_destroy(struct isoburn_imgen_opts **o, int flag);
1261
1262
1263/** ISO level to write at.
1264 @since 0.1.0
1265 @param o The option set to work on
1266 @param level is a term of the ISO 9660 standard. It should be one of:
1267 1= filenames restricted to form 8.3
1268 2= filenames allowed up to 31 characters
1269 3= file content may be larger than 4 GB - 1.
1270 @return 1 success, <=0 failure
1271*/
1272int isoburn_igopt_set_level(struct isoburn_imgen_opts *o, int level);
1273int isoburn_igopt_get_level(struct isoburn_imgen_opts *o, int *level);
1274
1275
1276/** Which extensions to support.
1277 @since 0.1.0
1278 @param o The option set to work on
1279 @param ext Bitfield:
1280 bit0= rockridge
1281 Rock Ridge extensions add POSIX file attributes like
1282 owner, group, access permissions, long filenames. Very
1283 advisable if the designed audience has Unix style systems.
1284 bit1= joliet
1285 Longer filenames for Windows systems.
1286 Weaker than RockRidge, but also readable with GNU/Linux.
1287 bit2= iso1999
1288 Enhanced Volume Descriptor as of ECMA-119 4th Edition
1289 (aka ISO 9660:1999).
1290 This is rather exotic. Better do not surprise the readers.
1291 bit3= hardlinks
1292 Enable hardlink consolidation. IsoNodes which refer to the
1293 same source object and have the same properties will get
1294 the same ISO image inode numbers.
1295 If combined with isoburn_igopt_rrip_version_1_10 below,
1296 then the PX entry layout of RRIP-1.12 will be used within
1297 RRIP-1.10 (mkisofs does this without causing visible trouble).
1298 bit5= aaip
1299 The libisofs specific SUSP based extension of ECMA-119 which
1300 can encode ACL and XFS-style Extended Attributes.
1301 bit6= session_md5
1302 @since 0.4.2
1303 Produce and write MD5 checksum tags of superblock, directory
1304 tree, and the whole session stream.
1305 bit7= file_md5
1306 @since 0.4.2
1307 Produce and write MD5 checksums for each single IsoFile.
1308 bit8= file_stability (only together with file_md5)
1309 @since 0.4.2
1310 Compute MD5 of each file before copying it into the image and
1311 compare this with the MD5 of the actual copying. If they do
1312 not match then issue MISHAP event.
1313 See also libisofs.h iso_write_opts_set_record_md5()
1314 bit9= no_emul_toc
1315 @since 0.5.8
1316 On overwritable media or random access files do not write
1317 the first session to LBA 32 and do not copy the first 64kB
1318 of the first session to LBA 0, but rather write the first
1319 session to LBA 0 directly.
1320 bit10= will_cancel
1321 @since 0.6.6
1322 Announce to libisofs that only the image size is desired
1323 and that the write thread will be cancelled by
1324 isoburn_cancel_prepared_write() before actual image writing
1325 occurs. Without this, cancellation can cause a MISHAP event.
1326 bit11= old_empty
1327 @since 1.0.2
1328 Let symbolic links and device files point to block 0, and let
1329 empty data files point to the address of the Volume Descriptor
1330 Set Terminator. This was done by libisofs in the past.
1331 By default there is now a single dedicated block of zero bytes
1332 after the end of the directory trees, of which the address
1333 is used for all files without own content.
1334 bit12= hfsplus
1335 @since 1.2.4
1336 Produce a HFS+ partition inside the ISO image and announce it
1337 by an Apple Partition Map in the System Area.
1338 >>> GPT production ?
1339 Caution: Interferes with isoburn_igopt_set_system_area() by
1340 overwriting the first 8 bytes of the data, and
1341 several blocks of 2 KiB after the first one.
1342 bit13= fat
1343 @since 1.2.4
1344 >>> Not yet implemented. Planned to co-exist with hfsplus.
1345 Produce a FAT32 partition inside the ISO image and announce it
1346 by an MBR partition entry in the System Area.
1347 Caution: Interferes with isoburn_igopt_set_system_area() by
1348 >>> what impact ?
1349
1350 @return 1 success, <=0 failure
1351*/
1352#define isoburn_igopt_rockridge 1
1353#define isoburn_igopt_joliet 2
1354#define isoburn_igopt_iso1999 4
1355#define isoburn_igopt_hardlinks 8
1356#define isoburn_igopt_aaip 32
1357#define isoburn_igopt_session_md5 64
1358#define isoburn_igopt_file_md5 128
1359#define isoburn_igopt_file_stability 256
1360#define isoburn_igopt_no_emul_toc 512
1361#define isoburn_igopt_will_cancel 1024
1362#define isoburn_igopt_old_empty 2048
1363#define isoburn_igopt_hfsplus 4096
1364#define isoburn_igopt_fat 8192
1365int isoburn_igopt_set_extensions(struct isoburn_imgen_opts *o, int ext);
1366int isoburn_igopt_get_extensions(struct isoburn_imgen_opts *o, int *ext);
1367
1368/** Relaxed constraints. Setting any of the bits to 1 break the specifications,
1369 but it is supposed to work on most moderns systems. Use with caution.
1370 @since 0.1.0
1371 @param o The option set to work on
1372 @param relax Bitfield:
1373 bit0= omit_version_numbers
1374 Omit the version number (";1") at the end of the
1375 ISO-9660 and Joliet identifiers.
1376 Version numbers are usually not used by readers.
1377 bit1= allow_deep_paths
1378 Allow ISO-9660 directory hierarchy to be deeper
1379 than 8 levels.
1380 bit2= allow_longer_paths
1381 Allow path in the ISO-9660 tree to have more than
1382 255 characters.
1383 bit3= max_37_char_filenames
1384 Allow a single file or directory hierarchy to have
1385 up to 37 characters. This is larger than the 31
1386 characters allowed by ISO level 2, and the extra space
1387 is taken from the version number, so this also forces
1388 omit_version_numbers.
1389 bit4= no_force_dots
1390 ISO-9660 forces filenames to have a ".", that separates
1391 file name from extension. libisofs adds it if original
1392 filename has none. Set this to 1 to prevent this
1393 behavior.
1394 bit5= allow_lowercase
1395 Allow lowercase characters in ISO-9660 filenames.
1396 By default, only uppercase characters, numbers and
1397 a few other characters are allowed.
1398 bit6= allow_full_ascii
1399 Allow all ASCII characters to be appear on an ISO-9660
1400 filename. Note that "/" and "\0" characters are never
1401 allowed, even in RR names.
1402 bit7= joliet_longer_paths
1403 Allow paths in the Joliet tree to have more than
1404 240 characters.
1405 bit8= always_gmt
1406 Write timestamps as GMT although the specs prescribe local
1407 time with eventual non-zero timezone offset. Negative
1408 timezones (west of GMT) can trigger bugs in some operating
1409 systems which typically appear in mounted ISO images as if
1410 the timezone shift from GMT was applied twice
1411 (e.g. in New York 22:36 becomes 17:36).
1412 bit9= rrip_version_1_10
1413 Write Rock Ridge info as of specification RRIP-1.10 rather
1414 than RRIP-1.12: signature "RRIP_1991A" rather than
1415 "IEEE_1282", field PX without file serial number.
1416 bit10= dir_rec_mtime
1417 Store as ECMA-119 Directory Record timestamp the mtime
1418 of the source rather than the image creation time.
1419 bit11= aaip_susp_1_10
1420 Write AAIP fields without announcing AAIP by an ER field and
1421 without distinguishing RRIP fields from the AAIP field by
1422 prefixed ES fields. This saves 5 to 10 bytes per file and
1423 might avoid problems with readers which only accept RRIP.
1424 SUSP-1.10 allows it, SUSP-1.12 frowns on it.
1425 bit12= only_iso_versions
1426 Same as bit1 omit_version_number but restricted to the names
1427 in the eventual Joliet tree.
1428 @since 0.5.4
1429 For reasons of backward compatibility it is not possible yet
1430 to disable version numbers for ISO 9660 while enabling them
1431 for Joliet.
1432 bit13= no_j_force_dots
1433 Same as no_force_dots but affecting the names in the eventual
1434 Joliet tree rather than the ISO 9660 / ECMA-119 names.
1435 @since 0.5.4
1436 Previous versions added dots to Joliet names unconditionally.
1437 bit14= allow_dir_id_ext
1438 Convert directory names for ECMA-119 similar to other file
1439 names, but do not force a dot or add a version number.
1440 This violates ECMA-119 by allowing one "." and especially
1441 ISO level 1 by allowing DOS style 8.3 names rather than
1442 only 8 characters.
1443 (mkisofs and its clones obviously do this violation.)
1444 @since 1.0.0
1445 bit15= joliet_long_names
1446 Allow for Joliet leaf names up to 103 characters rather than
1447 up to 64.
1448 @since 1.0.6
1449 bit16= joliet_rec_mtime
1450 Like dir_rec_mtime, but for the Joliet tree.
1451 @since 1.2.0
1452 bit17= iso1999_rec_mtime
1453 Like dir_rec_mtime, but for the tree of the Enhanced Volume
1454 Descriptor (aka ISO 9660:1999) as of ECMA-119 4th Edition
1455 @since 1.2.0
1456 bit18= allow_7bit_ascii
1457 Like allow_full_ascii, but only allowing 7-bit characters.
1458 Lowercase letters get mapped to uppercase if not
1459 allow_lowercase is set.
1460 Gets overridden if allow_full_ascii is enabled.
1461 bit19= joliet_utf16
1462 Encode Joliet names by character set UTF-16BE rather than
1463 UCS-2. The difference is with characters which are not present
1464 in UCS-2 and get encoded in UTF-16 by 2 words of 16 bit each.
1465 Both words then stem from a reserved subset of UCS-2.
1466 @since 1.3.6
1467 bit20= rrip_tf_long
1468 Write RRIP field TF with LONG FORM timestamps of 17 bytes
1469 instead of 7-byte timestamps. This happens automatically
1470 to individual nodes if one of their timestamps is after
1471 01 Jan 2150 UTC. (libisofs might get changed to support
1472 7-byte timestamps up to end of 2155.)
1473 @since 1.5.8
1474 bit21= rrip_tf_y1900
1475 Curb writing of old time values in RRIP field TF to year
1476 1900 AD. If not curbed, then dates down to the begin of
1477 year 0 (= 1 BC) can be written into the Rock Ridge data.
1478 Note that Linux up to at least version 6.16 misrepresents
1479 times before year 1900 as Jan 1 1970 00:00:00 UTC.
1480 @since 1.5.8
1481 bit22= relaxed_vol_atts
1482 Allow all characters to be part of Volume Id and Volume Set Id
1483 in PVD which are normally restricted to d-characters.
1484 This relaxation bit is set to 1 by default.
1485 @since 1.5.8
1486 bit23= relaxed_nonvol_atts
1487 Allow all characters to be part of other text fields in PVD
1488 which are normally restricted to a-characters or d-characters.
1489 @since 1.5.8
1490 @return 1 success, <=0 failure
1491*/
1492#define isoburn_igopt_omit_version_numbers 1
1493#define isoburn_igopt_allow_deep_paths 2
1494#define isoburn_igopt_allow_longer_paths 4
1495#define isoburn_igopt_max_37_char_filenames 8
1496#define isoburn_igopt_no_force_dots 16
1497#define isoburn_igopt_allow_lowercase 32
1498#define isoburn_igopt_allow_full_ascii 64
1499#define isoburn_igopt_joliet_longer_paths 128
1500#define isoburn_igopt_always_gmt 256
1501#define isoburn_igopt_rrip_version_1_10 512
1502#define isoburn_igopt_dir_rec_mtime 1024
1503#define isoburn_igopt_aaip_susp_1_10 2048
1504#define isoburn_igopt_only_iso_versions 4096
1505#define isoburn_igopt_no_j_force_dots 8192
1506#define isoburn_igopt_allow_dir_id_ext 16384
1507#define isoburn_igopt_joliet_long_names 32768
1508#define isoburn_igopt_joliet_rec_mtime 0x10000
1509#define isoburn_igopt_iso1999_rec_mtime 0x20000
1510#define isoburn_igopt_allow_7bit_ascii 0x40000
1511#define isoburn_igopt_joliet_utf16 0x80000
1512#define isoburn_igopt_rrip_tf_long 0x100000
1513#define isoburn_igopt_rrip_tf_y1900 0x200000
1514#define isoburn_igopt_relaxed_vol_atts 0x400000
1515#define isoburn_igopt_relaxed_nonvol_atts 0x800000
1516int isoburn_igopt_set_relaxed(struct isoburn_imgen_opts *o, int relax);
1517int isoburn_igopt_get_relaxed(struct isoburn_imgen_opts *o, int *relax);
1518
1519
1520/** If not isoburn_igopt_allow_deep_paths is in effect, then it may become
1521 necessary to relocate directories so that no ECMA-119 file path
1522 has more than 8 components. These directories are grafted into either
1523 the root directory of the ISO image or into a dedicated relocation
1524 directory. For details see libisofs.h.
1525 Wrapper for: iso_write_opts_set_rr_reloc()
1526 @since 1.2.2
1527 @param o The option set to work on
1528 @param name The name of the relocation directory in the root directory.
1529 Do not prepend "/". An empty name or NULL will direct
1530 relocated directories into the root directory. This is the
1531 default.
1532 If the given name does not exist in the root directory when
1533 isoburn_disc_write() is called, and if there are directories
1534 at path level 8, then directory /name will be created
1535 automatically.
1536 @param flags Bitfield for control purposes.
1537 bit0= Mark the relocation directory by a Rock Ridge RE entry,
1538 if it gets created during isoburn_disc_write(). This
1539 will make it invisible for most Rock Ridge readers.
1540 bit1= not settable via API (used internally)
1541 @return > 0 success, <= 0 failure
1542*/
1543int isoburn_igopt_set_rr_reloc(struct isoburn_imgen_opts *o, char *name,
1544 int flags);
1545
1546/** Obtain the settings of isoburn_igopt_set_rr_reloc().
1547 @since 1.2.2
1548 @param o The option set to work on
1549 @param name Will return NULL or a pointer to the name of the relocation
1550 directory in the root directory. Do not alter or dispose the
1551 memory which holds this name.
1552 @param flags Will return the flags bitfield.
1553 @return > 0 success, <= 0 failure
1554*/
1555int isoburn_igopt_get_rr_reloc(struct isoburn_imgen_opts *o, char **name,
1556 int *flags);
1557
1558
1559/** Caution: This option breaks any assumptions about names that
1560 are supported by ECMA-119 specifications.
1561 Try to omit any translation which would make a file name compliant to the
1562 ECMA-119 rules. This includes and exceeds omit_version_numbers,
1563 max_37_char_filenames, no_force_dots bit0, allow_full_ascii. Further it
1564 prevents the conversion from local character set to ASCII.
1565 The maximum name length is given by this call. If a filename exceeds
1566 this length or cannot be recorded untranslated for other reasons, then
1567 image production gets aborted.
1568 Currently the length limit is 96 characters, because an ECMA-119 directory
1569 record may at most have 254 bytes and up to 158 other bytes must fit into
1570 the record. Probably 96 more bytes can be made free for the name in future.
1571 @since 1.0.0
1572 @param o The option set to work on
1573 @param len 0 = disable this feature and perform name translation
1574 according to other settings.
1575 >0 = Omit any translation. Eventually abort image production
1576 if a name is longer than the given value.
1577 -1 = Like >0. Allow maximum possible length.
1578 isoburn_igopt_get_untranslated_name_len() will tell the
1579 effectively resulting value.
1580 @return >0 success, <=0 failure
1581*/
1582int isoburn_igopt_set_untranslated_name_len(struct isoburn_imgen_opts *o,
1583 int len);
1584int isoburn_igopt_get_untranslated_name_len(struct isoburn_imgen_opts *o,
1585 int *len);
1586
1587
1588/** Whether and how files should be sorted.
1589 @since 0.1.0
1590 @param o The option set to work on
1591 @param value Bitfield: bit0= sort_files_by_weight
1592 files should be sorted based on their weight.
1593 Weight is attributed to files in the image
1594 by libisofs call iso_node_set_sort_weight().
1595 @return 1 success, <=0 failure
1596*/
1597#define isoburn_igopt_sort_files_by_weight 1
1598int isoburn_igopt_set_sort_files(struct isoburn_imgen_opts *o, int value);
1599int isoburn_igopt_get_sort_files(struct isoburn_imgen_opts *o, int *value);
1600
1601
1602/** Set the override values for files and directory permissions.
1603 The parameters replace_* these take one of three values: 0, 1 or 2.
1604 If 0, the corresponding attribute will be kept as set in the IsoNode
1605 at the time of image generation.
1606 If set to 1, the corresponding attrib. will be changed by a default
1607 suitable value.
1608 With value 2, the attrib. will be changed with the value specified
1609 in the corresponding *_mode options. Note that only the permissions
1610 are set, the file type remains unchanged.
1611 @since 0.1.0
1612 @param o The option set to work on
1613 @param replace_dir_mode whether and how to override directories
1614 @param replace_file_mode whether and how to override files of other type
1615 @param dir_mode Mode to use on dirs with replace_dir_mode == 2.
1616 @param file_mode; Mode to use on files with replace_file_mode == 2.
1617 @return 1 success, <=0 failure
1618*/
1619int isoburn_igopt_set_over_mode(struct isoburn_imgen_opts *o,
1620 int replace_dir_mode, int replace_file_mode,
1621 mode_t dir_mode, mode_t file_mode);
1622int isoburn_igopt_get_over_mode(struct isoburn_imgen_opts *o,
1623 int *replace_dir_mode, int *replace_file_mode,
1624 mode_t *dir_mode, mode_t *file_mode);
1625
1626/** Set the override values values for group id and user id.
1627 The rules are like with above overriding of mode values. replace_* controls
1628 whether and how. The other two parameters provide values for eventual use.
1629 @since 0.1.0
1630 @param o The option set to work on
1631 @param replace_uid whether and how to override user ids
1632 @param replace_gid whether and how to override group ids
1633 @param uid User id to use with replace_uid == 2.
1634 @param gid Group id to use on files with replace_gid == 2.
1635 @return 1 success, <=0 failure
1636*/
1637int isoburn_igopt_set_over_ugid(struct isoburn_imgen_opts *o,
1638 int replace_uid, int replace_gid,
1639 uid_t uid, gid_t gid);
1640int isoburn_igopt_get_over_ugid(struct isoburn_imgen_opts *o,
1641 int *replace_uid, int *replace_gid,
1642 uid_t *uid, gid_t *gid);
1643
1644/** Set the character set to use for representing RR filenames in the image.
1645 @since 0.1.0
1646 @param o The option set to work on
1647 @param output_charset Set this to NULL to use the default output charset.
1648 For selecting a particular character set, submit its
1649 name, e.g. as listed by program iconv -l.
1650 Example: "UTF-8".
1651 @return 1 success, <=0 failure
1652*/
1653int isoburn_igopt_set_out_charset(struct isoburn_imgen_opts *o,
1654 char *output_charset);
1655int isoburn_igopt_get_out_charset(struct isoburn_imgen_opts *o,
1656 char **output_charset);
1657
1658
1659/** The number of bytes to be used for the fifo which decouples libisofs
1660 and libburn for better throughput and for reducing the risk of
1661 interrupting signals hitting the libburn thread which operates the
1662 MMC drive.
1663 The size will be rounded up to the next full 2048.
1664 Minimum is 64kiB, maximum is 1 GiB (but that is too much anyway).
1665 @since 0.1.0
1666 @param o The option set to work on
1667 @param fifo_size Number of bytes to use
1668 @return 1 success, <=0 failure
1669*/
1670int isoburn_igopt_set_fifo_size(struct isoburn_imgen_opts *o, int fifo_size);
1671int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size);
1672
1673
1674/** Obtain after image preparation the block address where the session will
1675 start on the medium.
1676 This value cannot be set by the application but only be inquired.
1677 @since 0.1.4
1678 @param o The option set to work on
1679 @param lba The block number of the session start on the medium.
1680 <0 means that no address has been determined yet.
1681 @return 1 success, <=0 failure
1682*/
1683int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba);
1684
1685/** Like isoburn_igopt_get_effective_lba(), but with off_t block addresses.
1686 @since 1.5.8
1687*/
1688int isoburn_igopt_get_effective_lba_v2(struct isoburn_imgen_opts *o,
1689 off_t *lba);
1690
1691
1692/** Obtain after image preparation the lowest block address of file content
1693 data. Failure can occur if libisofs is too old to provide this information,
1694 if the result exceeds 31 bit, or if the call is made before image
1695 preparation.
1696 This value cannot be set by the application but only be inquired.
1697 @since 0.3.6
1698 @param o The option set to work on
1699 @param lba The block number of the session start on the medium.
1700 <0 means that no address has been determined yet.
1701 @return 1 success, <=0 failure
1702*/
1703int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba);
1704
1705/** Like isoburn_igopt_get_data_start(), but with off_t block addresses.
1706 @since 1.5.8
1707*/
1708int isoburn_igopt_get_data_start_v2(struct isoburn_imgen_opts *o, off_t *lba);
1709
1710
1711/** Set or get parameters "name" and "timestamp" for a scdbackup checksum
1712 tag. It will be appended to the libisofs session tag if the image starts at
1713 LBA 0. See isoburn_disc_track_lba_nwa. The scdbackup tag can be used
1714 to verify the image by command scdbackup_verify $device -auto_end.
1715 See scdbackup/README appendix VERIFY for its inner details.
1716 @since 0.4.4
1717 @param o The option set to work on
1718 @param name The tag name. 80 characters max.
1719 An empty name disables production of an scdbackup tag.
1720 @param timestamp A string of up to 13 characters YYMMDD.hhmmss
1721 A9 = 2009, B0 = 2010, B1 = 2011, ... C0 = 2020, ...
1722 @param tag_written Either NULL or the address of an array with at least 512
1723 characters. In the latter case the eventually produced
1724 scdbackup tag will be copied to this array when the image
1725 gets written. This call sets scdbackup_tag_written[0] = 0
1726 to mark its preliminary invalidity.
1727 @return 1 success, <=0 failure
1728 */
1729int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name,
1730 char *timestamp, char *tag_written);
1731int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o,
1732 char name[81], char timestamp[19],
1733 char **tag_written);
1734
1735
1736/** Attach 32 kB of binary data which shall get written to the first 32 kB
1737 of the ISO image, the System Area.
1738 options can cause manipulations of these data before writing happens.
1739 If system area data are given or options bit0 is set, then bit1 of
1740 el_torito_set_isolinux_options() is automatically disabled.
1741 (For the meaning of options see also in libisofs.h
1742 iso_write_opts_set_system_area() parameter "options".)
1743 @since 0.5.4
1744 @param o The option set to work on
1745 @param data Either NULL or 32 kB of data. Do not submit less bytes !
1746 @param options Can cause manipulations of submitted data before they
1747 get written:
1748 bit0= apply a --protective-msdos-label as of grub-mkisofs.
1749 This means to patch bytes 446 to 512 of the system
1750 area so that one partition is defined which begins
1751 at the second 512-byte block of the image and ends
1752 where the image ends.
1753 This works with and without system_area_data.
1754 bit1= apply isohybrid MBR patching to the system area.
1755 This works only with system area data from
1756 SYSLINUX plus an ISOLINUX boot image (see
1757 iso_image_set_boot_image()) and only if not bit0
1758 is set.
1759 bit2-7= System area type
1760 0= with bit0 or bit1: MBR
1761 else: unspecified type
1762 @since 0.6.4
1763 1= MIPS Big Endian Volume Header
1764 Submit up to 15 MIPS Big Endian boot files by
1765 iso_image_add_mips_boot_file() of libisofs.
1766 This will overwrite the first 512 bytes of
1767 the submitted data.
1768 2= DEC Boot Block for MIPS Little Endian
1769 The first boot file submitted by
1770 iso_image_add_mips_boot_file() will be activated.
1771 This will overwrite the first 512 bytes of
1772 the submitted data.
1773 @since 0.6.6
1774 3= SUN Disk Label for SUN SPARC
1775 Submit up to 7 SPARC boot images by
1776 isoburn_igopt_set_partition_img() for partition
1777 numbers 2 to 8.
1778 This will overwrite the first 512 bytes of
1779 the submitted data.
1780 @since 1.3.8
1781 4= HP-PA PALO boot sector header version 4
1782 Submit all five parameters of
1783 iso_image_set_hppa_palo() as non-NULL texts.
1784 5= HP-PA PALO boot sector header version 5
1785 Submit all five parameters of
1786 iso_image_set_hppa_palo() as non-NULL texts.
1787 bit8-9= Only with System area type 0 = MBR
1788 @since 1.0.4
1789 Cylinder alignment mode eventually pads the image
1790 to make it end at a cylinder boundary.
1791 0 = auto (align if bit1)
1792 1 = always align to cylinder boundary
1793 2 = never align to cylinder boundary
1794 bit10-13= System area sub type
1795 @since 1.2.4
1796 With type 0 = MBR:
1797 Gets overridden by bit0 and bit1.
1798 0 = no particular sub type
1799 1 = CHRP: A single MBR partition of type 0x96
1800 covers the ISO image. Not compatible with
1801 any other feature which needs to have own
1802 MBR partition entries.
1803 bit14= Only with System area type 0 = MBR
1804 GRUB2 boot provisions:
1805 @since 1.3.0
1806 Patch system area at byte 0x1b0 to 0x1b7 with
1807 (512-block address + 4) of the first boot image file.
1808 Little-endian 8-byte.
1809 Should be combined with options bit0.
1810 Will not be in effect if options bit1 is set.
1811 bit15= Only with System area type MBR but not with CHRP
1812 @since 1.4.4
1813 Enforce MBR "bootable/active" flag. In worst case by
1814 dummy partition of type 0x00 which occupies block 0.
1815 bit16= "Legacy BIOS bootable" in GPT
1816 @since 1.5.6
1817 If this bit is set and a GPT partition for the
1818 ISO 9660 filesystem gets written, then set the GPT
1819 partition flags bit 2 "Legacy BIOS bootable".
1820 bit17= ISO not read-only
1821 @since 1.5.6
1822 Do not set GPT partition flag bit 60 "read-only" for
1823 the ISO 9660 filesystem partition, if such a
1824 partition gets written.
1825 @return 1 success, 0 no data to get, <0 failure
1826*/
1827int isoburn_igopt_set_system_area(struct isoburn_imgen_opts *o,
1828 char data[32768], int options);
1829int isoburn_igopt_get_system_area(struct isoburn_imgen_opts *o,
1830 char data[32768], int *options);
1831
1832/** Control production of a second set of volume descriptors (superblock)
1833 and directory trees, together with a partition table in the MBR where the
1834 first partition has non-zero start address and the others are zeroed.
1835 The first partition stretches to the end of the whole ISO image.
1836 The additional volume descriptor set and trees can be used to mount the
1837 ISO image at the start of the first partition, while it is still possible
1838 to mount it via the normal first volume descriptor set and tree at the
1839 start of the image or storage device.
1840 This makes few sense on optical media. But on USB sticks it creates a
1841 conventional partition table which makes it mountable on e.g. Linux via
1842 /dev/sdb and /dev/sdb1 alike.
1843 @since 0.6.2
1844 @param opts
1845 The option set to be manipulated.
1846 @param block_offset_2k
1847 The offset of the partition start relative to device start.
1848 This is counted in 2 kB blocks. The partition table will show the
1849 according number of 512 byte sectors.
1850 Default is 0 which causes no second set and trees.
1851 If it is not 0 then it must not be smaller than 16.
1852 @param secs_512_per_head
1853 Number of 512 byte sectors per head. 1 to 63. 0=automatic.
1854 @param heads_per_cyl
1855 Number of heads per cylinder. 1 to 255. 0=automatic.
1856 @return 1 success, <=0 failure
1857 */
1858int isoburn_igopt_set_part_offset(struct isoburn_imgen_opts *opts,
1859 uint32_t block_offset_2k,
1860 int secs_512_per_head, int heads_per_cyl);
1861int isoburn_igopt_get_part_offset(struct isoburn_imgen_opts *opts,
1862 uint32_t *block_offset_2k,
1863 int *secs_512_per_head, int *heads_per_cyl);
1864
1865
1866/** Explicitly set the four timestamps of the emerging ISO image.
1867 Default with all parameters is 0.
1868 @since 0.5.4
1869 @param opts
1870 The option set to work on
1871 @param creation_time
1872 ECMA-119 Volume Creation Date and Time
1873 When "the information in the volume was created."
1874 A value of 0 means that the timepoint of write start is to be used.
1875 @param modification_time
1876 ECMA-119 Volume Modification Date and Time
1877 When "the informationin the volume was last modified."
1878 A value of 0 means that the timepoint of write start is to be used.
1879 @param expiration_time
1880 ECMA-119 Volume Expiration Date and Time
1881 When "the information in the volume may be regarded as obsolete."
1882 A value of 0 means that the information never shall expire.
1883 @param effective_time
1884 ECMA-119 Volume Effective Date and Time
1885 When "the information in the volume may be used."
1886 A value of 0 means that not such retention is intended.
1887 @param uuid
1888 If this text is not empty, then it overrides vol_modification_time
1889 by copying the first 16 decimal digits from uuid, eventually
1890 padding up with decimal '1', and writing a NUL-byte as timezone GMT.
1891 It should express a reasonable time in form YYYYMMDDhhmmsscc
1892 E.g.: 2010040711405800 = 7 Apr 2010 11:40:58 (+0 centiseconds)
1893 @return 1 success, <=0 failure
1894 */
1895int isoburn_igopt_set_pvd_times(struct isoburn_imgen_opts *opts,
1896 time_t creation_time, time_t modification_time,
1897 time_t expiration_time, time_t effective_time,
1898 char *uuid);
1899int isoburn_igopt_get_pvd_times(struct isoburn_imgen_opts *opts,
1900 time_t *creation_time, time_t *modification_time,
1901 time_t *expiration_time, time_t *effective_time,
1902 char uuid[17]);
1903
1904
1905/** Associate a libjte environment object to the upcoming write run.
1906 libjte implements Jigdo Template Extraction as of Steve McIntyre and
1907 Richard Atterer.
1908 A non-NULL libjte_handle will cause failure to write if libjte was not
1909 enabled in libisofs at compile time.
1910 @since 0.6.4
1911 @param opts
1912 The option set to work on
1913 @param libjte_handle
1914 Pointer to a struct libjte_env e.g. created by libjte_new().
1915 It must stay existent from the start of image writing by
1916 isoburn_prepare_*() until the write thread has ended.
1917 E.g. until libburn indicates the end of its write run.
1918 @return 1 success, <=0 failure
1919*/
1920int isoburn_igopt_attach_jte(struct isoburn_imgen_opts *opts,
1921 void *libjte_handle);
1922
1923/** Remove eventual association to a libjte environment handle.
1924 @since 0.6.4
1925 @param opts
1926 The option set to work on
1927 @param libjte_handle
1928 If not submitted as NULL, this will return the previously set
1929 libjte handle.
1930 @return 1 success, <=0 failure
1931*/
1932int isoburn_igopt_detach_jte(struct isoburn_imgen_opts *opts,
1933 void **libjte_handle);
1934
1935
1936/** Set or get the number of trailing zero byte blocks to be written by
1937 libisofs. The image size counter of the emerging ISO image will include
1938 them. Eventual checksums will take them into respect.
1939 They will be written immediately before the eventual image checksum area
1940 which is at the very end of the image.
1941 For a motivation see iso_write_opts_set_tail_blocks() in libisofs.h .
1942 @since 0.6.4
1943 @param opts
1944 The option set to work on
1945 @param num_blocks
1946 Number of extra 2 kB blocks to be written by libisofs.
1947 @return 1 success, <=0 failure
1948*/
1949int isoburn_igopt_set_tail_blocks(struct isoburn_imgen_opts *opts,
1950 uint32_t num_blocks);
1951int isoburn_igopt_get_tail_blocks(struct isoburn_imgen_opts *opts,
1952 uint32_t *num_blocks);
1953
1954
1955/** Copy a data file from the local filesystem into the emerging ISO image.
1956 Mark it by an MBR partition entry as PreP partition and also cause
1957 protective MBR partition entries before and after this partition.
1958 See libisofs.h iso_write_opts_set_prep_img().
1959 @since 1.2.4
1960 @param opts
1961 The option set to be manipulated.
1962 @param path
1963 File address in the local file system.
1964 @param flag
1965 With isoburn_igopt_set_prep_partition():
1966 Control bits as of iso_write_opts_set_efi_bootp()
1967 bit0= The path contains instructions for the interval libisofs
1968 reader. See libisofs.h.
1969 @since 1.4.0
1970 With isoburn_igopt_get_prep_partition():
1971 bit0= add the current flag setting & 0x3fffffff to return value 1.
1972 @return 1 success, <=0 failure
1973*/
1974int isoburn_igopt_set_prep_partition(struct isoburn_imgen_opts *opts,
1975 char *path, int flag);
1976int isoburn_igopt_get_prep_partition(struct isoburn_imgen_opts *opts,
1977 char **path, int flag);
1978
1979/** Copy a data file from the local filesystem into the emerging ISO image
1980 and mark it by a GPT entry as EFI system partition.
1981 @since 1.2.4
1982 @param opts
1983 The option set to be manipulated.
1984 @param path
1985 File address in the local file system.
1986 Instead of a disk path, the word --efi-boot-image may be given.
1987 It exposes in GPT the content of the first El Torito EFI boot image
1988 as EFI system partition.
1989 @param flag
1990 With isoburn_igopt_get_efi_bootp():
1991 Control bits as of iso_write_opts_set_efi_bootp()
1992 bit0= The path contains instructions for the interval libisofs
1993 reader. See libisofs.h.
1994 @since 1.4.0
1995 With isoburn_igopt_set_efi_bootp():
1996 bit0= add the current flag setting & 0x3fffffff to return value 1.
1997 @return 1 success, <=0 failure
1998*/
1999int isoburn_igopt_set_efi_bootp(struct isoburn_imgen_opts *opts,
2000 char *path, int flag);
2001int isoburn_igopt_get_efi_bootp(struct isoburn_imgen_opts *opts,
2002 char **path, int flag);
2003
2004
2005/** Cause an arbitrary data file to be appended to the ISO image and to be
2006 described by a partition table entry in an MBR or SUN Disk Label at the
2007 start of the ISO image.
2008 The partition entry will bear the size of the image file rounded up to
2009 the next multiple of 2048 bytes.
2010 MBR or SUN Disk Label are selected by isoburn_igopt_set_system_area()
2011 system area type: 0 selects MBR partition table. 3 selects a SUN partition
2012 table with 320 kB start alignment.
2013 @since 0.6.4
2014 @param opts
2015 The option set to be manipulated.
2016 @param partition_number
2017 Depicts the partition table entry which shall describe the
2018 appended image.
2019 Range with MBR: 1 to 4. 1 will cause the whole ISO image to be
2020 unclaimable space before partition 1.
2021 @since 0.6.6
2022 Range with SUN Disk Label: 2 to 8.
2023 @param image_path
2024 File address in the local file system.
2025 With SUN Disk Label: an empty name causes the partition to become
2026 a copy of the next lower partition.
2027 @param partition_type
2028 The MBR partition type. E.g. FAT12 = 0x01 , FAT16 = 0x06,
2029 Linux Native Partition = 0x83. See fdisk command L.
2030 This parameter is ignored with SUN Disk Label.
2031 @return
2032 <=0 = error, 1 = success
2033*/
2034int isoburn_igopt_set_partition_img(struct isoburn_imgen_opts *opts,
2035 int partition_number, uint8_t partition_type,
2036 char *image_path);
2037
2038/** Inquire the current settings made by isoburn_igopt_set_partition_img().
2039 @since 0.6.4
2040 @param opts
2041 The option set to be inquired.
2042 @param num_entries
2043 Number of array elements in partition_types[] and image_paths[].
2044 @param partition_types
2045 The partition type associated with the partition. Valid only if
2046 image_paths[] of the same index is not NULL.
2047 @param image_paths
2048 Its elements get filled with either NULL or a pointer to a string
2049 with a file address or an empty text.
2050 @return
2051 <0 = error
2052 0 = no partition image set
2053 >0 highest used partition number
2054*/
2055int isoburn_igopt_get_partition_img(struct isoburn_imgen_opts *opts,
2056 int num_entries,
2057 uint8_t partition_types[],
2058 char *image_paths[]);
2059
2060
2061/** Set flag bits for a partition defined by isoburn_igopt_set_partition_img().
2062 The bits will be forwarded to libisofs iso_write_opts_set_partition_img().
2063 @since 1.4.0
2064 @param opts
2065 The option set to be manipulated.
2066 @param partition_number
2067 Depicts the partition table entry to which shall the flags bits
2068 shall apply.
2069 @param flag
2070 Control bits as of iso_write_opts_set_partition_img()
2071 bit0= The path contains instructions for the interval libisofs
2072 reader. See libisofs.h.
2073 @since 1.4.0
2074 @return
2075 <=0 = error, 1 = success
2076*/
2077int isoburn_igopt_set_part_flag(struct isoburn_imgen_opts *opts,
2078 int partition_number, int flag);
2079
2080/** Inquire the current settings made by isoburn_igopt_set_part_flags().
2081 @since 1.4.0
2082 @param opts
2083 The option set to be inquired.
2084 @param num_entries
2085 Number of array elements in part_flags[].
2086 @param part_flags
2087 The array elements 0 to num_entries - 1 will get filled by the
2088 flag bits of the images of the corresponding partition.
2089 @return
2090 <0 = error
2091 0 = no partition image set
2092 >0 highest used partition number
2093*/
2094int isoburn_igopt_get_part_flags(struct isoburn_imgen_opts *opts,
2095 int num_entries, int part_flags[]);
2096
2097/** Control whether partitions created by iso_write_opts_set_partition_img()
2098 are to be represented in MBR or as GPT partitions.
2099 @since 1.4.0
2100 @param opts
2101 The option set to be manipulated.
2102 @param gpt
2103 0= represent as MBR partition; as GPT only if other GPT partitions
2104 are present
2105 1= represent as GPT partition and cause protective MBR with a single
2106 partition which covers the whole output data.
2107 This may fail if other settings demand MBR partitions.
2108 Do not use other values for now.
2109 @return
2110 <=0 = error, 1 = success
2111*/
2112int isoburn_igopt_set_appended_as_gpt(struct isoburn_imgen_opts *opts,
2113 int gpt);
2114
2115/** Inquire the current setting made by isoburn_igopt_set_appended_as_gpt().
2116 @since 1.4.0
2117 @param opts
2118 The option set to be inquired.
2119 @param gpt
2120 Returns the current value.
2121 @return
2122 <=0 = error, 1 = success
2123*/
2124int isoburn_igopt_get_appended_as_gpt(struct isoburn_imgen_opts *opts,
2125 int *gpt);
2126
2127/** Set the GPT Type GUID for a partition defined by
2128 isoburn_igopt_set_partition_img().
2129 @since 1.5.2
2130 @param opts
2131 The option set to be manipulated.
2132 @param partition_number
2133 Depicts the partition table entry which shall get the Type GUID.
2134 @param guid
2135 16 bytes of user supplied GUID. Readily byte-swapped from the text
2136 form as prescribed by UEFI specs:
2137 4 byte, 2 byte, 2 byte as little-endian.
2138 2 byte, 6 byte as big-endian.
2139 @param valid
2140 Set to 1 to make this Type GUID valid.
2141 Set to 0 in order to invalidate a previously made setting. In this
2142 case MBR type 0xEF will become the EFI Type GUID. All others will
2143 become the Basic Data Partition Type GUID.
2144 @return
2145 <=0 = error, 1 = success
2146*/
2147int isoburn_igopt_set_part_type_guid(struct isoburn_imgen_opts *opts,
2148 int partition_number, uint8_t guid[16],
2149 int valid);
2150
2151/** Inquire the current settings made by isoburn_igopt_set_part_type_guid().
2152 @since 1.5.2
2153 @param opts
2154 The option set to be inquired.
2155 @param num_entries
2156 Number of array elements in part_flags[].
2157 @param guids
2158 The array elements 0 to num_entries - 1 will get filled by the
2159 16 flag bits of the images of the corresponding partition.
2160 @param valids
2161 The array elements 0 to num_entries - 1 will get filled by 1 or 0
2162 to indicate whether the corresponding type_guids element is valid.
2163 @return
2164 <0 = error
2165 0 = no partition image set
2166 >0 highest used partition number
2167*/
2168int isoburn_igopt_get_part_type_guid(struct isoburn_imgen_opts *opts,
2169 int num_entries, uint8_t guids[][16],
2170 int valids[]);
2171
2172/** Control whether the GPT partition table is allowed to leave some parts of
2173 the emerging ISO image uncovered, whether the partition entries in the
2174 GPT get sorted by their start block addresses, and whether partition 1
2175 gets created to represent the ISO 9660 filesystem.
2176 Default is that the partition entries get sorted and all gaps get filled
2177 by additional GPT partition entries. Partition 1 is by default created for
2178 the ISO filesystem if partition offset is 16, no partition 1 was created for
2179 other reasons, and no other partition overlaps with the range from LBA 16 to
2180 the end of the ISO 9660 filesystem.
2181 Note that GPT for ISOLINUX isohybrid does not get gaps filled, anyways.
2182 @since 1.5.8
2183 @param opts
2184 The option set to be inquired.
2185 @param with_gaps
2186 If 0, fill gaps.
2187 If 1, do not fill gaps.
2188 @param with_gaps_no_sort
2189 In case that with_gaps is 1:
2190 If 0, sort partitions by start block addresses.
2191 If 1, do not sort partitions.
2192 @param with_gaps_no_iso
2193 In case that with_gaps is 1:
2194 If 0, create partition 1 for the ISO filesystem if possible.
2195 If 1, do not create partition for the ISO filesystem if not already
2196 created for other reasons.
2197 @return
2198 <=0 = error, 1 = success
2199 */
2200int isoburn_igopt_set_gpt_with_gaps(struct isoburn_imgen_opts *opts,
2201 int with_gaps, int with_gaps_no_sort,
2202 int with_gaps_no_iso);
2203
2204/** Inquire the current settings made by isoburn_igopts_set_gpt_with_gaps().
2205 @since 1.5.8
2206 @param opts
2207 The option set to be manipulated.
2208 @param with_gaps
2209 If 0, fill gaps.
2210 If 1, do not fill gaps.
2211 @param with_gaps_no_sort
2212 In case that with_gaps is 1:
2213 If 0, sort partitions by start block addresses.
2214 If 1, do not sort partitions.
2215 @param with_gaps_no_iso
2216 In case that with_gaps is 1:
2217 If 0, create partition 1 for the ISO filesystem if possible.
2218 If 1, do not create partition for the ISO filesystem if not already
2219 created for other reasons.
2220 @return
2221 <=0 = error, 1 = success
2222 */
2223int isoburn_igopt_get_gpt_with_gaps(struct isoburn_imgen_opts *opts,
2224 int *with_gaps, int *with_gaps_no_sort,
2225 int *with_gaps_no_iso);
2226
2227/** Control whether partitions created by iso_write_opts_set_partition_img()
2228 are to be represented in Apple Partition Map.
2229 @since 1.4.4
2230 @param opts
2231 The option set to be manipulated.
2232 @param apm
2233 0= do not represent appended partitions in APM
2234 1= represent in APM, even if not
2235 iso_write_opts_set_part_like_isohybrid() enables it and no
2236 other APM partitions emerge.
2237 Do not use other values for now.
2238 @return
2239 <=0 = error, 1 = success
2240*/
2241int isoburn_igopt_set_appended_as_apm(struct isoburn_imgen_opts *opts,
2242 int apm);
2243
2244/** Inquire the current setting made by isoburn_igopt_set_appended_as_apm().
2245 @since 1.4.4
2246 @param opts
2247 The option set to be inquired.
2248 @param apm
2249 Returns the current value.
2250 @return
2251 <=0 = error, 1 = success
2252*/
2253int isoburn_igopt_get_appended_as_apm(struct isoburn_imgen_opts *opts,
2254 int *apm);
2255
2256
2257/** Control whether bits 2 to 8 of el_torito_set_isolinux_options()
2258 shall apply even if not isohybrid MBR patching is enabled (bit1 of
2259 parameter options of isoburn_igopt_set_system_area()).
2260 For details see iso_write_opts_set_part_like_isohybrid() in libisofs.h.
2261 @since 1.4.4
2262 @param opts
2263 The option set to be manipulated.
2264 @param alike
2265 0= Apply isohybrid behavior only with ISOLINUX isohybrid.
2266 Do not mention appended partitions in APM unless
2267 isoburn_igopt_set_appended_as_apm() is enabled.
2268 1= Apply isohybrid behavior even without ISOLINUX isohybrid.
2269 @return
2270 <=0 = error, 1 = success
2271*/
2272int isoburn_igopt_set_part_like_isohybrid(struct isoburn_imgen_opts *opts,
2273 int alike);
2274
2275/** Inquire the current setting of isoburn_igopt_set_part_like_isohybrid().
2276 @since 1.4.4
2277 @param opts
2278 The option set to be inquired.
2279 @param alike
2280 Returns the current value.
2281 @return
2282 <=0 = error, 1 = success
2283*/
2284int isoburn_igopt_get_part_like_isohybrid(struct isoburn_imgen_opts *opts,
2285 int *alike);
2286
2287/** Set the partition type of the MBR partition which represents the ISO
2288 filesystem or at least protects it.
2289 This is without effect if no such partition emerges by other settings or
2290 if the partition type is prescribed mandatorily like 0xee for
2291 GPT protective MBR or 0x96 for CHRP.
2292 @since 1.4.8
2293 @param opts
2294 The option set to be manipulated.
2295 @param part_type
2296 0x00 to 0xff as desired partition type.
2297 Any other value (e.g. -1) enables the default types of the various
2298 occasions.
2299*/
2300int isoburn_igopt_set_iso_mbr_part_type(struct isoburn_imgen_opts *opts,
2301 int part_type);
2302
2303/** Inquire the current setting of isoburn_igopt_set_iso_mbr_part_type().
2304 @since 1.4.8
2305 @param opts
2306 The option set to be inquired.
2307 @param part_type
2308 Returns the current value: -1, 0x00 to 0xff.
2309 @return
2310 <=0 = error, 1 = success
2311*/
2312int isoburn_igopt_get_iso_mbr_part_type(struct isoburn_imgen_opts *opts,
2313 int *part_type);
2314
2315/** Set the GPT Type GUID for the partition which represents the ISO 9660
2316 filesystem, if such a partition emerges in GPT.
2317 @since 1.5.2
2318 @param opts
2319 The option set to be manipulated.
2320 @param guid
2321 16 bytes of user supplied GUID. Readily byte-swapped from the text
2322 form as prescribed by UEFI specs:
2323 4 byte, 2 byte, 2 byte as little-endian.
2324 2 byte, 6 byte as big-endian.
2325 @param valid
2326 Set to 1 to make this Type GUID valid.
2327 Set to 0 in order to invalidate a previously made setting. In this
2328 case the setting of isoburn_igopt_set_iso_mbr_part_type() or its
2329 default gets into effect.
2330 @return
2331 <=0 = error, 1 = success
2332*/
2333int isoburn_igopt_set_iso_type_guid(struct isoburn_imgen_opts *opts,
2334 uint8_t guid[16], int valid);
2335
2336/** Inquire the current setting of isoburn_igopt_set_iso_type_guid().
2337 @since 1.5.2
2338 @param opts
2339 The option set to be inquired.
2340 @param guid
2341 Gets filled with the 16 bytes of GUID.
2342 @return
2343 <= error, 0= guid is invalid, 1 = guid is valid
2344*/
2345int isoburn_igopt_get_iso_type_guid(struct isoburn_imgen_opts *opts,
2346 uint8_t guid[16]);
2347
2348/** Control whether the emerging GPT gets a pseudo-randomly generated disk GUID
2349 or whether it gets a user supplied GUID.
2350 The partition GUIDs will be generated in a reproducible way by exoring a
2351 little-endian 32 bit counter with the disk GUID beginning at byte offset 9.
2352 @since 1.4.6
2353 @param opts
2354 The option set to be manipulated.
2355 @param guid
2356 16 bytes of user supplied GUID. Readily byte-swapped from the text
2357 form as prescribed by UEFI specs:
2358 4 byte, 2 byte, 2 byte as little-endian.
2359 2 byte, 6 byte as big-endian.
2360 The upper 4 bit of guid[6] and guid[7] should bear the value 4 to
2361 express the version 4 in both endiannesses. Bit 7 of byte[8] should
2362 be set to 1 and bit 6 be set to 0, in order to express the RFC 4122
2363 variant of GUID, where version 4 means "random".
2364 @param mode
2365 0 = ignore parameter guid and produce the GPT disk GUID by a
2366 pseudo-random algorithm. This is the default setting.
2367 1 = use parameter guid as GPT disk GUID
2368 2 = ignore parameter guid and derive the GPT disk GUID from
2369 parameter uuid of isoburn_igopt_set_pvd_times().
2370 The 16 bytes of uuid get copied and bytes 6, 7, 8 get their
2371 upper bits changed to comply to RFC 4122.
2372 If no such uuid is given when ISO production starts, then
2373 mode 2 defaults to mode 0.
2374*/
2375int isoburn_igopt_set_gpt_guid(struct isoburn_imgen_opts *opts,
2376 uint8_t guid[16], int mode);
2377
2378/** Inquire the current setting of isoburn_igopt_set_gpt_guid().
2379 @since 1.4.6
2380 @param opts
2381 The option set to be inquired.
2382 @param guid
2383 Returns the current guid if current mode is 1.
2384 @param mode
2385 Returns the current value.
2386 @return
2387 <=0 = error, 1 = success
2388*/
2389int isoburn_igopt_get_gpt_guid(struct isoburn_imgen_opts *opts,
2390 uint8_t guid[16], int *mode);
2391
2392/** Set the maximum number of SUSP CE entries and thus continuation areas.
2393 Each continuation area can hold at most 2048 bytes of SUSP data (Rock Ridge
2394 or AAIP). The first area can be smaller. There might be some waste at the
2395 end of each area.
2396 When the maximum number is exceeded during ISO filesystem production
2397 then possibly xattr and ACL get removed or error ISO_TOO_MANY_CE gets
2398 reported and filesystem production is prevented.
2399 Files with 32 or more CE entries do not show up in mounted filesystems on
2400 Linux. So the default setting is 31 with drop mode 2. If a higher limit is
2401 chosen and 31 gets surpassed, then a warning message gets reported.
2402 @since 1.5.6
2403 @param opts
2404 The option set to be inquired.
2405 @param num
2406 The maximum number of CE entries per file.
2407 Not more than 100000 may be set here.
2408 0 gets silently mapped to 1,because the root directory needs one CE.
2409 @param flag
2410 bit0-bit3 = Drop mode: What to do with AAIP data on too many CE:
2411 0 = throw ISO_TOO_MANY_CE, without dropping anything
2412 1 = permanently drop non-isofs fattr from IsoNode and
2413 retry filesystem production
2414 2 = drop ACL if dropping non-isofs fattr does not suffice
2415 @return
2416 <=0 = error, 1 = success
2417*/
2418int isoburn_igopt_set_max_ce_entries(struct isoburn_imgen_opts *opts,
2419 uint32_t num, int flag);
2420
2421/** Inquire the current setting of isoburn_igopt_().
2422 @since 1.5.6
2423 @param opts
2424 The option set to be inquired.
2425 @param num
2426 Returns the current setting
2427 @param max_ce_flag
2428 Returns the current flag setting
2429 @return
2430 <=0 = error, 1 = success
2431*/
2432int isoburn_igopt_get_max_ce_entries(struct isoburn_imgen_opts *opts,
2433 uint32_t *num, int *max_ce_flag);
2434
2435/** Set a name for the system area. This setting is ignored unless system area
2436 type 3 "SUN Disk Label" is in effect by iso_write_opts_set_system_area().
2437 In this case it will replace the default text at the start of the image:
2438 "CD-ROM Disc with Sun sparc boot created by libisofs"
2439 @since 0.6.6
2440 @param opts
2441 The option set to be manipulated.
2442 @param label
2443 A text of up to 128 characters.
2444 @return
2445 <=0 = error, 1 = success
2446*/
2447int isoburn_igopt_set_disc_label(struct isoburn_imgen_opts *opts, char *label);
2448
2449/** Inquire the current setting made by isoburn_igopt_set_disc_label().
2450 @since 0.6.6
2451 @param opts
2452 The option set to be inquired.
2453 @param label
2454 Returns a pointer to the currently set label string.
2455 Do not alter this string.
2456 Use only as long as the opts object exists.
2457 @return
2458 <=0 = error, 1 = success
2459*/
2460int isoburn_igopt_get_disc_label(struct isoburn_imgen_opts *opts,
2461 char **label);
2462
2463/** Set a serial number for the HFS+ extension of the emerging ISO image.
2464 @since 1.2.4
2465 @param opts
2466 The option set to be manipulated.
2467 @param serial_number
2468 8 bytes which should be unique to the image.
2469 If all bytes are 0, then the serial number will be generated as
2470 random number by libisofs. This is the default setting.
2471 @return
2472 <=0 = error, 1 = success
2473*/
2474int isoburn_igopt_set_hfsp_serial_number(struct isoburn_imgen_opts *opts,
2475 uint8_t serial_number[8]);
2476
2477
2478/** Inquire the current setting made by isoburn_igopt_set_disc_label()
2479 @since 1.2.4
2480 @param opts
2481 The option set to be inquired.
2482 @param serial_number
2483 Will get filled with the current setting.
2484 @return
2485 <=0 = error, 1 = success
2486*/
2487int isoburn_igopt_get_hfsp_serial_number(struct isoburn_imgen_opts *opts,
2488 uint8_t serial_number[8]);
2489
2490/** Set the allocation block size for HFS+ production and the block size
2491 for layout and address unit of Apple Partition map.
2492 @since 1.2.4
2493 @param opts
2494 The option set to be manipulated.
2495 @param hfsp_block_size
2496 -1 means that this setting shall be left unchanged
2497 0 allows the automatic default setting
2498 512 and 2048 enforce a size.
2499 @param apm_block_size
2500 -1 means that this setting shall be left unchanged
2501 0 allows the automatic default setting
2502 512 and 2048 enforce a size.
2503 Size 512 cannot be combined with GPT production.
2504 Size 2048 cannot be mounted -t hfsplus by Linux kernels at least up
2505 to 2.6.32.
2506 @return
2507 <=0 = error, 1 = success
2508*/
2509int isoburn_igopt_set_hfsp_block_size(struct isoburn_imgen_opts *opts,
2510 int hfsp_block_size, int apm_block_size);
2511
2512/** Inquire the current setting made by isoburn_igopt_set_hfsp_block_size
2513 @since 1.2.4
2514 @param opts
2515 The option set to be inquired.
2516 @param hfsp_block_size
2517 Will be set to a value as described above. Except -1.
2518 @param apm_block_size
2519 Will be set to a value as described above. Except -1.
2520 @return
2521 <=0 = error, 1 = success
2522*/
2523int isoburn_igopt_get_hfsp_block_size(struct isoburn_imgen_opts *opts,
2524 int *hfsp_block_size, int *apm_block_size);
2525
2526
2527/** Set or inquire the write type for the next write run on optical media.
2528 @since 1.2.4
2529 @param opts
2530 The option set to be manipulated or inquired.
2531 @param do_tao
2532 The value to be set or the variable where to return the current
2533 setting:
2534 0 = Let libburn choose according to other write parameters.
2535 This is advisable unless there are particular reasons not to
2536 use one of the two write types. Be aware that 1 and -1 can
2537 lead to failure if the write type is not appropriate for
2538 the given media situation.
2539 1 = Use BURN_WRITE_TAO which does
2540 TAO on CD, Incremental on DVD-R,
2541 no track reservation on DVD+R and BD-R
2542 -1 = Use BURN_WRITE_SAO which does
2543 SAO on CD, DAO on DVD-R,
2544 track reservation on DVD+R and BD-R
2545 @return
2546 <=0 = error, 1 = success
2547*/
2548int isoburn_igopt_set_write_type(struct isoburn_imgen_opts *opts, int do_tao);
2549int isoburn_igopt_get_write_type(struct isoburn_imgen_opts *opts, int *do_tao);
2550
2551/** Set or inquire whether a final fsync(2) is performed when updating the
2552 multi-session information of libburn stdio pseudo-drives by
2553 isoburn_activate_session().
2554 Note:
2555 fsync(2) calls during and at the end of isoburn_disc_write() are controlled
2556 by libburn call burn_write_opts_set_stdio_fsync().
2557 @since 1.2.4
2558 @param opts
2559 The option set to be manipulated or inquired.
2560 @param do_sync
2561 1= call fsync(2) with stdio drives in isoburn_activate_session()
2562 0= do not
2563 @return
2564 <=0 = error, 1 = success
2565 */
2566int isoburn_igopt_set_stdio_endsync(struct isoburn_imgen_opts *opts,
2567 int do_sync);
2568int isoburn_igopt_get_stdio_endsync(struct isoburn_imgen_opts *opts,
2569 int *do_sync);
2570
2571/* ----------------------------------------------------------------------- */
2572/* End of Options for image generation */
2573/* ----------------------------------------------------------------------- */
2574
2575
2576/** Frontend of libisofs call iso_conv_name_chars() controlled by
2577 struct isoburn_imgen_opts rather than IsoWriteOpts.
2578 See libisofs.h for a more detailed description.
2579 @since 1.3.6
2580 @param opts
2581 Defines options like output charset, UCS-2 versus UTF-16 for Joliet,
2582 and naming restrictions.
2583 @param name
2584 The input text which shall be converted.
2585 @param name_len
2586 The number of bytes in input text.
2587 @param result
2588 Will return the conversion result in case of success. Terminated by
2589 a trailing zero byte.
2590 Use free() to dispose it when no longer needed.
2591 @param result_len
2592 Will return the number of bytes in result (excluding trailing zero)
2593 @param flag
2594 Bitfield for control purposes.
2595 bit0-bit7= Name space
2596 0= generic (out_charset is valid,
2597 no reserved characters, no length limits)
2598 1= Rock Ridge (out_charset is valid)
2599 2= Joliet (out_charset gets overridden by UCS-2 or UTF-16)
2600 3= ECMA-119 (out_charset gets overridden by the
2601 dull ISO 9660 subset of ASCII)
2602 4= HFS+ (out_charset gets overridden by UTF-16BE)
2603 bit8= Treat input text as directory name
2604 (matters for Joliet and ECMA-119)
2605 bit9= Do not issue error messages
2606 bit15= Reverse operation (best to be done only with results of
2607 previous conversions)
2608 @return
2609 1 means success, <=0 means error
2610*/
2611int isoburn_conv_name_chars(struct isoburn_imgen_opts *opts,
2612 char *name, size_t name_len,
2613 char **result, size_t *result_len, int flag);
2614
2615
2616/** Get the image attached to a drive, if any.
2617 @since 0.1.0
2618 @param d The drive to inquire
2619 @return A reference to attached image, or NULL if the drive has no image
2620 attached. This reference needs to be released via iso_image_unref()
2621 when it is not longer needed.
2622*/
2623IsoImage *isoburn_get_attached_image(struct burn_drive *d);
2624
2625/** Get the start address of the image that is attached to the drive, if any.
2626 @since 1.2.2
2627 @param d The drive to inquire
2628 @return The logical block address where the System Area of the image
2629 starts. <0 means that the address is invalid.
2630*/
2631int isoburn_get_attached_start_lba(struct burn_drive *d);
2632
2633/** Like isoburn_get_attached_start_lba(), but with off_t return value.
2634 @since 1.5.8
2635*/
2636off_t isoburn_get_attached_start_lba_v2(struct burn_drive *d);
2637
2638
2639/** Load the ISO filesystem directory tree from the medium in the given drive.
2640 This will give libisoburn the base on which it can let libisofs perform
2641 image growing or image modification. The loaded volset gets attached
2642 to the drive object and handed out to the application.
2643 Not a wrapper, but peculiar to libisoburn.
2644 @since 0.1.0
2645 @param d The drive which holds an existing ISO filesystem or blank media.
2646 d is allowed to be NULL which produces an empty ISO image. In
2647 this case one has to call before writing isoburn_attach_volset()
2648 with the volset from this call and with the intended output
2649 drive.
2650 @param read_opts The read options which can be chosen by the application
2651 @param image the image read, if the disc is blank it will have no files.
2652 This reference needs to be released via iso_image_unref() when
2653 it is not longer needed. The drive, if not NULL, will hold an
2654 own reference which it will release when it gets a new volset
2655 or when it gets released via isoburn_drive_release().
2656 You can pass NULL if you already have a reference or you plan to
2657 obtain it later with isoburn_get_attached_image(). Of course, if
2658 you haven't specified a valid drive (i.e., if d == NULL), this
2659 parameter can't be NULL.
2660 @return <=0 error , 1 = success
2661*/
2662int isoburn_read_image(struct burn_drive *d,
2663 struct isoburn_read_opts *read_opts,
2664 IsoImage **image);
2665
2666/** Set a callback function for producing pacifier messages during the lengthy
2667 process of image reading. The callback function and the application handle
2668 are stored until they are needed for the underlying call to libisofs.
2669 Other than with libisofs the handle is managed entirely by the application.
2670 An idle .free() function is exposed to libisofs. The handle has to stay
2671 valid until isoburn_read_image() is done. It has to be detached by
2672 isoburn_set_read_pacifier(drive, NULL, NULL);
2673 before it may be removed from memory.
2674 @since 0.1.0
2675 @param drive The drive which will be used with isoburn_read_image()
2676 It has to be acquired by an isoburn_* wrapper call.
2677 @param read_pacifier The callback function
2678 @param app_handle The app handle which the callback function can obtain
2679 via iso_image_get_attached_data() from its IsoImage*
2680 @return 1 success, <=0 failure
2681*/
2682int isoburn_set_read_pacifier(struct burn_drive *drive,
2683 int (*read_pacifier)(IsoImage*, IsoFileSource*),
2684 void *app_handle);
2685
2686/** Inquire the partition offset of the loaded image. The first 512 bytes of
2687 the image get examined whether they bear an MBR signature and a first
2688 partition table entry which matches the size of the image. In this case
2689 the start address is recorded as partition offset and internal buffers
2690 get adjusted.
2691 See also isoburn_igopt_set_part_offset().
2692 @since 0.6.2
2693 @param drive The drive with the loaded image
2694 @param block_offset_2k returns the recognized partition offset
2695 @return <0 = error
2696 0 = no partition offset recognized
2697 1 = acceptable non-zero offset, buffers are adjusted
2698 2 = offset is credible but not acceptable for buffer size
2699*/
2700int isoburn_get_img_partition_offset(struct burn_drive *drive,
2701 uint32_t *block_offset_2k);
2702
2703/** Assess features of the importable directory trees and an estimation of the
2704 write options which would cause the recognized features.
2705 @since 1.5.6
2706 @param d The drive with the ISO filesystem
2707 @param read_opts The read options which would be used by
2708 isoburn_read_image()
2709 @param features Returned information which may be inquired by
2710 iso_read_image_features_*() or by
2711 iso_read_image_feature_named().
2712 Dispose by iso_read_image_features_destroy() when
2713 no longer needed.
2714 @param imgen_opts Returned set of write options which were derived
2715 from the features.
2716 Dispose by isoburn_igopt_destroy when no longer
2717 needed.
2718 @param flag Bitfield for control purposes, submit 0 for now.
2719 @return 1= success, <= 0 = error
2720*/
2721int isoburn_assess_written_features(struct burn_drive *d,
2722 struct isoburn_read_opts *read_opts,
2723 IsoReadImageFeatures **features,
2724 struct isoburn_imgen_opts **imgen_opts,
2725 int flag);
2726
2727
2728/** Set the IsoImage to be used with a drive. This eventually releases
2729 the reference to the old IsoImage attached to the drive.
2730 Caution: Use with care. It hardly makes sense to replace an image that
2731 reflects a valid ISO image on the medium.
2732 This call is rather intended for writing a newly created and populated
2733 image to blank media. The use case in xorriso is to let an image survive
2734 the change or demise of the outdev target drive.
2735 @since 0.1.0
2736 @param d The drive which shall be write target of the volset.
2737 @param image The image that represents the image to be written.
2738 This image pointer MUST already be a valid reference suitable
2739 for iso_image_unref().
2740 It may have been obtained by appropriate libisofs calls or by
2741 isoburn_read_image() with d==NULL.
2742 @return <=0 error , 1 = success
2743*/
2744int isoburn_attach_image(struct burn_drive *d, IsoImage *image);
2745
2746
2747/** Set the start address of the image that is attached to the drive, if any.
2748 @since 1.2.2
2749 @param d The drive to inquire
2750 @param lba The logical block address where the System Area of the image
2751 starts. <0 means that the address is invalid.
2752 @param flag Bitfield, submit 0 for now.
2753 @return <=0 error (e.g. because no image is attached), 1 = success
2754*/
2755int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag);
2756
2757/** Like isoburn_attach_start_lba(), but with off_t result value.
2758 @since 1.5.8
2759*/
2760int isoburn_attach_start_lba_v2(struct burn_drive *d, off_t lba, int flag);
2761
2762
2763/** Return the best possible estimation of the currently available capacity of
2764 the medium. This might depend on particular write option settings and on
2765 drive state.
2766 An eventual start address for emulated multi-session will be subtracted
2767 from the capacity estimation given by burn_disc_available_space().
2768 Negative results get defaulted to 0.
2769 Wrapper for: burn_disc_available_space()
2770 @since 0.1.0
2771 @param d The drive to query.
2772 @param o If not NULL: write parameters to be set on drive before query
2773 @return number of most probably available free bytes
2774*/
2775off_t isoburn_disc_available_space(struct burn_drive *d,
2776 struct burn_write_opts *o);
2777
2778
2779/** Obtain the start block number of the most recent session on the medium. In
2780 case of random access media this will normally be 0. Successful return is
2781 not a guarantee that there is a ISO-9660 image at all. The call will fail,
2782 nevertheless,if isoburn_disc_get_status() returns not BURN_DISC_APPENDABLE
2783 or BURN_DISC_FULL.
2784 Note: The result of this call may be fabricated by a previous call of
2785 isoburn_set_msc1() which can override the rule to load the most recent
2786 session.
2787 Wrapper for: burn_disc_get_msc1()
2788 @since 0.1.0
2789 @param d The drive to inquire
2790 @param start_lba Contains on success the start address in 2048 byte blocks
2791 @return <=0 error , 1 = success
2792*/
2793int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba);
2794
2795/** Like isoburn_disc_get_msc1(), but with off_t result value.
2796 @since 1.5.8
2797*/
2798int isoburn_disc_get_msc1_v2(struct burn_drive *d, off_t *start_lba);
2799
2800
2801/** Use this with trackno==0 to obtain the predicted start block number of the
2802 new session. The interesting number is returned in parameter nwa.
2803 Wrapper for: burn_disc_track_lba_nwa()
2804 @since 0.1.0
2805 @param d The drive to inquire
2806 @param o If not NULL: write parameters to be set on drive before query
2807 @param trackno Submit 0.
2808 @param lba return value: start lba
2809 @param nwa return value: Next Writeable Address
2810 @return 1=nwa is valid , 0=nwa is not valid , -1=error
2811*/
2812int isoburn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
2813 int trackno, int *lba, int *nwa);
2814
2815/** Like isoburn_disc_track_lba_nwa(), but with off_t result value.
2816 @since 1.5.8
2817*/
2818int isoburn_disc_track_lba_nwa_v2(struct burn_drive *d,
2819 struct burn_write_opts *o,
2820 int trackno, off_t *lba, off_t *nwa);
2821
2822
2823/** Obtain the size which was attributed to an emulated appendable on actually
2824 overwritable media. This value is supposed to be <= 2048 * nwa as of
2825 isoburn_disc_track_lba_nwa().
2826 @since 0.1.0
2827 @param d The drive holding the medium.
2828 @param start_byte The reply value counted in bytes, not in sectors.
2829 @param flag Unused yet. Submit 0.
2830 @return 1=stat_byte is valid, 0=not an emulated appendable, -1=error
2831*/
2832int isoburn_get_min_start_byte(struct burn_drive *d, off_t *start_byte,
2833 int flag);
2834
2835
2836/** Start production of an ISO 9660 image using the method of Growing:
2837 Create a disc object for writing the new session from the created or loaded
2838 iso_volset which has been manipulated via libisofs, to the same medium from
2839 where the image was eventually loaded.
2840 This call starts a libisofs thread which begins to produce the image.
2841 It has to be revoked by isoburn_cancel_prepared_write() if for some reason
2842 this image data stream shall not be consumed.
2843 The returned struct burn_disc is ready for use by a subsequent call to
2844 isoburn_disc_write(). After this asynchronous writing has ended and the
2845 drive is BURN_DRIVE_IDLE again, the burn_disc object has to be disposed
2846 by burn_disc_free().
2847 @since 0.1.0
2848 @param drive The combined source and target drive, grabbed with
2849 isoburn_drive_scan_and_grab(). .
2850 @param disc Returns the newly created burn_disc object.
2851 @param opts Image generation options, see isoburn_igopt_*()
2852 @return <=0 error , 1 = success
2853*/
2854int isoburn_prepare_disc(struct burn_drive *drive, struct burn_disc **disc,
2855 struct isoburn_imgen_opts *opts);
2856
2857
2858/** Start production of an ISO 9660 image using the method of Modifying:
2859 Create a disc object for producing a new image from a previous image
2860 plus the changes made by user. The generated burn_disc is suitable
2861 to be written to a grabbed drive with blank writeable medium.
2862 But you must not use the same drive for input and output, because data
2863 will be read from the source drive while at the same time the target
2864 drive is already writing.
2865 This call starts a libisofs thread which begins to produce the image.
2866 It has to be revoked by isoburn_cancel_prepared_write() if for some reason
2867 this image data stream shall not be consumed.
2868 The resulting burn_disc object has to be disposed when all its writing
2869 is done and the drive is BURN_DRIVE_IDLE again after asynchronous
2870 burn_disc_write().
2871 @since 0.1.0
2872 @param in_drive The input drive, grabbed with isoburn_drive_aquire() or
2873 one of its alternatives.
2874 @param disc Returns the newly created burn_disc object.
2875 @param opts Options for image generation and data transport to the
2876 medium.
2877 @param out_drive The output drive, from isoburn_drive_aquire() et.al..
2878 @return <=0 error , 1 = success
2879*/
2880int isoburn_prepare_new_image(struct burn_drive *in_drive,
2881 struct burn_disc **disc,
2882 struct isoburn_imgen_opts *opts,
2883 struct burn_drive *out_drive);
2884
2885
2886/** Start production of an ISO 9660 image using the method of Blind Growing:
2887 Create a disc object for writing an add-on session from the created or
2888 loaded IsoImage which has been manipulated via libisofs, to a different
2889 drive than the one from where it was loaded.
2890 Usually output will be stdio:/dev/fd/1 (i.e. stdout) being piped
2891 into some burn program like with this classic gesture:
2892 mkisofs -M $dev -C $msc1,$nwa | cdrecord -waiti dev=$dev
2893 Parameter translation into libisoburn:
2894 $dev is the address by which parameter in_drive of this call was
2895 acquired $msc1 was set by isoburn_set_msc1() before image reading
2896 or was detected from the in_drive medium
2897 $nwa is a parameter of this call
2898 or can be used as detected from the in_drive medium
2899
2900 This call starts a libisofs thread which begins to produce the image.
2901 It has to be revoked by isoburn_cancel_prepared_write() if for some reason
2902 this image data stream shall not be consumed.
2903 This call waits for libisofs output to become available and then detaches
2904 the input drive object from the data source object by which libisofs was
2905 reading from the input drive.
2906 So, as far as libisofs is concerned, that drive may be released immediately
2907 after this call in order to allow the consumer to access the drive for
2908 writing.
2909 The consumer should wait for input to become available and only then open
2910 its burn drive. With cdrecord this is caused by option -waiti.
2911
2912 The resulting burn_disc object has to be disposed when all its writing
2913 is done and the drive is BURN_DRIVE_IDLE again after asynchronous
2914 burn_disc_write().
2915 @since 0.2.2
2916 @param in_drive The input drive,grabbed with isoburn_drive_scan_and_grab().
2917 @param disc Returns the newly created burn_disc object.
2918 @param opts Options for image generation and data transport to media.
2919 @param out_drive The output drive, from isoburn_drive_aquire() et.al..
2920 typically stdio:/dev/fd/1 .
2921 @param nwa The address (2048 byte block count) where the add-on
2922 session will be finally stored on a mountable medium
2923 or in a mountable file.
2924 If nwa is -1 then the address is used as determined from
2925 the in_drive medium.
2926 @return <=0 error , 1 = success
2927*/
2928int isoburn_prepare_blind_grow(struct burn_drive *in_drive,
2929 struct burn_disc **disc,
2930 struct isoburn_imgen_opts *opts,
2931 struct burn_drive *out_drive, int nwa);
2932
2933/** Like isoburn_prepare_blind_grow(), but with off_t nwa value.
2934 @since 1.5.8
2935*/
2936int isoburn_prepare_blind_grow_v2(struct burn_drive *in_drive,
2937 struct burn_disc **disc,
2938 struct isoburn_imgen_opts *opts,
2939 struct burn_drive *out_drive, off_t nwa);
2940
2941
2942/**
2943 Revoke isoburn_prepare_*() instead of running isoburn_disc_write().
2944 libisofs reserves resources and maybe already starts generating the
2945 image stream when one of above three calls is performed. It is mandatory to
2946 either run isoburn_disc_write() or to revoke the preparations by the
2947 call described here.
2948 If this call returns 0 or 1 then the write thread of libisofs has ended.
2949 @since 0.1.0
2950 @param input_drive The drive or in_drive which was used with the
2951 preparation call.
2952 @param output_drive The out_drive used with isoburn_prepare_new_image(),
2953 NULL if none.
2954 @param flag Bitfield, submit 0 for now.
2955 bit0= -reserved for internal use-
2956 @return <0 error, 0= no pending preparations detectable, 1 = canceled
2957*/
2958int isoburn_cancel_prepared_write(struct burn_drive *input_drive,
2959 struct burn_drive *output_drive, int flag);
2960
2961
2962/**
2963 Override the truncation setting that was made with flag bit2 during the
2964 call of isoburn_drive_aquire. This applies only to stdio pseudo drives.
2965 @since 0.1.6
2966 @param drive The drive which was acquired and shall be used for writing.
2967 @param flag Bitfield controlling the setting:
2968 bit0= truncate (else do not truncate)
2969 bit1= do not warn if call is inappropriate to drive
2970 bit2= only set if truncation is currently enabled
2971 do not warn if call is inappropriate to drive
2972 @return 1 success, 0 inappropriate drive, <0 severe error
2973*/
2974int isoburn_set_truncate(struct burn_drive *drive, int flag);
2975
2976
2977/** Start writing of the new session.
2978 This call is asynchronous. I.e. it returns quite soon and the progress has
2979 to be watched by a loop with call burn_drive_get_status() until
2980 BURN_DRIVE_IDLE is returned.
2981 Wrapper for: burn_disc_write()
2982 @since 0.1.0
2983 @param o Options which control the burn process. See burnwrite_opts_*()
2984 in libburn.h.
2985 @param disc Disc object created either by isoburn_prepare_disc() or by
2986 isoburn_prepare_new_image().
2987*/
2988void isoburn_disc_write(struct burn_write_opts *o, struct burn_disc *disc);
2989
2990
2991/** Inquire state and fill parameters of the fifo which is attached to
2992 the emerging track. This should be done in the pacifier loop while
2993 isoburn_disc_write() or burn_disc_write() are active.
2994 This works only with drives obtained by isoburn_drive_scan_and_grab()
2995 or isoburn_drive_grab(). If isoburn_prepare_new_image() was used, then
2996 parameter out_drive must have announced the track output drive.
2997 Hint: If only burn_write_opts and not burn_drive is known, then the drive
2998 can be obtained by burn_write_opts_get_drive().
2999 @since 0.1.0
3000 @param d The drive to which the track with the fifo gets burned.
3001 @param size The total size of the fifo
3002 @param free_bytes The current free capacity of the fifo
3003 @param status_text Returns a pointer to a constant text, see below
3004 @return <0 reply invalid, >=0 fifo status code:
3005 bit0+1=input status, bit2=consumption status, i.e:
3006 0="standby" : data processing not started yet
3007 1="active" : input and consumption are active
3008 2="ending" : input has ended without error
3009 3="failing" : input had error and ended,
3010 4="unused" : ( consumption has ended before processing start )
3011 5="abandoned" : consumption has ended prematurely
3012 6="ended" : consumption has ended without input error
3013 7="aborted" : consumption has ended after input error
3014*/
3015int isoburn_get_fifo_status(struct burn_drive *d, int *size, int *free_bytes,
3016 char **status_text);
3017
3018
3019/** Inquire whether the most recent write run was successful.
3020 Wrapper for: burn_drive_wrote_well()
3021 @since 0.1.0
3022 @param d The drive to inquire
3023 @return 1=burn seems to have went well, 0=burn failed
3024*/
3025int isoburn_drive_wrote_well(struct burn_drive *d);
3026
3027
3028/** Call this after isoburn_disc_write has finished and burn_drive_wrote_well()
3029 indicates success. It will eventually complete the emulation of
3030 multi-session functionality, if needed at all. Let libisoburn decide.
3031 Not a wrapper, but peculiar to libisoburn.
3032 @since 0.1.0
3033 @param d The output drive to which the session was written
3034 @return 1 success , <=0 failure
3035*/
3036int isoburn_activate_session(struct burn_drive *d);
3037
3038
3039/** Wait after normal end of operations until libisofs ended all write
3040 threads and freed resource reservations.
3041 This call is not mandatory. But without it, messages from the ending
3042 threads might appear after the application ended its write procedure.
3043 @since 0.1.0
3044 @param input_drive The drive or in_drive which was used with the
3045 preparation call.
3046 @param output_drive The out_drive used with isoburn_prepare_new_image(),
3047 NULL if none.
3048 @param flag Bitfield, submit 0 for now.
3049 @return <=0 error , 1 = success
3050*/
3051int isoburn_sync_after_write(struct burn_drive *input_drive,
3052 struct burn_drive *output_drive, int flag);
3053
3054
3055/** Release an acquired drive.
3056 Wrapper for: burn_drive_release()
3057 @since 0.1.0
3058 @param drive The drive to be released
3059 @param eject 1= eject medium from drive , 0= do not eject
3060*/
3061void isoburn_drive_release(struct burn_drive *drive, int eject);
3062
3063
3064/** Release an acquired drive like with isoburn_drive_release() but with
3065 additional options.
3066 Wrapper for: burn_drive_release_v2()
3067 @since 1.5.8
3068 @param drive The drive to release.
3069 @param flag Bitfield for control purposes:
3070 bit0-2= mode
3071 0= unlock
3072 1= unlock+eject
3073 2= leave locked
3074 bit4= do not calm drive
3075 @return 1 means success, <=0 means failure
3076*/
3077int isoburn_drive_release_v2(struct burn_drive *drive, int flag);
3078
3079
3080/** Shutdown all three libraries.
3081 Wrapper for : iso_finish() and burn_finish().
3082 @since 0.1.0
3083*/
3085
3086
3087/*
3088 The following calls are for expert applications only.
3089 An application should have a special reason to use them.
3090*/
3091
3092
3093/** Inquire whether the medium needs emulation or would be suitable for
3094 generic multi-session via libburn.
3095 @since 0.1.0
3096 @param d The drive to inquire
3097 @return 0 is generic multi-session
3098 1 is emulated multi-session
3099 -1 is not suitable for isoburn
3100*/
3101int isoburn_needs_emulation(struct burn_drive *d);
3102
3103
3104/* ---------------------------- Test area ----------------------------- */
3105
3106/* no tests active, currently */
3107
3108#ifdef __cplusplus
3109} /* extern "C" */
3110#endif
3111
3112#endif /* LIBISOBURN_LIBISOBURN_H_ */
3113
int isoburn_disc_erasable(struct burn_drive *d)
Tells whether the medium can be treated by isoburn_disc_erase().
int isoburn_igopt_set_extensions(struct isoburn_imgen_opts *o, int ext)
int isoburn_prepare_disc(struct burn_drive *drive, struct burn_disc **disc, struct isoburn_imgen_opts *opts)
Start production of an ISO 9660 image using the method of Growing: Create a disc object for writing t...
int isoburn_igopt_get_hfsp_serial_number(struct isoburn_imgen_opts *opts, uint8_t serial_number[8])
Inquire the current setting made by isoburn_igopt_set_disc_label()
int isoburn_attach_image(struct burn_drive *d, IsoImage *image)
Set the IsoImage to be used with a drive.
int isoburn_igopt_set_iso_mbr_part_type(struct isoburn_imgen_opts *opts, int part_type)
Set the partition type of the MBR partition which represents the ISO filesystem or at least protects ...
int isoburn_disc_track_lba_nwa_v2(struct burn_drive *d, struct burn_write_opts *o, int trackno, off_t *lba, off_t *nwa)
Like isoburn_disc_track_lba_nwa(), but with off_t result value.
int isoburn_igopt_set_fifo_size(struct isoburn_imgen_opts *o, int fifo_size)
The number of bytes to be used for the fifo which decouples libisofs and libburn for better throughpu...
int isoburn_igopt_set_pvd_times(struct isoburn_imgen_opts *opts, time_t creation_time, time_t modification_time, time_t expiration_time, time_t effective_time, char *uuid)
Explicitly set the four timestamps of the emerging ISO image.
off_t isoburn_get_attached_start_lba_v2(struct burn_drive *d)
Like isoburn_get_attached_start_lba(), but with off_t return value.
int isoburn_set_truncate(struct burn_drive *drive, int flag)
Override the truncation setting that was made with flag bit2 during the call of isoburn_drive_aquire.
int isoburn_drive_aquire(struct burn_drive_info *drive_infos[], char *adr, int flag)
Acquire a target drive by its filesystem path or libburn persistent address.
int isoburn_ropt_get_auto_incharset(struct isoburn_read_opts *o, int *mode)
int isoburn_igopt_get_part_like_isohybrid(struct isoburn_imgen_opts *opts, int *alike)
Inquire the current setting of isoburn_igopt_set_part_like_isohybrid().
int isoburn_get_mount_params(struct burn_drive *d, int adr_mode, char *adr_value, int *lba, int *track, int *session, char volid[33], int flag)
Try to convert the given entity address into various entity addresses which would describe it.
int isoburn_get_img_partition_offset(struct burn_drive *drive, uint32_t *block_offset_2k)
Inquire the partition offset of the loaded image.
int isoburn_ropt_destroy(struct isoburn_read_opts **o, int flag)
Deletes an option set which was created by isoburn_ropt_new().
enum burn_disc_status isoburn_disc_get_status(struct burn_drive *drive)
Inquire the medium status.
int isoburn_igopt_set_disc_label(struct isoburn_imgen_opts *opts, char *label)
Set a name for the system area.
int isoburn_ropt_set_displacement(struct isoburn_read_opts *o, uint32_t displacement, int displacement_sign)
Control an offset to be applied to all block address pointers in the ISO image in order to compensate...
void isoburn_toc_track_get_entry(struct isoburn_toc_track *t, struct burn_toc_entry *entry)
Obtain a copy of the entry which describes a particular track.
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
Obtain after image preparation the lowest block address of file content data.
int isoburn_ropt_set_data_cache(struct isoburn_read_opts *o, int cache_tiles, int tile_blocks, int flag)
Sets the size and granularity of the cache which libisoburn provides to libisofs for reading of ISO i...
int isoburn_is_compatible(int major, int minor, int micro, int flag)
Check whether all features of header file libisoburn.h from the given major.minor....
int isoburn_drive_wrote_well(struct burn_drive *d)
Inquire whether the most recent write run was successful.
int isoburn_igopt_set_over_mode(struct isoburn_imgen_opts *o, int replace_dir_mode, int replace_file_mode, mode_t dir_mode, mode_t file_mode)
Set the override values for files and directory permissions.
int isoburn_needs_emulation(struct burn_drive *d)
Inquire whether the medium needs emulation or would be suitable for generic multi-session via libburn...
int isoburn_igopt_set_stdio_endsync(struct isoburn_imgen_opts *opts, int do_sync)
Set or inquire whether a final fsync(2) is performed when updating the multi-session information of l...
int isoburn_igopt_get_effective_lba_v2(struct isoburn_imgen_opts *o, off_t *lba)
Like isoburn_igopt_get_effective_lba(), but with off_t block addresses.
int isoburn_igopt_detach_jte(struct isoburn_imgen_opts *opts, void **libjte_handle)
Remove eventual association to a libjte environment handle.
int isoburn_ropt_get_size_what(struct isoburn_read_opts *o, uint32_t *size, int *has_what)
int isoburn_igopt_set_over_ugid(struct isoburn_imgen_opts *o, int replace_uid, int replace_gid, uid_t uid, gid_t gid)
Set the override values values for group id and user id.
struct isoburn_toc_session ** isoburn_toc_disc_get_sessions(struct isoburn_toc_disc *disc, int *num)
Get the array of session handles and the number of complete sessions from the table of content.
int isoburn_toc_track_get_emul_v2(struct isoburn_toc_track *t, off_t *start_lba, off_t *image_blocks, char volid[33], int flag)
Like isoburn_toc_track_get_emul() but with off_t reply type.
int isoburn_igopt_get_relaxed(struct isoburn_imgen_opts *o, int *relax)
int isoburn_igopt_get_max_ce_entries(struct isoburn_imgen_opts *opts, uint32_t *num, int *max_ce_flag)
Inquire the current setting of isoburn_igopt_().
int isoburn_igopt_set_gpt_with_gaps(struct isoburn_imgen_opts *opts, int with_gaps, int with_gaps_no_sort, int with_gaps_no_iso)
Control whether the GPT partition table is allowed to leave some parts of the emerging ISO image unco...
int isoburn_set_read_pacifier(struct burn_drive *drive, int(*read_pacifier)(IsoImage *, IsoFileSource *), void *app_handle)
Set a callback function for producing pacifier messages during the lengthy process of image reading.
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba)
Obtain after image preparation the block address where the session will start on the medium.
int isoburn_igopt_attach_jte(struct isoburn_imgen_opts *opts, void *libjte_handle)
Associate a libjte environment object to the upcoming write run.
int isoburn_igopt_get_appended_as_apm(struct isoburn_imgen_opts *opts, int *apm)
Inquire the current setting made by isoburn_igopt_set_appended_as_apm().
int isoburn_igopt_get_iso_type_guid(struct isoburn_imgen_opts *opts, uint8_t guid[16])
Inquire the current setting of isoburn_igopt_set_iso_type_guid().
void isoburn_toc_session_get_leadout_entry(struct isoburn_toc_session *s, struct burn_toc_entry *entry)
Obtain a copy of the entry which describes the end of a particular session.
int isoburn_igopt_set_relaxed(struct isoburn_imgen_opts *o, int relax)
int isoburn_drive_grab(struct burn_drive *drive, int load)
Acquire a drive from the burn_drive_info[] array which was obtained by a previous call of burn_drive_...
int isoburn_ropt_get_input_charset(struct isoburn_read_opts *o, char **input_charset)
int isoburn_igopt_get_system_area(struct isoburn_imgen_opts *o, char data[32768], int *options)
int isoburn_igopt_get_partition_img(struct isoburn_imgen_opts *opts, int num_entries, uint8_t partition_types[], char *image_paths[])
Inquire the current settings made by isoburn_igopt_set_partition_img().
int isoburn_disc_get_msc1_v2(struct burn_drive *d, off_t *start_lba)
Like isoburn_disc_get_msc1(), but with off_t result value.
int isoburn_igopt_get_data_start_v2(struct isoburn_imgen_opts *o, off_t *lba)
Like isoburn_igopt_get_data_start(), but with off_t block addresses.
int isoburn_attach_start_lba_v2(struct burn_drive *d, off_t lba, int flag)
Like isoburn_attach_start_lba(), but with off_t result value.
int isoburn_ropt_set_default_dirperms(struct isoburn_read_opts *o, mode_t mode)
Default attributes to use on directories if no RockRidge extension gets loaded.
int isoburn_igopt_get_over_mode(struct isoburn_imgen_opts *o, int *replace_dir_mode, int *replace_file_mode, mode_t *dir_mode, mode_t *file_mode)
int isoburn_ropt_set_auto_incharset(struct isoburn_read_opts *o, int mode)
Enable or disable methods to automatically choose an input charset.
off_t isoburn_toc_disc_get_sectors_v2(struct isoburn_toc_disc *disc)
Like isoburn_toc_disc_get_sectors(), but with off_t return value.
struct isoburn_toc_track ** isoburn_toc_session_get_tracks(struct isoburn_toc_session *s, int *num)
Get the array of track handles from a particular session.
int isoburn_igopt_set_system_area(struct isoburn_imgen_opts *o, char data[32768], int options)
Attach 32 kB of binary data which shall get written to the first 32 kB of the ISO image,...
off_t isoburn_disc_available_space(struct burn_drive *d, struct burn_write_opts *o)
Return the best possible estimation of the currently available capacity of the medium.
int isoburn_read_iso_head(struct burn_drive *d, int lba, int *image_blocks, char *info, int flag)
Try whether the data at the given address look like a ISO 9660 image header and obtain its alleged si...
int isoburn_sync_after_write(struct burn_drive *input_drive, struct burn_drive *output_drive, int flag)
Wait after normal end of operations until libisofs ended all write threads and freed resource reserva...
void isoburn_disc_erase(struct burn_drive *drive, int fast)
Mark the medium as blank.
int isoburn_igopt_set_tail_blocks(struct isoburn_imgen_opts *opts, uint32_t num_blocks)
Set or get the number of trailing zero byte blocks to be written by libisofs.
int isoburn_igopt_get_hfsp_block_size(struct isoburn_imgen_opts *opts, int *hfsp_block_size, int *apm_block_size)
Inquire the current setting made by isoburn_igopt_set_hfsp_block_size.
IsoImage * isoburn_get_attached_image(struct burn_drive *d)
Get the image attached to a drive, if any.
int isoburn_igopt_set_part_type_guid(struct isoburn_imgen_opts *opts, int partition_number, uint8_t guid[16], int valid)
Set the GPT Type GUID for a partition defined by isoburn_igopt_set_partition_img().
int isoburn_igopt_set_partition_img(struct isoburn_imgen_opts *opts, int partition_number, uint8_t partition_type, char *image_path)
Cause an arbitrary data file to be appended to the ISO image and to be described by a partition table...
int isoburn_igopt_get_rr_reloc(struct isoburn_imgen_opts *o, char **name, int *flags)
Obtain the settings of isoburn_igopt_set_rr_reloc().
int isoburn_igopt_set_max_ce_entries(struct isoburn_imgen_opts *opts, uint32_t num, int flag)
Set the maximum number of SUSP CE entries and thus continuation areas.
int isoburn_get_min_start_byte(struct burn_drive *d, off_t *start_byte, int flag)
Obtain the size which was attributed to an emulated appendable on actually overwritable media.
int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba, int *image_blocks, char volid[33], int flag)
Obtain eventual ISO image parameters of an emulated track.
int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name, char *timestamp, char *tag_written)
Set or get parameters "name" and "timestamp" for a scdbackup checksum tag.
int isoburn_igopt_set_iso_type_guid(struct isoburn_imgen_opts *opts, uint8_t guid[16], int valid)
Set the GPT Type GUID for the partition which represents the ISO 9660 filesystem, if such a partition...
int isoburn_igopt_destroy(struct isoburn_imgen_opts **o, int flag)
Deletes an option set which was created by isoburn_igopt_new().
int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc)
Tell the number of 2048 byte blocks covered by the table of content.
int isoburn_igopt_get_stdio_endsync(struct isoburn_imgen_opts *opts, int *do_sync)
int isoburn_igopt_set_prep_partition(struct isoburn_imgen_opts *opts, char *path, int flag)
Copy a data file from the local filesystem into the emerging ISO image.
int isoburn_igopt_get_part_flags(struct isoburn_imgen_opts *opts, int num_entries, int part_flags[])
Inquire the current settings made by isoburn_igopt_set_part_flags().
int isoburn_ropt_set_default_perms(struct isoburn_read_opts *o, uid_t uid, gid_t gid, mode_t mode)
Default attributes to use if no RockRidge extension gets loaded.
int isoburn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o, int trackno, int *lba, int *nwa)
Use this with trackno==0 to obtain the predicted start block number of the new session.
int isoburn_igopt_get_untranslated_name_len(struct isoburn_imgen_opts *o, int *len)
int isoburn_drive_set_msgs_submit(struct burn_drive *d, int(*msgs_submit)(void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag), void *submit_handle, int submit_flag, int flag)
Attach to a drive an application provided method for immediate delivery of messages.
int isoburn_get_fifo_status(struct burn_drive *d, int *size, int *free_bytes, char **status_text)
Inquire state and fill parameters of the fifo which is attached to the emerging track.
int isoburn_igopt_get_level(struct isoburn_imgen_opts *o, int *level)
int isoburn_conv_name_chars(struct isoburn_imgen_opts *opts, char *name, size_t name_len, char **result, size_t *result_len, int flag)
Frontend of libisofs call iso_conv_name_chars() controlled by struct isoburn_imgen_opts rather than I...
int isoburn_igopt_get_iso_mbr_part_type(struct isoburn_imgen_opts *opts, int *part_type)
Inquire the current setting of isoburn_igopt_set_iso_mbr_part_type().
void isoburn_finish(void)
Shutdown all three libraries.
int isoburn_ropt_get_data_cache(struct isoburn_read_opts *o, int *cache_tiles, int *tile_blocks, int *set_flag, int flag)
Inquire the current settings of isoburn_set_data_cache().
int isoburn_igopt_get_part_offset(struct isoburn_imgen_opts *opts, uint32_t *block_offset_2k, int *secs_512_per_head, int *heads_per_cyl)
int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba)
Obtain the start block number of the most recent session on the medium.
int isoburn_igopt_get_tail_blocks(struct isoburn_imgen_opts *opts, uint32_t *num_blocks)
int isoburn_igopt_set_part_flag(struct isoburn_imgen_opts *opts, int partition_number, int flag)
Set flag bits for a partition defined by isoburn_igopt_set_partition_img().
int isoburn_igopt_set_appended_as_gpt(struct isoburn_imgen_opts *opts, int gpt)
Control whether partitions created by iso_write_opts_set_partition_img() are to be represented in MBR...
int isoburn_igopt_get_appended_as_gpt(struct isoburn_imgen_opts *opts, int *gpt)
Inquire the current setting made by isoburn_igopt_set_appended_as_gpt().
int isoburn_igopt_set_efi_bootp(struct isoburn_imgen_opts *opts, char *path, int flag)
Copy a data file from the local filesystem into the emerging ISO image and mark it by a GPT entry as ...
int isoburn_igopt_set_rr_reloc(struct isoburn_imgen_opts *o, char *name, int flags)
If not isoburn_igopt_allow_deep_paths is in effect, then it may become necessary to relocate director...
int isoburn_igopt_get_efi_bootp(struct isoburn_imgen_opts *opts, char **path, int flag)
int isoburn_igopt_set_part_offset(struct isoburn_imgen_opts *opts, uint32_t block_offset_2k, int secs_512_per_head, int heads_per_cyl)
Control production of a second set of volume descriptors (superblock) and directory trees,...
int isoburn_assess_written_features(struct burn_drive *d, struct isoburn_read_opts *read_opts, IsoReadImageFeatures **features, struct isoburn_imgen_opts **imgen_opts, int flag)
Assess features of the importable directory trees and an estimation of the write options which would ...
int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[], char *adr, int load)
Acquire a target drive by its filesystem path or libburn persistent address.
int isoburn_igopt_get_gpt_with_gaps(struct isoburn_imgen_opts *opts, int *with_gaps, int *with_gaps_no_sort, int *with_gaps_no_iso)
Inquire the current settings made by isoburn_igopts_set_gpt_with_gaps().
int isoburn_get_attached_start_lba(struct burn_drive *d)
Get the start address of the image that is attached to the drive, if any.
int isoburn_libisofs_req(int *major, int *minor, int *micro)
The minimum compile time requirements of libisoburn towards libjte are the same as of a suitable libi...
int isoburn_igopt_get_part_type_guid(struct isoburn_imgen_opts *opts, int num_entries, uint8_t guids[][16], int valids[])
Inquire the current settings made by isoburn_igopt_set_part_type_guid().
int isoburn_igopt_set_out_charset(struct isoburn_imgen_opts *o, char *output_charset)
Set the character set to use for representing RR filenames in the image.
int isoburn_igopt_set_part_like_isohybrid(struct isoburn_imgen_opts *opts, int alike)
Control whether bits 2 to 8 of el_torito_set_isolinux_options() shall apply even if not isohybrid MBR...
int isoburn_initialize(char msg[1024], int flag)
Overview.
int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s)
Tell the number of 2048 byte blocks covered by a particular session.
int isoburn_igopt_get_over_ugid(struct isoburn_imgen_opts *o, int *replace_uid, int *replace_gid, uid_t *uid, gid_t *gid)
int isoburn_get_mount_params_v2(struct burn_drive *d, int adr_mode, char *adr_value, off_t *lba, int *track, int *session, char volid[33], int flag)
Like isoburn_get_mount_params() but with off_t block address type.
int isoburn_igopt_set_hfsp_block_size(struct isoburn_imgen_opts *opts, int hfsp_block_size, int apm_block_size)
Set the allocation block size for HFS+ production and the block size for layout and address unit of A...
int isoburn_read_image(struct burn_drive *d, struct isoburn_read_opts *read_opts, IsoImage **image)
Load the ISO filesystem directory tree from the medium in the given drive.
void isoburn_version(int *major, int *minor, int *micro)
Obtain the three release version numbers of the library.
int isoburn_ropt_get_truncate_mode(struct isoburn_read_opts *o, int *mode, int *length)
void isoburn_toc_disc_free(struct isoburn_toc_disc *disc)
Release the memory associated with a master handle of a medium.
int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o, char name[81], char timestamp[19], char **tag_written)
int isoburn_libjte_req(int *major, int *minor, int *micro)
The minimum version of libjte to be used with this version of libisoburn at runtime.
int isoburn_read_iso_head_v2(struct burn_drive *d, off_t lba, off_t *image_blocks, char *info, int flag)
Like isoburn_read_iso_head() but with off_t block address and count.
int isoburn_igopt_set_untranslated_name_len(struct isoburn_imgen_opts *o, int len)
Caution: This option breaks any assumptions about names that are supported by ECMA-119 specifications...
int isoburn_igopt_get_out_charset(struct isoburn_imgen_opts *o, char **output_charset)
int isoburn_igopt_set_hfsp_serial_number(struct isoburn_imgen_opts *opts, uint8_t serial_number[8])
Set a serial number for the HFS+ extension of the emerging ISO image.
int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag)
Set the start address of the image that is attached to the drive, if any.
int isoburn_disc_pretend_full_uncond(struct burn_drive *drive)
Sets the medium status to BURN_DISC_FULL unconditionally.
int isoburn_set_msgs_submit(int(*msgs_submit)(void *handle, int error_code, char msg_text[], int os_errno, char severity[], int flag), void *submit_handle, int submit_flag, int flag)
Note: Above version numbers are also recorded in configure.ac because libtool wants them as parameter...
int isoburn_ropt_get_tree_loaded(struct isoburn_read_opts *o, int *tree, int *rr)
After calling function isoburn_read_image() there are information available in the option set about w...
int isoburn_igopt_get_disc_label(struct isoburn_imgen_opts *opts, char **label)
Inquire the current setting made by isoburn_igopt_set_disc_label().
int isoburn_igopt_set_sort_files(struct isoburn_imgen_opts *o, int value)
int isoburn_ropt_get_displacement(struct isoburn_read_opts *o, uint32_t *displacement, int *displacement_sign)
int isoburn_prepare_blind_grow(struct burn_drive *in_drive, struct burn_disc **disc, struct isoburn_imgen_opts *opts, struct burn_drive *out_drive, int nwa)
Start production of an ISO 9660 image using the method of Blind Growing: Create a disc object for wri...
int isoburn_drive_release_v2(struct burn_drive *drive, int flag)
Release an acquired drive like with isoburn_drive_release() but with additional options.
int isoburn_igopt_get_prep_partition(struct isoburn_imgen_opts *opts, char **path, int flag)
int isoburn_ropt_get_default_perms(struct isoburn_read_opts *o, uid_t *uid, gid_t *gid, mode_t *mode)
int isoburn_igopt_set_write_type(struct isoburn_imgen_opts *opts, int do_tao)
Set or inquire the write type for the next write run on optical media.
int isoburn_igopt_get_sort_files(struct isoburn_imgen_opts *o, int *value)
int isoburn_cancel_prepared_write(struct burn_drive *input_drive, struct burn_drive *output_drive, int flag)
Revoke isoburn_prepare_*() instead of running isoburn_disc_write().
int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size)
int isoburn_prepare_new_image(struct burn_drive *in_drive, struct burn_disc **disc, struct isoburn_imgen_opts *opts, struct burn_drive *out_drive)
Start production of an ISO 9660 image using the method of Modifying: Create a disc object for produci...
int isoburn_igopt_get_gpt_guid(struct isoburn_imgen_opts *opts, uint8_t guid[16], int *mode)
Inquire the current setting of isoburn_igopt_set_gpt_guid().
int isoburn_prepare_blind_grow_v2(struct burn_drive *in_drive, struct burn_disc **disc, struct isoburn_imgen_opts *opts, struct burn_drive *out_drive, off_t nwa)
Like isoburn_prepare_blind_grow(), but with off_t nwa value.
void isoburn_drive_release(struct burn_drive *drive, int eject)
Release an acquired drive.
int isoburn_libburn_req(int *major, int *minor, int *micro)
The minimum version of libburn to be used with this version of libisoburn at runtime.
int isoburn_igopt_set_level(struct isoburn_imgen_opts *o, int level)
ISO level to write at.
int isoburn_ropt_get_default_dirperms(struct isoburn_read_opts *o, mode_t *mode)
int isoburn_igopt_get_extensions(struct isoburn_imgen_opts *o, int *ext)
int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value, int flag)
Set up isoburn_disc_get_msc1() to return a fabricated value.
int isoburn_igopt_get_pvd_times(struct isoburn_imgen_opts *opts, time_t *creation_time, time_t *modification_time, time_t *expiration_time, time_t *effective_time, char uuid[17])
off_t isoburn_toc_session_get_sectors_v2(struct isoburn_toc_session *s)
Like isoburn_toc_session_get_sectors(), but with off_t return value.
int isoburn_igopt_set_appended_as_apm(struct isoburn_imgen_opts *opts, int apm)
Control whether partitions created by iso_write_opts_set_partition_img() are to be represented in App...
struct isoburn_toc_disc * isoburn_toc_drive_get_disc(struct burn_drive *d)
Obtain a master handle for the table of content.
int isoburn_ropt_set_extensions(struct isoburn_read_opts *o, int ext)
int isoburn_igopt_set_gpt_guid(struct isoburn_imgen_opts *opts, uint8_t guid[16], int mode)
Control whether the emerging GPT gets a pseudo-randomly generated disk GUID or whether it gets a user...
int isoburn_ropt_set_input_charset(struct isoburn_read_opts *o, char *input_charset)
Set the character set for reading RR file names from ISO images.
int isoburn_igopt_get_write_type(struct isoburn_imgen_opts *opts, int *do_tao)
void isoburn_disc_write(struct burn_write_opts *o, struct burn_disc *disc)
Start writing of the new session.
int isoburn_toc_disc_get_incmpl_sess(struct isoburn_toc_disc *disc)
Obtain the number of incomplete sessions which are recorded in the result array of isoburn_toc_disc_g...
int isoburn_ropt_set_truncate_mode(struct isoburn_read_opts *o, int mode, int length)
Set the name truncation mode and the maximum name length for imported file objects.
int isoburn_ropt_new(struct isoburn_read_opts **o, int flag)
Produces a set of image read options, initialized with default values.
int isoburn_ropt_get_extensions(struct isoburn_read_opts *o, int *ext)
int isoburn_igopt_new(struct isoburn_imgen_opts **o, int flag)
Produces a set of generation and transfer options, initialized with default values.
int isoburn_activate_session(struct burn_drive *d)
Call this after isoburn_disc_write has finished and burn_drive_wrote_well() indicates success.

Generated for libisoburn by  doxygen 1.13.2