00001 00002 /* 00003 Lower level API definition of libisoburn. 00004 00005 Copyright 2007-2013 Vreixo Formoso Lopes <metalpain2002@yahoo.es> 00006 and Thomas Schmitt <scdbackup@gmx.net> 00007 Provided under GPL version 2 or later. 00008 */ 00009 00010 /** Overview 00011 00012 libisoburn is a frontend for libraries libburn and libisofs which enables 00013 creation and expansion of ISO-9660 filesystems on all CD/DVD/BD media supported 00014 by libburn. This includes media like DVD+RW, which do not support multi-session 00015 management on media level and even plain disk files or block devices. 00016 00017 The price for that is thorough specialization on data files in ISO-9660 00018 filesystem images. So libisoburn is not suitable for audio (CD-DA) or any 00019 other CD layout which does not entirely consist of ISO-9660 sessions. 00020 00021 Note that there is a higher level of API: xorriso.h. One should not mix it 00022 with the API calls of libisoburn.h, libisofs.h, and libburn.h. 00023 00024 00025 Connector functions 00026 00027 libisofs and libburn do not depend on each other but share some interfaces 00028 by which they can cooperate. 00029 libisoburn establishes the connection between both modules by creating the 00030 necessary interface objects and attaching them to the right places. 00031 00032 00033 Wrapper functions 00034 00035 The priciple of this frontend is that you may use any call of libisofs or 00036 libburn unless it has a isoburn_*() wrapper listed in the following function 00037 documentation. 00038 00039 E.g. call isoburn_initialize() rather than iso_init(); burn_initialize(); 00040 and call isoburn_drive_scan_and_grab() rather than burn_drive_scan_and_grab(). 00041 But you may call burn_disc_get_profile() directly if you want to display 00042 the media type. 00043 00044 The wrappers will transparently provide the necessary emulations which 00045 are appropriate for particular target drives and media states. 00046 To learn about them you have to read both API descriptions: the one of 00047 the wrapper and the one of the underlying libburn or libisofs call. 00048 00049 Macros BURN_* and functions burn_*() are documented in <libburn/libburn.h> 00050 Macros ISO_* and functions iso_*() are documented in <libisofs/libisofs.h> 00051 00052 00053 Usage model 00054 00055 There may be an input drive and an output drive. Either of them may be missing 00056 with the consequence that no reading resp. writing is possible. 00057 Both drive roles can be fulfilled by the same drive. 00058 00059 Input can be a random access readable libburn drive: 00060 optical media, regular files, block devices. 00061 Output can be any writeable libburn drive: 00062 writeable optical media in burner, writeable file objects (no directories). 00063 00064 libburn demands rw-permissions to drive device file resp. file object. 00065 00066 If the input drive provides a suitable ISO RockRidge image, then its tree 00067 may be loaded into memory and can then be manipulated by libisofs API calls. 00068 The loading is done by isoburn_read_image() under control of 00069 struct isoburn_read_opts which the application obtains from libisoburn 00070 and manipulates by the family of isoburn_ropt_set_*() functions. 00071 00072 Writing of result images is controlled by libisofs related parameters 00073 in a struct isoburn_imgen_opts which the application obtains from libisoburn 00074 and manipulates by the family of isoburn_igopt_set_*() functions. 00075 00076 All multi-session aspects are handled by libisoburn according to these 00077 settings. The application does not have to analyze media state and write 00078 job parameters. It rather states its desires which libisoburn tries to 00079 fulfill, or else will refuse to start the write run. 00080 00081 00082 Setup for Growing, Modifying or Blind Growing 00083 00084 The connector function family offers alternative API calls for performing 00085 the setup for several alternative image generation strategies. 00086 00087 Growing: 00088 If input and output drive are the same, then isoburn_prepare_disc() is to 00089 be used. It will lead to an add-on session on appendable or overwriteable 00090 media with existing ISO image. With blank media it will produce a first 00091 session. 00092 00093 Modifying: 00094 If the output drive is not the input drive, and if it bears blank media 00095 or overwriteable without a valid ISO image, then one may produce a consolidated 00096 image with old and new data. This will copy file data from an eventual input 00097 drive with valid image, add any newly introduced data from the local 00098 filesystem, and produce a first session on output media. 00099 To prepare for such an image generation run, use isoburn_prepare_new_image(). 00100 00101 Blind Growing: 00102 This method reads the old image from one drive and writes the add-on session 00103 to a different drive. That output drive is nevertheless supposed to 00104 finally lead to the same medium from where the session was loaded. Usually it 00105 will be stdio:/dev/fd/1 (i.e. stdout) being piped into some burn program 00106 like with this classic gesture: 00107 mkisofs -M $dev -C $msc1,$nwa | cdrecord -waiti dev=$dev 00108 Blind growing is prepared by the call isoburn_prepare_blind_grow(). 00109 The input drive should be released immediately after this call in order 00110 to allow the consumer of the output stream to access that drive for writing. 00111 00112 After either of these setups, some peripheral libburn drive parameter settings 00113 like burn_write_opts_set_simulate(), burn_write_opts_set_multi(), 00114 burn_drive_set_speed(), burn_write_opts_set_underrun_proof() should be made. 00115 Do not set the write mode. It will be chosen by libisoburn so it matches job 00116 and media state. 00117 00118 Writing the image 00119 00120 Then one may start image generation and write threads by isoburn_disc_write(). 00121 Progress may be watched at the output drive by burn_drive_get_status() and 00122 isoburn_get_fifo_status(). 00123 00124 At some time, the output drive will be BURN_DRIVE_IDLE indicating that 00125 writing has ended. 00126 One should inquire isoburn_drive_wrote_well() to learn about overall success. 00127 00128 Finally one must call isoburn_activate_session() which will complete any 00129 eventual multi-session emulation. 00130 00131 00132 Application Constraints 00133 00134 Applications shall include libisofs/libisofs.h , libburn/libburn.h and this 00135 file itself: libisoburn/libisoburn.h . 00136 They shall link with -lisofs -lburn -lisoburn or with the .o files emerging 00137 from building those libraries from their sources. 00138 00139 Applications must use 64 bit off_t. 00140 E.g. on 32-bit GNU/Linux by defining 00141 #define _LARGEFILE_SOURCE 00142 #define _FILE_OFFSET_BITS 64 00143 The minimum requirement is to interface with the library by 64 bit signed 00144 integers where libisofs.h or libisoburn.h prescribe off_t. 00145 Failure to do so may result in surprising malfunction or memory faults. 00146 00147 Application files which include libisofs/libisofs.h or libisoburn/libisoburn.h 00148 must provide definitions for uint32_t and uint8_t. 00149 This can be achieved either: 00150 - by using autotools which will define HAVE_STDINT_H or HAVE_INTTYPES_H 00151 according to its ./configure tests, 00152 - or by defining the macros HAVE_STDINT_H resp. HAVE_INTTYPES_H according 00153 to the local situation, 00154 - or by appropriately defining uint32_t and uint8_t by other means, 00155 e.g. by including inttypes.h before including libisofs.h and libisoburn.h 00156 00157 */ 00158 #ifdef HAVE_STDINT_H 00159 #include <stdint.h> 00160 #else 00161 #ifdef HAVE_INTTYPES_H 00162 #include <inttypes.h> 00163 #endif 00164 #endif 00165 00166 00167 /* Important: If you add a public API function then add its name to file 00168 libisoburn/libisoburn.ver 00169 */ 00170 00171 00172 /* API functions */ 00173 00174 00175 /** Initialize libisoburn, libisofs and libburn. 00176 Wrapper for : iso_init() and burn_initialize() 00177 @since 0.1.0 00178 @param msg A character array for eventual messages (e.g. with errors) 00179 @param flag Bitfield for control purposes (unused yet, submit 0) 00180 @return 1 indicates success, 0 is failure 00181 */ 00182 int isoburn_initialize(char msg[1024], int flag); 00183 00184 00185 /** Check whether all features of header file libisoburn.h from the given 00186 major.minor.micro revision triple can be delivered by the library version 00187 which is performing this call. 00188 An application of libisoburn can easily memorize the version of the 00189 libisoburn.h header in its own code. Immediately after isoburn_initialize() 00190 it should simply do this check: 00191 if (! isoburn_is_compatible(isoburn_header_version_major, 00192 isoburn_header_version_minor, 00193 isoburn_header_version_micro, 0)) 00194 ...refuse to start the program with this dynamic library version... 00195 @since 0.1.0 00196 @param major obtained at build time 00197 @param minor obtained at build time 00198 @param micro obtained at build time 00199 @param flag Bitfield for control purposes. Unused yet. Submit 0. 00200 @return 1= library can work for caller 00201 0= library is not usable in some aspects. Caller must restrict 00202 itself to an earlier API version or must not use this libray 00203 at all. 00204 */ 00205 int isoburn_is_compatible(int major, int minor, int micro, int flag); 00206 00207 00208 /** Obtain the three release version numbers of the library. These are the 00209 numbers encountered by the application when linking with libisoburn, 00210 i.e. possibly not before run time. 00211 Better do not base the fundamental compatibility decision of an application 00212 on these numbers. For a reliable check use isoburn_is_compatible(). 00213 @since 0.1.0 00214 @param major The maturity version (0 for now, as we are still learning) 00215 @param minor The development goal version. 00216 @param micro The development step version. This has an additional meaning: 00217 00218 Pare numbers indicate a version with frozen API. I.e. you can 00219 rely on the same set of features to be present in all 00220 published releases with that major.minor.micro combination. 00221 Features of a pare release will stay available and ABI 00222 compatible as long as the SONAME of libisoburn stays "1". 00223 Currently there are no plans to ever change the SONAME. 00224 00225 Odd numbers indicate that API upgrades are in progress. 00226 I.e. new features might be already present or they might 00227 be still missing. Newly introduced features may be changed 00228 incompatibly or even be revoked before release of a pare 00229 version. 00230 So micro revisions {1,3,5,7,9} should never be used for 00231 dynamic linking unless the proper library match can be 00232 guaranteed by external circumstances. 00233 00234 @return 1 success, <=0 might in future become an error indication 00235 */ 00236 void isoburn_version(int *major, int *minor, int *micro); 00237 00238 00239 /** The minimum version of libisofs to be used with this version of libisoburn 00240 at compile time. 00241 @since 0.1.0 00242 */ 00243 #define isoburn_libisofs_req_major 1 00244 #define isoburn_libisofs_req_minor 2 00245 #define isoburn_libisofs_req_micro 8 00246 00247 /** The minimum version of libburn to be used with this version of libisoburn 00248 at compile time. 00249 @since 0.1.0 00250 */ 00251 #define isoburn_libburn_req_major 1 00252 #define isoburn_libburn_req_minor 2 00253 #define isoburn_libburn_req_micro 8 00254 00255 /** The minimum compile time requirements of libisoburn towards libjte are 00256 the same as of a suitable libisofs towards libjte. 00257 So use these macros from libisofs.h : 00258 iso_libjte_req_major 00259 iso_libjte_req_minor 00260 iso_libjte_req_micro 00261 @since 0.6.4 00262 */ 00263 00264 /** The minimum version of libisofs to be used with this version of libisoburn 00265 at runtime. This is checked already in isoburn_initialize() which will 00266 refuse on outdated version. So this call is for information purposes after 00267 successful startup only. 00268 @since 0.1.0 00269 @param major isoburn_libisofs_req_major as seen at build time 00270 @param minor as seen at build time 00271 @param micro as seen at build time 00272 @return 1 success, <=0 might in future become an error indication 00273 */ 00274 int isoburn_libisofs_req(int *major, int *minor, int *micro); 00275 00276 00277 /** The minimum version of libjte to be used with this version of libisoburn 00278 at runtime. The use of libjte is optional and depends on configure 00279 tests. It can be prevented by ./configure option --disable-libjte . 00280 This is checked already in isoburn_initialize() which will refuse on 00281 outdated version. So this call is for information purposes after 00282 successful startup only. 00283 @since 0.6.4 00284 */ 00285 int isoburn_libjte_req(int *major, int *minor, int *micro); 00286 00287 00288 /** The minimum version of libburn to be used with this version of libisoburn 00289 at runtime. This is checked already in isoburn_initialize() which will 00290 refuse on outdated version. So this call is for information purposes after 00291 successful startup only. 00292 @since 0.1.0 00293 @param major isoburn_libburn_req_major as seen at build time 00294 @param minor as seen at build time 00295 @param micro as seen at build time 00296 @return 1 success, <=0 might in future become an error indication 00297 */ 00298 int isoburn_libburn_req(int *major, int *minor, int *micro); 00299 00300 00301 /** These three release version numbers tell the revision of this header file 00302 and of the API it describes. They are memorized by applications at build 00303 time. 00304 @since 0.1.0 00305 */ 00306 #define isoburn_header_version_major 1 00307 #define isoburn_header_version_minor 2 00308 #define isoburn_header_version_micro 8 00309 /** Note: 00310 Above version numbers are also recorded in configure.ac because libtool 00311 wants them as parameters at build time. 00312 For the library compatibility check, ISOBURN_*_VERSION in configure.ac 00313 are not decisive. Only the three numbers here do matter. 00314 */ 00315 /** Usage discussion: 00316 00317 Some developers of the libburnia project have differing 00318 opinions how to ensure the compatibility of libaries 00319 and applications. 00320 00321 It is about whether to use at compile time and at runtime 00322 the version numbers isoburn_header_version_* provided here. 00323 Thomas Schmitt advises to use them. 00324 Vreixo Formoso advises to use other means. 00325 00326 At compile time: 00327 00328 Vreixo Formoso advises to leave proper version matching 00329 to properly programmed checks in the the application's 00330 build system, which will eventually refuse compilation. 00331 00332 Thomas Schmitt advises to use the macros defined here 00333 for comparison with the application's requirements of 00334 library revisions and to eventually break compilation. 00335 00336 Both advises are combinable. I.e. be master of your 00337 build system and have #if checks in the source code 00338 of your application, nevertheless. 00339 00340 At runtime (via *_is_compatible()): 00341 00342 Vreixo Formoso advises to compare the application's 00343 requirements of library revisions with the runtime 00344 library. This is to allow runtime libraries which are 00345 young enough for the application but too old for 00346 the lib*.h files seen at compile time. 00347 00348 Thomas Schmitt advises to compare the header 00349 revisions defined here with the runtime library. 00350 This is to enforce a strictly monotonous chain 00351 of revisions from app to header to library, 00352 at the cost of excluding some older libraries. 00353 00354 These two advises are mutually exclusive. 00355 00356 ----------------------------------------------------- 00357 00358 For an implementation of the Thomas Schmitt approach, 00359 see libisoburn/burn_wrap.c : isoburn_initialize() 00360 This connects libisoburn as "application" with libisofs 00361 as "library". 00362 00363 The compatible part of Vreixo Formoso's approach is implemented 00364 in configure.ac LIBBURN_REQUIRED, LIBISOFS_REQUIRED. 00365 In isoburn_initialize() it would rather test by 00366 iso_lib_is_compatible(isoburn_libisofs_req_major,... 00367 than by 00368 iso_lib_is_compatible(iso_lib_header_version_major,... 00369 and would leave out the ugly compile time traps. 00370 00371 */ 00372 00373 00374 /** Announce to the library an application provided method for immediate 00375 delivery of messages. It is used when no drive is affected directly or 00376 if the drive has no own msgs_submit() method attached by 00377 isoburn_drive_set_msgs_submit. 00378 If no method is preset or if the method is set to NULL then libisoburn 00379 delivers its messages through the message queue of libburn. 00380 @param msgs_submit The function call which implements the method 00381 @param submit_handle Handle to be used as first argument of msgs_submit 00382 @param submit_flag Flag to be used as last argument of msgs_submit 00383 @param flag Unused yet, submit 0 00384 @since 0.2.0 00385 */ 00386 int isoburn_set_msgs_submit(int (*msgs_submit)(void *handle, int error_code, 00387 char msg_text[], int os_errno, 00388 char severity[], int flag), 00389 void *submit_handle, int submit_flag, int flag); 00390 00391 00392 /** Acquire a target drive by its filesystem path resp. libburn persistent 00393 address. 00394 Wrapper for: burn_drive_scan_and_grab() 00395 @since 0.1.0 00396 @param drive_infos On success returns a one element array with the drive 00397 (cdrom/burner). Thus use with driveno 0 only. On failure 00398 the array has no valid elements at all. 00399 The returned array should be freed via burn_drive_info_free() 00400 when the drive is no longer needed. But before this is done 00401 one has to call isoburn_drive_release(drive_infos[0].drive). 00402 @param adr The persistent address of the desired drive. 00403 @param load 1 attempt to load the disc tray. 0 no attempt,rather failure. 00404 @return 1 = success , 0 = drive not found , <0 = other error 00405 */ 00406 int isoburn_drive_scan_and_grab(struct burn_drive_info *drive_infos[], 00407 char* adr, int load); 00408 00409 00410 /** Acquire a target drive by its filesystem path resp. libburn persistent 00411 address. This is a modern successor of isoburn_drive_scan_and_grab(). 00412 Wrapper for: burn_drive_scan_and_grab() 00413 @since 0.1.2 00414 @param drive_infos On success returns a one element array with the drive 00415 (cdrom/burner). Thus use with driveno 0 only. On failure 00416 the array has no valid elements at all. 00417 The returned array should be freed via burn_drive_info_free() 00418 when the drive is no longer needed. But before this is done 00419 one has to call isoburn_drive_release(drive_infos[0].drive). 00420 @param adr The persistent address of the desired drive. 00421 @param flag bit0= attempt to load the disc tray. 00422 Else: failure if not loaded. 00423 bit1= regard overwriteable media as blank 00424 bit2= if the drive is a regular disk file: 00425 truncate it to the write start address when writing 00426 begins 00427 bit3= if the drive reports a read-only profile try to read 00428 table of content by scanning for ISO image headers. 00429 (depending on media type and drive this might 00430 help or it might make the resulting toc even worse) 00431 bit4= do not emulate table of content on overwriteable media 00432 bit5= ignore ACL from external filesystems 00433 bit6= ignore POSIX Extended Attributes from external 00434 filesystems 00435 bit7= pretend read-only profile and scan for table of content 00436 bit8= re-assess already acquired (*drive_infos)[0] rather 00437 than aquiring adr 00438 @since 1.1.8 00439 bit9= when scanning for ISO 9660 sessions by bit3: 00440 Do not demand a valid superblock at LBA 0, ignore it in 00441 favor of one at LBA 32, and scan until end of medium. 00442 @since 1.2.6 00443 @return 1 = success , 0 = drive not found , <0 = other error 00444 00445 Please excuse the typo "aquire" in the function name. 00446 */ 00447 int isoburn_drive_aquire(struct burn_drive_info *drive_infos[], 00448 char* adr, int flag); 00449 00450 /** Acquire a drive from the burn_drive_info[] array which was obtained by 00451 a previous call of burn_drive_scan(). 00452 Wrapper for: burn_drive_grab() 00453 @since 0.1.0 00454 @param drive The drive to grab. E.g. drive_infos[1].drive . 00455 Call isoburn_drive_release(drive) when it it no longer needed. 00456 @param load 1 attempt to load the disc tray. 0 no attempt, rather failure. 00457 @return 1 success, <=0 failure 00458 */ 00459 int isoburn_drive_grab(struct burn_drive *drive, int load); 00460 00461 00462 /** Attach to a drive an application provided method for immediate 00463 delivery of messages. 00464 If no method is set or if the method is set to NULL then libisoburn 00465 delivers messages of the drive through the global msgs_submit() method 00466 set by isoburn_set_msgs_submiti() or by the message queue of libburn. 00467 @since 0.2.0 00468 @param d The drive to which this function, handle and flag shall apply 00469 @param msgs_submit The function call which implements the method 00470 @param submit_handle Handle to be used as first argument of msgs_submit 00471 @param submit_flag Flag to be used as last argument of msgs_submit 00472 @param flag Unused yet, submit 0 00473 */ 00474 int isoburn_drive_set_msgs_submit(struct burn_drive *d, 00475 int (*msgs_submit)(void *handle, int error_code, 00476 char msg_text[], int os_errno, 00477 char severity[], int flag), 00478 void *submit_handle, int submit_flag, int flag); 00479 00480 00481 /** Inquire the medium status. Expect the whole spectrum of libburn BURN_DISC_* 00482 with multi-session media. Emulated states with random access media are 00483 BURN_DISC_BLANK and BURN_DISC_APPENDABLE. 00484 Wrapper for: burn_disc_get_status() 00485 @since 0.1.0 00486 @param drive The drive to inquire. 00487 @return The status of the drive, or what kind of disc is in it. 00488 Note: BURN_DISC_UNGRABBED indicates wrong API usage 00489 */ 00490 #ifdef __cplusplus 00491 enum burn::burn_disc_status isoburn_disc_get_status(struct burn_drive *drive); 00492 #else 00493 enum burn_disc_status isoburn_disc_get_status(struct burn_drive *drive); 00494 #endif 00495 00496 00497 /** Tells whether the medium can be treated by isoburn_disc_erase(). 00498 Wrapper for: burn_disc_erasable() 00499 @since 0.1.0 00500 @param d The drive to inquire. 00501 @return 0=not erasable , else erasable 00502 */ 00503 int isoburn_disc_erasable(struct burn_drive *d); 00504 00505 00506 /** Mark the medium as blank. With multi-session media this will call 00507 burn_disc_erase(). With random access media, an eventual ISO-9660 00508 filesystem will get invalidated by altering its start blocks on the medium. 00509 In case of success, the medium is in status BURN_DISC_BLANK afterwards. 00510 Wrapper for: burn_disc_erase() 00511 @since 0.1.0 00512 @param drive The drive with the medium to erase. 00513 @param fast 1=fast erase, 0=thorough erase 00514 With DVD-RW, fast erase yields media incapable of multi-session. 00515 */ 00516 void isoburn_disc_erase(struct burn_drive *drive, int fast); 00517 00518 00519 /** Set up isoburn_disc_get_msc1() to return a fabricated value. 00520 This makes only sense between aquiring the drive and reading the 00521 image. After isoburn_read_image() it will confuse the coordination 00522 of libisoburn and libisofs. 00523 Note: Sessions and tracks are counted beginning with 1, not with 0. 00524 @since 0.1.6 00525 @param d The drive where msc1 is to be set 00526 @param adr_mode Determines how to interpret adr_value and to set msc1. 00527 If adr_value shall represent a number then decimal ASCII 00528 digits are expected. 00529 0= start lba of last session in TOC, ignore adr_value 00530 1= start lba of session number given by adr_value 00531 2= start lba of track given number by adr_value 00532 3= adr_value itself is the lba to be used 00533 4= start lba of last session with volume id 00534 given by adr_value 00535 @param adr_value A string describing the value to be eventually used. 00536 @param flag Bitfield for control purposes. 00537 bit0= @since 0.2.2 00538 with adr_mode 3: adr_value might be 16 blocks too high 00539 (e.g. -C stemming from growisofs). Probe for ISO head 00540 at adr_value-16 and eventually adjust setting. 00541 bit1= insist in seeing a disc object with at least one session 00542 bit2= with adr_mode 4: use adr_value as regular expression 00543 */ 00544 int isoburn_set_msc1(struct burn_drive *d, int adr_mode, char *adr_value, 00545 int flag); 00546 00547 00548 /* ----------------------------------------------------------------------- */ 00549 /* 00550 00551 Wrappers for emulation of TOC on overwriteable media 00552 00553 Media which match the overwriteable usage model lack of a history of sessions 00554 and tracks. libburn will not even hand out a burn_disc object for them and 00555 always declare them blank. libisoburn checks for a valid ISO filesystem 00556 header at LBA 0 and eventually declares them appendable. 00557 Nevertheless one can only determine an upper limit of the size of the overall 00558 image (by isoburn_get_min_start_byte()) but not a list of stored sessions 00559 and their LBAs, as it is possible with true multi-session media. 00560 00561 The following wrappers add the capability to obtain a session and track TOC 00562 from emulated multi-session images on overwriteables if the first session 00563 was written by libisoburn-0.1.6 or later (i.e. with a header copy at LBA 32). 00564 00565 Be aware that the structs emitted by these isoburn calls are not compatible 00566 with the libburn structs. I.e. you may use them only with isoburn_toc_* 00567 calls. 00568 isoburn_toc_disc needs to be freed after use. isoburn_toc_session and 00569 isoburn_toc_track vanish together with their isoburn_toc_disc. 00570 */ 00571 00572 /* Opaque handles to media, session, track */ 00573 struct isoburn_toc_disc; 00574 struct isoburn_toc_session; 00575 struct isoburn_toc_track; 00576 00577 00578 /** Obtain a master handle for the table of content. 00579 This handle governs allocated resources which have to be released by 00580 isoburn_toc_disc_free() when no longer needed. 00581 Wrapper for: burn_drive_get_disc() 00582 @since 0.1.6 00583 @param d The drive with the medium to inspect 00584 @return NULL in case there is no content info, else it is a valid handle 00585 */ 00586 struct isoburn_toc_disc *isoburn_toc_drive_get_disc(struct burn_drive *d); 00587 00588 00589 /** Tell the number of 2048 byte blocks covered by the table of content. 00590 This number includes the eventual gaps between sessions and tracks. 00591 So this call is not really a wrapper for burn_disc_get_sectors(). 00592 @since 0.1.6 00593 @param disc The master handle of the medium 00594 @return Number of blocks, <=0 indicates unknown or unreadable state 00595 */ 00596 int isoburn_toc_disc_get_sectors(struct isoburn_toc_disc *disc); 00597 00598 00599 /** Get the array of session handles and the number of complete sessions 00600 from the table of content. 00601 The result array contains *num + isoburn_toc_disc_get_incmpl_sess() 00602 elements. All above *num are incomplete sessions. 00603 Typically there is at most one incomplete session with no track. 00604 Wrapper for: burn_disc_get_sessions() 00605 @since 0.1.6 00606 @param disc The master handle of the medium 00607 @param num returns the number of sessions in the array 00608 @return the address of the array of session handles 00609 */ 00610 struct isoburn_toc_session **isoburn_toc_disc_get_sessions( 00611 struct isoburn_toc_disc *disc, int *num); 00612 00613 00614 /** Obtain the number of incomplete sessions which are recorded in the 00615 result array of isoburn_toc_disc_get_sessions() after the complete 00616 sessions. See above. 00617 @since 1.2.8 00618 @param disc The master handle of the medium 00619 @return the number of incomplete sessions 00620 */ 00621 int isoburn_toc_disc_get_incmpl_sess(struct isoburn_toc_disc *disc); 00622 00623 00624 /** Tell the number of 2048 byte blocks covered by a particular session. 00625 Wrapper for: burn_session_get_sectors() 00626 @since 0.1.6 00627 @param s The session handle 00628 @return number of blocks, <=0 indicates unknown or unreadable state 00629 */ 00630 int isoburn_toc_session_get_sectors(struct isoburn_toc_session *s); 00631 00632 00633 /** Obtain a copy of the entry which describes the end of a particular session. 00634 Wrapper for: burn_session_get_leadout_entry() 00635 @since 0.1.6 00636 @param s The session handle 00637 @param entry A pointer to memory provided by the caller. It will be filled 00638 with info according to struct burn_toc_entry as defined 00639 in libburn.h 00640 */ 00641 void isoburn_toc_session_get_leadout_entry(struct isoburn_toc_session *s, 00642 struct burn_toc_entry *entry); 00643 00644 00645 /** Get the array of track handles from a particular session. 00646 Wrapper for: burn_session_get_tracks() 00647 @since 0.1.6 00648 @param s The session handle 00649 @param num returns the number of tracks in the array 00650 @return the address of the array of track handles, 00651 NULL if no tracks are registered with session s 00652 */ 00653 struct isoburn_toc_track **isoburn_toc_session_get_tracks( 00654 struct isoburn_toc_session *s, int *num); 00655 00656 00657 /** Obtain a copy of the entry which describes a particular track. 00658 Wrapper for: burn_track_get_entry() 00659 @since 0.1.6 00660 @param t The track handle 00661 @param entry A pointer to memory provided by the caller. It will be filled 00662 with info according to struct burn_toc_entry as defined 00663 in libburn.h 00664 */ 00665 void isoburn_toc_track_get_entry(struct isoburn_toc_track *t, 00666 struct burn_toc_entry *entry); 00667 00668 00669 /** Obtain eventual ISO image parameters of an emulated track. This info was 00670 gained with much effort and thus gets cached in the track object. 00671 If this call returns 1 then one can save a call of isoburn_read_iso_head() 00672 with return mode 1 which could cause an expensive read operation. 00673 @since 0.4.0 00674 @param t The track handle 00675 @param start_lba Returns the start address of the ISO session 00676 @param image_blocks Returns the number of 2048 bytes blocks 00677 @param volid Caller provided memory for the volume id 00678 @param flag unused yet, submit 0 00679 @return 0= not an emulated ISO session , 1= reply is valid 00680 */ 00681 int isoburn_toc_track_get_emul(struct isoburn_toc_track *t, int *start_lba, 00682 int *image_blocks, char volid[33], int flag); 00683 00684 00685 00686 /** Release the memory associated with a master handle of a medium. 00687 The handle is invalid afterwards and may not be used any more. 00688 Wrapper for: burn_disc_free() 00689 @since 0.1.6 00690 @param disc The master handle of the medium 00691 */ 00692 void isoburn_toc_disc_free(struct isoburn_toc_disc *disc); 00693 00694 00695 /** Try whether the data at the given address look like a ISO 9660 00696 image header and obtain its alleged size. Depending on the info mode 00697 one other string of text information can be retrieved too. 00698 @since 0.1.6 00699 @param d The drive with the medium to inspect 00700 @param lba The block number from where to read 00701 @param image_blocks Returns the number of 2048 bytes blocks in the session 00702 @param info Caller provided memory, enough to take eventual info reply 00703 @param flag bit0-7: info return mode 00704 0= do not return anything in info (do not even touch it) 00705 1= copy volume id to info (info needs 33 bytes) 00706 2= @since 0.2.2 : 00707 copy 64 kB header to info (needs 65536 bytes) 00708 bit13= @since 0.2.2: 00709 Do not read head from medium but use first 64 kB from 00710 info. 00711 In this case it is permissible to submit d == NULL. 00712 bit14= check both half buffers (not only second) 00713 return 2 if found in first block 00714 bit15= return -1 on read error 00715 @return >0 seems to be a valid ISO image, 0 format not recognized, <0 error 00716 */ 00717 int isoburn_read_iso_head(struct burn_drive *d, int lba, 00718 int *image_blocks, char *info, int flag); 00719 00720 00721 /** Try to convert the given entity address into various entity addresses 00722 which would describe it. 00723 Note: Sessions and tracks are counted beginning with 1, not with 0. 00724 @since 0.3.2 00725 @param d The drive where msc1 is to be set 00726 @param adr_mode Determines how to interpret the input adr_value. 00727 If adr_value shall represent a number then decimal ASCII 00728 digits are expected. 00729 0= start lba of last session in TOC, ignore adr_value 00730 1= start lba of session number given by adr_value 00731 2= start lba of track given number by adr_value 00732 3= adr_value itself is the lba to be used 00733 4= start lba of last session with volume id 00734 given by adr_value 00735 @param adr_value A string describing the value to be eventually used. 00736 @param lba returns the block address of the entity, -1 means invalid 00737 @param track returns the track number of the entity, -1 means invalid 00738 @param session returns the session number of the entity, -1 means invalid 00739 @param volid returns the volume id of the entity if it is a ISO session 00740 @param flag Bitfield for control purposes. 00741 bit2= with adr_mode 4: use adr_value as regular expression 00742 @return <=0 error , 1 ok, ISO session, 2 ok, not an ISO session 00743 */ 00744 int isoburn_get_mount_params(struct burn_drive *d, 00745 int adr_mode, char *adr_value, 00746 int *lba, int *track, int *session, 00747 char volid[33], int flag); 00748 00749 00750 /* ----------------------------------------------------------------------- */ 00751 /* 00752 00753 Options for image reading. 00754 00755 An application shall create an option set object by isoburn_ropt_new(), 00756 program it by isoburn_ropt_set_*(), use it with isoburn_read_image(), 00757 and finally delete it by isoburn_ropt_destroy(). 00758 00759 */ 00760 /* ----------------------------------------------------------------------- */ 00761 00762 struct isoburn_read_opts; 00763 00764 /** Produces a set of image read options, initialized with default values. 00765 @since 0.1.0 00766 @param o the newly created option set object 00767 @param flag Bitfield for control purposes. Submit 0 for now. 00768 @return 1=ok , <0 = failure 00769 */ 00770 int isoburn_ropt_new(struct isoburn_read_opts **o, int flag); 00771 00772 00773 /** Deletes an option set which was created by isoburn_ropt_new(). 00774 @since 0.1.0 00775 @param o The option set to work on 00776 @param flag Bitfield for control purposes. Submit 0 for now. 00777 @return 1= **o destroyed , 0= *o was already NULL (harmless) 00778 */ 00779 int isoburn_ropt_destroy(struct isoburn_read_opts **o, int flag); 00780 00781 /** Sets the size and granularity of the cache which libisoburn provides to 00782 libisofs for reading of ISO image data. This cache consists of several 00783 tiles which are buffers of a given size. The ISO image is divided into 00784 virtual tiles of that size. A cache tile may hold an in-memory copy 00785 of such a virtual image tile. 00786 When libisofs requests to read a block, then first the cache is inquired 00787 whether it holds that block. If not, then the block is read via libburn 00788 together with its neighbors in their virtual image tile into a free 00789 cache tile. If no cache tile is free, then the one will be re-used which 00790 has the longest time of not being hit by a read attempt. 00791 00792 A larger cache might speed up image loading by reducing the number of 00793 libburn read calls on the directory tree. It might also help with 00794 reading the content of many small files, if for some reason it is not an 00795 option to sort access by LBA. 00796 Caching will not provide much benefit with libburn "stdio:" drives, 00797 because the operating system is supposed to provide the same speed-up 00798 in a more flexible way. 00799 00800 @since 1.2.2 00801 @param o The option set to work on. 00802 It is permissible to submit NULL in order to just 00803 have the parameters tested. 00804 @param cache_tiles Number of tiles in the cache. Not less than 1. 00805 Default is 32. 00806 @param tile_blocks Number of blocks per tile. Must be a power of 2. 00807 Default is 32. 00808 cache_tiles * tile_blocks * 2048 must not exceed 00809 1073741824 (= 1 GiB). 00810 @param flag Bitfield for control purposes. Unused yet. Submit 0. 00811 @return <=0 error , >0 ok 00812 */ 00813 int isoburn_ropt_set_data_cache(struct isoburn_read_opts *o, 00814 int cache_tiles, int tile_blocks, int flag); 00815 00816 /** Inquire the current settings of isoburn_set_data_cache(). 00817 @since 1.2.2 00818 @param o The option set to work on. 00819 NULL has the same effect as flag bit0. 00820 @param cache_tiles Will return the number of tiles in the cache. 00821 @param tile_blocks Will return the number of blocks per tile. 00822 @param set_flag Will return control bits. None are defined yet. 00823 @param flag Bitfield for control purposes 00824 bit0= return default values rather than current ones 00825 @return <=0 error , >0 reply is valid 00826 */ 00827 int isoburn_ropt_get_data_cache(struct isoburn_read_opts *o, 00828 int *cache_tiles, int *tile_blocks, 00829 int *set_flag, int flag); 00830 00831 00832 /** Which existing ISO 9660 extensions in the image to read or not to read. 00833 Whether to read the content of an existing image at all. 00834 The bits can be combined by | resp. inquired by &. 00835 @since 0.1.0 00836 @param ext Bitfield: 00837 bit0= norock 00838 Do not read Rock Ridge extensions 00839 bit1= nojoliet 00840 Do not read Joliet extensions 00841 bit2= noiso1999 00842 Do not read ISO 9660:1999 enhanced tree 00843 bit3= preferjoliet 00844 When both Joliet and RR extensions are present, the RR 00845 tree is used. If you prefer using Joliet, set this to 1. 00846 bit4= pretend_blank 00847 Always create empty image.Ignore any image on input drive. 00848 bit5= noaaip 00849 @since 0.3.4 00850 Do not load AAIP information from image. This information 00851 eventually contains ACL or XFS-style Extended Attributes. 00852 bit6= noacl 00853 @since 0.3.4 00854 Do not obtain ACL from external filesystem objects (e.g. 00855 local filesystem files). 00856 bit7= noea 00857 @since 0.3.4 00858 Do not obtain XFS-style Extended Attributes from external 00859 filesystem objects (e.g. local filesystem files). 00860 bit8= noino 00861 @since 0.4.0 00862 Do not load eventual inode numbers from RRIP entry PX, 00863 but generate a new unique inode number for each imported 00864 IsoNode object. 00865 PX inode numbers allow to mark families of hardlinks by 00866 giving all family members the same inode number. libisofs 00867 keeps the PX inode numbers unaltered when IsoNode objects 00868 get written into an ISO image. 00869 bit9= nomd5 00870 @since 0.4.2 00871 Do not load the eventual MD5 checksum array. 00872 Do not check eventual session_md5 tags. 00873 bit10= nomd5tag 00874 @since 1.0.4 00875 Do not check eventual session_md5 tags although bit9 00876 is not set. 00877 @return 1 success, <=0 failure 00878 */ 00879 #define isoburn_ropt_norock 1 00880 #define isoburn_ropt_nojoliet 2 00881 #define isoburn_ropt_noiso1999 4 00882 #define isoburn_ropt_preferjoliet 8 00883 #define isoburn_ropt_pretend_blank 16 00884 #define isoburn_ropt_noaaip 32 00885 #define isoburn_ropt_noacl 64 00886 #define isoburn_ropt_noea 128 00887 #define isoburn_ropt_noino 256 00888 #define isoburn_ropt_nomd5 512 00889 #define isoburn_ropt_nomd5tag 1024 00890 00891 int isoburn_ropt_set_extensions(struct isoburn_read_opts *o, int ext); 00892 int isoburn_ropt_get_extensions(struct isoburn_read_opts *o, int *ext); 00893 00894 00895 /** Default attributes to use if no RockRidge extension gets loaded. 00896 @since 0.1.0 00897 @param o The option set to work on 00898 @param uid user id number (see /etc/passwd) 00899 @param gid group id number (see /etc/group) 00900 @param mode permissions (not file type) as of man 2 stat. 00901 With directories, r-permissions will automatically imply 00902 x-permissions. See isoburn_ropt_set_default_dirperms() below. 00903 @return 1 success, <=0 failure 00904 */ 00905 int isoburn_ropt_set_default_perms(struct isoburn_read_opts *o, 00906 uid_t uid, gid_t gid, mode_t mode); 00907 int isoburn_ropt_get_default_perms(struct isoburn_read_opts *o, 00908 uid_t *uid, gid_t *gid, mode_t *mode); 00909 00910 /** Default attributes to use on directories if no RockRidge extension 00911 gets loaded. 00912 Above call isoburn_ropt_set_default_perms() automatically adds 00913 x-permissions to r-permissions for directories. This call here may 00914 be done afterwards to set independend permissions for directories, 00915 especially to override the automatically added x-permissions. 00916 @since 0.1.0 00917 @param o The option set to work on 00918 @param mode permissions (not file type) as of man 2 stat. 00919 @return 1 success, <=0 failure 00920 */ 00921 int isoburn_ropt_set_default_dirperms(struct isoburn_read_opts *o, 00922 mode_t mode); 00923 int isoburn_ropt_get_default_dirperms(struct isoburn_read_opts *o, 00924 mode_t *mode); 00925 00926 00927 /** Set the character set for reading RR file names from ISO images. 00928 @since 0.1.0 00929 @param o The option set to work on 00930 @param input_charset Set this to NULL to use the default locale charset 00931 For selecting a particular character set, submit its 00932 name, e.g. as listed by program iconv -l. 00933 Example: "UTF-8". 00934 @return 1 success, <=0 failure 00935 */ 00936 int isoburn_ropt_set_input_charset(struct isoburn_read_opts *o, 00937 char *input_charset); 00938 int isoburn_ropt_get_input_charset(struct isoburn_read_opts *o, 00939 char **input_charset); 00940 00941 00942 /** 00943 Enable or disable methods to automatically choose an input charset. 00944 This eventually overrides the name set via isoburn_ropt_set_input_charset() 00945 @since 0.3.8 00946 @param o The option set to work on 00947 @param mode Bitfield for control purposes: 00948 bit0= allow to set the input character set automatically from 00949 attribute "isofs.cs" of root directory. 00950 Submit any other bits with value 0. 00951 @return 1 success, <=0 failure 00952 */ 00953 int isoburn_ropt_set_auto_incharset(struct isoburn_read_opts *o, int mode); 00954 int isoburn_ropt_get_auto_incharset(struct isoburn_read_opts *o, int *mode); 00955 00956 00957 /** Control an offset to be applied to all block address pointers in the ISO 00958 image in order to compensate for an eventual displacement of the image 00959 relative to the start block address for which it was produced. 00960 E.g. if track number 2 from CD gets copied into a disk file and shall then 00961 be loaded as ISO filesystem, then the directory tree and all data file 00962 content of the track copy will become readable by setting the track start 00963 address as displacement and -1 as displacement_sign. 00964 Data file content outside the track will of course not be accessible and 00965 eventually produce read errors. 00966 @since 0.6.6 00967 @param o The option set to work on 00968 @param displacement 0 or a positive number 00969 @param displacement_sign Determines wether to add or subtract displacement 00970 to block addresses before applying them to the 00971 storage object for reading: 00972 +1 = add , -1= subtract , else keep unaltered 00973 */ 00974 int isoburn_ropt_set_displacement(struct isoburn_read_opts *o, 00975 uint32_t displacement, int displacement_sign); 00976 int isoburn_ropt_get_displacement(struct isoburn_read_opts *o, 00977 uint32_t *displacement, int *displacement_sign); 00978 00979 /* If you get here because of a compilation error like 00980 00981 /usr/include/libisoburn/libisoburn.h:895: error: 00982 expected declaration specifiers or '...' before 'uint32_t' 00983 00984 then see above paragraph "Application Constraints" about the definition 00985 of uint32_t. 00986 */ 00987 00988 00989 /** After calling function isoburn_read_image() there are informations 00990 available in the option set. 00991 This info can be obtained as bits in parameter has_what. Like: 00992 joliet_available = (has_what & isoburn_ropt_has_joliet); 00993 @since 0.1.0 00994 @param o The option set to work on 00995 @param size Number of image data blocks, 2048 bytes each. 00996 @param has_what Bitfield: 00997 bit0= has_rockridge 00998 RockRidge extension info is available (POSIX filesystem) 00999 bit1= has_joliet 01000 Joliet extension info is available (suitable for MS-Windows) 01001 bit2= has_iso1999 01002 ISO version 2 Enhanced Volume Descriptor is available. 01003 This is rather exotic. 01004 bit3= has_el_torito 01005 El-Torito boot record is present 01006 @return 1 success, <=0 failure 01007 */ 01008 #define isoburn_ropt_has_rockridge 1 01009 #define isoburn_ropt_has_joliet 2 01010 #define isoburn_ropt_has_iso1999 4 01011 #define isoburn_ropt_has_el_torito 8 01012 01013 int isoburn_ropt_get_size_what(struct isoburn_read_opts *o, 01014 uint32_t *size, int *has_what); 01015 01016 /* ts A90122 */ 01017 /* >>> to be implemented: 01018 #define isoburn_ropt_has_acl 64 01019 #define isoburn_ropt_has_ea 128 01020 */ 01021 01022 01023 01024 /* ----------------------------------------------------------------------- */ 01025 /* End of Options for image reading */ 01026 /* ----------------------------------------------------------------------- */ 01027 01028 /* ----------------------------------------------------------------------- */ 01029 /* 01030 01031 Options for image generation by libisofs and image transport to libburn. 01032 01033 An application shall create an option set by isoburn_igopt_new(), 01034 program it by isoburn_igopt_set_*(), use it with either 01035 isoburn_prepare_new_image() or isoburn_prepare_disc(), and finally delete 01036 it by isoburn_igopt_destroy(). 01037 01038 */ 01039 /* ----------------------------------------------------------------------- */ 01040 01041 struct isoburn_imgen_opts; 01042 01043 /** Produces a set of generation and transfer options, initialized with default 01044 values. 01045 @since 0.1.0 01046 @param o the newly created option set object 01047 @param flag Bitfield for control purposes. Submit 0 for now. 01048 @return 1=ok , <0 = failure 01049 */ 01050 int isoburn_igopt_new(struct isoburn_imgen_opts **o, int flag); 01051 01052 01053 /** Deletes an option set which was created by isoburn_igopt_new(). 01054 @since 0.1.0 01055 @param o The option set to give up 01056 @param flag Bitfield for control purposes. Submit 0 for now. 01057 @return 1= **o destroyed , 0= *o was already NULL (harmless) 01058 */ 01059 int isoburn_igopt_destroy(struct isoburn_imgen_opts **o, int flag); 01060 01061 01062 /** ISO level to write at. 01063 @since 0.1.0 01064 @param o The option set to work on 01065 @param level is a term of the ISO 9660 standard. It should be one of: 01066 1= filenames restricted to form 8.3 01067 2= filenames allowed up to 31 characters 01068 3= file content may be larger than 4 GB - 1. 01069 @return 1 success, <=0 failure 01070 */ 01071 int isoburn_igopt_set_level(struct isoburn_imgen_opts *o, int level); 01072 int isoburn_igopt_get_level(struct isoburn_imgen_opts *o, int *level); 01073 01074 01075 /** Which extensions to support. 01076 @since 0.1.0 01077 @param o The option set to work on 01078 @param ext Bitfield: 01079 bit0= rockridge 01080 Rock Ridge extensions add POSIX file attributes like 01081 owner, group, access permissions, long filenames. Very 01082 advisable if the designed audience has Unix style systems. 01083 bit1= joliet 01084 Longer filenames for Windows systems. 01085 Weaker than RockRidge, but also readable with GNU/Linux. 01086 bit2= iso1999 01087 This is rather exotic. Better do not surprise the readers. 01088 bit3= hardlinks 01089 Enable hardlink consolidation. IsoNodes which refer to the 01090 same source object and have the same properties will get 01091 the same ISO image inode numbers. 01092 If combined with isoburn_igopt_rrip_version_1_10 below, 01093 then the PX entry layout of RRIP-1.12 will be used within 01094 RRIP-1.10 (mkisofs does this without causing visible trouble). 01095 bit5= aaip 01096 The libisofs specific SUSP based extension of ECMA-119 which 01097 can encode ACL and XFS-style Extended Attributes. 01098 bit6= session_md5 01099 @since 0.4.2 01100 Produce and write MD5 checksum tags of superblock, directory 01101 tree, and the whole session stream. 01102 bit7= file_md5 01103 @since 0.4.2 01104 Produce and write MD5 checksums for each single IsoFile. 01105 bit8= file_stability (only together with file_md5) 01106 @since 0.4.2 01107 Compute MD5 of each file before copying it into the image and 01108 compare this with the MD5 of the actual copying. If they do 01109 not match then issue MISHAP event. 01110 See also libisofs.h iso_write_opts_set_record_md5() 01111 bit9= no_emul_toc 01112 @since 0.5.8 01113 On overwriteable media or random access files do not write 01114 the first session to LBA 32 and do not copy the first 64kB 01115 of the first session to LBA 0, but rather write the first 01116 session to LBA 0 directly. 01117 bit10= will_cancel 01118 @since 0.6.6 01119 Announce to libisofs that only the image size is desired 01120 and that the write thread will be cancelled by 01121 isoburn_cancel_prepared_write() before actual image writing 01122 occurs. Without this, cancellation can cause a MISHAP event. 01123 bit11= old_empty 01124 @since 1.0.2 01125 Let symbolic links and device files point to block 0, and let 01126 empty data files point to the address of the Volume Descriptor 01127 Set Terminator. This was done by libisofs in the past. 01128 By default there is now a single dedicated block of zero bytes 01129 after the end of the directory trees, of which the address 01130 is used for all files without own content. 01131 bit12= hfsplus 01132 @since 1.2.4 01133 Produce a HFS+ partition inside the ISO image and announce it 01134 by an Apple Partition Map in the System Area. 01135 >>> GPT production ? 01136 Caution: Interferes with isoburn_igopt_set_system_area() by 01137 overwriting the first 8 bytes of the data, and 01138 several blocks of 2 KiB after the first one. 01139 bit13= fat 01140 @since 1.2.4 01141 >>> Not yet implemented. Planned to co-exist with hfsplus. 01142 Produce a FAT32 partition inside the ISO image and announce it 01143 by an MBR partition entry in the System Area. 01144 Caution: Interferes with isoburn_igopt_set_system_area() by 01145 >>> what impact ? 01146 01147 @return 1 success, <=0 failure 01148 */ 01149 #define isoburn_igopt_rockridge 1 01150 #define isoburn_igopt_joliet 2 01151 #define isoburn_igopt_iso1999 4 01152 #define isoburn_igopt_hardlinks 8 01153 #define isoburn_igopt_aaip 32 01154 #define isoburn_igopt_session_md5 64 01155 #define isoburn_igopt_file_md5 128 01156 #define isoburn_igopt_file_stability 256 01157 #define isoburn_igopt_no_emul_toc 512 01158 #define isoburn_igopt_will_cancel 1024 01159 #define isoburn_igopt_old_empty 2048 01160 #define isoburn_igopt_hfsplus 4096 01161 #define isoburn_igopt_fat 8192 01162 int isoburn_igopt_set_extensions(struct isoburn_imgen_opts *o, int ext); 01163 int isoburn_igopt_get_extensions(struct isoburn_imgen_opts *o, int *ext); 01164 01165 /** Relaxed constraints. Setting any of the bits to 1 break the specifications, 01166 but it is supposed to work on most moderns systems. Use with caution. 01167 @since 0.1.0 01168 @param o The option set to work on 01169 @param relax Bitfield: 01170 bit0= omit_version_numbers 01171 Omit the version number (";1") at the end of the 01172 ISO-9660 and Joliet identifiers. 01173 Version numbers are usually not used by readers. 01174 bit1= allow_deep_paths 01175 Allow ISO-9660 directory hierarchy to be deeper 01176 than 8 levels. 01177 bit2= allow_longer_paths 01178 Allow path in the ISO-9660 tree to have more than 01179 255 characters. 01180 bit3= max_37_char_filenames 01181 Allow a single file or directory hierarchy to have 01182 up to 37 characters. This is larger than the 31 01183 characters allowed by ISO level 2, and the extra space 01184 is taken from the version number, so this also forces 01185 omit_version_numbers. 01186 bit4= no_force_dots 01187 ISO-9660 forces filenames to have a ".", that separates 01188 file name from extension. libisofs adds it if original 01189 filename has none. Set this to 1 to prevent this 01190 behavior. 01191 bit5= allow_lowercase 01192 Allow lowercase characters in ISO-9660 filenames. 01193 By default, only uppercase characters, numbers and 01194 a few other characters are allowed. 01195 bit6= allow_full_ascii 01196 Allow all ASCII characters to be appear on an ISO-9660 01197 filename. Note that "/" and "\0" characters are never 01198 allowed, even in RR names. 01199 bit7= joliet_longer_paths 01200 Allow paths in the Joliet tree to have more than 01201 240 characters. 01202 bit8= always_gmt 01203 Write timestamps as GMT although the specs prescribe local 01204 time with eventual non-zero timezone offset. Negative 01205 timezones (west of GMT) can trigger bugs in some operating 01206 systems which typically appear in mounted ISO images as if 01207 the timezone shift from GMT was applied twice 01208 (e.g. in New York 22:36 becomes 17:36). 01209 bit9= rrip_version_1_10 01210 Write Rock Ridge info as of specification RRIP-1.10 rather 01211 than RRIP-1.12: signature "RRIP_1991A" rather than 01212 "IEEE_1282", field PX without file serial number. 01213 bit10= dir_rec_mtime 01214 Store as ECMA-119 Directory Record timestamp the mtime 01215 of the source rather than the image creation time. 01216 bit11= aaip_susp_1_10 01217 Write AAIP fields without announcing AAIP by an ER field and 01218 without distinguishing RRIP fields from the AAIP field by 01219 prefixed ES fields. This saves 5 to 10 bytes per file and 01220 might avoid problems with readers which only accept RRIP. 01221 SUSP-1.10 allows it, SUSP-1.12 frowns on it. 01222 bit12= only_iso_numbers 01223 Same as bit1 omit_version_number but restricted to the names 01224 in the eventual Joliet tree. 01225 @since 0.5.4 01226 For reasons of backward compatibility it is not possible yet 01227 to disable version numbers for ISO 9660 while enabling them 01228 for Joliet. 01229 bit13= no_j_force_dots 01230 Same as no_force_dots but affecting the names in the eventual 01231 Joliet tree rather than the ISO 9660 / ECMA-119 names. 01232 @since 0.5.4 01233 Previous versions added dots to Joliet names unconditionally. 01234 bit14= allow_dir_id_ext 01235 Convert directory names for ECMA-119 similar to other file 01236 names, but do not force a dot or add a version number. 01237 This violates ECMA-119 by allowing one "." and especially 01238 ISO level 1 by allowing DOS style 8.3 names rather than 01239 only 8 characters. 01240 (mkisofs and its clones obviously do this violation.) 01241 @since 1.0.0 01242 bit15= joliet_long_names 01243 Allow for Joliet leaf names up to 103 characters rather than 01244 up to 64. 01245 @since 1.0.6 01246 bit16= joliet_rec_mtime 01247 Like dir_rec_mtime, but for the Joliet tree. 01248 @since 1.2.0 01249 bit17= iso1999_rec_mtime 01250 Like dir_rec_mtime, but for the ISO 9660:1999 tree. 01251 @since 1.2.0 01252 bit18= allow_7bit_ascii 01253 Like allow_full_ascii, but only allowing 7-bit characters. 01254 Lowercase letters get mapped to uppercase if not 01255 allow_lowercase is set. 01256 Gets overridden if allow_full_ascii is enabled. 01257 @return 1 success, <=0 failure 01258 */ 01259 #define isoburn_igopt_omit_version_numbers 1 01260 #define isoburn_igopt_allow_deep_paths 2 01261 #define isoburn_igopt_allow_longer_paths 4 01262 #define isoburn_igopt_max_37_char_filenames 8 01263 #define isoburn_igopt_no_force_dots 16 01264 #define isoburn_igopt_allow_lowercase 32 01265 #define isoburn_igopt_allow_full_ascii 64 01266 #define isoburn_igopt_joliet_longer_paths 128 01267 #define isoburn_igopt_always_gmt 256 01268 #define isoburn_igopt_rrip_version_1_10 512 01269 #define isoburn_igopt_dir_rec_mtime 1024 01270 #define isoburn_igopt_aaip_susp_1_10 2048 01271 #define isoburn_igopt_only_iso_versions 4096 01272 #define isoburn_igopt_no_j_force_dots 8192 01273 #define isoburn_igopt_allow_dir_id_ext 16384 01274 #define isoburn_igopt_joliet_long_names 32768 01275 #define isoburn_igopt_joliet_rec_mtime 0x10000 01276 #define isoburn_igopt_iso1999_rec_mtime 0x20000 01277 #define isoburn_igopt_allow_7bit_ascii 0x40000 01278 int isoburn_igopt_set_relaxed(struct isoburn_imgen_opts *o, int relax); 01279 int isoburn_igopt_get_relaxed(struct isoburn_imgen_opts *o, int *relax); 01280 01281 01282 /** If not isoburn_igopt_allow_deep_paths is in effect, then it may become 01283 necessary to relocate directories so that no ECMA-119 file path 01284 has more than 8 components. These directories are grafted into either 01285 the root directory of the ISO image or into a dedicated relocation 01286 directory. For details see libisofs.h. 01287 Wrapper for: iso_write_opts_set_rr_reloc() 01288 @since 1.2.2 01289 @param o The option set to work on 01290 @param name The name of the relocation directory in the root directory. 01291 Do not prepend "/". An empty name or NULL will direct 01292 relocated directories into the root directory. This is the 01293 default. 01294 If the given name does not exist in the root directory when 01295 isoburn_disc_write() is called, and if there are directories 01296 at path level 8, then directory /name will be created 01297 automatically. 01298 @param flags Bitfield for control purposes. 01299 bit0= Mark the relocation directory by a Rock Ridge RE entry, 01300 if it gets created during isoburn_disc_write(). This 01301 will make it invisible for most Rock Ridge readers. 01302 bit1= not settable via API (used internally) 01303 @return > 0 success, <= 0 failure 01304 */ 01305 int isoburn_igopt_set_rr_reloc(struct isoburn_imgen_opts *o, char *name, 01306 int flags); 01307 01308 /** Obtain the settings of isoburn_igopt_set_rr_reloc(). 01309 @since 1.2.2 01310 @param o The option set to work on 01311 @param name Will return NULL or a pointer to the name of the relocation 01312 directory in the root directory. Do not alter or dispose the 01313 memory which holds this name. 01314 @param flags Will return the flags bitfield. 01315 @return > 0 success, <= 0 failure 01316 */ 01317 int isoburn_igopt_get_rr_reloc(struct isoburn_imgen_opts *o, char **name, 01318 int *flags); 01319 01320 01321 /** Caution: This option breaks any assumptions about names that 01322 are supported by ECMA-119 specifications. 01323 Try to omit any translation which would make a file name compliant to the 01324 ECMA-119 rules. This includes and exceeds omit_version_numbers, 01325 max_37_char_filenames, no_force_dots bit0, allow_full_ascii. Further it 01326 prevents the conversion from local character set to ASCII. 01327 The maximum name length is given by this call. If a filename exceeds 01328 this length or cannot be recorded untranslated for other reasons, then 01329 image production gets aborted. 01330 Currently the length limit is 96 characters, because an ECMA-119 directory 01331 record may at most have 254 bytes and up to 158 other bytes must fit into 01332 the record. Probably 96 more bytes can be made free for the name in future. 01333 @since 1.0.0 01334 @param o The option set to work on 01335 @param len 0 = disable this feature and perform name translation 01336 according to other settings. 01337 >0 = Omit any translation. Eventually abort image production 01338 if a name is longer than the given value. 01339 -1 = Like >0. Allow maximum possible length. 01340 isoburn_igopt_get_untranslated_name_len() will tell the 01341 effectively resulting value. 01342 @return >0 success, <=0 failure 01343 */ 01344 int isoburn_igopt_set_untranslated_name_len(struct isoburn_imgen_opts *o, 01345 int len); 01346 int isoburn_igopt_get_untranslated_name_len(struct isoburn_imgen_opts *o, 01347 int *len); 01348 01349 01350 /** Whether and how files should be sorted. 01351 @since 0.1.0 01352 @param o The option set to work on 01353 @param value Bitfield: bit0= sort_files_by_weight 01354 files should be sorted based on their weight. 01355 Weight is attributed to files in the image 01356 by libisofs call iso_node_set_sort_weight(). 01357 @return 1 success, <=0 failure 01358 */ 01359 #define isoburn_igopt_sort_files_by_weight 1 01360 int isoburn_igopt_set_sort_files(struct isoburn_imgen_opts *o, int value); 01361 int isoburn_igopt_get_sort_files(struct isoburn_imgen_opts *o, int *value); 01362 01363 01364 /** Set the override values for files and directory permissions. 01365 The parameters replace_* these take one of three values: 0, 1 or 2. 01366 If 0, the corresponding attribute will be kept as set in the IsoNode 01367 at the time of image generation. 01368 If set to 1, the corresponding attrib. will be changed by a default 01369 suitable value. 01370 With value 2, the attrib. will be changed with the value specified 01371 in the corresponding *_mode options. Note that only the permissions 01372 are set, the file type remains unchanged. 01373 @since 0.1.0 01374 @param o The option set to work on 01375 @param replace_dir_mode whether and how to override directories 01376 @param replace_file_mode whether and how to override files of other type 01377 @param dir_mode Mode to use on dirs with replace_dir_mode == 2. 01378 @param file_mode; Mode to use on files with replace_file_mode == 2. 01379 @return 1 success, <=0 failure 01380 */ 01381 int isoburn_igopt_set_over_mode(struct isoburn_imgen_opts *o, 01382 int replace_dir_mode, int replace_file_mode, 01383 mode_t dir_mode, mode_t file_mode); 01384 int isoburn_igopt_get_over_mode(struct isoburn_imgen_opts *o, 01385 int *replace_dir_mode, int *replace_file_mode, 01386 mode_t *dir_mode, mode_t *file_mode); 01387 01388 /** Set the override values values for group id and user id. 01389 The rules are like with above overriding of mode values. replace_* controls 01390 whether and how. The other two parameters provide values for eventual use. 01391 @since 0.1.0 01392 @param o The option set to work on 01393 @param replace_uid whether and how to override user ids 01394 @param replace_gid whether and how to override group ids 01395 @param uid User id to use with replace_uid == 2. 01396 @param gid Group id to use on files with replace_gid == 2. 01397 @return 1 success, <=0 failure 01398 */ 01399 int isoburn_igopt_set_over_ugid(struct isoburn_imgen_opts *o, 01400 int replace_uid, int replace_gid, 01401 uid_t uid, gid_t gid); 01402 int isoburn_igopt_get_over_ugid(struct isoburn_imgen_opts *o, 01403 int *replace_uid, int *replace_gid, 01404 uid_t *uid, gid_t *gid); 01405 01406 /** Set the charcter set to use for representing RR filenames in the image. 01407 @since 0.1.0 01408 @param o The option set to work on 01409 @param output_charset Set this to NULL to use the default output charset. 01410 For selecting a particular character set, submit its 01411 name, e.g. as listed by program iconv -l. 01412 Example: "UTF-8". 01413 @return 1 success, <=0 failure 01414 */ 01415 int isoburn_igopt_set_out_charset(struct isoburn_imgen_opts *o, 01416 char *output_charset); 01417 int isoburn_igopt_get_out_charset(struct isoburn_imgen_opts *o, 01418 char **output_charset); 01419 01420 01421 /** The number of bytes to be used for the fifo which decouples libisofs 01422 and libburn for better throughput and for reducing the risk of 01423 interrupting signals hitting the libburn thread which operates the 01424 MMC drive. 01425 The size will be rounded up to the next full 2048. 01426 Minimum is 64kiB, maximum is 1 GiB (but that is too much anyway). 01427 @since 0.1.0 01428 @param o The option set to work on 01429 @param fifo_size Number of bytes to use 01430 @return 1 success, <=0 failure 01431 */ 01432 int isoburn_igopt_set_fifo_size(struct isoburn_imgen_opts *o, int fifo_size); 01433 int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size); 01434 01435 01436 /** Obtain after image preparation the block address where the session will 01437 start on the medium. 01438 This value cannot be set by the application but only be inquired. 01439 @since 0.1.4 01440 @param o The option set to work on 01441 @param lba The block number of the session start on the medium. 01442 <0 means that no address has been determined yet. 01443 @return 1 success, <=0 failure 01444 */ 01445 int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba); 01446 01447 01448 /** Obtain after image preparation the lowest block address of file content 01449 data. Failure can occur if libisofs is too old to provide this information, 01450 if the result exceeds 31 bit, or if the call is made before image 01451 preparation. 01452 This value cannot be set by the application but only be inquired. 01453 @since 0.3.6 01454 @param o The option set to work on 01455 @param lba The block number of the session start on the medium. 01456 <0 means that no address has been determined yet. 01457 @return 1 success, <=0 failure 01458 */ 01459 int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba); 01460 01461 01462 /** Set resp. get parameters "name" and "timestamp" for a scdbackup checksum 01463 tag. It will be appended to the libisofs session tag if the image starts at 01464 LBA 0. See isoburn_disc_track_lba_nwa. The scdbackup tag can be used 01465 to verify the image by command scdbackup_verify $device -auto_end. 01466 See scdbackup/README appendix VERIFY for its inner details. 01467 @since 0.4.4 01468 @param o The option set to work on 01469 @param name The tag name. 80 characters max. 01470 @param timestamp A string of up to 13 characters YYMMDD.hhmmss 01471 A9 = 2009, B0 = 2010, B1 = 2011, ... C0 = 2020, ... 01472 @param tag_written Either NULL or the address of an array with at least 512 01473 characters. In the latter case the eventually produced 01474 scdbackup tag will be copied to this array when the image 01475 gets written. This call sets scdbackup_tag_written[0] = 0 01476 to mark its preliminary invalidity. 01477 @return 1 success, <=0 failure 01478 */ 01479 int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name, 01480 char *timestamp, char *tag_written); 01481 int isoburn_igopt_get_scdbackup_tag(struct isoburn_imgen_opts *o, 01482 char name[81], char timestamp[19], 01483 char **tag_written); 01484 01485 01486 /** Attach 32 kB of binary data which shall get written to the first 32 kB 01487 of the ISO image, the System Area. 01488 options can cause manipulations of these data before writing happens. 01489 If system area data are giveni or options bit0 is set, then bit1 of 01490 el_torito_set_isolinux_options() is automatically disabled. 01491 @since 0.5.4 01492 @param o The option set to work on 01493 @param data Either NULL or 32 kB of data. Do not submit less bytes ! 01494 @param options Can cause manipulations of submitted data before they 01495 get written: 01496 bit0= apply a --protective-msdos-label as of grub-mkisofs. 01497 This means to patch bytes 446 to 512 of the system 01498 area so that one partition is defined which begins 01499 at the second 512-byte block of the image and ends 01500 where the image ends. 01501 This works with and without system_area_data. 01502 bit1= apply isohybrid MBR patching to the system area. 01503 This works only with system area data from 01504 SYSLINUX plus an ISOLINUX boot image (see 01505 iso_image_set_boot_image()) and only if not bit0 01506 is set. 01507 bit2-7= System area type 01508 0= with bit0 or bit1: MBR 01509 else: unspecified type 01510 @since 0.6.4 01511 1= MIPS Big Endian Volume Header 01512 Submit up to 15 MIPS Big Endian boot files by 01513 iso_image_add_mips_boot_file() of libisofs. 01514 This will overwrite the first 512 bytes of 01515 the submitted data. 01516 2= DEC Boot Block for MIPS Little Endian 01517 The first boot file submitted by 01518 iso_image_add_mips_boot_file() will be activated. 01519 This will overwrite the first 512 bytes of 01520 the submitted data. 01521 @since 0.6.6 01522 3= SUN Disk Label for SUN SPARC 01523 Submit up to 7 SPARC boot images by 01524 isoburn_igopt_set_partition_img() for partition 01525 numbers 2 to 8. 01526 This will overwrite the first 512 bytes of 01527 the submitted data. 01528 bit8-9= Only with System area type 0 = MBR 01529 @since 1.0.4 01530 Cylinder alignment mode eventually pads the image 01531 to make it end at a cylinder boundary. 01532 0 = auto (align if bit1) 01533 1 = always align to cylinder boundary 01534 2 = never align to cylinder boundary 01535 bit10-13= System area sub type 01536 @since 1.2.4 01537 With type 0 = MBR: 01538 Gets overridden by bit0 and bit1. 01539 0 = no particular sub type 01540 1 = CHRP: A single MBR partition of type 0x96 01541 covers the ISO image. Not compatible with 01542 any other feature which needs to have own 01543 MBR partition entries. 01544 @return 1 success, 0 no data to get, <0 failure 01545 */ 01546 int isoburn_igopt_set_system_area(struct isoburn_imgen_opts *o, 01547 char data[32768], int options); 01548 int isoburn_igopt_get_system_area(struct isoburn_imgen_opts *o, 01549 char data[32768], int *options); 01550 01551 /** Control production of a second set of volume descriptors (superblock) 01552 and directory trees, together with a partition table in the MBR where the 01553 first partition has non-zero start address and the others are zeroed. 01554 The first partition stretches to the end of the whole ISO image. 01555 The additional volume descriptor set and trees will allow to mount the 01556 ISO image at the start of the first partition, while it is still possible 01557 to mount it via the normal first volume descriptor set and tree at the 01558 start of the image resp. storage device. 01559 This makes few sense on optical media. But on USB sticks it creates a 01560 conventional partition table which makes it mountable on e.g. Linux via 01561 /dev/sdb and /dev/sdb1 alike. 01562 @since 0.6.2 01563 @param opts 01564 The option set to be manipulated. 01565 @param block_offset_2k 01566 The offset of the partition start relative to device start. 01567 This is counted in 2 kB blocks. The partition table will show the 01568 according number of 512 byte sectors. 01569 Default is 0 which causes no second set and trees. 01570 If it is not 0 then it must not be smaller than 16. 01571 @param secs_512_per_head 01572 Number of 512 byte sectors per head. 1 to 63. 0=automatic. 01573 @param heads_per_cyl 01574 Number of heads per cylinder. 1 to 255. 0=automatic. 01575 @return 1 success, <=0 failure 01576 */ 01577 int isoburn_igopt_set_part_offset(struct isoburn_imgen_opts *opts, 01578 uint32_t block_offset_2k, 01579 int secs_512_per_head, int heads_per_cyl); 01580 int isoburn_igopt_get_part_offset(struct isoburn_imgen_opts *opts, 01581 uint32_t *block_offset_2k, 01582 int *secs_512_per_head, int *heads_per_cyl); 01583 01584 01585 /** Explicitely set the four timestamps of the emerging ISO image. 01586 Default with all parameters is 0. 01587 @since 0.5.4 01588 @param opts 01589 The option set to work on 01590 @param creation_time 01591 ECMA-119 Volume Creation Date and Time 01592 When "the information in the volume was created." 01593 A value of 0 means that the timepoint of write start is to be used. 01594 @param modification_time 01595 ECMA-119 Volume Modification Date and Time 01596 When "the informationin the volume was last modified." 01597 A value of 0 means that the timepoint of write start is to be used. 01598 @param expiration_time 01599 ECMA-119 Volume Expiration Date and Time 01600 When "the information in the volume may be regarded as obsolete." 01601 A value of 0 means that the information never shall expire. 01602 @param effective_time 01603 ECMA-119 Volume Effective Date and Time 01604 When "the information in the volume may be used." 01605 A value of 0 means that not such retention is intended. 01606 @param uuid 01607 If this text is not empty, then it overrides vol_modification_time 01608 by copying the first 16 decimal digits from uuid, eventually 01609 padding up with decimal '1', and writing a NUL-byte as timezone GMT. 01610 It should express a reasonable time in form YYYYMMDDhhmmsscc 01611 E.g.: 2010040711405800 = 7 Apr 2010 11:40:58 (+0 centiseconds) 01612 @return 1 success, <=0 failure 01613 */ 01614 int isoburn_igopt_set_pvd_times(struct isoburn_imgen_opts *opts, 01615 time_t creation_time, time_t modification_time, 01616 time_t expiration_time, time_t effective_time, 01617 char *uuid); 01618 int isoburn_igopt_get_pvd_times(struct isoburn_imgen_opts *opts, 01619 time_t *creation_time, time_t *modification_time, 01620 time_t *expiration_time, time_t *effective_time, 01621 char uuid[17]); 01622 01623 01624 /** Associate a libjte environment object to the upcomming write run. 01625 libjte implements Jigdo Template Extraction as of Steve McIntyre and 01626 Richard Atterer. 01627 A non-NULL libjte_handle will cause failure to write if libjte was not 01628 enabled in libisofs at compile time. 01629 @since 0.6.4 01630 @param opts 01631 The option set to work on 01632 @param libjte_handle 01633 Pointer to a struct libjte_env e.g. created by libjte_new(). 01634 It must stay existent from the start of image writing by 01635 isoburn_prepare_*() until the write thread has ended. 01636 E.g. until libburn indicates the end of its write run. 01637 @return 1 success, <=0 failure 01638 */ 01639 int isoburn_igopt_attach_jte(struct isoburn_imgen_opts *opts, 01640 void *libjte_handle); 01641 01642 /** Remove eventual association to a libjte environment handle. 01643 @since 0.6.4 01644 @param opts 01645 The option set to work on 01646 @param libjte_handle 01647 If not submitted as NULL, this will return the previously set 01648 libjte handle. 01649 @return 1 success, <=0 failure 01650 */ 01651 int isoburn_igopt_detach_jte(struct isoburn_imgen_opts *opts, 01652 void **libjte_handle); 01653 01654 01655 /** Set resp. get the number of trailing zero byte blocks to be written by 01656 libisofs. The image size counter of the emerging ISO image will include 01657 them. Eventual checksums will take them into respect. 01658 They will be written immediately before the eventual image checksum area 01659 which is at the very end of the image. 01660 For a motivation see iso_write_opts_set_tail_blocks() in libisofs.h . 01661 @since 0.6.4 01662 @param opts 01663 The option set to work on 01664 @aram num_blocks 01665 Number of extra 2 kB blocks to be written by libisofs. 01666 @return 1 success, <=0 failure 01667 */ 01668 int isoburn_igopt_set_tail_blocks(struct isoburn_imgen_opts *opts, 01669 uint32_t num_blocks); 01670 int isoburn_igopt_get_tail_blocks(struct isoburn_imgen_opts *opts, 01671 uint32_t *num_blocks); 01672 01673 01674 /** Copy a data file from the local filesystem into the emerging ISO image. 01675 Mark it by an MBR partition entry as PreP partition and also cause 01676 protective MBR partition entries before and after this partition. 01677 See libisofs.h iso_write_opts_set_prep_img(). 01678 @since 1.2.4 01679 @param opts 01680 The option set to be manipulated. 01681 @param path 01682 File address in the local file system. 01683 @param flag 01684 Reserved for future usage, set to 0. 01685 @return 1 success, <=0 failure 01686 */ 01687 int isoburn_igopt_set_prep_partition(struct isoburn_imgen_opts *opts, 01688 char *path, int flag); 01689 int isoburn_igopt_get_prep_partition(struct isoburn_imgen_opts *opts, 01690 char **path, int flag); 01691 01692 /** Copy a data file from the local filesystem into the emerging ISO image. 01693 @since 1.2.4 01694 @param opts 01695 The option set to be manipulated. 01696 @param path 01697 File address in the local file system. 01698 @param flag 01699 Reserved for future usage, set to 0. 01700 @return 1 success, <=0 failure 01701 */ 01702 int isoburn_igopt_set_efi_bootp(struct isoburn_imgen_opts *opts, 01703 char *path, int flag); 01704 int isoburn_igopt_get_efi_bootp(struct isoburn_imgen_opts *opts, 01705 char **path, int flag); 01706 01707 01708 /** Cause an arbitrary data file to be appended to the ISO image and to be 01709 described by a partition table entry in an MBR or SUN Disk Label at the 01710 start of the ISO image. 01711 The partition entry will bear the size of the image file rounded up to 01712 the next multiple of 2048 bytes. 01713 MBR or SUN Disk Label are selected by isoburn_igopt_set_system_area() 01714 system area type: 0 selects MBR partition table. 3 selects a SUN partition 01715 table with 320 kB start alignment. 01716 @since 0.6.4 01717 @param opts 01718 The option set to be manipulated. 01719 @param partition_number 01720 Depicts the partition table entry which shall describe the 01721 appended image. 01722 Range with MBR: 1 to 4. 1 will cause the whole ISO image to be 01723 unclaimable space before partition 1. 01724 @since 0.6.6 01725 Range with SUN Disk Label: 2 to 8. 01726 @param image_path 01727 File address in the local file system. 01728 With SUN Disk Label: an empty name causes the partition to become 01729 a copy of the next lower partition. 01730 @param image_type 01731 The MBR partition type. E.g. FAT12 = 0x01 , FAT16 = 0x06, 01732 Linux Native Partition = 0x83. See fdisk command L. 01733 This parameter is ignored with SUN Disk Label. 01734 @return 01735 <=0 = error, 1 = success 01736 */ 01737 int isoburn_igopt_set_partition_img(struct isoburn_imgen_opts *opts, 01738 int partition_number, uint8_t partition_type, 01739 char *image_path); 01740 01741 /** Inquire the current settings made by isoburn_igopt_set_partition_img(). 01742 @since 0.6.4 01743 @param opts 01744 The option set to be inquired. 01745 @param num_entries 01746 Number of array elements in partition_types[] and image_paths[]. 01747 @param partition_types 01748 The partition type associated with the partition. Valid only if 01749 image_paths[] of the same index is not NULL. 01750 @param image_paths 01751 Its elements get filled with either NULL or a pointer to a string 01752 with a file address resp. an empty text. 01753 @return 01754 <0 = error 01755 0 = no partition image set 01756 >0 highest used partition number 01757 */ 01758 int isoburn_igopt_get_partition_img(struct isoburn_imgen_opts *opts, 01759 int num_entries, 01760 uint8_t partition_types[], 01761 char *image_paths[]); 01762 01763 01764 /** Set a name for the system area. This setting is ignored unless system area 01765 type 3 "SUN Disk Label" is in effect by iso_write_opts_set_system_area(). 01766 In this case it will replace the default text at the start of the image: 01767 "CD-ROM Disc with Sun sparc boot created by libisofs" 01768 @since 0.6.6 01769 @param opts 01770 The option set to be manipulated. 01771 @param label 01772 A text of up to 128 characters. 01773 @return 01774 <=0 = error, 1 = success 01775 */ 01776 int isoburn_igopt_set_disc_label(struct isoburn_imgen_opts *opts, char *label); 01777 01778 /** Inquire the current setting made by isoburn_igopt_set_disc_label(). 01779 @since 0.6.6 01780 @param opts 01781 The option set to be inquired. 01782 @param label 01783 Returns a pointer to the currently set label string. 01784 Do not alter this string. 01785 Use only as long as the opts object exists. 01786 @return 01787 <=0 = error, 1 = success 01788 */ 01789 int isoburn_igopt_get_disc_label(struct isoburn_imgen_opts *opts, 01790 char **label); 01791 01792 /** Set a serial number for the HFS+ extension of the emerging ISO image. 01793 @since 1.2.4 01794 @param opts 01795 The option set to be manipulated. 01796 @param serial_number 01797 8 bytes which should be unique to the image. 01798 If all bytes are 0, then the serial number will be generated as 01799 random number by libisofs. This is the default setting. 01800 @return 01801 <=0 = error, 1 = success 01802 */ 01803 int isoburn_igopt_set_hfsp_serial_number(struct isoburn_imgen_opts *opts, 01804 uint8_t serial_number[8]); 01805 01806 01807 /** Inquire the current setting made by isoburn_igopt_set_disc_label() 01808 @since 1.2.4 01809 @param opts 01810 The option set to be inquired. 01811 @param serial_number 01812 Will get filled with the current setting. 01813 @return 01814 <=0 = error, 1 = success 01815 */ 01816 int isoburn_igopt_get_hfsp_serial_number(struct isoburn_imgen_opts *opts, 01817 uint8_t serial_number[8]); 01818 01819 /** Set the allocation block size for HFS+ production and the block size 01820 for layout and address unit of Apple Partition map. 01821 @since 1.2.4 01822 @param opts 01823 The option set to be manipulated. 01824 @param hfsp_block_size 01825 -1 means that this setting shall be left unchanged 01826 0 allows the automatic default setting 01827 512 and 2048 enforce a size. 01828 @param apm_block_size 01829 -1 means that this setting shall be left unchanged 01830 0 allows the automatic default setting 01831 512 and 2048 enforce a size. 01832 Size 512 cannot be combined with GPT production. 01833 Size 2048 cannot be mounted -t hfsplus by Linux kernels at least up 01834 to 2.6.32. 01835 @return 01836 <=0 = error, 1 = success 01837 */ 01838 int isoburn_igopt_set_hfsp_block_size(struct isoburn_imgen_opts *opts, 01839 int hfsp_block_size, int apm_block_size); 01840 01841 /** Inquire the current setting made by isoburn_igopt_set_hfsp_block_size 01842 @since 1.2.4 01843 @param opts 01844 The option set to be inquired. 01845 @param hfsp_block_size 01846 Will be set to a value as described above. Except -1. 01847 @param apm_block_size 01848 Will be set to a value as described above. Except -1. 01849 @return 01850 <=0 = error, 1 = success 01851 */ 01852 int isoburn_igopt_get_hfsp_block_size(struct isoburn_imgen_opts *opts, 01853 int *hfsp_block_size, int *apm_block_size); 01854 01855 01856 /** Set or inquire the write type for the next write run on optical media. 01857 @since 1.2.4 01858 @param opts 01859 The option set to be manipulated or inquired. 01860 @param do_tao 01861 The value to be set or the variable where to return the current 01862 setting: 01863 0 = Let libburn choose according to other write parameters. 01864 This is advisable unless there are particular reasons not to 01865 use one of the two write types. Be aware that 1 and -1 can 01866 lead to failure if the write type is not appropriate for 01867 the given media situation. 01868 1 = Use BURN_WRITE_TAO which does 01869 TAO on CD, Incremental on DVD-R, 01870 no track reservation on DVD+R and BD-R 01871 -1 = Use BURN_WRITE_SAO which does 01872 SAO on CD, DAO on DVD-R, 01873 track reservation on DVD+R and BD-R 01874 @return 01875 <=0 = error, 1 = success 01876 */ 01877 int isoburn_igopt_set_write_type(struct isoburn_imgen_opts *opts, int do_tao); 01878 int isoburn_igopt_get_write_type(struct isoburn_imgen_opts *opts, int *do_tao); 01879 01880 01881 /* ----------------------------------------------------------------------- */ 01882 /* End of Options for image generation */ 01883 /* ----------------------------------------------------------------------- */ 01884 01885 01886 /** Get the image attached to a drive, if any. 01887 @since 0.1.0 01888 @param d The drive to inquire 01889 @return A reference to attached image, or NULL if the drive has no image 01890 attached. This reference needs to be released via iso_image_unref() 01891 when it is not longer needed. 01892 */ 01893 IsoImage *isoburn_get_attached_image(struct burn_drive *d); 01894 01895 /** Get the start address of the image that is attached to the drive, if any. 01896 @since 1.2.2 01897 @param d The drive to inquire 01898 @return The logical block address where the System Area of the image 01899 starts. <0 means that the address is invalid. 01900 */ 01901 int isoburn_get_attached_start_lba(struct burn_drive *d); 01902 01903 01904 /** Load the ISO filesystem directory tree from the medium in the given drive. 01905 This will give libisoburn the base on which it can let libisofs perform 01906 image growing or image modification. The loaded volset gets attached 01907 to the drive object and handed out to the application. 01908 Not a wrapper, but peculiar to libisoburn. 01909 @since 0.1.0 01910 @param d The drive which holds an existing ISO filesystem or blank media. 01911 d is allowed to be NULL which produces an empty ISO image. In 01912 this case one has to call before writing isoburn_attach_volset() 01913 with the volset from this call and with the intended output 01914 drive. 01915 @param read_opts The read options which can be chosen by the application 01916 @param image the image read, if the disc is blank it will have no files. 01917 This reference needs to be released via iso_image_unref() when 01918 it is not longer needed. The drive, if not NULL, will hold an 01919 own reference which it will release when it gets a new volset 01920 or when it gets released via isoburn_drive_release(). 01921 You can pass NULL if you already have a reference or you plan to 01922 obtain it later with isoburn_get_attached_image(). Of course, if 01923 you haven't specified a valid drive (i.e., if d == NULL), this 01924 parameter can't be NULL. 01925 @return <=0 error , 1 = success 01926 */ 01927 int isoburn_read_image(struct burn_drive *d, 01928 struct isoburn_read_opts *read_opts, 01929 IsoImage **image); 01930 01931 /** Set a callback function for producing pacifier messages during the lengthy 01932 process of image reading. The callback function and the application handle 01933 are stored until they are needed for the underlying call to libisofs. 01934 Other than with libisofs the handle is managed entirely by the application. 01935 An idle .free() function is exposed to libisofs. The handle has to stay 01936 valid until isoburn_read_image() is done. It has to be detached by 01937 isoburn_set_read_pacifier(drive, NULL, NULL); 01938 before it may be removed from memory. 01939 @since 0.1.0 01940 @param drive The drive which will be used with isoburn_read_image() 01941 It has to be acquired by an isoburn_* wrapper call. 01942 @param read_pacifier The callback function 01943 @param app_handle The app handle which the callback function can obtain 01944 via iso_image_get_attached_data() from its IsoImage* 01945 @return 1 success, <=0 failure 01946 */ 01947 int isoburn_set_read_pacifier(struct burn_drive *drive, 01948 int (*read_pacifier)(IsoImage*, IsoFileSource*), 01949 void *app_handle); 01950 01951 /** Inquire the partition offset of the loaded image. The first 512 bytes of 01952 the image get examined whether they bear an MBR signature and a first 01953 partition table entry which matches the size of the image. In this case 01954 the start address is recorded as partition offset and internal buffers 01955 get adjusted. 01956 See also isoburn_igopt_set_part_offset(). 01957 @since 0.6.2 01958 @param drive The drive with the loaded image 01959 @param block_offset_2k returns the recognized partition offset 01960 @return <0 = error 01961 0 = no partition offset recognized 01962 1 = acceptable non-zero offset, buffers are adjusted 01963 2 = offset is credible but not acceptable for buffer size 01964 */ 01965 int isoburn_get_img_partition_offset(struct burn_drive *drive, 01966 uint32_t *block_offset_2k); 01967 01968 01969 /** Set the IsoImage to be used with a drive. This eventually releases 01970 the reference to the old IsoImage attached to the drive. 01971 Caution: Use with care. It hardly makes sense to replace an image that 01972 reflects a valid ISO image on the medium. 01973 This call is rather intended for writing a newly created and populated 01974 image to blank media. The use case in xorriso is to let an image survive 01975 the change or demise of the outdev target drive. 01976 @since 0.1.0 01977 @param d The drive which shall be write target of the volset. 01978 @param image The image that represents the image to be written. 01979 This image pointer MUST already be a valid reference suitable 01980 for iso_image_unref(). 01981 It may have been obtained by appropriate libisofs calls or by 01982 isoburn_read_image() with d==NULL. 01983 @return <=0 error , 1 = success 01984 */ 01985 int isoburn_attach_image(struct burn_drive *d, IsoImage *image); 01986 01987 01988 /** Set the start address of the image that is attached to the drive, if any. 01989 @since 1.2.2 01990 @param d The drive to inquire 01991 @param lba The logical block address where the System Area of the image 01992 starts. <0 means that the address is invalid. 01993 @param flag Bitfield, submit 0 for now. 01994 @return <=0 error (e.g. because no image is attached), 1 = success 01995 */ 01996 int isoburn_attach_start_lba(struct burn_drive *d, int lba, int flag); 01997 01998 01999 /** Return the best possible estimation of the currently available capacity of 02000 the medium. This might depend on particular write option settings and on 02001 drive state. 02002 An eventual start address for emulated multi-session will be subtracted 02003 from the capacity estimation given by burn_disc_available_space(). 02004 Negative results get defaulted to 0. 02005 Wrapper for: burn_disc_available_space() 02006 @since 0.1.0 02007 @param d The drive to query. 02008 @param o If not NULL: write parameters to be set on drive before query 02009 @return number of most probably available free bytes 02010 */ 02011 off_t isoburn_disc_available_space(struct burn_drive *d, 02012 struct burn_write_opts *o); 02013 02014 02015 /** Obtain the start block number of the most recent session on the medium. In 02016 case of random access media this will normally be 0. Successfull return is 02017 not a guarantee that there is a ISO-9660 image at all. The call will fail, 02018 nevertheless,if isoburn_disc_get_status() returns not BURN_DISC_APPENDABLE 02019 or BURN_DISC_FULL. 02020 Note: The result of this call may be fabricated by a previous call of 02021 isoburn_set_msc1() which can override the rule to load the most recent 02022 session. 02023 Wrapper for: burn_disc_get_msc1() 02024 @since 0.1.0 02025 @param d The drive to inquire 02026 @param start_lba Contains on success the start address in 2048 byte blocks 02027 @return <=0 error , 1 = success 02028 */ 02029 int isoburn_disc_get_msc1(struct burn_drive *d, int *start_lba); 02030 02031 02032 /** Use this with trackno==0 to obtain the predicted start block number of the 02033 new session. The interesting number is returned in parameter nwa. 02034 Wrapper for: burn_disc_track_lba_nwa() 02035 @since 0.1.0 02036 @param d The drive to inquire 02037 @param o If not NULL: write parameters to be set on drive before query 02038 @param trackno Submit 0. 02039 @param lba return value: start lba 02040 @param nwa return value: Next Writeable Address 02041 @return 1=nwa is valid , 0=nwa is not valid , -1=error 02042 */ 02043 int isoburn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o, 02044 int trackno, int *lba, int *nwa); 02045 02046 02047 /** Obtain the size which was attributed to an emulated appendable on actually 02048 overwriteable media. This value is supposed to be <= 2048 * nwa as of 02049 isoburn_disc_track_lba_nwa(). 02050 @since 0.1.0 02051 @param d The drive holding the medium. 02052 @param start_byte The reply value counted in bytes, not in sectors. 02053 @param flag Unused yet. Submit 0. 02054 @return 1=stat_byte is valid, 0=not an emulated appendable, -1=error 02055 */ 02056 int isoburn_get_min_start_byte(struct burn_drive *d, off_t *start_byte, 02057 int flag); 02058 02059 02060 /** To choose the expansion method of Growing: 02061 Create a disc object for writing the new session from the created or loaded 02062 iso_volset which has been manipulated via libisofs, to the same medium from 02063 where the image was eventually loaded. This struct burn_disc is ready for 02064 use by a subsequent call to isoburn_disc_write(). 02065 After this asynchronous writing has ended and the drive is BURN_DRIVE_IDLE 02066 again, the burn_disc object has to be disposed by burn_disc_free(). 02067 @since 0.1.0 02068 @param drive The combined source and target drive, grabbed with 02069 isoburn_drive_scan_and_grab(). . 02070 @param disc Returns the newly created burn_disc object. 02071 @param opts Image generation options, see isoburn_igopt_*() 02072 @return <=0 error , 1 = success 02073 */ 02074 int isoburn_prepare_disc(struct burn_drive *drive, struct burn_disc **disc, 02075 struct isoburn_imgen_opts *opts); 02076 02077 02078 /** To choose the expansion method of Modifying: 02079 Create a disc object for producing a new image from a previous image 02080 plus the changes made by user. The generated burn_disc is suitable 02081 to be written to a grabbed drive with blank writeable medium. 02082 But you must not use the same drive for input and output, because data 02083 will be read from the source drive while at the same time the target 02084 drive is already writing. 02085 The resulting burn_disc object has to be disposed when all its writing 02086 is done and the drive is BURN_DRIVE_IDLE again after asynchronous 02087 burn_disc_write(). 02088 @since 0.1.0 02089 @param in_drive The input drive, grabbed with isoburn_drive_aquire() or 02090 one of its alternatives. 02091 @param disc Returns the newly created burn_disc object. 02092 @param opts Options for image generation and data transport to the 02093 medium. 02094 @param out_drive The output drive, from isoburn_drive_aquire() et.al.. 02095 @return <=0 error , 1 = success 02096 */ 02097 int isoburn_prepare_new_image(struct burn_drive *in_drive, 02098 struct burn_disc **disc, 02099 struct isoburn_imgen_opts *opts, 02100 struct burn_drive *out_drive); 02101 02102 02103 /** To choose the expansion method of Blind Growing: 02104 Create a disc object for writing an add-on session from the created or 02105 loaded IsoImage which has been manipulated via libisofs, to a different 02106 drive than the one from where it was loaded. 02107 Usually output will be stdio:/dev/fd/1 (i.e. stdout) being piped 02108 into some burn program like with this classic gesture: 02109 mkisofs -M $dev -C $msc1,$nwa | cdrecord -waiti dev=$dev 02110 Parameter translation into libisoburn: 02111 $dev is the address by which parameter in_drive of this call was 02112 acquired $msc1 was set by isoburn_set_msc1() before image reading 02113 or was detected from the in_drive medium 02114 $nwa is a parameter of this call 02115 or can be used as detected from the in_drive medium 02116 02117 This call waits for libisofs output to become available and then detaches 02118 the input drive object from the data source object by which libisofs was 02119 reading from the input drive. 02120 So, as far as libisofs is concerned, that drive may be released immediately 02121 after this call in order to allow the consumer to access the drive for 02122 writing. 02123 The consumer should wait for input to become available and only then open 02124 its burn drive. With cdrecord this is caused by option -waiti. 02125 02126 The resulting burn_disc object has to be disposed when all its writing 02127 is done and the drive is BURN_DRIVE_IDLE again after asynchronous 02128 burn_disc_write(). 02129 @since 0.2.2 02130 @param in_drive The input drive,grabbed with isoburn_drive_scan_and_grab(). 02131 @param disc Returns the newly created burn_disc object. 02132 @param opts Options for image generation and data transport to media. 02133 @param out_drive The output drive, from isoburn_drive_aquire() et.al.. 02134 typically stdio:/dev/fd/1 . 02135 @param nwa The address (2048 byte block count) where the add-on 02136 session will be finally stored on a mountable medium 02137 or in a mountable file. 02138 If nwa is -1 then the address is used as determined from 02139 the in_drive medium. 02140 @return <=0 error , 1 = success 02141 */ 02142 int isoburn_prepare_blind_grow(struct burn_drive *in_drive, 02143 struct burn_disc **disc, 02144 struct isoburn_imgen_opts *opts, 02145 struct burn_drive *out_drive, int nwa); 02146 02147 02148 /** 02149 Revoke isoburn_prepare_*() instead of running isoburn_disc_write(). 02150 libisofs reserves resources and maybe already starts generating the 02151 image stream when one of above three calls is performed. It is mandatory to 02152 either run isoburn_disc_write() or to revoke the preparations by the 02153 call described here. 02154 If this call returns 0 or 1 then the write thread of libisofs has ended. 02155 @since 0.1.0 02156 @param input_drive The drive resp. in_drive which was used with the 02157 preparation call. 02158 @param output_drive The out_drive used with isoburn_prepare_new_image(), 02159 NULL if none. 02160 @param flag Bitfield, submit 0 for now. 02161 bit0= -reserved for internal use- 02162 @return <0 error, 0= no pending preparations detectable, 1 = canceled 02163 */ 02164 int isoburn_cancel_prepared_write(struct burn_drive *input_drive, 02165 struct burn_drive *output_drive, int flag); 02166 02167 02168 /** 02169 Override the truncation setting that was made with flag bit2 during the 02170 call of isoburn_drive_aquire. This applies only to stdio pseudo drives. 02171 @since 0.1.6 02172 @param drive The drive which was acquired and shall be used for writing. 02173 @param flag Bitfield controlling the setting: 02174 bit0= truncate (else do not truncate) 02175 bit1= do not warn if call is inappropriate to drive 02176 bit2= only set if truncation is currently enabled 02177 do not warn if call is inappropriate to drive 02178 @return 1 success, 0 inappropriate drive, <0 severe error 02179 */ 02180 int isoburn_set_truncate(struct burn_drive *drive, int flag); 02181 02182 02183 /** Start writing of the new session. 02184 This call is asynchrounous. I.e. it returns quite soon and the progress has 02185 to be watched by a loop with call burn_drive_get_status() until 02186 BURN_DRIVE_IDLE is returned. 02187 Wrapper for: burn_disc_write() 02188 @since 0.1.0 02189 @param o Options which control the burn process. See burnwrite_opts_*() 02190 in libburn.h. 02191 @param disc Disc object created either by isoburn_prepare_disc() or by 02192 isoburn_prepare_new_image(). 02193 */ 02194 void isoburn_disc_write(struct burn_write_opts *o, struct burn_disc *disc); 02195 02196 02197 /** Inquire state and fill parameters of the fifo which is attached to 02198 the emerging track. This should be done in the pacifier loop while 02199 isoburn_disc_write() or burn_disc_write() are active. 02200 This works only with drives obtained by isoburn_drive_scan_and_grab() 02201 or isoburn_drive_grab(). If isoburn_prepare_new_image() was used, then 02202 parameter out_drive must have announced the track output drive. 02203 Hint: If only burn_write_opts and not burn_drive is known, then the drive 02204 can be obtained by burn_write_opts_get_drive(). 02205 @since 0.1.0 02206 @param d The drive to which the track with the fifo gets burned. 02207 @param size The total size of the fifo 02208 @param free_bytes The current free capacity of the fifo 02209 @param status_text Returns a pointer to a constant text, see below 02210 @return <0 reply invalid, >=0 fifo status code: 02211 bit0+1=input status, bit2=consumption status, i.e: 02212 0="standby" : data processing not started yet 02213 1="active" : input and consumption are active 02214 2="ending" : input has ended without error 02215 3="failing" : input had error and ended, 02216 4="unused" : ( consumption has ended before processing start ) 02217 5="abandoned" : consumption has ended prematurely 02218 6="ended" : consumption has ended without input error 02219 7="aborted" : consumption has ended after input error 02220 */ 02221 int isoburn_get_fifo_status(struct burn_drive *d, int *size, int *free_bytes, 02222 char **status_text); 02223 02224 02225 /** Inquire whether the most recent write run was successful. 02226 Wrapper for: burn_drive_wrote_well() 02227 @since 0.1.0 02228 @param d The drive to inquire 02229 @return 1=burn seems to have went well, 0=burn failed 02230 */ 02231 int isoburn_drive_wrote_well(struct burn_drive *d); 02232 02233 02234 /** Call this after isoburn_disc_write has finished and burn_drive_wrote_well() 02235 indicates success. It will eventually complete the emulation of 02236 multi-session functionality, if needed at all. Let libisoburn decide. 02237 Not a wrapper, but peculiar to libisoburn. 02238 @since 0.1.0 02239 @param d The output drive to which the session was written 02240 @return 1 success , <=0 failure 02241 */ 02242 int isoburn_activate_session(struct burn_drive *d); 02243 02244 02245 /** Wait after normal end of operations until libisofs ended all write 02246 threads and freed resource reservations. 02247 This call is not mandatory. But without it, messages from the ending 02248 threads might appear after the application ended its write procedure. 02249 @since 0.1.0 02250 @param input_drive The drive resp. in_drive which was used with the 02251 preparation call. 02252 @param output_drive The out_drive used with isoburn_prepare_new_image(), 02253 NULL if none. 02254 @param flag Bitfield, submit 0 for now. 02255 @return <=0 error , 1 = success 02256 */ 02257 int isoburn_sync_after_write(struct burn_drive *input_drive, 02258 struct burn_drive *output_drive, int flag); 02259 02260 02261 /** Release an acquired drive. 02262 Wrapper for: burn_drive_release() 02263 @since 0.1.0 02264 @param drive The drive to be released 02265 @param eject 1= eject medium from drive , 0= do not eject 02266 */ 02267 void isoburn_drive_release(struct burn_drive *drive, int eject); 02268 02269 02270 /** Shutdown all three libraries. 02271 Wrapper for : iso_finish() and burn_finish(). 02272 @since 0.1.0 02273 */ 02274 void isoburn_finish(void); 02275 02276 02277 /* 02278 The following calls are for expert applications only. 02279 An application should have a special reason to use them. 02280 */ 02281 02282 02283 /** Inquire wether the medium needs emulation or would be suitable for 02284 generic multi-session via libburn. 02285 @since 0.1.0 02286 @param d The drive to inquire 02287 @return 0 is generic multi-session 02288 1 is emulated multi-session 02289 -1 is not suitable for isoburn 02290 */ 02291 int isoburn_needs_emulation(struct burn_drive *d); 02292 02293 02294 /* ---------------------------- Test area ----------------------------- */ 02295 02296 /* no tests active, currently */ 02297