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

Generated for libisoburn by  doxygen 1.8.11