<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>libburn: libburn.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <h1>libburn.h</h1><a href="libburn_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */</span> <a name="l00002"></a>00002 <a name="l00003"></a>00003 <span class="preprocessor">#ifndef LIBBURN_H</span> <a name="l00004"></a>00004 <span class="preprocessor"></span><span class="preprocessor">#define LIBBURN_H</span> <a name="l00005"></a>00005 <span class="preprocessor"></span> <a name="l00006"></a>00006 <span class="comment">/* </span> <a name="l00007"></a>00007 <span class="comment"></span> <a name="l00008"></a>00008 <span class="comment">Applications must use 64 bit off_t. E.g. by defining</span> <a name="l00009"></a>00009 <span class="comment"> #define _LARGEFILE_SOURCE</span> <a name="l00010"></a>00010 <span class="comment"> #define _FILE_OFFSET_BITS 64</span> <a name="l00011"></a>00011 <span class="comment">or take special precautions to interface with the library by 64 bit integers</span> <a name="l00012"></a>00012 <span class="comment">where this .h files prescribe off_t. Not to use 64 bit file i/o will keep the</span> <a name="l00013"></a>00013 <span class="comment">application from producing and processing ISO images of more than 2 GB size.</span> <a name="l00014"></a>00014 <span class="comment"></span> <a name="l00015"></a>00015 <span class="comment">*/</span> <a name="l00016"></a>00016 <span class="preprocessor">#include <sys/types.h></span> <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="preprocessor">#ifndef DOXYGEN</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#if defined(__cplusplus)</span> <a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define BURN_BEGIN_DECLS \</span> <a name="l00022"></a>00022 <span class="preprocessor"> namespace burn { \</span> <a name="l00023"></a>00023 <span class="preprocessor"> extern "C" {</span> <a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define BURN_END_DECLS \</span> <a name="l00025"></a>00025 <span class="preprocessor"> } \</span> <a name="l00026"></a>00026 <span class="preprocessor"> }</span> <a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#else</span> <a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define BURN_BEGIN_DECLS</span> <a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define BURN_END_DECLS</span> <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00031"></a>00031 <span class="preprocessor"></span> <a name="l00032"></a>00032 BURN_BEGIN_DECLS <a name="l00033"></a>00033 <a name="l00034"></a>00034 <span class="preprocessor">#endif</span> <a name="l00035"></a>00035 <span class="preprocessor"></span><span class="comment"></span> <a name="l00036"></a>00036 <span class="comment">/** References a physical drive in the system */</span> <a name="l00037"></a>00037 <span class="keyword">struct </span>burn_drive; <a name="l00038"></a>00038 <span class="comment"></span> <a name="l00039"></a>00039 <span class="comment">/** References a whole disc */</span> <a name="l00040"></a>00040 <span class="keyword">struct </span>burn_disc; <a name="l00041"></a>00041 <span class="comment"></span> <a name="l00042"></a>00042 <span class="comment">/** References a single session on a disc */</span> <a name="l00043"></a>00043 <span class="keyword">struct </span>burn_session; <a name="l00044"></a>00044 <span class="comment"></span> <a name="l00045"></a>00045 <span class="comment">/** References a single track on a disc */</span> <a name="l00046"></a>00046 <span class="keyword">struct </span>burn_track; <a name="l00047"></a>00047 <a name="l00048"></a>00048 <span class="comment">/* ts A61111 */</span><span class="comment"></span> <a name="l00049"></a>00049 <span class="comment">/** References a set of write parameters */</span> <a name="l00050"></a>00050 <span class="keyword">struct </span>burn_write_opts; <a name="l00051"></a>00051 <span class="comment"></span> <a name="l00052"></a>00052 <span class="comment">/** Session format for normal audio or data discs */</span> <a name="l00053"></a><a class="code" href="libburn_8h.html#acb71b062ff79542deb3cba465cda7aaf">00053</a> <span class="preprocessor">#define BURN_CDROM 0</span> <a name="l00054"></a>00054 <span class="preprocessor"></span><span class="comment">/** Session format for obsolete CD-I discs */</span> <a name="l00055"></a><a class="code" href="libburn_8h.html#a6fcb658ba7cb4920292c2cb00779f521">00055</a> <span class="preprocessor">#define BURN_CDI 0x10</span> <a name="l00056"></a>00056 <span class="preprocessor"></span><span class="comment">/** Session format for CDROM-XA discs */</span> <a name="l00057"></a><a class="code" href="libburn_8h.html#a1a71d247b6a8a25c3e03ffcd06c93283">00057</a> <span class="preprocessor">#define BURN_CDXA 0x20</span> <a name="l00058"></a>00058 <span class="preprocessor"></span> <a name="l00059"></a><a class="code" href="libburn_8h.html#a57aa6e45b0236acb5fbaa9f44280f6dc">00059</a> <span class="preprocessor">#define BURN_POS_END 100</span> <a name="l00060"></a>00060 <span class="preprocessor"></span><span class="comment"></span> <a name="l00061"></a>00061 <span class="comment">/** Mask for mode bits */</span> <a name="l00062"></a><a class="code" href="libburn_8h.html#aba177c2dbb1c666d88aa226e2a6ccb5e">00062</a> <span class="preprocessor">#define BURN_MODE_BITS 127</span> <a name="l00063"></a>00063 <span class="preprocessor"></span><span class="comment"></span> <a name="l00064"></a>00064 <span class="comment">/** Track mode - mode 0 data</span> <a name="l00065"></a>00065 <span class="comment"> 0 bytes of user data. it's all 0s. mode 0. get it? HAH</span> <a name="l00066"></a>00066 <span class="comment">*/</span> <a name="l00067"></a><a class="code" href="libburn_8h.html#aef27a096c38d27ed44e3c20606fad299">00067</a> <span class="preprocessor">#define BURN_MODE0 (1 << 0)</span> <a name="l00068"></a>00068 <span class="preprocessor"></span><span class="comment">/** Track mode - mode "raw" - all 2352 bytes supplied by app</span> <a name="l00069"></a>00069 <span class="comment"> FOR DATA TRACKS ONLY!</span> <a name="l00070"></a>00070 <span class="comment">*/</span> <a name="l00071"></a><a class="code" href="libburn_8h.html#a1cc9673c6f833c8429d61154e5b7391e">00071</a> <span class="preprocessor">#define BURN_MODE_RAW (1 << 1)</span> <a name="l00072"></a>00072 <span class="preprocessor"></span><span class="comment">/** Track mode - mode 1 data</span> <a name="l00073"></a>00073 <span class="comment"> 2048 bytes user data, and all the LEC money can buy</span> <a name="l00074"></a>00074 <span class="comment">*/</span> <a name="l00075"></a><a class="code" href="libburn_8h.html#af2e861349cb91c0af3a482225e3326ae">00075</a> <span class="preprocessor">#define BURN_MODE1 (1 << 2)</span> <a name="l00076"></a>00076 <span class="preprocessor"></span><span class="comment">/** Track mode - mode 2 data</span> <a name="l00077"></a>00077 <span class="comment"> defaults to formless, 2336 bytes of user data, unprotected</span> <a name="l00078"></a>00078 <span class="comment"> | with a data form if required.</span> <a name="l00079"></a>00079 <span class="comment">*/</span> <a name="l00080"></a><a class="code" href="libburn_8h.html#a2b6976f11728bf401a907be7f852dad2">00080</a> <span class="preprocessor">#define BURN_MODE2 (1 << 3)</span> <a name="l00081"></a>00081 <span class="preprocessor"></span><span class="comment">/** Track mode modifier - Form 1, | with MODE2 for reasonable results</span> <a name="l00082"></a>00082 <span class="comment"> 2048 bytes of user data, 4 bytes of subheader</span> <a name="l00083"></a>00083 <span class="comment">*/</span> <a name="l00084"></a><a class="code" href="libburn_8h.html#abcad5110c2ab40b9f15edbf8a35af243">00084</a> <span class="preprocessor">#define BURN_FORM1 (1 << 4)</span> <a name="l00085"></a>00085 <span class="preprocessor"></span><span class="comment">/** Track mode modifier - Form 2, | with MODE2 for reasonable results</span> <a name="l00086"></a>00086 <span class="comment"> lots of user data. not much LEC.</span> <a name="l00087"></a>00087 <span class="comment">*/</span> <a name="l00088"></a><a class="code" href="libburn_8h.html#afe34f7f797a6e145a2ac5d489d1c7312">00088</a> <span class="preprocessor">#define BURN_FORM2 (1 << 5)</span> <a name="l00089"></a>00089 <span class="preprocessor"></span><span class="comment">/** Track mode - audio</span> <a name="l00090"></a>00090 <span class="comment"> 2352 bytes per sector. may be | with 4ch or preemphasis.</span> <a name="l00091"></a>00091 <span class="comment"> NOT TO BE CONFUSED WITH BURN_MODE_RAW</span> <a name="l00092"></a>00092 <span class="comment"> Audio data must be 44100Hz 16bit stereo with no riff or other header at</span> <a name="l00093"></a>00093 <span class="comment"> beginning. Extra header data will cause pops or clicks. Audio data should</span> <a name="l00094"></a>00094 <span class="comment"> also be in little-endian byte order. Big-endian audio data causes static.</span> <a name="l00095"></a>00095 <span class="comment">*/</span> <a name="l00096"></a><a class="code" href="libburn_8h.html#af52cf0d05e7e207ef4a06c9caad94d9f">00096</a> <span class="preprocessor">#define BURN_AUDIO (1 << 6)</span> <a name="l00097"></a>00097 <span class="preprocessor"></span><span class="comment">/** Track mode modifier - 4 channel audio. */</span> <a name="l00098"></a><a class="code" href="libburn_8h.html#a5e02913bb94213130d501ce7fec4b00e">00098</a> <span class="preprocessor">#define BURN_4CH (1 << 7)</span> <a name="l00099"></a>00099 <span class="preprocessor"></span><span class="comment">/** Track mode modifier - Digital copy permitted, can be set on any track.*/</span> <a name="l00100"></a><a class="code" href="libburn_8h.html#a638768a4caa81e5c804191c69053c3fd">00100</a> <span class="preprocessor">#define BURN_COPY (1 << 8)</span> <a name="l00101"></a>00101 <span class="preprocessor"></span><span class="comment">/** Track mode modifier - 50/15uS pre-emphasis */</span> <a name="l00102"></a><a class="code" href="libburn_8h.html#a77e7f124f657346501a5c6154957ba0e">00102</a> <span class="preprocessor">#define BURN_PREEMPHASIS (1 << 9)</span> <a name="l00103"></a>00103 <span class="preprocessor"></span><span class="comment">/** Input mode modifier - subcodes present packed 16 */</span> <a name="l00104"></a><a class="code" href="libburn_8h.html#a3be823bdb6bf32c739b04690227c1f08">00104</a> <span class="preprocessor">#define BURN_SUBCODE_P16 (1 << 10)</span> <a name="l00105"></a>00105 <span class="preprocessor"></span><span class="comment">/** Input mode modifier - subcodes present packed 96 */</span> <a name="l00106"></a><a class="code" href="libburn_8h.html#a6617b8b3523c15977d84577e64fd1e10">00106</a> <span class="preprocessor">#define BURN_SUBCODE_P96 (1 << 11)</span> <a name="l00107"></a>00107 <span class="preprocessor"></span><span class="comment">/** Input mode modifier - subcodes present raw 96 */</span> <a name="l00108"></a><a class="code" href="libburn_8h.html#a966c47288988de1056f839f47c13c8a6">00108</a> <span class="preprocessor">#define BURN_SUBCODE_R96 (1 << 12)</span> <a name="l00109"></a>00109 <span class="preprocessor"></span><span class="comment"></span> <a name="l00110"></a>00110 <span class="comment">/** Possible disc writing style/modes */</span> <a name="l00111"></a><a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9b">00111</a> <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9b" title="Possible disc writing style/modes.">burn_write_types</a> <a name="l00112"></a>00112 {<span class="comment"></span> <a name="l00113"></a>00113 <span class="comment"> /** Packet writing.</span> <a name="l00114"></a>00114 <span class="comment"> currently unsupported, (for DVD Incremental Streaming use TAO)</span> <a name="l00115"></a>00115 <span class="comment"> */</span> <a name="l00116"></a><a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9ba581d5cbf98192e4e43e06f6c936747eb">00116</a> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9ba581d5cbf98192e4e43e06f6c936747eb" title="Packet writing.">BURN_WRITE_PACKET</a>, <a name="l00117"></a>00117 <span class="comment"></span> <a name="l00118"></a>00118 <span class="comment"> /** With CD: Track At Once recording</span> <a name="l00119"></a>00119 <span class="comment"> 2s gaps between tracks, no fonky lead-ins</span> <a name="l00120"></a>00120 <span class="comment"></span> <a name="l00121"></a>00121 <span class="comment"> With sequential DVD-R[W]: Incremental Streaming</span> <a name="l00122"></a>00122 <span class="comment"> With DVD-RAM/+RW: Random Writeable (used sequentially)</span> <a name="l00123"></a>00123 <span class="comment"> With overwriteable DVD-RW: Rigid Restricted Overwrite </span> <a name="l00124"></a>00124 <span class="comment"> */</span> <a name="l00125"></a><a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9baba04cadb6ce69906177a3af1f113bb5d">00125</a> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9baba04cadb6ce69906177a3af1f113bb5d" title="With CD: Track At Once recording 2s gaps between tracks, no fonky lead-ins.">BURN_WRITE_TAO</a>, <a name="l00126"></a>00126 <span class="comment"></span> <a name="l00127"></a>00127 <span class="comment"> /** With CD: Session At Once</span> <a name="l00128"></a>00128 <span class="comment"> Block type MUST be BURN_BLOCK_SAO</span> <a name="l00129"></a>00129 <span class="comment"> ts A70122: Currently not capable of mixing data and audio tracks.</span> <a name="l00130"></a>00130 <span class="comment"></span> <a name="l00131"></a>00131 <span class="comment"> With sequential DVD-R[W]: Disc-at-once, DAO</span> <a name="l00132"></a>00132 <span class="comment"> Single session, single track, fixed size mandatory, (-dvd-compat)</span> <a name="l00133"></a>00133 <span class="comment"> */</span> <a name="l00134"></a><a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9badf2f96fa55054c4217a871ddf4dca4b3">00134</a> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9badf2f96fa55054c4217a871ddf4dca4b3" title="With CD: Session At Once Block type MUST be BURN_BLOCK_SAO ts A70122: Currently not...">BURN_WRITE_SAO</a>, <a name="l00135"></a>00135 <span class="comment"></span> <a name="l00136"></a>00136 <span class="comment"> /** With CD: Raw disc at once recording.</span> <a name="l00137"></a>00137 <span class="comment"> all subcodes must be provided by lib or user</span> <a name="l00138"></a>00138 <span class="comment"> only raw block types are supported</span> <a name="l00139"></a>00139 <span class="comment"> */</span> <a name="l00140"></a><a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9ba0930c18b066270bf28dfb3ab9c2b6747">00140</a> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9ba0930c18b066270bf28dfb3ab9c2b6747" title="With CD: Raw disc at once recording.">BURN_WRITE_RAW</a>, <a name="l00141"></a>00141 <span class="comment"></span> <a name="l00142"></a>00142 <span class="comment"> /** In replies this indicates that not any writing will work.</span> <a name="l00143"></a>00143 <span class="comment"> As parameter for inquiries it indicates that no particular write</span> <a name="l00144"></a>00144 <span class="comment"> mode shall is specified.</span> <a name="l00145"></a>00145 <span class="comment"> Do not use for setting a write mode for burning. It won't work.</span> <a name="l00146"></a>00146 <span class="comment"> */</span> <a name="l00147"></a><a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9baf43fb685b48fdc83337465457eec54fd">00147</a> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9baf43fb685b48fdc83337465457eec54fd" title="In replies this indicates that not any writing will work.">BURN_WRITE_NONE</a> <a name="l00148"></a>00148 }; <a name="l00149"></a>00149 <span class="comment"></span> <a name="l00150"></a>00150 <span class="comment">/** Data format to send to the drive */</span> <a name="l00151"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229">00151</a> <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229" title="Data format to send to the drive.">burn_block_types</a> <a name="l00152"></a>00152 {<span class="comment"></span> <a name="l00153"></a>00153 <span class="comment"> /** sync, headers, edc/ecc provided by lib/user */</span> <a name="l00154"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a4dc1f5cc0e38b2bd2fff9aaf9656ea6a">00154</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a4dc1f5cc0e38b2bd2fff9aaf9656ea6a" title="sync, headers, edc/ecc provided by lib/user">BURN_BLOCK_RAW0</a> = 1,<span class="comment"></span> <a name="l00155"></a>00155 <span class="comment"> /** sync, headers, edc/ecc and p/q subs provided by lib/user */</span> <a name="l00156"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229ab94edf927b9479bfb8c6cbedad5f0245">00156</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229ab94edf927b9479bfb8c6cbedad5f0245" title="sync, headers, edc/ecc and p/q subs provided by lib/user">BURN_BLOCK_RAW16</a> = 2,<span class="comment"></span> <a name="l00157"></a>00157 <span class="comment"> /** sync, headers, edc/ecc and packed p-w subs provided by lib/user */</span> <a name="l00158"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a5ca2023144c1fb6516ebca436f6a4378">00158</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a5ca2023144c1fb6516ebca436f6a4378" title="sync, headers, edc/ecc and packed p-w subs provided by lib/user">BURN_BLOCK_RAW96P</a> = 4,<span class="comment"></span> <a name="l00159"></a>00159 <span class="comment"> /** sync, headers, edc/ecc and raw p-w subs provided by lib/user */</span> <a name="l00160"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229aff1d4646b636b043a810e791bbaf795c">00160</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229aff1d4646b636b043a810e791bbaf795c" title="sync, headers, edc/ecc and raw p-w subs provided by lib/user">BURN_BLOCK_RAW96R</a> = 8,<span class="comment"></span> <a name="l00161"></a>00161 <span class="comment"> /** only 2048 bytes of user data provided by lib/user */</span> <a name="l00162"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229ac8c0ec2f18cbf7e126757b5132d7b68d">00162</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229ac8c0ec2f18cbf7e126757b5132d7b68d" title="only 2048 bytes of user data provided by lib/user">BURN_BLOCK_MODE1</a> = 256,<span class="comment"></span> <a name="l00163"></a>00163 <span class="comment"> /** 2336 bytes of user data provided by lib/user */</span> <a name="l00164"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229ad7c7e459e532251bcd5420ac3d79cc2e">00164</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229ad7c7e459e532251bcd5420ac3d79cc2e" title="2336 bytes of user data provided by lib/user">BURN_BLOCK_MODE2R</a> = 512,<span class="comment"></span> <a name="l00165"></a>00165 <span class="comment"> /** 2048 bytes of user data provided by lib/user</span> <a name="l00166"></a>00166 <span class="comment"> subheader provided in write parameters</span> <a name="l00167"></a>00167 <span class="comment"> are we ever going to support this shit? I vote no.</span> <a name="l00168"></a>00168 <span class="comment"> (supposed to be supported on all drives...)</span> <a name="l00169"></a>00169 <span class="comment"> */</span> <a name="l00170"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a1ddf2eebb7bde048c4aa88e1b240c931">00170</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a1ddf2eebb7bde048c4aa88e1b240c931" title="2048 bytes of user data provided by lib/user subheader provided in write parameters...">BURN_BLOCK_MODE2_PATHETIC</a> = 1024,<span class="comment"></span> <a name="l00171"></a>00171 <span class="comment"> /** 2048 bytes of data + 8 byte subheader provided by lib/user</span> <a name="l00172"></a>00172 <span class="comment"> hey, this is also dumb</span> <a name="l00173"></a>00173 <span class="comment"> */</span> <a name="l00174"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a890315f2742ba0b2477a058939e1555d">00174</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a890315f2742ba0b2477a058939e1555d" title="2048 bytes of data + 8 byte subheader provided by lib/user hey, this is also dumb...">BURN_BLOCK_MODE2_LAME</a> = 2048,<span class="comment"></span> <a name="l00175"></a>00175 <span class="comment"> /** 2324 bytes of data provided by lib/user</span> <a name="l00176"></a>00176 <span class="comment"> subheader provided in write parameters</span> <a name="l00177"></a>00177 <span class="comment"> no sir, I don't like it.</span> <a name="l00178"></a>00178 <span class="comment"> */</span> <a name="l00179"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a1b4275ac7f3691ff93f61729c6260a96">00179</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a1b4275ac7f3691ff93f61729c6260a96" title="2324 bytes of data provided by lib/user subheader provided in write parameters no...">BURN_BLOCK_MODE2_OBSCURE</a> = 4096,<span class="comment"></span> <a name="l00180"></a>00180 <span class="comment"> /** 2332 bytes of data supplied by lib/user</span> <a name="l00181"></a>00181 <span class="comment"> 8 bytes sub header provided in write parameters</span> <a name="l00182"></a>00182 <span class="comment"> this is the second least suck mode2, and is mandatory for</span> <a name="l00183"></a>00183 <span class="comment"> all drives to support.</span> <a name="l00184"></a>00184 <span class="comment"> */</span> <a name="l00185"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a301c73375dbc48d855a7c00142d7d37b">00185</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a301c73375dbc48d855a7c00142d7d37b" title="2332 bytes of data supplied by lib/user 8 bytes sub header provided in write parameters...">BURN_BLOCK_MODE2_OK</a> = 8192,<span class="comment"></span> <a name="l00186"></a>00186 <span class="comment"> /** SAO block sizes are based on cue sheet, so use this. */</span> <a name="l00187"></a><a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a158699d12be05c36d906d31e3dd77948">00187</a> <a class="code" href="libburn_8h.html#a2d80692168ddc1ef2d4d12a9c34fe229a158699d12be05c36d906d31e3dd77948" title="SAO block sizes are based on cue sheet, so use this.">BURN_BLOCK_SAO</a> = 16384 <a name="l00188"></a>00188 }; <a name="l00189"></a>00189 <span class="comment"></span> <a name="l00190"></a>00190 <span class="comment">/** Possible status of the drive in regard to the disc in it. */</span> <a name="l00191"></a><a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54">00191</a> <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54" title="Possible status of the drive in regard to the disc in it.">burn_disc_status</a> <a name="l00192"></a>00192 {<span class="comment"></span> <a name="l00193"></a>00193 <span class="comment"> /** The current status is not yet known */</span> <a name="l00194"></a><a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54a04ea5fb0a755b8a546064d6f4c95c8a4">00194</a> <a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54a04ea5fb0a755b8a546064d6f4c95c8a4" title="The current status is not yet known.">BURN_DISC_UNREADY</a>, <a name="l00195"></a>00195 <span class="comment"></span> <a name="l00196"></a>00196 <span class="comment"> /** The drive holds a blank disc. It is ready for writing from scratch.</span> <a name="l00197"></a>00197 <span class="comment"> Unused multi-session media:</span> <a name="l00198"></a>00198 <span class="comment"> CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, BD-R</span> <a name="l00199"></a>00199 <span class="comment"> Blanked multi-session media (i.e. treated by burn_disc_erase())</span> <a name="l00200"></a>00200 <span class="comment"> CD-RW, DVD-RW</span> <a name="l00201"></a>00201 <span class="comment"> Overwriteable media with or without valid data</span> <a name="l00202"></a>00202 <span class="comment"> DVD-RAM, DVD+RW, formatted DVD-RW, BD-RE</span> <a name="l00203"></a>00203 <span class="comment"> */</span> <a name="l00204"></a><a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54a59c757934ef338281512efce4ab6fd93">00204</a> <a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54a59c757934ef338281512efce4ab6fd93" title="The drive holds a blank disc.">BURN_DISC_BLANK</a>, <a name="l00205"></a>00205 <span class="comment"></span> <a name="l00206"></a>00206 <span class="comment"> /** There is no disc at all in the drive */</span> <a name="l00207"></a><a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54a23eef5011f3aa95ce1858a2930c22c69">00207</a> <a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54a23eef5011f3aa95ce1858a2930c22c69" title="There is no disc at all in the drive.">BURN_DISC_EMPTY</a>, <a name="l00208"></a>00208 <span class="comment"></span> <a name="l00209"></a>00209 <span class="comment"> /** There is an incomplete disc in the drive. It is ready for appending</span> <a name="l00210"></a>00210 <span class="comment"> another session.</span> <a name="l00211"></a>00211 <span class="comment"> Written but not yet closed multi-session media</span> <a name="l00212"></a>00212 <span class="comment"> CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, BD-R</span> <a name="l00213"></a>00213 <span class="comment"> */</span> <a name="l00214"></a><a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54acda6fac8462fa9affb4bff80daa2ab3f">00214</a> <a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54acda6fac8462fa9affb4bff80daa2ab3f" title="There is an incomplete disc in the drive.">BURN_DISC_APPENDABLE</a>, <a name="l00215"></a>00215 <span class="comment"></span> <a name="l00216"></a>00216 <span class="comment"> /** There is a disc with data on it in the drive. It is usable only for</span> <a name="l00217"></a>00217 <span class="comment"> reading.</span> <a name="l00218"></a>00218 <span class="comment"> Written and closed multi-session media</span> <a name="l00219"></a>00219 <span class="comment"> CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, BD-R</span> <a name="l00220"></a>00220 <span class="comment"> Read-Only media</span> <a name="l00221"></a>00221 <span class="comment"> CD-ROM, DVD-ROM, BD-ROM</span> <a name="l00222"></a>00222 <span class="comment"> Note that many DVD-ROM drives report any written media</span> <a name="l00223"></a>00223 <span class="comment"> as Read-Only media and not by their real media types.</span> <a name="l00224"></a>00224 <span class="comment"> */</span> <a name="l00225"></a><a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54ae0ea0a584e319ee775062c88975c93cd">00225</a> <a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54ae0ea0a584e319ee775062c88975c93cd" title="There is a disc with data on it in the drive.">BURN_DISC_FULL</a>, <a name="l00226"></a>00226 <a name="l00227"></a>00227 <span class="comment">/* ts A61007 */</span> <a name="l00228"></a>00228 <span class="comment">/* @since 0.2.4 */</span><span class="comment"></span> <a name="l00229"></a>00229 <span class="comment"> /** The drive was not grabbed when the status was inquired */</span> <a name="l00230"></a><a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54a56872aaf0bacb66e473587f466f8b5eb">00230</a> <a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54a56872aaf0bacb66e473587f466f8b5eb" title="The drive was not grabbed when the status was inquired.">BURN_DISC_UNGRABBED</a>, <a name="l00231"></a>00231 <a name="l00232"></a>00232 <span class="comment">/* ts A61020 */</span> <a name="l00233"></a>00233 <span class="comment">/* @since 0.2.6 */</span><span class="comment"></span> <a name="l00234"></a>00234 <span class="comment"> /** The media seems to be unsuitable for reading and for writing */</span> <a name="l00235"></a><a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54aaf7330c61d75af35667384f513aa4d24">00235</a> <a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54aaf7330c61d75af35667384f513aa4d24" title="The media seems to be unsuitable for reading and for writing.">BURN_DISC_UNSUITABLE</a> <a name="l00236"></a>00236 }; <a name="l00237"></a>00237 <a name="l00238"></a>00238 <span class="comment"></span> <a name="l00239"></a>00239 <span class="comment">/** Possible data source return values */</span> <a name="l00240"></a><a class="code" href="libburn_8h.html#aa5ddf1fe21e47ff4d4a44262c1d7da9b">00240</a> <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#aa5ddf1fe21e47ff4d4a44262c1d7da9b" title="Possible data source return values.">burn_source_status</a> <a name="l00241"></a>00241 {<span class="comment"></span> <a name="l00242"></a>00242 <span class="comment"> /** The source is ok */</span> <a name="l00243"></a><a class="code" href="libburn_8h.html#aa5ddf1fe21e47ff4d4a44262c1d7da9ba936b5414e25492f45a3f240941f3d9a1">00243</a> <a class="code" href="libburn_8h.html#aa5ddf1fe21e47ff4d4a44262c1d7da9ba936b5414e25492f45a3f240941f3d9a1" title="The source is ok.">BURN_SOURCE_OK</a>,<span class="comment"></span> <a name="l00244"></a>00244 <span class="comment"> /** The source is at end of file */</span> <a name="l00245"></a><a class="code" href="libburn_8h.html#aa5ddf1fe21e47ff4d4a44262c1d7da9ba687a05195174024eaecfbb43a50d4d5d">00245</a> <a class="code" href="libburn_8h.html#aa5ddf1fe21e47ff4d4a44262c1d7da9ba687a05195174024eaecfbb43a50d4d5d" title="The source is at end of file.">BURN_SOURCE_EOF</a>,<span class="comment"></span> <a name="l00246"></a>00246 <span class="comment"> /** The source is unusable */</span> <a name="l00247"></a><a class="code" href="libburn_8h.html#aa5ddf1fe21e47ff4d4a44262c1d7da9baef9df463dc8227c73fbfbcc9bc561dfb">00247</a> <a class="code" href="libburn_8h.html#aa5ddf1fe21e47ff4d4a44262c1d7da9baef9df463dc8227c73fbfbcc9bc561dfb" title="The source is unusable.">BURN_SOURCE_FAILED</a> <a name="l00248"></a>00248 }; <a name="l00249"></a>00249 <a name="l00250"></a>00250 <span class="comment"></span> <a name="l00251"></a>00251 <span class="comment">/** Possible busy states for a drive */</span> <a name="l00252"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802b">00252</a> <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802b" title="Possible busy states for a drive.">burn_drive_status</a> <a name="l00253"></a>00253 {<span class="comment"></span> <a name="l00254"></a>00254 <span class="comment"> /** The drive is not in an operation */</span> <a name="l00255"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802badcb522cf8ccf1349e3d69826c3e1757f">00255</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802badcb522cf8ccf1349e3d69826c3e1757f" title="The drive is not in an operation.">BURN_DRIVE_IDLE</a>,<span class="comment"></span> <a name="l00256"></a>00256 <span class="comment"> /** The library is spawning the processes to handle a pending</span> <a name="l00257"></a>00257 <span class="comment"> operation (A read/write/etc is about to start but hasn't quite</span> <a name="l00258"></a>00258 <span class="comment"> yet) */</span> <a name="l00259"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba9c16cf7335531f54df68a0b280c75898">00259</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba9c16cf7335531f54df68a0b280c75898" title="The library is spawning the processes to handle a pending operation (A read/write/etc...">BURN_DRIVE_SPAWNING</a>,<span class="comment"></span> <a name="l00260"></a>00260 <span class="comment"> /** The drive is reading data from a disc */</span> <a name="l00261"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802bad4620cc17a68490800416627d6a8f315">00261</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802bad4620cc17a68490800416627d6a8f315" title="The drive is reading data from a disc.">BURN_DRIVE_READING</a>,<span class="comment"></span> <a name="l00262"></a>00262 <span class="comment"> /** The drive is writing data to a disc */</span> <a name="l00263"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba3560c4470b29bc7a04d864590487bba2">00263</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba3560c4470b29bc7a04d864590487bba2" title="The drive is writing data to a disc.">BURN_DRIVE_WRITING</a>,<span class="comment"></span> <a name="l00264"></a>00264 <span class="comment"> /** The drive is writing Lead-In */</span> <a name="l00265"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba1d6464c47f94c3056ad25167e322d728">00265</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba1d6464c47f94c3056ad25167e322d728" title="The drive is writing Lead-In.">BURN_DRIVE_WRITING_LEADIN</a>,<span class="comment"></span> <a name="l00266"></a>00266 <span class="comment"> /** The drive is writing Lead-Out */</span> <a name="l00267"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba59d559ab3b031035c9b8798f73eaa847">00267</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba59d559ab3b031035c9b8798f73eaa847" title="The drive is writing Lead-Out.">BURN_DRIVE_WRITING_LEADOUT</a>,<span class="comment"></span> <a name="l00268"></a>00268 <span class="comment"> /** The drive is erasing a disc */</span> <a name="l00269"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba86dd049f7f882f728fd3b426034ce197">00269</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba86dd049f7f882f728fd3b426034ce197" title="The drive is erasing a disc.">BURN_DRIVE_ERASING</a>,<span class="comment"></span> <a name="l00270"></a>00270 <span class="comment"> /** The drive is being grabbed */</span> <a name="l00271"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba538ec757b2d3df21d501365ad499b9b7">00271</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba538ec757b2d3df21d501365ad499b9b7" title="The drive is being grabbed.">BURN_DRIVE_GRABBING</a>, <a name="l00272"></a>00272 <a name="l00273"></a>00273 <span class="comment">/* ts A61102 */</span> <a name="l00274"></a>00274 <span class="comment">/* @since 0.2.6 */</span><span class="comment"></span> <a name="l00275"></a>00275 <span class="comment"> /** The drive gets written zeroes before the track payload data */</span> <a name="l00276"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802bab66127d82bf72b234ee2bfb62e6535f5">00276</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802bab66127d82bf72b234ee2bfb62e6535f5" title="The drive gets written zeroes before the track payload data.">BURN_DRIVE_WRITING_PREGAP</a>,<span class="comment"></span> <a name="l00277"></a>00277 <span class="comment"> /** The drive is told to close a track (TAO only) */</span> <a name="l00278"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802bab079990294847289e1081adbb17057a5">00278</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802bab079990294847289e1081adbb17057a5" title="The drive is told to close a track (TAO only).">BURN_DRIVE_CLOSING_TRACK</a>,<span class="comment"></span> <a name="l00279"></a>00279 <span class="comment"> /** The drive is told to close a session (TAO only) */</span> <a name="l00280"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba4645cd88b6a6ff0e60a602904186933f">00280</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba4645cd88b6a6ff0e60a602904186933f" title="The drive is told to close a session (TAO only).">BURN_DRIVE_CLOSING_SESSION</a>, <a name="l00281"></a>00281 <a name="l00282"></a>00282 <span class="comment">/* ts A61223 */</span> <a name="l00283"></a>00283 <span class="comment">/* @since 0.3.0 */</span><span class="comment"></span> <a name="l00284"></a>00284 <span class="comment"> /** The drive is formatting media */</span> <a name="l00285"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba01ecd28c0de7281e29de662a0a03ad0d">00285</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba01ecd28c0de7281e29de662a0a03ad0d" title="The drive is formatting media.">BURN_DRIVE_FORMATTING</a>, <a name="l00286"></a>00286 <a name="l00287"></a>00287 <span class="comment">/* ts A70822 */</span> <a name="l00288"></a>00288 <span class="comment">/* @since 0.4.0 */</span><span class="comment"></span> <a name="l00289"></a>00289 <span class="comment"> /** The drive is busy in synchronous read (if you see this then it</span> <a name="l00290"></a>00290 <span class="comment"> has been interrupted) */</span> <a name="l00291"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba0326160a63b1aaacf50bc4f158952064">00291</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba0326160a63b1aaacf50bc4f158952064" title="The drive is busy in synchronous read (if you see this then it has been interrupted)...">BURN_DRIVE_READING_SYNC</a>,<span class="comment"></span> <a name="l00292"></a>00292 <span class="comment"> /** The drive is busy in synchronous write (if you see this then it</span> <a name="l00293"></a>00293 <span class="comment"> has been interrupted) */</span> <a name="l00294"></a><a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba9381d396f2e21af3ff437f4d4f563fca">00294</a> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802ba9381d396f2e21af3ff437f4d4f563fca" title="The drive is busy in synchronous write (if you see this then it has been interrupted)...">BURN_DRIVE_WRITING_SYNC</a> <a name="l00295"></a>00295 <a name="l00296"></a>00296 }; <a name="l00297"></a>00297 <a name="l00298"></a>00298 <span class="comment"></span> <a name="l00299"></a>00299 <span class="comment">/** Information about a track on a disc - this is from the q sub channel of the</span> <a name="l00300"></a>00300 <span class="comment"> lead-in area of a disc. The documentation here is very terse.</span> <a name="l00301"></a>00301 <span class="comment"> See a document such as mmc3 for proper information.</span> <a name="l00302"></a>00302 <span class="comment"></span> <a name="l00303"></a>00303 <span class="comment"> CAUTION : This structure is prone to future extension !</span> <a name="l00304"></a>00304 <span class="comment"></span> <a name="l00305"></a>00305 <span class="comment"> Do not restrict your application to unsigned char with any counter like</span> <a name="l00306"></a>00306 <span class="comment"> "session", "point", "pmin", ...</span> <a name="l00307"></a>00307 <span class="comment"> Do not rely on the current size of a burn_toc_entry. </span> <a name="l00308"></a>00308 <span class="comment"></span> <a name="l00309"></a>00309 <span class="comment"> ts A70201 : DVD extension, see below</span> <a name="l00310"></a>00310 <span class="comment">*/</span> <a name="l00311"></a><a class="code" href="structburn__toc__entry.html">00311</a> <span class="keyword">struct </span><a class="code" href="structburn__toc__entry.html" title="Information about a track on a disc - this is from the q sub channel of the lead-in...">burn_toc_entry</a> <a name="l00312"></a>00312 {<span class="comment"></span> <a name="l00313"></a>00313 <span class="comment"> /** Session the track is in */</span> <a name="l00314"></a><a class="code" href="structburn__toc__entry.html#a859be551dea1325045ab73f16a8f9231">00314</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#a859be551dea1325045ab73f16a8f9231" title="Session the track is in.">session</a>;<span class="comment"></span> <a name="l00315"></a>00315 <span class="comment"> /** Type of data. for this struct to be valid, it must be 1 */</span> <a name="l00316"></a><a class="code" href="structburn__toc__entry.html#a273b4cd97c47d8b6da31e786fde05205">00316</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#a273b4cd97c47d8b6da31e786fde05205" title="Type of data.">adr</a>;<span class="comment"></span> <a name="l00317"></a>00317 <span class="comment"> /** Type of data in the track */</span> <a name="l00318"></a><a class="code" href="structburn__toc__entry.html#a9e0b54e1f55e0dec14c108d01c1550cb">00318</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#a9e0b54e1f55e0dec14c108d01c1550cb" title="Type of data in the track.">control</a>;<span class="comment"></span> <a name="l00319"></a>00319 <span class="comment"> /** Zero. Always. Really. */</span> <a name="l00320"></a><a class="code" href="structburn__toc__entry.html#a910d5a61ebdb4f7d492f0cd78bea1f74">00320</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#a910d5a61ebdb4f7d492f0cd78bea1f74" title="Zero.">tno</a>;<span class="comment"></span> <a name="l00321"></a>00321 <span class="comment"> /** Track number or special information */</span> <a name="l00322"></a><a class="code" href="structburn__toc__entry.html#a80a0042a85308bbe873ddc082e3787f6">00322</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#a80a0042a85308bbe873ddc082e3787f6" title="Track number or special information.">point</a>; <a name="l00323"></a><a class="code" href="structburn__toc__entry.html#abbfff4daf185f67b44af1e023cab51f2">00323</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#abbfff4daf185f67b44af1e023cab51f2">min</a>; <a name="l00324"></a><a class="code" href="structburn__toc__entry.html#aae09be56c752ae28c82fe843ddd2edcb">00324</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#aae09be56c752ae28c82fe843ddd2edcb">sec</a>; <a name="l00325"></a><a class="code" href="structburn__toc__entry.html#a311604a76c7057d79aa926ed52e55aea">00325</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#a311604a76c7057d79aa926ed52e55aea">frame</a>; <a name="l00326"></a><a class="code" href="structburn__toc__entry.html#ac94ce897703c1bfbb9a12a64aa85f3ba">00326</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#ac94ce897703c1bfbb9a12a64aa85f3ba">zero</a>;<span class="comment"></span> <a name="l00327"></a>00327 <span class="comment"> /** Track start time minutes for normal tracks */</span> <a name="l00328"></a><a class="code" href="structburn__toc__entry.html#a5f6cdf2f9fea285b3e2c56db89959997">00328</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#a5f6cdf2f9fea285b3e2c56db89959997" title="Track start time minutes for normal tracks.">pmin</a>;<span class="comment"></span> <a name="l00329"></a>00329 <span class="comment"> /** Track start time seconds for normal tracks */</span> <a name="l00330"></a><a class="code" href="structburn__toc__entry.html#a5d2b1c4180cd83e58fdb9f3741076fd1">00330</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#a5d2b1c4180cd83e58fdb9f3741076fd1" title="Track start time seconds for normal tracks.">psec</a>;<span class="comment"></span> <a name="l00331"></a>00331 <span class="comment"> /** Track start time frames for normal tracks */</span> <a name="l00332"></a><a class="code" href="structburn__toc__entry.html#ab0baffe39414eebb172008db80745131">00332</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#ab0baffe39414eebb172008db80745131" title="Track start time frames for normal tracks.">pframe</a>; <a name="l00333"></a>00333 <a name="l00334"></a>00334 <span class="comment">/* Indicates whether extension data are valid and eventually override</span> <a name="l00335"></a>00335 <span class="comment"> older elements in this structure:</span> <a name="l00336"></a>00336 <span class="comment"> bit0= DVD extension is valid @since 0.3.2</span> <a name="l00337"></a>00337 <span class="comment"> @since 0.5.2 : DVD extensions are made valid for CD too</span> <a name="l00338"></a>00338 <span class="comment"> */</span> <a name="l00339"></a><a class="code" href="structburn__toc__entry.html#a32ec83dd9468d0e0bbf6c7619f711e14">00339</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#a32ec83dd9468d0e0bbf6c7619f711e14">extensions_valid</a>; <a name="l00340"></a>00340 <a name="l00341"></a>00341 <span class="comment">/* ts A70201 : DVD extension.</span> <a name="l00342"></a>00342 <span class="comment"> If invalid the members are guaranteed to be 0. */</span> <a name="l00343"></a>00343 <span class="comment">/* @since 0.3.2 */</span> <a name="l00344"></a>00344 <span class="comment">/* Tracks and session numbers are 16 bit. Here are the high bytes. */</span> <a name="l00345"></a><a class="code" href="structburn__toc__entry.html#ae707968153ebd679a9904e0ceae961b7">00345</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#ae707968153ebd679a9904e0ceae961b7">session_msb</a>; <a name="l00346"></a><a class="code" href="structburn__toc__entry.html#a7d6e7b8c339c64269a00864ab264121b">00346</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structburn__toc__entry.html#a7d6e7b8c339c64269a00864ab264121b">point_msb</a>; <a name="l00347"></a>00347 <span class="comment">/* pmin, psec, and pframe may be too small if DVD extension is valid */</span> <a name="l00348"></a><a class="code" href="structburn__toc__entry.html#a4685ab3632c0020cb529255d15df12b8">00348</a> <span class="keywordtype">int</span> <a class="code" href="structburn__toc__entry.html#a4685ab3632c0020cb529255d15df12b8">start_lba</a>; <a name="l00349"></a>00349 <span class="comment">/* min, sec, and frame may be too small if DVD extension is valid */</span> <a name="l00350"></a><a class="code" href="structburn__toc__entry.html#a90d8e8108c6de79edfcbece170e2ace2">00350</a> <span class="keywordtype">int</span> <a class="code" href="structburn__toc__entry.html#a90d8e8108c6de79edfcbece170e2ace2">track_blocks</a>; <a name="l00351"></a>00351 <a name="l00352"></a>00352 }; <a name="l00353"></a>00353 <a name="l00354"></a>00354 <span class="comment"></span> <a name="l00355"></a>00355 <span class="comment">/** Data source interface for tracks.</span> <a name="l00356"></a>00356 <span class="comment"> This allows to use arbitrary program code as provider of track input data.</span> <a name="l00357"></a>00357 <span class="comment"></span> <a name="l00358"></a>00358 <span class="comment"> Objects compliant to this interface are either provided by the application</span> <a name="l00359"></a>00359 <span class="comment"> or by API calls of libburn: burn_fd_source_new() , burn_file_source_new(),</span> <a name="l00360"></a>00360 <span class="comment"> and burn_fifo_source_new().</span> <a name="l00361"></a>00361 <span class="comment"></span> <a name="l00362"></a>00362 <span class="comment"> The API calls allow to use any file object as data source. Consider to feed</span> <a name="l00363"></a>00363 <span class="comment"> an eventual custom data stream asynchronously into a pipe(2) and to let</span> <a name="l00364"></a>00364 <span class="comment"> libburn handle the rest. </span> <a name="l00365"></a>00365 <span class="comment"> In this case the following rule applies:</span> <a name="l00366"></a>00366 <span class="comment"> Call burn_source_free() exactly once for every source obtained from</span> <a name="l00367"></a>00367 <span class="comment"> libburn API. You MUST NOT otherwise use or manipulate its components.</span> <a name="l00368"></a>00368 <span class="comment"></span> <a name="l00369"></a>00369 <span class="comment"> In general, burn_source objects can be freed as soon as they are attached</span> <a name="l00370"></a>00370 <span class="comment"> to track objects. The track objects will keep them alive and dispose them</span> <a name="l00371"></a>00371 <span class="comment"> when they are no longer needed. With a fifo burn_source it makes sense to</span> <a name="l00372"></a>00372 <span class="comment"> keep the own reference for inquiring its state while burning is in</span> <a name="l00373"></a>00373 <span class="comment"> progress.</span> <a name="l00374"></a>00374 <span class="comment"></span> <a name="l00375"></a>00375 <span class="comment"> ---</span> <a name="l00376"></a>00376 <span class="comment"></span> <a name="l00377"></a>00377 <span class="comment"> The following description of burn_source applies only to application</span> <a name="l00378"></a>00378 <span class="comment"> implemented burn_source objects. You need not to know it for API provided</span> <a name="l00379"></a>00379 <span class="comment"> ones.</span> <a name="l00380"></a>00380 <span class="comment"></span> <a name="l00381"></a>00381 <span class="comment"> If you really implement an own passive data producer by this interface,</span> <a name="l00382"></a>00382 <span class="comment"> then beware: it can do anything and it can spoil everything.</span> <a name="l00383"></a>00383 <span class="comment"></span> <a name="l00384"></a>00384 <span class="comment"> In this case the functions (*read), (*get_size), (*set_size), (*free_data)</span> <a name="l00385"></a>00385 <span class="comment"> MUST be implemented by the application and attached to the object at</span> <a name="l00386"></a>00386 <span class="comment"> creation time.</span> <a name="l00387"></a>00387 <span class="comment"> Function (*read_sub) is allowed to be NULL or it MUST be implemented and</span> <a name="l00388"></a>00388 <span class="comment"> attached.</span> <a name="l00389"></a>00389 <span class="comment"></span> <a name="l00390"></a>00390 <span class="comment"> burn_source.refcount MUST be handled properly: If not exactly as many</span> <a name="l00391"></a>00391 <span class="comment"> references are freed as have been obtained, then either memory leaks or</span> <a name="l00392"></a>00392 <span class="comment"> corrupted memory are the consequence.</span> <a name="l00393"></a>00393 <span class="comment"> All objects which are referred to by *data must be kept existent until</span> <a name="l00394"></a>00394 <span class="comment"> (*free_data) is called via burn_source_free() by the last referer.</span> <a name="l00395"></a>00395 <span class="comment">*/</span> <a name="l00396"></a><a class="code" href="structburn__source.html">00396</a> <span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> { <a name="l00397"></a>00397 <span class="comment"></span> <a name="l00398"></a>00398 <span class="comment"> /** Reference count for the data source. MUST be 1 when a new source</span> <a name="l00399"></a>00399 <span class="comment"> is created and thus the first reference is handed out. Increment</span> <a name="l00400"></a>00400 <span class="comment"> it to take more references for yourself. Use burn_source_free()</span> <a name="l00401"></a>00401 <span class="comment"> to destroy your references to it. */</span> <a name="l00402"></a><a class="code" href="structburn__source.html#ada75710f35fe822c592b37d01505609d">00402</a> <span class="keywordtype">int</span> <a class="code" href="structburn__source.html#ada75710f35fe822c592b37d01505609d" title="Reference count for the data source.">refcount</a>; <a name="l00403"></a>00403 <a name="l00404"></a>00404 <span class="comment"></span> <a name="l00405"></a>00405 <span class="comment"> /** Read data from the source. Semantics like with read(2), but MUST</span> <a name="l00406"></a>00406 <span class="comment"> either deliver the full buffer as defined by size or MUST deliver</span> <a name="l00407"></a>00407 <span class="comment"> EOF (return 0) or failure (return -1) at this call or at the</span> <a name="l00408"></a>00408 <span class="comment"> next following call. I.e. the only incomplete buffer may be the</span> <a name="l00409"></a>00409 <span class="comment"> last one from that source.</span> <a name="l00410"></a>00410 <span class="comment"> libburn will read a single sector by each call to (*read).</span> <a name="l00411"></a>00411 <span class="comment"> The size of a sector depends on BURN_MODE_*. The known range is</span> <a name="l00412"></a>00412 <span class="comment"> 2048 to 2352.</span> <a name="l00413"></a>00413 <span class="comment"></span> <a name="l00414"></a>00414 <span class="comment"> If this call is reading from a pipe then it will learn</span> <a name="l00415"></a>00415 <span class="comment"> about the end of data only when that pipe gets closed on the</span> <a name="l00416"></a>00416 <span class="comment"> feeder side. So if the track size is not fixed or if the pipe</span> <a name="l00417"></a>00417 <span class="comment"> delivers less than the predicted amount or if the size is not</span> <a name="l00418"></a>00418 <span class="comment"> block aligned, then burning will halt until the input process</span> <a name="l00419"></a>00419 <span class="comment"> closes the pipe.</span> <a name="l00420"></a>00420 <span class="comment"></span> <a name="l00421"></a>00421 <span class="comment"> IMPORTANT:</span> <a name="l00422"></a>00422 <span class="comment"> If this function pointer is NULL, then the struct burn_source is of</span> <a name="l00423"></a>00423 <span class="comment"> version >= 1 and the job of .(*read)() is done by .(*read_xt)().</span> <a name="l00424"></a>00424 <span class="comment"> See below, member .version.</span> <a name="l00425"></a>00425 <span class="comment"> */</span> <a name="l00426"></a>00426 int (*<a class="code" href="structburn__source.html#a200c110bc2478463843b7779b8a25493" title="Read data from the source.">read</a>)(<span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> size); <a name="l00427"></a>00427 <a name="l00428"></a>00428 <span class="comment"></span> <a name="l00429"></a>00429 <span class="comment"> /** Read subchannel data from the source (NULL if lib generated) </span> <a name="l00430"></a>00430 <span class="comment"> WARNING: This is an obscure feature with CD raw write modes.</span> <a name="l00431"></a>00431 <span class="comment"> Unless you checked the libburn code for correctness in that aspect</span> <a name="l00432"></a>00432 <span class="comment"> you should not rely on raw writing with own subchannels.</span> <a name="l00433"></a>00433 <span class="comment"> ADVICE: Set this pointer to NULL.</span> <a name="l00434"></a>00434 <span class="comment"> */</span> <a name="l00435"></a>00435 int (*<a class="code" href="structburn__source.html#ad8332b0edc6e32c2416ea17abbc37a34" title="Read subchannel data from the source (NULL if lib generated) WARNING: This is an...">read_sub</a>)(<span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> size); <a name="l00436"></a>00436 <a name="l00437"></a>00437 <span class="comment"></span> <a name="l00438"></a>00438 <span class="comment"> /** Get the size of the source's data. Return 0 means unpredictable</span> <a name="l00439"></a>00439 <span class="comment"> size. If application provided (*get_size) allows return 0, then</span> <a name="l00440"></a>00440 <span class="comment"> the application MUST provide a fully functional (*set_size).</span> <a name="l00441"></a>00441 <span class="comment"> */</span> <a name="l00442"></a>00442 off_t (*<a class="code" href="structburn__source.html#a905045f75e49e37fe913a44b01cface8" title="Get the size of the source&#39;s data.">get_size</a>)(<span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *); <a name="l00443"></a>00443 <a name="l00444"></a>00444 <a name="l00445"></a>00445 <span class="comment">/* ts A70125 : BROKE BINARY BACKWARD COMPATIBILITY AT libburn-0.3.1. */</span> <a name="l00446"></a>00446 <span class="comment">/* @since 0.3.2 */</span><span class="comment"></span> <a name="l00447"></a>00447 <span class="comment"> /** Program the reply of (*get_size) to a fixed value. It is advised</span> <a name="l00448"></a>00448 <span class="comment"> to implement this by a attribute off_t fixed_size; in *data .</span> <a name="l00449"></a>00449 <span class="comment"> The read() function does not have to take into respect this fake</span> <a name="l00450"></a>00450 <span class="comment"> setting. It is rather a note of libburn to itself. Eventually</span> <a name="l00451"></a>00451 <span class="comment"> necessary truncation or padding is done in libburn. Truncation</span> <a name="l00452"></a>00452 <span class="comment"> is usually considered a misburn. Padding is considered ok.</span> <a name="l00453"></a>00453 <span class="comment"></span> <a name="l00454"></a>00454 <span class="comment"> libburn is supposed to work even if (*get_size) ignores the</span> <a name="l00455"></a>00455 <span class="comment"> setting by (*set_size). But your application will not be able to</span> <a name="l00456"></a>00456 <span class="comment"> enforce fixed track sizes by burn_track_set_size() and possibly</span> <a name="l00457"></a>00457 <span class="comment"> even padding might be left out.</span> <a name="l00458"></a>00458 <span class="comment"> */</span> <a name="l00459"></a>00459 int (*<a class="code" href="structburn__source.html#a14da00d9e877e6d83ccdee7e8df00158" title="Program the reply of (*get_size) to a fixed value.">set_size</a>)(<span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *source, off_t size); <a name="l00460"></a>00460 <a name="l00461"></a>00461 <span class="comment"></span> <a name="l00462"></a>00462 <span class="comment"> /** Clean up the source specific data. This function will be called</span> <a name="l00463"></a>00463 <span class="comment"> once by burn_source_free() when the last referer disposes the</span> <a name="l00464"></a>00464 <span class="comment"> source.</span> <a name="l00465"></a>00465 <span class="comment"> */</span> <a name="l00466"></a>00466 void (*<a class="code" href="structburn__source.html#a0267cb87e07dba714ec2f1201c8dc592" title="Clean up the source specific data.">free_data</a>)(<span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *); <a name="l00467"></a>00467 <a name="l00468"></a>00468 <span class="comment"></span> <a name="l00469"></a>00469 <span class="comment"> /** Next source, for when a source runs dry and padding is disabled</span> <a name="l00470"></a>00470 <span class="comment"> WARNING: This is an obscure feature. Set to NULL at creation and</span> <a name="l00471"></a>00471 <span class="comment"> from then on leave untouched and uninterpreted.</span> <a name="l00472"></a>00472 <span class="comment"> */</span> <a name="l00473"></a><a class="code" href="structburn__source.html#ac44857dc438cf3790abe5a4b6b337a39">00473</a> <span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *<a class="code" href="structburn__source.html#ac44857dc438cf3790abe5a4b6b337a39" title="Next source, for when a source runs dry and padding is disabled WARNING: This is...">next</a>; <a name="l00474"></a>00474 <a name="l00475"></a>00475 <span class="comment"></span> <a name="l00476"></a>00476 <span class="comment"> /** Source specific data. Here the various source classes express their</span> <a name="l00477"></a>00477 <span class="comment"> specific properties and the instance objects store their individual</span> <a name="l00478"></a>00478 <span class="comment"> management data.</span> <a name="l00479"></a>00479 <span class="comment"> E.g. data could point to a struct like this:</span> <a name="l00480"></a>00480 <span class="comment"> struct app_burn_source</span> <a name="l00481"></a>00481 <span class="comment"> {</span> <a name="l00482"></a>00482 <span class="comment"> struct my_app *app_handle;</span> <a name="l00483"></a>00483 <span class="comment"> ... other individual source parameters ...</span> <a name="l00484"></a>00484 <span class="comment"> off_t fixed_size;</span> <a name="l00485"></a>00485 <span class="comment"> };</span> <a name="l00486"></a>00486 <span class="comment"></span> <a name="l00487"></a>00487 <span class="comment"> Function (*free_data) has to be prepared to clean up and free</span> <a name="l00488"></a>00488 <span class="comment"> the struct.</span> <a name="l00489"></a>00489 <span class="comment"> */</span> <a name="l00490"></a><a class="code" href="structburn__source.html#ae42ab808c7ce51af973a76c841cc6dae">00490</a> <span class="keywordtype">void</span> *<a class="code" href="structburn__source.html#ae42ab808c7ce51af973a76c841cc6dae" title="Source specific data.">data</a>; <a name="l00491"></a>00491 <a name="l00492"></a>00492 <a name="l00493"></a>00493 <span class="comment">/* ts A71222 : Supposed to be binary backwards compatible extension. */</span> <a name="l00494"></a>00494 <span class="comment">/* @since 0.4.2 */</span><span class="comment"></span> <a name="l00495"></a>00495 <span class="comment"> /** Valid only if above member .(*read)() is NULL. This indicates a</span> <a name="l00496"></a>00496 <span class="comment"> version of struct burn_source younger than 0.</span> <a name="l00497"></a>00497 <span class="comment"> From then on, member .version tells which further members exist</span> <a name="l00498"></a>00498 <span class="comment"> in the memory layout of struct burn_source. libburn will only touch</span> <a name="l00499"></a>00499 <span class="comment"> those announced extensions.</span> <a name="l00500"></a>00500 <span class="comment"></span> <a name="l00501"></a>00501 <span class="comment"> Versions:</span> <a name="l00502"></a>00502 <span class="comment"> 0 has .(*read)() != NULL, not even .version is present.</span> <a name="l00503"></a>00503 <span class="comment"> 1 has .version, .(*read_xt)(), .(*cancel)()</span> <a name="l00504"></a>00504 <span class="comment"> */</span> <a name="l00505"></a><a class="code" href="structburn__source.html#af7f96269792e56ee68c112f1e9e4027f">00505</a> <span class="keywordtype">int</span> <a class="code" href="structburn__source.html#af7f96269792e56ee68c112f1e9e4027f" title="Valid only if above member .">version</a>; <a name="l00506"></a>00506 <span class="comment"></span> <a name="l00507"></a>00507 <span class="comment"> /** This substitutes for (*read)() in versions above 0. */</span> <a name="l00508"></a>00508 int (*<a class="code" href="structburn__source.html#a7756a887e9dd87f4cfa928b781ae2f16" title="This substitutes for (*read)() in versions above 0.">read_xt</a>)(<span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *buffer, <span class="keywordtype">int</span> size); <a name="l00509"></a>00509 <span class="comment"></span> <a name="l00510"></a>00510 <span class="comment"> /** Informs the burn_source that the consumer of data prematurely</span> <a name="l00511"></a>00511 <span class="comment"> ended reading. This call may or may not be issued by libburn</span> <a name="l00512"></a>00512 <span class="comment"> before (*free_data)() is called.</span> <a name="l00513"></a>00513 <span class="comment"> */</span> <a name="l00514"></a>00514 int (*<a class="code" href="structburn__source.html#a9652a8d8f500f701ab579a3ed4e313e3" title="Informs the burn_source that the consumer of data prematurely ended reading.">cancel</a>)(<span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *source); <a name="l00515"></a>00515 }; <a name="l00516"></a>00516 <a name="l00517"></a>00517 <span class="comment"></span> <a name="l00518"></a>00518 <span class="comment">/** Information on a drive in the system */</span> <a name="l00519"></a><a class="code" href="structburn__drive__info.html">00519</a> <span class="keyword">struct </span><a class="code" href="structburn__drive__info.html" title="Information on a drive in the system.">burn_drive_info</a> <a name="l00520"></a>00520 {<span class="comment"></span> <a name="l00521"></a>00521 <span class="comment"> /** Name of the vendor of the drive */</span> <a name="l00522"></a><a class="code" href="structburn__drive__info.html#aff3ff7a51541d619f7f156ba58256992">00522</a> <span class="keywordtype">char</span> <a class="code" href="structburn__drive__info.html#aff3ff7a51541d619f7f156ba58256992" title="Name of the vendor of the drive.">vendor</a>[9];<span class="comment"></span> <a name="l00523"></a>00523 <span class="comment"> /** Name of the drive */</span> <a name="l00524"></a><a class="code" href="structburn__drive__info.html#a679639bfb29abb68d5b35269e935e88f">00524</a> <span class="keywordtype">char</span> <a class="code" href="structburn__drive__info.html#a679639bfb29abb68d5b35269e935e88f" title="Name of the drive.">product</a>[17];<span class="comment"></span> <a name="l00525"></a>00525 <span class="comment"> /** Revision of the drive */</span> <a name="l00526"></a><a class="code" href="structburn__drive__info.html#ad32e0d356a7c7aabf2183794fee6eec5">00526</a> <span class="keywordtype">char</span> <a class="code" href="structburn__drive__info.html#ad32e0d356a7c7aabf2183794fee6eec5" title="Revision of the drive.">revision</a>[5]; <a name="l00527"></a>00527 <span class="comment"></span> <a name="l00528"></a>00528 <span class="comment"> /** Invalid: Was: "Location of the drive in the filesystem." */</span><span class="comment"></span> <a name="l00529"></a>00529 <span class="comment"> /** This string has no meaning any more. Once it stored the persistent</span> <a name="l00530"></a>00530 <span class="comment"> drive address. Now always use function burn_drive_d_get_adr() to</span> <a name="l00531"></a>00531 <span class="comment"> inquire a persistent address. ^^^^^^ ALWAYS ^^^^^^^^ */</span> <a name="l00532"></a><a class="code" href="structburn__drive__info.html#a1d4aa193e4b62d05c4a7123c50d9fa20">00532</a> <span class="keywordtype">char</span> <a class="code" href="structburn__drive__info.html#a1d4aa193e4b62d05c4a7123c50d9fa20" title="Invalid: Was: &quot;Location of the drive in the filesystem.&quot;.">location</a>[17]; <a name="l00533"></a>00533 <span class="comment"></span> <a name="l00534"></a>00534 <span class="comment"> /** Can the drive read DVD-RAM discs */</span> <a name="l00535"></a><a class="code" href="structburn__drive__info.html#a8a4e421ea605dacadd9db83402d05879">00535</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a8a4e421ea605dacadd9db83402d05879" title="Can the drive read DVD-RAM discs.">read_dvdram</a>:1;<span class="comment"></span> <a name="l00536"></a>00536 <span class="comment"> /** Can the drive read DVD-R discs */</span> <a name="l00537"></a><a class="code" href="structburn__drive__info.html#a8349f5f8ca683f2853673dfd99a3a73c">00537</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a8349f5f8ca683f2853673dfd99a3a73c" title="Can the drive read DVD-R discs.">read_dvdr</a>:1;<span class="comment"></span> <a name="l00538"></a>00538 <span class="comment"> /** Can the drive read DVD-ROM discs */</span> <a name="l00539"></a><a class="code" href="structburn__drive__info.html#a5cf016d6ec0281243f8b0a66de8c6b7c">00539</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a5cf016d6ec0281243f8b0a66de8c6b7c" title="Can the drive read DVD-ROM discs.">read_dvdrom</a>:1;<span class="comment"></span> <a name="l00540"></a>00540 <span class="comment"> /** Can the drive read CD-R discs */</span> <a name="l00541"></a><a class="code" href="structburn__drive__info.html#a1ea3f46ed1fbed86e8209dcf515e1949">00541</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a1ea3f46ed1fbed86e8209dcf515e1949" title="Can the drive read CD-R discs.">read_cdr</a>:1;<span class="comment"></span> <a name="l00542"></a>00542 <span class="comment"> /** Can the drive read CD-RW discs */</span> <a name="l00543"></a><a class="code" href="structburn__drive__info.html#a49b347a1c99997adf05c0a05951030ea">00543</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a49b347a1c99997adf05c0a05951030ea" title="Can the drive read CD-RW discs.">read_cdrw</a>:1; <a name="l00544"></a>00544 <span class="comment"></span> <a name="l00545"></a>00545 <span class="comment"> /** Can the drive write DVD-RAM discs */</span> <a name="l00546"></a><a class="code" href="structburn__drive__info.html#acb21375424d23114654f7b7e831a8bb9">00546</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#acb21375424d23114654f7b7e831a8bb9" title="Can the drive write DVD-RAM discs.">write_dvdram</a>:1;<span class="comment"></span> <a name="l00547"></a>00547 <span class="comment"> /** Can the drive write DVD-R discs */</span> <a name="l00548"></a><a class="code" href="structburn__drive__info.html#a42b142728122ab65a24bacf17fa11b83">00548</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a42b142728122ab65a24bacf17fa11b83" title="Can the drive write DVD-R discs.">write_dvdr</a>:1;<span class="comment"></span> <a name="l00549"></a>00549 <span class="comment"> /** Can the drive write CD-R discs */</span> <a name="l00550"></a><a class="code" href="structburn__drive__info.html#ab8222bb9c5e9c34280886fe880fa33ef">00550</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#ab8222bb9c5e9c34280886fe880fa33ef" title="Can the drive write CD-R discs.">write_cdr</a>:1;<span class="comment"></span> <a name="l00551"></a>00551 <span class="comment"> /** Can the drive write CD-RW discs */</span> <a name="l00552"></a><a class="code" href="structburn__drive__info.html#a743634862fe7fba92ea082c648776ffa">00552</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a743634862fe7fba92ea082c648776ffa" title="Can the drive write CD-RW discs.">write_cdrw</a>:1; <a name="l00553"></a>00553 <span class="comment"></span> <a name="l00554"></a>00554 <span class="comment"> /** Can the drive simulate a write */</span> <a name="l00555"></a><a class="code" href="structburn__drive__info.html#a380d0026d4d91c271d75fdd4483b1d5e">00555</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a380d0026d4d91c271d75fdd4483b1d5e" title="Can the drive simulate a write.">write_simulate</a>:1; <a name="l00556"></a>00556 <span class="comment"></span> <a name="l00557"></a>00557 <span class="comment"> /** Can the drive report C2 errors */</span> <a name="l00558"></a><a class="code" href="structburn__drive__info.html#ada41b01ae91143bef44cce5bc5499706">00558</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#ada41b01ae91143bef44cce5bc5499706" title="Can the drive report C2 errors.">c2_errors</a>:1; <a name="l00559"></a>00559 <span class="comment"></span> <a name="l00560"></a>00560 <span class="comment"> /** The size of the drive's buffer (in kilobytes) */</span> <a name="l00561"></a><a class="code" href="structburn__drive__info.html#a885bbe08a220622cad5fbde630a745f5">00561</a> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a885bbe08a220622cad5fbde630a745f5" title="The size of the drive&#39;s buffer (in kilobytes).">buffer_size</a>;<span class="comment"></span> <a name="l00562"></a>00562 <span class="comment"> /** </span> <a name="l00563"></a>00563 <span class="comment"> * The supported block types in tao mode.</span> <a name="l00564"></a>00564 <span class="comment"> * They should be tested with the desired block type.</span> <a name="l00565"></a>00565 <span class="comment"> * See also burn_block_types.</span> <a name="l00566"></a>00566 <span class="comment"> */</span> <a name="l00567"></a><a class="code" href="structburn__drive__info.html#a7345d61635ea87c3881208460dc9ae1f">00567</a> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a7345d61635ea87c3881208460dc9ae1f" title="The supported block types in tao mode.">tao_block_types</a>;<span class="comment"></span> <a name="l00568"></a>00568 <span class="comment"> /** </span> <a name="l00569"></a>00569 <span class="comment"> * The supported block types in sao mode.</span> <a name="l00570"></a>00570 <span class="comment"> * They should be tested with the desired block type.</span> <a name="l00571"></a>00571 <span class="comment"> * See also burn_block_types.</span> <a name="l00572"></a>00572 <span class="comment"> */</span> <a name="l00573"></a><a class="code" href="structburn__drive__info.html#a6a82b2d657be87bf62982b05310261df">00573</a> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a6a82b2d657be87bf62982b05310261df" title="The supported block types in sao mode.">sao_block_types</a>;<span class="comment"></span> <a name="l00574"></a>00574 <span class="comment"> /** </span> <a name="l00575"></a>00575 <span class="comment"> * The supported block types in raw mode.</span> <a name="l00576"></a>00576 <span class="comment"> * They should be tested with the desired block type.</span> <a name="l00577"></a>00577 <span class="comment"> * See also burn_block_types.</span> <a name="l00578"></a>00578 <span class="comment"> */</span> <a name="l00579"></a><a class="code" href="structburn__drive__info.html#abed6e794b24694dbcc28ffedb3142c9b">00579</a> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#abed6e794b24694dbcc28ffedb3142c9b" title="The supported block types in raw mode.">raw_block_types</a>;<span class="comment"></span> <a name="l00580"></a>00580 <span class="comment"> /** </span> <a name="l00581"></a>00581 <span class="comment"> * The supported block types in packet mode.</span> <a name="l00582"></a>00582 <span class="comment"> * They should be tested with the desired block type.</span> <a name="l00583"></a>00583 <span class="comment"> * See also burn_block_types.</span> <a name="l00584"></a>00584 <span class="comment"> */</span> <a name="l00585"></a><a class="code" href="structburn__drive__info.html#a4d20d17ca3d3411d6c8796e9e4a4138d">00585</a> <span class="keywordtype">int</span> <a class="code" href="structburn__drive__info.html#a4d20d17ca3d3411d6c8796e9e4a4138d" title="The supported block types in packet mode.">packet_block_types</a>; <a name="l00586"></a>00586 <span class="comment"></span> <a name="l00587"></a>00587 <span class="comment"> /** The value by which this drive can be indexed when using functions</span> <a name="l00588"></a>00588 <span class="comment"> in the library. This is the value to pass to all libbburn functions</span> <a name="l00589"></a>00589 <span class="comment"> that operate on a drive. */</span> <a name="l00590"></a><a class="code" href="structburn__drive__info.html#aa53408d48157a07e48b114e6c95550d0">00590</a> <span class="keyword">struct </span>burn_drive *<a class="code" href="structburn__drive__info.html#aa53408d48157a07e48b114e6c95550d0" title="The value by which this drive can be indexed when using functions in the library...">drive</a>; <a name="l00591"></a>00591 }; <a name="l00592"></a>00592 <a name="l00593"></a>00593 <span class="comment"></span> <a name="l00594"></a>00594 <span class="comment">/** Operation progress report. All values are 0 based indices. </span> <a name="l00595"></a>00595 <span class="comment"> * */</span> <a name="l00596"></a><a class="code" href="structburn__progress.html">00596</a> <span class="keyword">struct </span><a class="code" href="structburn__progress.html" title="Operation progress report.">burn_progress</a> {<span class="comment"></span> <a name="l00597"></a>00597 <span class="comment"> /** The total number of sessions */</span> <a name="l00598"></a><a class="code" href="structburn__progress.html#a7f150e04854b94b2b4fe3359e4602afa">00598</a> <span class="keywordtype">int</span> <a class="code" href="structburn__progress.html#a7f150e04854b94b2b4fe3359e4602afa" title="The total number of sessions.">sessions</a>;<span class="comment"></span> <a name="l00599"></a>00599 <span class="comment"> /** Current session.*/</span> <a name="l00600"></a><a class="code" href="structburn__progress.html#a300edce46c85bcf322b96291f7da87dc">00600</a> <span class="keywordtype">int</span> <a class="code" href="structburn__progress.html#a300edce46c85bcf322b96291f7da87dc" title="Current session.">session</a>;<span class="comment"></span> <a name="l00601"></a>00601 <span class="comment"> /** The total number of tracks */</span> <a name="l00602"></a><a class="code" href="structburn__progress.html#a711f38142a4a1ed9055efb071c3cfe1c">00602</a> <span class="keywordtype">int</span> <a class="code" href="structburn__progress.html#a711f38142a4a1ed9055efb071c3cfe1c" title="The total number of tracks.">tracks</a>;<span class="comment"></span> <a name="l00603"></a>00603 <span class="comment"> /** Current track. */</span> <a name="l00604"></a><a class="code" href="structburn__progress.html#a93666a25e6d3611f9384e89fe2a2f65e">00604</a> <span class="keywordtype">int</span> <a class="code" href="structburn__progress.html#a93666a25e6d3611f9384e89fe2a2f65e" title="Current track.">track</a>;<span class="comment"></span> <a name="l00605"></a>00605 <span class="comment"> /** The total number of indices */</span> <a name="l00606"></a><a class="code" href="structburn__progress.html#a8f46cf5a172d4247c64cc34cad385f46">00606</a> <span class="keywordtype">int</span> <a class="code" href="structburn__progress.html#a8f46cf5a172d4247c64cc34cad385f46" title="The total number of indices.">indices</a>;<span class="comment"></span> <a name="l00607"></a>00607 <span class="comment"> /** Curent index. */</span> <a name="l00608"></a><a class="code" href="structburn__progress.html#a0d554fe904153e1ca49210a9d64bba92">00608</a> <span class="keywordtype">int</span> <a class="code" href="structburn__progress.html#a0d554fe904153e1ca49210a9d64bba92" title="Curent index.">index</a>;<span class="comment"></span> <a name="l00609"></a>00609 <span class="comment"> /** The starting logical block address */</span> <a name="l00610"></a><a class="code" href="structburn__progress.html#a5fae8dc29160c2d8cd50e7ec350a331d">00610</a> <span class="keywordtype">int</span> <a class="code" href="structburn__progress.html#a5fae8dc29160c2d8cd50e7ec350a331d" title="The starting logical block address.">start_sector</a>;<span class="comment"></span> <a name="l00611"></a>00611 <span class="comment"> /** On write: The number of sectors.</span> <a name="l00612"></a>00612 <span class="comment"> On blank: 0x10000 as upper limit for relative progress steps */</span> <a name="l00613"></a><a class="code" href="structburn__progress.html#af093a66f1ae097ba40eeac7e1c6ac5d9">00613</a> <span class="keywordtype">int</span> <a class="code" href="structburn__progress.html#af093a66f1ae097ba40eeac7e1c6ac5d9" title="On write: The number of sectors.">sectors</a>;<span class="comment"></span> <a name="l00614"></a>00614 <span class="comment"> /** On write: The current sector being processed.</span> <a name="l00615"></a>00615 <span class="comment"> On blank: Relative progress steps 0 to 0x10000 */</span> <a name="l00616"></a><a class="code" href="structburn__progress.html#a7aa74bd989075ae02a5066003874c60d">00616</a> <span class="keywordtype">int</span> <a class="code" href="structburn__progress.html#a7aa74bd989075ae02a5066003874c60d" title="On write: The current sector being processed.">sector</a>; <a name="l00617"></a>00617 <a name="l00618"></a>00618 <span class="comment">/* ts A61023 */</span> <a name="l00619"></a>00619 <span class="comment">/* @since 0.2.6 */</span><span class="comment"></span> <a name="l00620"></a>00620 <span class="comment"> /** The capacity of the drive buffer */</span> <a name="l00621"></a><a class="code" href="structburn__progress.html#a6b2690b3662cf6ebd3521fb49c307f83">00621</a> <span class="keywordtype">unsigned</span> <a class="code" href="structburn__progress.html#a6b2690b3662cf6ebd3521fb49c307f83" title="The capacity of the drive buffer.">buffer_capacity</a>;<span class="comment"></span> <a name="l00622"></a>00622 <span class="comment"> /** The free space in the drive buffer (might be slightly outdated) */</span> <a name="l00623"></a><a class="code" href="structburn__progress.html#acecdd45782b86ecec914dc2444f1f7c8">00623</a> <span class="keywordtype">unsigned</span> <a class="code" href="structburn__progress.html#acecdd45782b86ecec914dc2444f1f7c8" title="The free space in the drive buffer (might be slightly outdated).">buffer_available</a>; <a name="l00624"></a>00624 <a name="l00625"></a>00625 <span class="comment">/* ts A61119 */</span> <a name="l00626"></a>00626 <span class="comment">/* @since 0.2.6 */</span><span class="comment"></span> <a name="l00627"></a>00627 <span class="comment"> /** The number of bytes sent to the drive buffer */</span> <a name="l00628"></a><a class="code" href="structburn__progress.html#a046f511fc686d836df5deeaddcd5c54a">00628</a> off_t <a class="code" href="structburn__progress.html#a046f511fc686d836df5deeaddcd5c54a" title="The number of bytes sent to the drive buffer.">buffered_bytes</a>;<span class="comment"></span> <a name="l00629"></a>00629 <span class="comment"> /** The minimum number of bytes stored in buffer during write.</span> <a name="l00630"></a>00630 <span class="comment"> (Caution: Before surely one buffer size of bytes was processed,</span> <a name="l00631"></a>00631 <span class="comment"> this value is 0xffffffff.) </span> <a name="l00632"></a>00632 <span class="comment"> */</span> <a name="l00633"></a><a class="code" href="structburn__progress.html#a47657c55d8b25e7f75341abfec045dba">00633</a> <span class="keywordtype">unsigned</span> <a class="code" href="structburn__progress.html#a47657c55d8b25e7f75341abfec045dba" title="The minimum number of bytes stored in buffer during write.">buffer_min_fill</a>; <a name="l00634"></a>00634 }; <a name="l00635"></a>00635 <a name="l00636"></a>00636 <a name="l00637"></a>00637 <span class="comment">/* ts A61226 */</span> <a name="l00638"></a>00638 <span class="comment">/* @since 0.3.0 */</span><span class="comment"></span> <a name="l00639"></a>00639 <span class="comment">/** Description of a speed capability as reported by the drive in conjunction</span> <a name="l00640"></a>00640 <span class="comment"> with eventually loaded media. There can be more than one such object per</span> <a name="l00641"></a>00641 <span class="comment"> drive. So they are chained via .next and .prev , where NULL marks the end</span> <a name="l00642"></a>00642 <span class="comment"> of the chain. This list is set up by burn_drive_scan() and gets updated</span> <a name="l00643"></a>00643 <span class="comment"> by burn_drive_grab().</span> <a name="l00644"></a>00644 <span class="comment"> A copy may be obtained by burn_drive_get_speedlist() and disposed by</span> <a name="l00645"></a>00645 <span class="comment"> burn_drive_free_speedlist().</span> <a name="l00646"></a>00646 <span class="comment"> For technical background info see SCSI specs MMC and SPC:</span> <a name="l00647"></a>00647 <span class="comment"> mode page 2Ah (from SPC 5Ah MODE SENSE) , mmc3r10g.pdf , 6.3.11 Table 364</span> <a name="l00648"></a>00648 <span class="comment"> ACh GET PERFORMANCE, Type 03h , mmc5r03c.pdf , 6.8.5.3 Table 312</span> <a name="l00649"></a>00649 <span class="comment">*/</span> <a name="l00650"></a><a class="code" href="structburn__speed__descriptor.html">00650</a> <span class="keyword">struct </span><a class="code" href="structburn__speed__descriptor.html" title="Description of a speed capability as reported by the drive in conjunction with eventually...">burn_speed_descriptor</a> { <a name="l00651"></a>00651 <span class="comment"></span> <a name="l00652"></a>00652 <span class="comment"> /** Where this info comes from : </span> <a name="l00653"></a>00653 <span class="comment"> 0 = misc , 1 = mode page 2Ah , 2 = ACh GET PERFORMANCE */</span> <a name="l00654"></a><a class="code" href="structburn__speed__descriptor.html#af4a70acf80dd511139560d5763fbbf6a">00654</a> <span class="keywordtype">int</span> <a class="code" href="structburn__speed__descriptor.html#af4a70acf80dd511139560d5763fbbf6a" title="Where this info comes from : 0 = misc , 1 = mode page 2Ah , 2 = ACh GET PERFORMANCE...">source</a>; <a name="l00655"></a>00655 <span class="comment"></span> <a name="l00656"></a>00656 <span class="comment"> /** The media type that was current at the time of report</span> <a name="l00657"></a>00657 <span class="comment"> -2 = state unknown, -1 = no media was loaded , else see</span> <a name="l00658"></a>00658 <span class="comment"> burn_disc_get_profile() */</span> <a name="l00659"></a><a class="code" href="structburn__speed__descriptor.html#ae0dbdd281077dbea2dd39aa5dfbf8363">00659</a> <span class="keywordtype">int</span> <a class="code" href="structburn__speed__descriptor.html#ae0dbdd281077dbea2dd39aa5dfbf8363" title="The media type that was current at the time of report -2 = state unknown, -1 = no...">profile_loaded</a>; <a name="l00660"></a><a class="code" href="structburn__speed__descriptor.html#aab12cc2614fad8bdab09b05923359ab2">00660</a> <span class="keywordtype">char</span> <a class="code" href="structburn__speed__descriptor.html#aab12cc2614fad8bdab09b05923359ab2">profile_name</a>[80]; <a name="l00661"></a>00661 <span class="comment"></span> <a name="l00662"></a>00662 <span class="comment"> /** The attributed capacity of appropriate media in logical block units</span> <a name="l00663"></a>00663 <span class="comment"> i.e. 2352 raw bytes or 2048 data bytes. -1 = capacity unknown. */</span> <a name="l00664"></a><a class="code" href="structburn__speed__descriptor.html#a89ab969bcedf0de26f212080a8258676">00664</a> <span class="keywordtype">int</span> <a class="code" href="structburn__speed__descriptor.html#a89ab969bcedf0de26f212080a8258676" title="The attributed capacity of appropriate media in logical block units i.e.">end_lba</a>; <a name="l00665"></a>00665 <span class="comment"></span> <a name="l00666"></a>00666 <span class="comment"> /** Speed is given in 1000 bytes/s , 0 = invalid. The numbers</span> <a name="l00667"></a>00667 <span class="comment"> are supposed to be usable with burn_drive_set_speed() */</span> <a name="l00668"></a><a class="code" href="structburn__speed__descriptor.html#aed75181f4eec508486bdaf77ab2b1266">00668</a> <span class="keywordtype">int</span> <a class="code" href="structburn__speed__descriptor.html#aed75181f4eec508486bdaf77ab2b1266" title="Speed is given in 1000 bytes/s , 0 = invalid.">write_speed</a>; <a name="l00669"></a><a class="code" href="structburn__speed__descriptor.html#a4b34f315b381038b26b9069f0bc03a63">00669</a> <span class="keywordtype">int</span> <a class="code" href="structburn__speed__descriptor.html#a4b34f315b381038b26b9069f0bc03a63">read_speed</a>; <a name="l00670"></a>00670 <span class="comment"></span> <a name="l00671"></a>00671 <span class="comment"> /** Expert info from ACh GET PERFORMANCE and/or mode page 2Ah.</span> <a name="l00672"></a>00672 <span class="comment"> Expect values other than 0 or 1 to get a meaning in future.*/</span> <a name="l00673"></a>00673 <span class="comment">/* Rotational control: 0 = CLV/default , 1 = CAV */</span> <a name="l00674"></a><a class="code" href="structburn__speed__descriptor.html#a42f1f82fda98833172d4c47af3a2422f">00674</a> <span class="keywordtype">int</span> <a class="code" href="structburn__speed__descriptor.html#a42f1f82fda98833172d4c47af3a2422f" title="Expert info from ACh GET PERFORMANCE and/or mode page 2Ah.">wrc</a>; <a name="l00675"></a>00675 <span class="comment">/* 1 = drive promises reported performance over full media */</span> <a name="l00676"></a><a class="code" href="structburn__speed__descriptor.html#a721d7221e134db93d026f468a1ebebd2">00676</a> <span class="keywordtype">int</span> <a class="code" href="structburn__speed__descriptor.html#a721d7221e134db93d026f468a1ebebd2">exact</a>; <a name="l00677"></a>00677 <span class="comment">/* 1 = suitable for mixture of read and write */</span> <a name="l00678"></a><a class="code" href="structburn__speed__descriptor.html#aeb9abbd02f6e6bd916ea81961b262d67">00678</a> <span class="keywordtype">int</span> <a class="code" href="structburn__speed__descriptor.html#aeb9abbd02f6e6bd916ea81961b262d67">mrw</a>; <a name="l00679"></a>00679 <span class="comment"></span> <a name="l00680"></a>00680 <span class="comment"> /** List chaining. Use .next until NULL to iterate over the list */</span> <a name="l00681"></a><a class="code" href="structburn__speed__descriptor.html#a61cfab5ff72c894b4cae840ad288f1c2">00681</a> <span class="keyword">struct </span><a class="code" href="structburn__speed__descriptor.html" title="Description of a speed capability as reported by the drive in conjunction with eventually...">burn_speed_descriptor</a> *<a class="code" href="structburn__speed__descriptor.html#a61cfab5ff72c894b4cae840ad288f1c2" title="List chaining.">prev</a>; <a name="l00682"></a><a class="code" href="structburn__speed__descriptor.html#a185873e5b05e90de40167c536fd0341b">00682</a> <span class="keyword">struct </span><a class="code" href="structburn__speed__descriptor.html" title="Description of a speed capability as reported by the drive in conjunction with eventually...">burn_speed_descriptor</a> *<a class="code" href="structburn__speed__descriptor.html#a185873e5b05e90de40167c536fd0341b">next</a>; <a name="l00683"></a>00683 }; <a name="l00684"></a>00684 <a name="l00685"></a>00685 <span class="comment"></span> <a name="l00686"></a>00686 <span class="comment">/** Initialize the library.</span> <a name="l00687"></a>00687 <span class="comment"> This must be called before using any other functions in the library. It</span> <a name="l00688"></a>00688 <span class="comment"> may be called more than once with no effect.</span> <a name="l00689"></a>00689 <span class="comment"> It is possible to 'restart' the library by shutting it down and</span> <a name="l00690"></a>00690 <span class="comment"> re-initializing it. Once this was necessary if you follow the older and</span> <a name="l00691"></a>00691 <span class="comment"> more general way of accessing a drive via burn_drive_scan() and</span> <a name="l00692"></a>00692 <span class="comment"> burn_drive_grab(). See burn_drive_scan_and_grab() with its strong</span> <a name="l00693"></a>00693 <span class="comment"> urges and its explanations.</span> <a name="l00694"></a>00694 <span class="comment"> @return Nonzero if the library was able to initialize; zero if</span> <a name="l00695"></a>00695 <span class="comment"> initialization failed.</span> <a name="l00696"></a>00696 <span class="comment">*/</span> <a name="l00697"></a>00697 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a53b82b88a6ebfa788ace50d890080bc6" title="Initialize the library.">burn_initialize</a>(<span class="keywordtype">void</span>); <a name="l00698"></a>00698 <span class="comment"></span> <a name="l00699"></a>00699 <span class="comment">/** Shutdown the library.</span> <a name="l00700"></a>00700 <span class="comment"> This should be called before exiting your application. Make sure that all</span> <a name="l00701"></a>00701 <span class="comment"> drives you have grabbed are released <i>before</i> calling this.</span> <a name="l00702"></a>00702 <span class="comment">*/</span> <a name="l00703"></a>00703 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#ab9b933537517c9fda9758a9f2b4af337" title="Shutdown the library.">burn_finish</a>(<span class="keywordtype">void</span>); <a name="l00704"></a>00704 <a name="l00705"></a>00705 <a name="l00706"></a>00706 <span class="comment">/* ts A61002 */</span><span class="comment"></span> <a name="l00707"></a>00707 <span class="comment">/** Abort any running drive operation and finally call burn_finish().</span> <a name="l00708"></a>00708 <span class="comment"> You MUST calm down the busy drive if an aborting event occurs during a</span> <a name="l00709"></a>00709 <span class="comment"> burn run. For that you may call this function either from your own signal</span> <a name="l00710"></a>00710 <span class="comment"> handling code or indirectly by activating the builtin signal handling:</span> <a name="l00711"></a>00711 <span class="comment"> burn_set_signal_handling("my_app_name : ", NULL, 0);</span> <a name="l00712"></a>00712 <span class="comment"> Else you may eventually call burn_drive_cancel() on the active drive and</span> <a name="l00713"></a>00713 <span class="comment"> wait for it to assume state BURN_DRIVE_IDLE.</span> <a name="l00714"></a>00714 <span class="comment"> @param patience Maximum number of seconds to wait for drives to finish</span> <a name="l00715"></a>00715 <span class="comment"> @param pacifier_func If not NULL: a function to produce appeasing messages.</span> <a name="l00716"></a>00716 <span class="comment"> See burn_abort_pacifier() for an example.</span> <a name="l00717"></a>00717 <span class="comment"> @param handle Opaque handle to be used with pacifier_func</span> <a name="l00718"></a>00718 <span class="comment"> @return 1 ok, all went well</span> <a name="l00719"></a>00719 <span class="comment"> 0 had to leave a drive in unclean state</span> <a name="l00720"></a>00720 <span class="comment"> <0 severe error, do no use libburn again</span> <a name="l00721"></a>00721 <span class="comment"> @since 0.2.6</span> <a name="l00722"></a>00722 <span class="comment">*/</span> <a name="l00723"></a>00723 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#aa07803603e8be01157ab6a667c5b5a6e" title="Abort any running drive operation and finally call burn_finish().">burn_abort</a>(<span class="keywordtype">int</span> patience, <a name="l00724"></a>00724 <span class="keywordtype">int</span> (*pacifier_func)(<span class="keywordtype">void</span> *handle, <span class="keywordtype">int</span> patience, <span class="keywordtype">int</span> elapsed), <a name="l00725"></a>00725 <span class="keywordtype">void</span> *handle); <a name="l00726"></a>00726 <span class="comment"></span> <a name="l00727"></a>00727 <span class="comment">/** A pacifier function suitable for burn_abort.</span> <a name="l00728"></a>00728 <span class="comment"> @param handle If not NULL, a pointer to a text suitable for printf("%s")</span> <a name="l00729"></a>00729 <span class="comment"> @param patience Maximum number of seconds to wait</span> <a name="l00730"></a>00730 <span class="comment"> @param elapsed Elapsed number of seconds</span> <a name="l00731"></a>00731 <span class="comment">*/</span> <a name="l00732"></a>00732 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#ad0fd9f069a3f4beb999942b2ec9e82a9" title="A pacifier function suitable for burn_abort.">burn_abort_pacifier</a>(<span class="keywordtype">void</span> *handle, <span class="keywordtype">int</span> patience, <span class="keywordtype">int</span> elapsed); <a name="l00733"></a>00733 <a name="l00734"></a>00734 <span class="comment"></span> <a name="l00735"></a>00735 <span class="comment">/** ts A61006 : This is for development only. Not suitable for applications.</span> <a name="l00736"></a>00736 <span class="comment"> Set the verbosity level of the library. The default value is 0, which means</span> <a name="l00737"></a>00737 <span class="comment"> that nothing is output on stderr. The more you increase this, the more</span> <a name="l00738"></a>00738 <span class="comment"> debug output should be displayed on stderr for you.</span> <a name="l00739"></a>00739 <span class="comment"> @param level The verbosity level desired. 0 for nothing, higher positive</span> <a name="l00740"></a>00740 <span class="comment"> values for more information output.</span> <a name="l00741"></a>00741 <span class="comment">*/</span> <a name="l00742"></a>00742 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a156a8d519324e5eb4f5c7eaead3bd9cf" title="ts A61006 : This is for development only.">burn_set_verbosity</a>(<span class="keywordtype">int</span> level); <a name="l00743"></a>00743 <a name="l00744"></a>00744 <span class="comment">/* ts A60813 */</span><span class="comment"></span> <a name="l00745"></a>00745 <span class="comment">/** Set parameters for behavior on opening device files. To be called early</span> <a name="l00746"></a>00746 <span class="comment"> after burn_initialize() and before any bus scan. But not mandatory at all.</span> <a name="l00747"></a>00747 <span class="comment"> Parameter value 1 enables a feature, 0 disables. </span> <a name="l00748"></a>00748 <span class="comment"> Default is (1,0,0). Have a good reason before you change it.</span> <a name="l00749"></a>00749 <span class="comment"> @param exclusive Linux only:</span> <a name="l00750"></a>00750 <span class="comment"> 0 = no attempt to make drive access exclusive.</span> <a name="l00751"></a>00751 <span class="comment"> 1 = Try to open only devices which are not marked as busy</span> <a name="l00752"></a>00752 <span class="comment"> and try to mark them busy if opened sucessfully. (O_EXCL)</span> <a name="l00753"></a>00753 <span class="comment"> There are kernels which simply don't care about O_EXCL.</span> <a name="l00754"></a>00754 <span class="comment"> Some have it off, some have it on, some are switchable.</span> <a name="l00755"></a>00755 <span class="comment"> 2 = in case of a SCSI device, also try to open exclusively</span> <a name="l00756"></a>00756 <span class="comment"> the matching /dev/sr, /dev/scd and /dev/st .</span> <a name="l00757"></a>00757 <span class="comment"> One may select a device SCSI file family by adding</span> <a name="l00758"></a>00758 <span class="comment"> 0 = default family</span> <a name="l00759"></a>00759 <span class="comment"> 4 = /dev/sr%d</span> <a name="l00760"></a>00760 <span class="comment"> 8 = /dev/scd%d</span> <a name="l00761"></a>00761 <span class="comment"> 16 = /dev/sg%d</span> <a name="l00762"></a>00762 <span class="comment"> Do not use other values !</span> <a name="l00763"></a>00763 <span class="comment"> Add 32 to demand an exclusive lock by fcntl(,F_SETLK,)</span> <a name="l00764"></a>00764 <span class="comment"> after open() has succeeded.</span> <a name="l00765"></a>00765 <span class="comment"> @param blocking Try to wait for drives which do not open immediately but</span> <a name="l00766"></a>00766 <span class="comment"> also do not return an error as well. (O_NONBLOCK)</span> <a name="l00767"></a>00767 <span class="comment"> This might stall indefinitely with /dev/hdX hard disks.</span> <a name="l00768"></a>00768 <span class="comment"> @param abort_on_busy Unconditionally abort process when a non blocking</span> <a name="l00769"></a>00769 <span class="comment"> exclusive opening attempt indicates a busy drive.</span> <a name="l00770"></a>00770 <span class="comment"> Use this only after thorough tests with your app.</span> <a name="l00771"></a>00771 <span class="comment"> @since 0.2.2</span> <a name="l00772"></a>00772 <span class="comment">*/</span> <a name="l00773"></a>00773 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#ae8c8b955f66a011f847d02bed2d736e6" title="Set parameters for behavior on opening device files.">burn_preset_device_open</a>(<span class="keywordtype">int</span> exclusive, <span class="keywordtype">int</span> blocking, <span class="keywordtype">int</span> abort_on_busy); <a name="l00774"></a>00774 <a name="l00775"></a>00775 <a name="l00776"></a>00776 <span class="comment">/* ts A70223 */</span><span class="comment"></span> <a name="l00777"></a>00777 <span class="comment">/** Allows the use of media types which are implemented in libburn but not yet</span> <a name="l00778"></a>00778 <span class="comment"> tested. The list of those untested profiles is subject to change.</span> <a name="l00779"></a>00779 <span class="comment"> Currently it contains: 0x15 "DVD-R/DL sequential recording",</span> <a name="l00780"></a>00780 <span class="comment"> If you really test such media, then please report the outcome on</span> <a name="l00781"></a>00781 <span class="comment"> libburn-hackers@pykix.org</span> <a name="l00782"></a>00782 <span class="comment"> If ever then this call should be done soon after burn_initialize() before</span> <a name="l00783"></a>00783 <span class="comment"> any drive scanning.</span> <a name="l00784"></a>00784 <span class="comment"> @param yes 1=allow all implemented profiles, 0=only tested media (default)</span> <a name="l00785"></a>00785 <span class="comment"> @since 0.3.4</span> <a name="l00786"></a>00786 <span class="comment">*/</span> <a name="l00787"></a>00787 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#aae7e655c1c3a1bbf9e2dffd278e63d7d" title="Allows the use of media types which are implemented in libburn but not yet tested...">burn_allow_untested_profiles</a>(<span class="keywordtype">int</span> yes); <a name="l00788"></a>00788 <a name="l00789"></a>00789 <a name="l00790"></a>00790 <span class="comment">/* ts A60823 */</span><span class="comment"></span> <a name="l00791"></a>00791 <span class="comment">/** Aquire a drive with known persistent address.</span> <a name="l00792"></a>00792 <span class="comment"></span> <a name="l00793"></a>00793 <span class="comment"> This is the sysadmin friendly way to open one drive and to leave all</span> <a name="l00794"></a>00794 <span class="comment"> others untouched. It bundles the following API calls to form a</span> <a name="l00795"></a>00795 <span class="comment"> non-obtrusive way to use libburn:</span> <a name="l00796"></a>00796 <span class="comment"> burn_drive_add_whitelist() , burn_drive_scan() , burn_drive_grab()</span> <a name="l00797"></a>00797 <span class="comment"> You are *strongly urged* to use this call whenever you know the drive</span> <a name="l00798"></a>00798 <span class="comment"> address in advance.</span> <a name="l00799"></a>00799 <span class="comment"></span> <a name="l00800"></a>00800 <span class="comment"> If not, then you have to use directly above calls. In that case, you are</span> <a name="l00801"></a>00801 <span class="comment"> *strongly urged* to drop any unintended drive which will be exclusively</span> <a name="l00802"></a>00802 <span class="comment"> occupied and not closed by burn_drive_scan().</span> <a name="l00803"></a>00803 <span class="comment"> This can be done by shutting down the library including a call to</span> <a name="l00804"></a>00804 <span class="comment"> burn_finish(). You may later start a new libburn session and should then</span> <a name="l00805"></a>00805 <span class="comment"> use the function described here with an address obtained after</span> <a name="l00806"></a>00806 <span class="comment"> burn_drive_scan() via burn_drive_d_get_adr(drive_infos[driveno].drive,adr).</span> <a name="l00807"></a>00807 <span class="comment"> Another way is to drop the unwanted drives by burn_drive_info_forget().</span> <a name="l00808"></a>00808 <span class="comment"></span> <a name="l00809"></a>00809 <span class="comment"> Operating on multiple drives:</span> <a name="l00810"></a>00810 <span class="comment"></span> <a name="l00811"></a>00811 <span class="comment"> Different than with burn_drive_scan() it is allowed to call</span> <a name="l00812"></a>00812 <span class="comment"> burn_drive_scan_and_grab() without giving up any other scanned drives. So</span> <a name="l00813"></a>00813 <span class="comment"> this call can be used to get a collection of more than one aquired drives.</span> <a name="l00814"></a>00814 <span class="comment"> The attempt to aquire the same drive twice will fail, though.</span> <a name="l00815"></a>00815 <span class="comment"></span> <a name="l00816"></a>00816 <span class="comment"> Pseudo-drives:</span> <a name="l00817"></a>00817 <span class="comment"></span> <a name="l00818"></a>00818 <span class="comment"> burn_drive_scan_and_grab() is able to aquire virtual drives which will</span> <a name="l00819"></a>00819 <span class="comment"> accept options much like a MMC burner drive. Many of those options will not</span> <a name="l00820"></a>00820 <span class="comment"> cause any effect, though. The address of a pseudo-drive begins with</span> <a name="l00821"></a>00821 <span class="comment"> prefix "stdio:" followed by a path.</span> <a name="l00822"></a>00822 <span class="comment"> Examples: "stdio:/tmp/pseudo_drive" , "stdio:/dev/null" , "stdio:-"</span> <a name="l00823"></a>00823 <span class="comment"></span> <a name="l00824"></a>00824 <span class="comment"> If the path is empty, the result is a null-drive = drive role 0.</span> <a name="l00825"></a>00825 <span class="comment"> It pretends to have loaded no media and supports no reading or writing.</span> <a name="l00826"></a>00826 <span class="comment"></span> <a name="l00827"></a>00827 <span class="comment"> If the path leads to an existing regular file, or to a not yet existing</span> <a name="l00828"></a>00828 <span class="comment"> file, or to an existing block device, then the result is a random access</span> <a name="l00829"></a>00829 <span class="comment"> stdio-drive capable of reading and writing = drive role 2.</span> <a name="l00830"></a>00830 <span class="comment"></span> <a name="l00831"></a>00831 <span class="comment"> If the path leads to an existing file of any type other than directory,</span> <a name="l00832"></a>00832 <span class="comment"> then the result is a sequential write-only stdio-drive = drive role 3.</span> <a name="l00833"></a>00833 <span class="comment"></span> <a name="l00834"></a>00834 <span class="comment"> The special address form "stdio:/dev/fd/<number>" is interpreted literally</span> <a name="l00835"></a>00835 <span class="comment"> as reference to open file descriptor <number>. This address form coincides</span> <a name="l00836"></a>00836 <span class="comment"> with real files on some systems, but it is in fact hardcoded in libburn.</span> <a name="l00837"></a>00837 <span class="comment"> Special address "stdio:-" means stdout = "stdio:/dev/fd/1".</span> <a name="l00838"></a>00838 <span class="comment"> The role of such a drive is determined by the file type obtained via</span> <a name="l00839"></a>00839 <span class="comment"> fstat(<number>).</span> <a name="l00840"></a>00840 <span class="comment"> </span> <a name="l00841"></a>00841 <span class="comment"> Roles 2 and 3 perform all their eventual data transfer activities on a file</span> <a name="l00842"></a>00842 <span class="comment"> via standard i/o functions open(2), lseek(2), read(2), write(2), close(2).</span> <a name="l00843"></a>00843 <span class="comment"> The media profile is reported as 0xffff. Write space information from those</span> <a name="l00844"></a>00844 <span class="comment"> media is not necessarily realistic.</span> <a name="l00845"></a>00845 <span class="comment"></span> <a name="l00846"></a>00846 <span class="comment"> The capabilities of role 2 resemble DVD-RAM but it can simulate writing.</span> <a name="l00847"></a>00847 <span class="comment"> If the path does not exist in the filesystem yet, it is attempted to create</span> <a name="l00848"></a>00848 <span class="comment"> it as a regular file as soon as write operations are started.</span> <a name="l00849"></a>00849 <span class="comment"></span> <a name="l00850"></a>00850 <span class="comment"> The capabilities of role 3 resemble a blank DVD-R. Nevertheless each</span> <a name="l00851"></a>00851 <span class="comment"> burn_disc_write() run may only write a single track.</span> <a name="l00852"></a>00852 <span class="comment"></span> <a name="l00853"></a>00853 <span class="comment"> One may distinguish pseudo-drives from MMC drives by call</span> <a name="l00854"></a>00854 <span class="comment"> burn_drive_get_drive_role().</span> <a name="l00855"></a>00855 <span class="comment"></span> <a name="l00856"></a>00856 <span class="comment"> @param drive_infos On success returns a one element array with the drive</span> <a name="l00857"></a>00857 <span class="comment"> (cdrom/burner). Thus use with driveno 0 only. On failure</span> <a name="l00858"></a>00858 <span class="comment"> the array has no valid elements at all.</span> <a name="l00859"></a>00859 <span class="comment"> The returned array should be freed via burn_drive_info_free()</span> <a name="l00860"></a>00860 <span class="comment"> when it is no longer needed.</span> <a name="l00861"></a>00861 <span class="comment"> This is a result from call burn_drive_scan(). See there.</span> <a name="l00862"></a>00862 <span class="comment"> Use with driveno 0 only.</span> <a name="l00863"></a>00863 <span class="comment"> @param adr The persistent address of the desired drive. Either once</span> <a name="l00864"></a>00864 <span class="comment"> obtained by burn_drive_d_get_adr() or composed skillfully by</span> <a name="l00865"></a>00865 <span class="comment"> application resp. its user. E.g. "/dev/sr0".</span> <a name="l00866"></a>00866 <span class="comment"> Consider to preprocess it by burn_drive_convert_fs_adr().</span> <a name="l00867"></a>00867 <span class="comment"> @param load Nonzero to make the drive attempt to load a disc (close its</span> <a name="l00868"></a>00868 <span class="comment"> tray door, etc).</span> <a name="l00869"></a>00869 <span class="comment"> @return 1 = success , 0 = drive not found , -1 = other error</span> <a name="l00870"></a>00870 <span class="comment"> @since 0.2.2</span> <a name="l00871"></a>00871 <span class="comment">*/</span> <a name="l00872"></a>00872 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#ae9c75e892e445ff73c38579210ba06a9" title="Aquire a drive with known persistent address.">burn_drive_scan_and_grab</a>(<span class="keyword">struct</span> <a class="code" href="structburn__drive__info.html" title="Information on a drive in the system.">burn_drive_info</a> *drive_infos[], <a name="l00873"></a>00873 <span class="keywordtype">char</span>* adr, <span class="keywordtype">int</span> load); <a name="l00874"></a>00874 <a name="l00875"></a>00875 <a name="l00876"></a>00876 <span class="comment">/* ts A51221 */</span> <a name="l00877"></a>00877 <span class="comment">/* @since 0.2.2 */</span><span class="comment"></span> <a name="l00878"></a>00878 <span class="comment">/** Maximum number of particularly permissible drive addresses */</span> <a name="l00879"></a><a class="code" href="libburn_8h.html#a059c3474c7b225a5e2de481d2a37415b">00879</a> <span class="preprocessor">#define BURN_DRIVE_WHITELIST_LEN 255</span> <a name="l00880"></a>00880 <span class="preprocessor"></span><span class="comment"></span> <a name="l00881"></a>00881 <span class="comment">/** Add a device to the list of permissible drives. As soon as some entry is in</span> <a name="l00882"></a>00882 <span class="comment"> the whitelist all non-listed drives are banned from scanning.</span> <a name="l00883"></a>00883 <span class="comment"> @return 1 success, <=0 failure</span> <a name="l00884"></a>00884 <span class="comment"> @since 0.2.2</span> <a name="l00885"></a>00885 <span class="comment">*/</span> <a name="l00886"></a>00886 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a8510b41255693e65f12f0bf55ad50ee7" title="Add a device to the list of permissible drives.">burn_drive_add_whitelist</a>(<span class="keywordtype">char</span> *device_address); <a name="l00887"></a>00887 <span class="comment"></span> <a name="l00888"></a>00888 <span class="comment">/** Remove all drives from whitelist. This enables all possible drives. */</span> <a name="l00889"></a>00889 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#ada5a94ace45d01ff43489e35e9ba2f9e" title="Remove all drives from whitelist.">burn_drive_clear_whitelist</a>(<span class="keywordtype">void</span>); <a name="l00890"></a>00890 <a name="l00891"></a>00891 <span class="comment"></span> <a name="l00892"></a>00892 <span class="comment">/** Scan for drives. This function MUST be called until it returns nonzero.</span> <a name="l00893"></a>00893 <span class="comment"> In case of re-scanning:</span> <a name="l00894"></a>00894 <span class="comment"> All pointers to struct burn_drive and all struct burn_drive_info arrays</span> <a name="l00895"></a>00895 <span class="comment"> are invalidated by using this function. Do NOT store drive pointers across</span> <a name="l00896"></a>00896 <span class="comment"> calls to this function !</span> <a name="l00897"></a>00897 <span class="comment"> To avoid invalid pointers one MUST free all burn_drive_info arrays</span> <a name="l00898"></a>00898 <span class="comment"> by burn_drive_info_free() before calling burn_drive_scan() a second time.</span> <a name="l00899"></a>00899 <span class="comment"> If there are drives left, then burn_drive_scan() will refuse to work.</span> <a name="l00900"></a>00900 <span class="comment"></span> <a name="l00901"></a>00901 <span class="comment"> After this call all drives depicted by the returned array are subject</span> <a name="l00902"></a>00902 <span class="comment"> to eventual (O_EXCL) locking. See burn_preset_device_open(). This state</span> <a name="l00903"></a>00903 <span class="comment"> ends either with burn_drive_info_forget() or with burn_drive_release().</span> <a name="l00904"></a>00904 <span class="comment"> It is unfriendly to other processes on the system to hold drives locked</span> <a name="l00905"></a>00905 <span class="comment"> which one does not definitely plan to use soon.</span> <a name="l00906"></a>00906 <span class="comment"> @param drive_infos Returns an array of drive info items (cdroms/burners).</span> <a name="l00907"></a>00907 <span class="comment"> The returned array must be freed by burn_drive_info_free()</span> <a name="l00908"></a>00908 <span class="comment"> before burn_finish(), and also before calling this function</span> <a name="l00909"></a>00909 <span class="comment"> burn_drive_scan() again.</span> <a name="l00910"></a>00910 <span class="comment"> @param n_drives Returns the number of drive items in drive_infos.</span> <a name="l00911"></a>00911 <span class="comment"> @return 0 while scanning is not complete</span> <a name="l00912"></a>00912 <span class="comment"> >0 when it is finished sucessfully,</span> <a name="l00913"></a>00913 <span class="comment"> <0 when finished but failed.</span> <a name="l00914"></a>00914 <span class="comment">*/</span> <a name="l00915"></a>00915 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a21b480156713f0dbc8a254c24fa9689e" title="Scan for drives.">burn_drive_scan</a>(<span class="keyword">struct</span> <a class="code" href="structburn__drive__info.html" title="Information on a drive in the system.">burn_drive_info</a> *drive_infos[], <a name="l00916"></a>00916 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *n_drives); <a name="l00917"></a>00917 <a name="l00918"></a>00918 <span class="comment">/* ts A60904 : ticket 62, contribution by elmom */</span><span class="comment"></span> <a name="l00919"></a>00919 <span class="comment">/** Release memory about a single drive and any exclusive lock on it.</span> <a name="l00920"></a>00920 <span class="comment"> Become unable to inquire or grab it. Expect FATAL consequences if you try.</span> <a name="l00921"></a>00921 <span class="comment"> @param drive_info pointer to a single element out of the array</span> <a name="l00922"></a>00922 <span class="comment"> obtained from burn_drive_scan() : &(drive_infos[driveno])</span> <a name="l00923"></a>00923 <span class="comment"> @param force controls degree of permissible drive usage at the moment this</span> <a name="l00924"></a>00924 <span class="comment"> function is called, and the amount of automatically provided</span> <a name="l00925"></a>00925 <span class="comment"> drive shutdown : </span> <a name="l00926"></a>00926 <span class="comment"> 0= drive must be ungrabbed and BURN_DRIVE_IDLE</span> <a name="l00927"></a>00927 <span class="comment"> 1= try to release drive resp. accept BURN_DRIVE_GRABBING </span> <a name="l00928"></a>00928 <span class="comment"> Use these two only. Further values are to be defined.</span> <a name="l00929"></a>00929 <span class="comment"> @return 1 on success, 2 if drive was already forgotten,</span> <a name="l00930"></a>00930 <span class="comment"> 0 if not permissible, <0 on other failures, </span> <a name="l00931"></a>00931 <span class="comment"> @since 0.2.2</span> <a name="l00932"></a>00932 <span class="comment">*/</span> <a name="l00933"></a>00933 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a9ac4cfc83330f237b6b3824e58039775" title="Release memory about a single drive and any exclusive lock on it.">burn_drive_info_forget</a>(<span class="keyword">struct</span> <a class="code" href="structburn__drive__info.html" title="Information on a drive in the system.">burn_drive_info</a> *drive_info, <span class="keywordtype">int</span> force); <a name="l00934"></a>00934 <a name="l00935"></a>00935 <span class="comment"></span> <a name="l00936"></a>00936 <span class="comment">/** When no longer needed, free a whole burn_drive_info array which was</span> <a name="l00937"></a>00937 <span class="comment"> returned by burn_drive_scan().</span> <a name="l00938"></a>00938 <span class="comment"> For freeing single drive array elements use burn_drive_info_forget().</span> <a name="l00939"></a>00939 <span class="comment">*/</span> <a name="l00940"></a>00940 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#acfdda1441d7c2fe226c9efc3a640107c" title="When no longer needed, free a whole burn_drive_info array which was returned by burn_drive_scan()...">burn_drive_info_free</a>(<span class="keyword">struct</span> <a class="code" href="structburn__drive__info.html" title="Information on a drive in the system.">burn_drive_info</a> drive_infos[]); <a name="l00941"></a>00941 <a name="l00942"></a>00942 <a name="l00943"></a>00943 <span class="comment">/* ts A60823 */</span> <a name="l00944"></a>00944 <span class="comment">/* @since 0.2.2 */</span><span class="comment"></span> <a name="l00945"></a>00945 <span class="comment">/** Maximum length+1 to expect with a persistent drive address string */</span> <a name="l00946"></a><a class="code" href="libburn_8h.html#a489ca2111726a034324275aca4ed069c">00946</a> <span class="preprocessor">#define BURN_DRIVE_ADR_LEN 1024</span> <a name="l00947"></a>00947 <span class="preprocessor"></span> <a name="l00948"></a>00948 <span class="comment">/* ts A70906 */</span><span class="comment"></span> <a name="l00949"></a>00949 <span class="comment">/** Inquire the persistent address of the given drive.</span> <a name="l00950"></a>00950 <span class="comment"> @param drive The drive to inquire.</span> <a name="l00951"></a>00951 <span class="comment"> @param adr An application provided array of at least BURN_DRIVE_ADR_LEN</span> <a name="l00952"></a>00952 <span class="comment"> characters size. The persistent address gets copied to it.</span> <a name="l00953"></a>00953 <span class="comment"> @return >0 success , <=0 error (due to libburn internal problem)</span> <a name="l00954"></a>00954 <span class="comment"> @since 0.4.0</span> <a name="l00955"></a>00955 <span class="comment">*/</span> <a name="l00956"></a>00956 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a1c31ea5a5cfd876e56f68123a6c35a4a" title="Inquire the persistent address of the given drive.">burn_drive_d_get_adr</a>(<span class="keyword">struct</span> burn_drive *drive, <span class="keywordtype">char</span> adr[]); <a name="l00957"></a>00957 <a name="l00958"></a>00958 <span class="comment">/* A60823 */</span><span class="comment"></span> <a name="l00959"></a>00959 <span class="comment">/** Inquire the persistent address of a drive via a given drive_info object.</span> <a name="l00960"></a>00960 <span class="comment"> (Note: This is a legacy call.)</span> <a name="l00961"></a>00961 <span class="comment"> @param drive_info The drive to inquire.Usually some &(drive_infos[driveno])</span> <a name="l00962"></a>00962 <span class="comment"> @param adr An application provided array of at least BURN_DRIVE_ADR_LEN</span> <a name="l00963"></a>00963 <span class="comment"> characters size. The persistent address gets copied to it.</span> <a name="l00964"></a>00964 <span class="comment"> @return >0 success , <=0 error (due to libburn internal problem)</span> <a name="l00965"></a>00965 <span class="comment"> @since 0.2.6</span> <a name="l00966"></a>00966 <span class="comment">*/</span> <a name="l00967"></a>00967 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a1ccfaccc7c7b10aa7f25bec20cf1b1b2" title="Inquire the persistent address of a drive via a given drive_info object.">burn_drive_get_adr</a>(<span class="keyword">struct</span> <a class="code" href="structburn__drive__info.html" title="Information on a drive in the system.">burn_drive_info</a> *drive_info, <span class="keywordtype">char</span> adr[]); <a name="l00968"></a>00968 <a name="l00969"></a>00969 <a name="l00970"></a>00970 <span class="comment">/* ts A60922 ticket 33 */</span><span class="comment"></span> <a name="l00971"></a>00971 <span class="comment">/** Evaluate whether the given address would be a possible persistent drive</span> <a name="l00972"></a>00972 <span class="comment"> address of libburn.</span> <a name="l00973"></a>00973 <span class="comment"> @return 1 means yes, 0 means no</span> <a name="l00974"></a>00974 <span class="comment"> @since 0.2.6</span> <a name="l00975"></a>00975 <span class="comment">*/</span> <a name="l00976"></a>00976 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#aa9f4623d854bd124b6f2178b1ea8db91" title="Evaluate whether the given address would be a possible persistent drive address of...">burn_drive_is_enumerable_adr</a>(<span class="keywordtype">char</span> *adr); <a name="l00977"></a>00977 <a name="l00978"></a>00978 <span class="comment">/* ts A60922 ticket 33 */</span><span class="comment"></span> <a name="l00979"></a>00979 <span class="comment">/** Try to convert a given existing filesystem address into a persistent drive</span> <a name="l00980"></a>00980 <span class="comment"> address. This succeeds with symbolic links or if a hint about the drive's</span> <a name="l00981"></a>00981 <span class="comment"> system address can be read from the filesystem object and a matching drive</span> <a name="l00982"></a>00982 <span class="comment"> is found.</span> <a name="l00983"></a>00983 <span class="comment"> @param path The address of an existing file system object</span> <a name="l00984"></a>00984 <span class="comment"> @param adr An application provided array of at least BURN_DRIVE_ADR_LEN</span> <a name="l00985"></a>00985 <span class="comment"> characters size. The persistent address gets copied to it.</span> <a name="l00986"></a>00986 <span class="comment"> @return 1 = success , 0 = failure , -1 = severe error</span> <a name="l00987"></a>00987 <span class="comment"> @since 0.2.6</span> <a name="l00988"></a>00988 <span class="comment">*/</span> <a name="l00989"></a>00989 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a1b0e38d691eeb1da5f34a6ef0cc052bc" title="Try to convert a given existing filesystem address into a persistent drive address...">burn_drive_convert_fs_adr</a>(<span class="keywordtype">char</span> *path, <span class="keywordtype">char</span> adr[]); <a name="l00990"></a>00990 <a name="l00991"></a>00991 <span class="comment">/* ts A60923 */</span><span class="comment"></span> <a name="l00992"></a>00992 <span class="comment">/** Try to convert a given SCSI address of bus,host,channel,target,lun into</span> <a name="l00993"></a>00993 <span class="comment"> a persistent drive address. If a SCSI address component parameter is < 0</span> <a name="l00994"></a>00994 <span class="comment"> then it is not decisive and the first enumerated address which matches</span> <a name="l00995"></a>00995 <span class="comment"> the >= 0 parameters is taken as result.</span> <a name="l00996"></a>00996 <span class="comment"> Note: bus and (host,channel) are supposed to be redundant.</span> <a name="l00997"></a>00997 <span class="comment"> @param bus_no "Bus Number" (something like a virtual controller)</span> <a name="l00998"></a>00998 <span class="comment"> @param host_no "Host Number" (something like half a virtual controller)</span> <a name="l00999"></a>00999 <span class="comment"> @param channel_no "Channel Number" (other half of "Host Number")</span> <a name="l01000"></a>01000 <span class="comment"> @param target_no "Target Number" or "SCSI Id" (a device)</span> <a name="l01001"></a>01001 <span class="comment"> @param lun_no "Logical Unit Number" (a sub device)</span> <a name="l01002"></a>01002 <span class="comment"> @param adr An application provided array of at least BURN_DRIVE_ADR_LEN</span> <a name="l01003"></a>01003 <span class="comment"> characters size. The persistent address gets copied to it.</span> <a name="l01004"></a>01004 <span class="comment"> @return 1 = success , 0 = failure , -1 = severe error</span> <a name="l01005"></a>01005 <span class="comment"> @since 0.2.6</span> <a name="l01006"></a>01006 <span class="comment">*/</span> <a name="l01007"></a>01007 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a4fbbb491a02d49908aa04b4082077efe" title="Try to convert a given SCSI address of bus,host,channel,target,lun into a persistent...">burn_drive_convert_scsi_adr</a>(<span class="keywordtype">int</span> bus_no, <span class="keywordtype">int</span> host_no, <span class="keywordtype">int</span> channel_no, <a name="l01008"></a>01008 <span class="keywordtype">int</span> target_no, <span class="keywordtype">int</span> lun_no, <span class="keywordtype">char</span> adr[]); <a name="l01009"></a>01009 <a name="l01010"></a>01010 <span class="comment">/* ts A60923 - A61005 */</span><span class="comment"></span> <a name="l01011"></a>01011 <span class="comment">/** Try to obtain bus,host,channel,target,lun from path. If there is an SCSI</span> <a name="l01012"></a>01012 <span class="comment"> address at all, then this call should succeed with a persistent</span> <a name="l01013"></a>01013 <span class="comment"> drive address obtained via burn_drive_d_get_adr(). It is also supposed to</span> <a name="l01014"></a>01014 <span class="comment"> succeed with any device file of a (possibly emulated) SCSI device.</span> <a name="l01015"></a>01015 <span class="comment"> @return 1 = success , 0 = failure , -1 = severe error</span> <a name="l01016"></a>01016 <span class="comment"> @since 0.2.6</span> <a name="l01017"></a>01017 <span class="comment">*/</span> <a name="l01018"></a>01018 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a4183fa8e13423c71f1eb3859f31f1fb7" title="Try to obtain bus,host,channel,target,lun from path.">burn_drive_obtain_scsi_adr</a>(<span class="keywordtype">char</span> *path, <span class="keywordtype">int</span> *bus_no, <span class="keywordtype">int</span> *host_no, <a name="l01019"></a>01019 <span class="keywordtype">int</span> *channel_no, <span class="keywordtype">int</span> *target_no, <span class="keywordtype">int</span> *lun_no); <a name="l01020"></a>01020 <span class="comment"></span> <a name="l01021"></a>01021 <span class="comment">/** Grab a drive. This must be done before the drive can be used (for reading,</span> <a name="l01022"></a>01022 <span class="comment"> writing, etc).</span> <a name="l01023"></a>01023 <span class="comment"> @param drive The drive to grab. This is found in a returned</span> <a name="l01024"></a>01024 <span class="comment"> burn_drive_info struct.</span> <a name="l01025"></a>01025 <span class="comment"> @param load Nonzero to make the drive attempt to load a disc (close its</span> <a name="l01026"></a>01026 <span class="comment"> tray door, etc).</span> <a name="l01027"></a>01027 <span class="comment"> @return 1 if it was possible to grab the drive, else 0</span> <a name="l01028"></a>01028 <span class="comment">*/</span> <a name="l01029"></a>01029 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a392a1a309e906c35b8e2f31cc3f30969" title="Grab a drive.">burn_drive_grab</a>(<span class="keyword">struct</span> burn_drive *drive, <span class="keywordtype">int</span> load); <a name="l01030"></a>01030 <a name="l01031"></a>01031 <a name="l01032"></a>01032 <span class="comment">/* ts A90824 */</span><span class="comment"></span> <a name="l01033"></a>01033 <span class="comment">/** Calm down or alert a drive. Some drives stay alert after reading for</span> <a name="l01034"></a>01034 <span class="comment"> quite some time. This saves time with the startup for the next read</span> <a name="l01035"></a>01035 <span class="comment"> operation but also causes noise and consumes extra energy. It makes</span> <a name="l01036"></a>01036 <span class="comment"> sense to calm down the drive if no read operation is expected for the</span> <a name="l01037"></a>01037 <span class="comment"> next few seconds. The drive will get alert automatically if operations</span> <a name="l01038"></a>01038 <span class="comment"> are required.</span> <a name="l01039"></a>01039 <span class="comment"> @param drive The drive to influence.</span> <a name="l01040"></a>01040 <span class="comment"> @param flag Bitfield for control purposes</span> <a name="l01041"></a>01041 <span class="comment"> bit0= become alert (else start snoozing)</span> <a name="l01042"></a>01042 <span class="comment"> This is not mandatory to allow further drive operations</span> <a name="l01043"></a>01043 <span class="comment"> @return 1= success , 0= drive role not suitable for calming</span> <a name="l01044"></a>01044 <span class="comment"> @since 0.7.0</span> <a name="l01045"></a>01045 <span class="comment">*/</span> <a name="l01046"></a>01046 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a267e0aaf9fc0f97dbf30d9c2db704bef" title="Calm down or alert a drive.">burn_drive_snooze</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keywordtype">int</span> flag); <a name="l01047"></a>01047 <a name="l01048"></a>01048 <span class="comment"></span> <a name="l01049"></a>01049 <span class="comment">/** Release a drive. This should not be done until the drive is no longer</span> <a name="l01050"></a>01050 <span class="comment"> busy (see burn_drive_get_status).</span> <a name="l01051"></a>01051 <span class="comment"> Linux: The drive device file is not reserved afterwards. (O_EXCL, F_SETLK).</span> <a name="l01052"></a>01052 <span class="comment"> @param drive The drive to release.</span> <a name="l01053"></a>01053 <span class="comment"> @param eject Nonzero to make the drive eject the disc in it.</span> <a name="l01054"></a>01054 <span class="comment">*/</span> <a name="l01055"></a>01055 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a765bba03b9f40c07f159ff9ef7db0e09" title="Release a drive.">burn_drive_release</a>(<span class="keyword">struct</span> burn_drive *drive, <span class="keywordtype">int</span> eject); <a name="l01056"></a>01056 <a name="l01057"></a>01057 <a name="l01058"></a>01058 <span class="comment">/* ts A70918 */</span><span class="comment"></span> <a name="l01059"></a>01059 <span class="comment">/** Like burn_drive_release() but keeping the drive tray closed and its</span> <a name="l01060"></a>01060 <span class="comment"> eject button disabled. This physically locked drive state will last until</span> <a name="l01061"></a>01061 <span class="comment"> the drive is grabbed again and released via burn_drive_release().</span> <a name="l01062"></a>01062 <span class="comment"> Programs like eject, cdrecord, growisofs will break that ban too.</span> <a name="l01063"></a>01063 <span class="comment"> @param drive The drive to release and leave locked.</span> <a name="l01064"></a>01064 <span class="comment"> @param flag Bitfield for control purposes (unused yet, submit 0)</span> <a name="l01065"></a>01065 <span class="comment"> @return 1 means success, <=0 means failure</span> <a name="l01066"></a>01066 <span class="comment"> @since 0.4.0</span> <a name="l01067"></a>01067 <span class="comment">*/</span> <a name="l01068"></a>01068 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a1af62d5ee036ccbd33566064813faeeb" title="Like burn_drive_release() but keeping the drive tray closed and its eject button...">burn_drive_leave_locked</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keywordtype">int</span> flag); <a name="l01069"></a>01069 <a name="l01070"></a>01070 <span class="comment"></span> <a name="l01071"></a>01071 <span class="comment">/** Returns what kind of disc a drive is holding. This function may need to be</span> <a name="l01072"></a>01072 <span class="comment"> called more than once to get a proper status from it. See burn_disc_status</span> <a name="l01073"></a>01073 <span class="comment"> for details.</span> <a name="l01074"></a>01074 <span class="comment"> @param drive The drive to query for a disc.</span> <a name="l01075"></a>01075 <span class="comment"> @return The status of the drive, or what kind of disc is in it.</span> <a name="l01076"></a>01076 <span class="comment"> Note: BURN_DISC_UNGRABBED indicates wrong API usage</span> <a name="l01077"></a>01077 <span class="comment">*/</span> <a name="l01078"></a>01078 <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#ad6002e7587373e7e9a9efbd22c1e6c54" title="Possible status of the drive in regard to the disc in it.">burn_disc_status</a> <a class="code" href="libburn_8h.html#ac009cc9dfe07c8c0b67f528a369fd511" title="Returns what kind of disc a drive is holding.">burn_disc_get_status</a>(<span class="keyword">struct</span> burn_drive *drive); <a name="l01079"></a>01079 <a name="l01080"></a>01080 <a name="l01081"></a>01081 <span class="comment">/* ts A61020 */</span><span class="comment"></span> <a name="l01082"></a>01082 <span class="comment">/** WARNING: This revives an old bug-like behavior that might be dangerous.</span> <a name="l01083"></a>01083 <span class="comment"> Sets the drive status to BURN_DISC_BLANK if it is BURN_DISC_UNREADY</span> <a name="l01084"></a>01084 <span class="comment"> or BURN_DISC_UNSUITABLE. Thus marking media as writable which actually</span> <a name="l01085"></a>01085 <span class="comment"> failed to declare themselves either blank or (partially) filled.</span> <a name="l01086"></a>01086 <span class="comment"> @return 1 drive status has been set , 0 = unsuitable drive status</span> <a name="l01087"></a>01087 <span class="comment"> @since 0.2.6</span> <a name="l01088"></a>01088 <span class="comment">*/</span> <a name="l01089"></a>01089 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#abb6106eca6d20bc2f1bed6fa478f8362" title="WARNING: This revives an old bug-like behavior that might be dangerous.">burn_disc_pretend_blank</a>(<span class="keyword">struct</span> burn_drive *drive); <a name="l01090"></a>01090 <a name="l01091"></a>01091 <a name="l01092"></a>01092 <span class="comment">/* ts A61106 */</span><span class="comment"></span> <a name="l01093"></a>01093 <span class="comment">/** WARNING: This overrides the safety measures against unsuitable media.</span> <a name="l01094"></a>01094 <span class="comment"> Sets the drive status to BURN_DISC_FULL if it is BURN_DISC_UNREADY</span> <a name="l01095"></a>01095 <span class="comment"> or BURN_DISC_UNSUITABLE. Thus marking media as blankable which actually</span> <a name="l01096"></a>01096 <span class="comment"> failed to declare themselves either blank or (partially) filled.</span> <a name="l01097"></a>01097 <span class="comment"> @since 0.2.6</span> <a name="l01098"></a>01098 <span class="comment">*/</span> <a name="l01099"></a>01099 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a73095a973b308715e3d2b25ec19e65c7" title="WARNING: This overrides the safety measures against unsuitable media.">burn_disc_pretend_full</a>(<span class="keyword">struct</span> burn_drive *drive); <a name="l01100"></a>01100 <a name="l01101"></a>01101 <a name="l01102"></a>01102 <span class="comment">/* ts A61021 */</span><span class="comment"></span> <a name="l01103"></a>01103 <span class="comment">/** Reads ATIP information from inserted media. To be obtained via</span> <a name="l01104"></a>01104 <span class="comment"> burn_drive_get_write_speed(), burn_drive_get_min_write_speed(),</span> <a name="l01105"></a>01105 <span class="comment"> burn_drive_get_start_end_lba(). The drive must be grabbed for this call.</span> <a name="l01106"></a>01106 <span class="comment"> @param drive The drive to query.</span> <a name="l01107"></a>01107 <span class="comment"> @return 1=sucess, 0=no valid ATIP info read, -1 severe error</span> <a name="l01108"></a>01108 <span class="comment"> @since 0.2.6</span> <a name="l01109"></a>01109 <span class="comment">*/</span> <a name="l01110"></a>01110 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a2d4098c0115d49624f9cd8b8abe24a5d" title="Reads ATIP information from inserted media.">burn_disc_read_atip</a>(<span class="keyword">struct</span> burn_drive *drive); <a name="l01111"></a>01111 <a name="l01112"></a>01112 <a name="l01113"></a>01113 <span class="comment">/* ts A61020 */</span><span class="comment"></span> <a name="l01114"></a>01114 <span class="comment">/** Returns start and end lba of the media which is currently inserted</span> <a name="l01115"></a>01115 <span class="comment"> in the given drive. The drive has to be grabbed to have hope for reply.</span> <a name="l01116"></a>01116 <span class="comment"> Shortcomming (not a feature): unless burn_disc_read_atip() was called </span> <a name="l01117"></a>01117 <span class="comment"> only blank media will return valid info.</span> <a name="l01118"></a>01118 <span class="comment"> @param drive The drive to query.</span> <a name="l01119"></a>01119 <span class="comment"> @param start_lba Returns the start lba value</span> <a name="l01120"></a>01120 <span class="comment"> @param end_lba Returns the end lba value</span> <a name="l01121"></a>01121 <span class="comment"> @param flag Bitfield for control purposes (unused yet, submit 0)</span> <a name="l01122"></a>01122 <span class="comment"> @return 1 if lba values are valid , 0 if invalid</span> <a name="l01123"></a>01123 <span class="comment"> @since 0.2.6</span> <a name="l01124"></a>01124 <span class="comment">*/</span> <a name="l01125"></a>01125 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#adb0be6f581320ed339d24069abbdbaca" title="Returns start and end lba of the media which is currently inserted in the given drive...">burn_drive_get_start_end_lba</a>(<span class="keyword">struct</span> burn_drive *drive, <a name="l01126"></a>01126 <span class="keywordtype">int</span> *start_lba, <span class="keywordtype">int</span> *<a class="code" href="structburn__speed__descriptor.html#a89ab969bcedf0de26f212080a8258676" title="The attributed capacity of appropriate media in logical block units i.e.">end_lba</a>, <span class="keywordtype">int</span> flag); <a name="l01127"></a>01127 <a name="l01128"></a>01128 <span class="comment">/* ts A61110 */</span><span class="comment"></span> <a name="l01129"></a>01129 <span class="comment">/** Read start lba and Next Writeable Address of a track from media.</span> <a name="l01130"></a>01130 <span class="comment"> Usually a track lba is obtained from the result of burn_track_get_entry().</span> <a name="l01131"></a>01131 <span class="comment"> This call retrieves an updated lba, eventual nwa, and can address the</span> <a name="l01132"></a>01132 <span class="comment"> invisible track to come.</span> <a name="l01133"></a>01133 <span class="comment"> The drive must be grabbed for this call. One may not issue this call</span> <a name="l01134"></a>01134 <span class="comment"> during ongoing burn_disc_write() or burn_disc_erase().</span> <a name="l01135"></a>01135 <span class="comment"> @param d The drive to query.</span> <a name="l01136"></a>01136 <span class="comment"> @param o If not NULL: write parameters to be set on drive before query</span> <a name="l01137"></a>01137 <span class="comment"> @param trackno 0=next track to come, >0 number of existing track</span> <a name="l01138"></a>01138 <span class="comment"> @param lba return value: start lba</span> <a name="l01139"></a>01139 <span class="comment"> @param nwa return value: Next Writeable Address</span> <a name="l01140"></a>01140 <span class="comment"> @return 1=nwa is valid , 0=nwa is not valid , -1=error</span> <a name="l01141"></a>01141 <span class="comment"> @since 0.2.6</span> <a name="l01142"></a>01142 <span class="comment">*/</span> <a name="l01143"></a>01143 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#af9cc58ec679aaa10659fdce8f814c4cb" title="Read start lba and Next Writeable Address of a track from media.">burn_disc_track_lba_nwa</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keyword">struct</span> burn_write_opts *o, <a name="l01144"></a>01144 <span class="keywordtype">int</span> trackno, <span class="keywordtype">int</span> *lba, <span class="keywordtype">int</span> *nwa); <a name="l01145"></a>01145 <a name="l01146"></a>01146 <span class="comment">/* ts A70131 */</span><span class="comment"></span> <a name="l01147"></a>01147 <span class="comment">/** Read start lba of the first track in the last complete session.</span> <a name="l01148"></a>01148 <span class="comment"> This is the first parameter of mkisofs option -C. The second parameter</span> <a name="l01149"></a>01149 <span class="comment"> is nwa as obtained by burn_disc_track_lba_nwa() with trackno 0.</span> <a name="l01150"></a>01150 <span class="comment"> @param d The drive to query.</span> <a name="l01151"></a>01151 <span class="comment"> @param start_lba returns the start address of that track</span> <a name="l01152"></a>01152 <span class="comment"> @return <= 0 : failure, 1 = ok </span> <a name="l01153"></a>01153 <span class="comment"> @since 0.3.2</span> <a name="l01154"></a>01154 <span class="comment">*/</span> <a name="l01155"></a>01155 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#acf950895b5acd6c88568dc7902d7a348" title="Read start lba of the first track in the last complete session.">burn_disc_get_msc1</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keywordtype">int</span> *start_lba); <a name="l01156"></a>01156 <a name="l01157"></a>01157 <a name="l01158"></a>01158 <span class="comment">/* ts A70213 */</span><span class="comment"></span> <a name="l01159"></a>01159 <span class="comment">/** Return the best possible estimation of the currently available capacity of</span> <a name="l01160"></a>01160 <span class="comment"> the media. This might depend on particular write option settings. For</span> <a name="l01161"></a>01161 <span class="comment"> inquiring the space with such a set of options, the drive has to be</span> <a name="l01162"></a>01162 <span class="comment"> grabbed and BURN_DRIVE_IDLE. If not, then one will only get a canned value</span> <a name="l01163"></a>01163 <span class="comment"> from the most recent automatic inquiry (e.g. during last drive grabbing).</span> <a name="l01164"></a>01164 <span class="comment"> An eventual start address from burn_write_opts_set_start_byte() will be</span> <a name="l01165"></a>01165 <span class="comment"> subtracted from the obtained capacity estimation. Negative results get</span> <a name="l01166"></a>01166 <span class="comment"> defaulted to 0.</span> <a name="l01167"></a>01167 <span class="comment"> @param d The drive to query.</span> <a name="l01168"></a>01168 <span class="comment"> @param o If not NULL: write parameters to be set on drive before query</span> <a name="l01169"></a>01169 <span class="comment"> @return number of most probably available free bytes</span> <a name="l01170"></a>01170 <span class="comment"> @since 0.3.4</span> <a name="l01171"></a>01171 <span class="comment">*/</span> <a name="l01172"></a>01172 off_t <a class="code" href="libburn_8h.html#a88cfe8e8827d41ee1aaf8ea8a80b44fc" title="Return the best possible estimation of the currently available capacity of the media...">burn_disc_available_space</a>(<span class="keyword">struct</span> burn_drive *d, <a name="l01173"></a>01173 <span class="keyword">struct</span> burn_write_opts *o); <a name="l01174"></a>01174 <a name="l01175"></a>01175 <a name="l01176"></a>01176 <span class="comment">/* ts A61202 */</span><span class="comment"></span> <a name="l01177"></a>01177 <span class="comment">/** Tells the MMC Profile identifier of the loaded media. The drive must be</span> <a name="l01178"></a>01178 <span class="comment"> grabbed in order to get a non-zero result.</span> <a name="l01179"></a>01179 <span class="comment"> libburn currently writes only to profiles </span> <a name="l01180"></a>01180 <span class="comment"> 0x09 "CD-R", 0x0a "CD-RW",</span> <a name="l01181"></a>01181 <span class="comment"> 0x11 "DVD-R sequential recording", 0x12 "DVD-RAM",</span> <a name="l01182"></a>01182 <span class="comment"> 0x13 "DVD-RW restricted overwrite", 0x14 "DVD-RW sequential recording",</span> <a name="l01183"></a>01183 <span class="comment"> 0x1a "DVD+RW", 0x1b "DVD+R",</span> <a name="l01184"></a>01184 <span class="comment"> 0x2b "DVD+R/DL",</span> <a name="l01185"></a>01185 <span class="comment"> 0x41 "BD-R sequential recording", 0x43 "BD-RE",</span> <a name="l01186"></a>01186 <span class="comment"> 0xffff "stdio file"</span> <a name="l01187"></a>01187 <span class="comment"> Note: 0xffff is not a MMC profile but a libburn invention.</span> <a name="l01188"></a>01188 <span class="comment"> If enabled by burn_allow_untested_profiles() it also writes to profiles</span> <a name="l01189"></a>01189 <span class="comment"> 0x15 "DVD-R/DL sequential recording",</span> <a name="l01190"></a>01190 <span class="comment"> Read-only are the profiles</span> <a name="l01191"></a>01191 <span class="comment"> 0x08 "CD-ROM", 0x10 "DVD-ROM",</span> <a name="l01192"></a>01192 <span class="comment"> 0x40 "BD-ROM",</span> <a name="l01193"></a>01193 <span class="comment"> For now read-only is BD-R profile (testers wanted)</span> <a name="l01194"></a>01194 <span class="comment"> 0x42 "BD-R random recording"</span> <a name="l01195"></a>01195 <span class="comment"> @param d The drive where the media is inserted.</span> <a name="l01196"></a>01196 <span class="comment"> @param pno Profile Number. See also mmc5r03c.pdf, table 89</span> <a name="l01197"></a>01197 <span class="comment"> @param name Profile Name (see above list, unknown profiles have empty name)</span> <a name="l01198"></a>01198 <span class="comment"> @return 1 profile is valid, 0 no profile info available </span> <a name="l01199"></a>01199 <span class="comment"> @since 0.3.0</span> <a name="l01200"></a>01200 <span class="comment">*/</span> <a name="l01201"></a>01201 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a1627c70c71ec5b6116f8d9d63d229285" title="Tells the MMC Profile identifier of the loaded media.">burn_disc_get_profile</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keywordtype">int</span> *pno, <span class="keywordtype">char</span> name[80]); <a name="l01202"></a>01202 <span class="comment"></span> <a name="l01203"></a>01203 <span class="comment">/** Tells whether a disc can be erased or not</span> <a name="l01204"></a>01204 <span class="comment"> @param d The drive to inquire.</span> <a name="l01205"></a>01205 <span class="comment"> @return Non-zero means erasable</span> <a name="l01206"></a>01206 <span class="comment">*/</span> <a name="l01207"></a>01207 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a7838224062ed72305f3c6b1055cb1a98" title="Tells whether a disc can be erased or not.">burn_disc_erasable</a>(<span class="keyword">struct</span> burn_drive *d); <a name="l01208"></a>01208 <span class="comment"></span> <a name="l01209"></a>01209 <span class="comment">/** Returns the progress and status of a drive.</span> <a name="l01210"></a>01210 <span class="comment"> @param drive The drive to query busy state for.</span> <a name="l01211"></a>01211 <span class="comment"> @param p Returns the progress of the operation, NULL if you don't care</span> <a name="l01212"></a>01212 <span class="comment"> @return the current status of the drive. See also burn_drive_status.</span> <a name="l01213"></a>01213 <span class="comment">*/</span> <a name="l01214"></a>01214 <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#a3cb9c75648e773f63911b0975f67802b" title="Possible busy states for a drive.">burn_drive_status</a> <a class="code" href="libburn_8h.html#a992777abdf1f13f1e2c45271e43e9a3d" title="Returns the progress and status of a drive.">burn_drive_get_status</a>(<span class="keyword">struct</span> burn_drive *drive, <a name="l01215"></a>01215 <span class="keyword">struct</span> <a class="code" href="structburn__progress.html" title="Operation progress report.">burn_progress</a> *p); <a name="l01216"></a>01216 <span class="comment"></span> <a name="l01217"></a>01217 <span class="comment">/** Creates a write_opts struct for burning to the specified drive.</span> <a name="l01218"></a>01218 <span class="comment"> The returned object must later be freed with burn_write_opts_free().</span> <a name="l01219"></a>01219 <span class="comment"> @param drive The drive to write with</span> <a name="l01220"></a>01220 <span class="comment"> @return The write_opts, NULL on error</span> <a name="l01221"></a>01221 <span class="comment">*/</span> <a name="l01222"></a>01222 <span class="keyword">struct </span>burn_write_opts *<a class="code" href="libburn_8h.html#ad62ba8f5344c36e2faa9aa6208751e0a" title="Creates a write_opts struct for burning to the specified drive.">burn_write_opts_new</a>(<span class="keyword">struct</span> burn_drive *drive); <a name="l01223"></a>01223 <a name="l01224"></a>01224 <a name="l01225"></a>01225 <span class="comment">/* ts A70901 */</span><span class="comment"></span> <a name="l01226"></a>01226 <span class="comment">/** Inquires the drive associated with a burn_write_opts object.</span> <a name="l01227"></a>01227 <span class="comment"> @param opts object to inquire</span> <a name="l01228"></a>01228 <span class="comment"> @return pointer to drive</span> <a name="l01229"></a>01229 <span class="comment"> @since 0.4.0</span> <a name="l01230"></a>01230 <span class="comment">*/</span> <a name="l01231"></a>01231 <span class="keyword">struct </span>burn_drive *<a class="code" href="libburn_8h.html#a4271e01366acfff481cab59bfbb728b6" title="Inquires the drive associated with a burn_write_opts object.">burn_write_opts_get_drive</a>(<span class="keyword">struct</span> burn_write_opts *opts); <a name="l01232"></a>01232 <a name="l01233"></a>01233 <span class="comment"></span> <a name="l01234"></a>01234 <span class="comment">/** Frees a write_opts struct created with burn_write_opts_new</span> <a name="l01235"></a>01235 <span class="comment"> @param opts write_opts to free</span> <a name="l01236"></a>01236 <span class="comment">*/</span> <a name="l01237"></a>01237 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a1336283a8e59fe7ac187243350e21866" title="Frees a write_opts struct created with burn_write_opts_new.">burn_write_opts_free</a>(<span class="keyword">struct</span> burn_write_opts *opts); <a name="l01238"></a>01238 <span class="comment"></span> <a name="l01239"></a>01239 <span class="comment">/** Creates a read_opts struct for reading from the specified drive</span> <a name="l01240"></a>01240 <span class="comment"> must be freed with burn_read_opts_free</span> <a name="l01241"></a>01241 <span class="comment"> @param drive The drive to read from</span> <a name="l01242"></a>01242 <span class="comment"> @return The read_opts</span> <a name="l01243"></a>01243 <span class="comment">*/</span> <a name="l01244"></a>01244 <span class="keyword">struct </span>burn_read_opts *<a class="code" href="libburn_8h.html#a9261df8b2d810e807526caa479f30120" title="Creates a read_opts struct for reading from the specified drive must be freed with...">burn_read_opts_new</a>(<span class="keyword">struct</span> burn_drive *drive); <a name="l01245"></a>01245 <span class="comment"></span> <a name="l01246"></a>01246 <span class="comment">/** Frees a read_opts struct created with burn_read_opts_new</span> <a name="l01247"></a>01247 <span class="comment"> @param opts write_opts to free</span> <a name="l01248"></a>01248 <span class="comment">*/</span> <a name="l01249"></a>01249 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#ad1370433edfce05b425892539f91d161" title="Frees a read_opts struct created with burn_read_opts_new.">burn_read_opts_free</a>(<span class="keyword">struct</span> burn_read_opts *opts); <a name="l01250"></a>01250 <span class="comment"></span> <a name="l01251"></a>01251 <span class="comment">/** Erase a disc in the drive. The drive must be grabbed successfully BEFORE</span> <a name="l01252"></a>01252 <span class="comment"> calling this functions. Always ensure that the drive reports a status of</span> <a name="l01253"></a>01253 <span class="comment"> BURN_DISC_FULL before calling this function. An erase operation is not</span> <a name="l01254"></a>01254 <span class="comment"> cancellable, as control of the operation is passed wholly to the drive and</span> <a name="l01255"></a>01255 <span class="comment"> there is no way to interrupt it safely.</span> <a name="l01256"></a>01256 <span class="comment"> @param drive The drive with which to erase a disc.</span> <a name="l01257"></a>01257 <span class="comment"> @param fast Nonzero to do a fast erase, where only the disc's headers are</span> <a name="l01258"></a>01258 <span class="comment"> erased; zero to erase the entire disc.</span> <a name="l01259"></a>01259 <span class="comment"> With DVD-RW, fast blanking yields media capable only of DAO.</span> <a name="l01260"></a>01260 <span class="comment">*/</span> <a name="l01261"></a>01261 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a86a5394e31ab522bca8cc5b7990f1923" title="Erase a disc in the drive.">burn_disc_erase</a>(<span class="keyword">struct</span> burn_drive *drive, <span class="keywordtype">int</span> fast); <a name="l01262"></a>01262 <a name="l01263"></a>01263 <a name="l01264"></a>01264 <span class="comment">/* ts A70101 - A70417 */</span><span class="comment"></span> <a name="l01265"></a>01265 <span class="comment">/** Format media for use with libburn. This currently applies to DVD-RW</span> <a name="l01266"></a>01266 <span class="comment"> in state "Sequential Recording" (profile 0014h) which get formatted to</span> <a name="l01267"></a>01267 <span class="comment"> state "Restricted Overwrite" (profile 0013h). DVD+RW can be "de-iced"</span> <a name="l01268"></a>01268 <span class="comment"> by setting bit2 of flag. DVD-RAM and BD-RE may get formatted initially</span> <a name="l01269"></a>01269 <span class="comment"> or re-formatted to adjust their Defect Managment.</span> <a name="l01270"></a>01270 <span class="comment"> This function usually returns while the drive is still in the process</span> <a name="l01271"></a>01271 <span class="comment"> of formatting. The formatting is done, when burn_drive_get_status()</span> <a name="l01272"></a>01272 <span class="comment"> returns BURN_DRIVE_IDLE. This may be immediately after return or may</span> <a name="l01273"></a>01273 <span class="comment"> need several thousand seconds to occur.</span> <a name="l01274"></a>01274 <span class="comment"> @param drive The drive with the disc to format.</span> <a name="l01275"></a>01275 <span class="comment"> @param size The size in bytes to be used with the format command. It should</span> <a name="l01276"></a>01276 <span class="comment"> be divisible by 32*1024. The effect of this parameter may</span> <a name="l01277"></a>01277 <span class="comment"> depend on the media profile and on parameter flag.</span> <a name="l01278"></a>01278 <span class="comment"> @param flag Bitfield for control purposes:</span> <a name="l01279"></a>01279 <span class="comment"> bit0= after formatting, write the given number of zero-bytes</span> <a name="l01280"></a>01280 <span class="comment"> to the media and eventually perform preliminary closing.</span> <a name="l01281"></a>01281 <span class="comment"> bit1+2: size mode</span> <a name="l01282"></a>01282 <span class="comment"> 0 = use parameter size as far as it makes sense</span> <a name="l01283"></a>01283 <span class="comment"> 1 = insist in size 0 even if there is a better default known</span> <a name="l01284"></a>01284 <span class="comment"> (on DVD-RAM or BD-R identical to size mode 0,</span> <a name="l01285"></a>01285 <span class="comment"> i.e. they never get formatted with payload size 0)</span> <a name="l01286"></a>01286 <span class="comment"> 2 = without bit7: format to maximum available size</span> <a name="l01287"></a>01287 <span class="comment"> with bit7 : take size from indexed format descriptor</span> <a name="l01288"></a>01288 <span class="comment"> 3 = without bit7: format to default size</span> <a name="l01289"></a>01289 <span class="comment"> with bit7 : take size from indexed format descriptor</span> <a name="l01290"></a>01290 <span class="comment"> bit3= -reserved-</span> <a name="l01291"></a>01291 <span class="comment"> bit4= enforce re-format of (partly) formatted media</span> <a name="l01292"></a>01292 <span class="comment"> bit5= try to disable eventual defect management</span> <a name="l01293"></a>01293 <span class="comment"> bit6= try to avoid lengthy media certification</span> <a name="l01294"></a>01294 <span class="comment"> bit7, bit8 to bit15 =</span> <a name="l01295"></a>01295 <span class="comment"> bit7 enables MMC expert application mode (else libburn</span> <a name="l01296"></a>01296 <span class="comment"> tries to choose a suitable format type):</span> <a name="l01297"></a>01297 <span class="comment"> If it is set then bit8 to bit15 contain the index of</span> <a name="l01298"></a>01298 <span class="comment"> the format to use. See burn_disc_get_formats(),</span> <a name="l01299"></a>01299 <span class="comment"> burn_disc_get_format_descr().</span> <a name="l01300"></a>01300 <span class="comment"> Acceptable types are: 0x00, 0x01, 0x10, 0x11, 0x13,</span> <a name="l01301"></a>01301 <span class="comment"> 0x15, 0x26, 0x30, 0x31, 0x32.</span> <a name="l01302"></a>01302 <span class="comment"> If bit7 is set, then bit4 is set automatically.</span> <a name="l01303"></a>01303 <span class="comment"> bit16= enable POW on blank BD-R</span> <a name="l01304"></a>01304 <span class="comment"> @since 0.3.0</span> <a name="l01305"></a>01305 <span class="comment">*/</span> <a name="l01306"></a>01306 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a1ac5250deb1dd13d7192f5e834fd5c4d" title="Format media for use with libburn.">burn_disc_format</a>(<span class="keyword">struct</span> burn_drive *drive, off_t size, <span class="keywordtype">int</span> flag); <a name="l01307"></a>01307 <a name="l01308"></a>01308 <a name="l01309"></a>01309 <span class="comment">/* ts A70112 */</span> <a name="l01310"></a>01310 <span class="comment">/* @since 0.3.0 */</span><span class="comment"></span> <a name="l01311"></a>01311 <span class="comment">/** Possible formatting status values */</span> <a name="l01312"></a><a class="code" href="libburn_8h.html#a7b6978947a00d7f643003a1103b8a821">01312</a> <span class="preprocessor">#define BURN_FORMAT_IS_UNFORMATTED 1</span> <a name="l01313"></a><a class="code" href="libburn_8h.html#a86701ad4b673f19aaffcb85263a551bb">01313</a> <span class="preprocessor"></span><span class="preprocessor">#define BURN_FORMAT_IS_FORMATTED 2</span> <a name="l01314"></a><a class="code" href="libburn_8h.html#a7ce625ce3d11a3138039b5426455f2fb">01314</a> <span class="preprocessor"></span><span class="preprocessor">#define BURN_FORMAT_IS_UNKNOWN 3</span> <a name="l01315"></a>01315 <span class="preprocessor"></span> <a name="l01316"></a>01316 <span class="comment">/* ts A70112 */</span><span class="comment"></span> <a name="l01317"></a>01317 <span class="comment">/** Inquire the formatting status, the associated sizes and the number of</span> <a name="l01318"></a>01318 <span class="comment"> available formats. The info is media specific and stems from MMC command</span> <a name="l01319"></a>01319 <span class="comment"> 23h READ FORMAT CAPACITY. See mmc5r03c.pdf 6.24 for background details.</span> <a name="l01320"></a>01320 <span class="comment"> Media type can be determined via burn_disc_get_profile().</span> <a name="l01321"></a>01321 <span class="comment"> @param drive The drive with the disc to format.</span> <a name="l01322"></a>01322 <span class="comment"> @param status The current formatting status of the inserted media.</span> <a name="l01323"></a>01323 <span class="comment"> See BURN_FORMAT_IS_* macros. Note: "unknown" is the</span> <a name="l01324"></a>01324 <span class="comment"> legal status for quick formatted, yet unwritten DVD-RW.</span> <a name="l01325"></a>01325 <span class="comment"> @param size The size in bytes associated with status.</span> <a name="l01326"></a>01326 <span class="comment"> unformatted: the maximum achievable size of the media</span> <a name="l01327"></a>01327 <span class="comment"> formatted: the currently formatted capacity</span> <a name="l01328"></a>01328 <span class="comment"> unknown: maximum capacity of drive or of media</span> <a name="l01329"></a>01329 <span class="comment"> @param bl_sas Additional info "Block Length/Spare Area Size".</span> <a name="l01330"></a>01330 <span class="comment"> Expected to be constantly 2048 for non-BD media.</span> <a name="l01331"></a>01331 <span class="comment"> @param num_formats The number of available formats. To be used with</span> <a name="l01332"></a>01332 <span class="comment"> burn_disc_get_format_descr() to obtain such a format</span> <a name="l01333"></a>01333 <span class="comment"> and eventually with burn_disc_format() to select one.</span> <a name="l01334"></a>01334 <span class="comment"> @return 1 reply is valid , <=0 failure</span> <a name="l01335"></a>01335 <span class="comment"> @since 0.3.0</span> <a name="l01336"></a>01336 <span class="comment">*/</span> <a name="l01337"></a>01337 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#abe718b844984771afe7c38f44e7abbe6" title="Inquire the formatting status, the associated sizes and the number of available formats...">burn_disc_get_formats</a>(<span class="keyword">struct</span> burn_drive *drive, <span class="keywordtype">int</span> *status, off_t *size, <a name="l01338"></a>01338 <span class="keywordtype">unsigned</span> *bl_sas, <span class="keywordtype">int</span> *num_formats); <a name="l01339"></a>01339 <a name="l01340"></a>01340 <span class="comment">/* ts A70112 */</span><span class="comment"></span> <a name="l01341"></a>01341 <span class="comment">/** Inquire parameters of an available media format.</span> <a name="l01342"></a>01342 <span class="comment"> @param drive The drive with the disc to format.</span> <a name="l01343"></a>01343 <span class="comment"> @param index The index of the format item. Beginning with 0 up to reply</span> <a name="l01344"></a>01344 <span class="comment"> parameter from burn_disc_get_formats() : num_formats - 1</span> <a name="l01345"></a>01345 <span class="comment"> @param type The format type. See mmc5r03c.pdf, 6.5, 04h FORMAT UNIT.</span> <a name="l01346"></a>01346 <span class="comment"> 0x00=full, 0x10=CD-RW/DVD-RW full, 0x11=CD-RW/DVD-RW grow,</span> <a name="l01347"></a>01347 <span class="comment"> 0x15=DVD-RW quick, 0x13=DVD-RW quick grow,</span> <a name="l01348"></a>01348 <span class="comment"> 0x26=DVD+RW background, 0x30=BD-RE with spare areas,</span> <a name="l01349"></a>01349 <span class="comment"> 0x31=BD-RE without spare areas</span> <a name="l01350"></a>01350 <span class="comment"> @param size The maximum size in bytes achievable with this format.</span> <a name="l01351"></a>01351 <span class="comment"> @param tdp Type Dependent Parameter. See mmc5r03c.pdf.</span> <a name="l01352"></a>01352 <span class="comment"> @return 1 reply is valid , <=0 failure</span> <a name="l01353"></a>01353 <span class="comment"> @since 0.3.0</span> <a name="l01354"></a>01354 <span class="comment">*/</span> <a name="l01355"></a>01355 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a6c9a17a117a2aa8fbb4317437fe0188c" title="Inquire parameters of an available media format.">burn_disc_get_format_descr</a>(<span class="keyword">struct</span> burn_drive *drive, <span class="keywordtype">int</span> index, <a name="l01356"></a>01356 <span class="keywordtype">int</span> *type, off_t *size, <span class="keywordtype">unsigned</span> *tdp); <a name="l01357"></a>01357 <a name="l01358"></a>01358 <a name="l01359"></a>01359 <a name="l01360"></a>01360 <span class="comment">/* ts A61109 : this was and is defunct */</span><span class="comment"></span> <a name="l01361"></a>01361 <span class="comment">/** Read a disc from the drive and write it to an fd pair. The drive must be</span> <a name="l01362"></a>01362 <span class="comment"> grabbed successfully BEFORE calling this function. Always ensure that the</span> <a name="l01363"></a>01363 <span class="comment"> drive reports a status of BURN_DISC_FULL before calling this function.</span> <a name="l01364"></a>01364 <span class="comment"> @param drive The drive from which to read a disc.</span> <a name="l01365"></a>01365 <span class="comment"> @param o The options for the read operation.</span> <a name="l01366"></a>01366 <span class="comment">*/</span> <a name="l01367"></a>01367 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#ab2bf0d54acdc4159db65c8d5547a0e30" title="Read a disc from the drive and write it to an fd pair.">burn_disc_read</a>(<span class="keyword">struct</span> burn_drive *drive, <span class="keyword">const</span> <span class="keyword">struct</span> burn_read_opts *o); <a name="l01368"></a>01368 <a name="l01369"></a>01369 <a name="l01370"></a>01370 <a name="l01371"></a>01371 <span class="comment">/* ts A70222 */</span> <a name="l01372"></a>01372 <span class="comment">/* @since 0.3.4 */</span><span class="comment"></span> <a name="l01373"></a>01373 <span class="comment">/** The length of a rejection reasons string for burn_precheck_write() and</span> <a name="l01374"></a>01374 <span class="comment"> burn_write_opts_auto_write_type() .</span> <a name="l01375"></a>01375 <span class="comment">*/</span> <a name="l01376"></a><a class="code" href="libburn_8h.html#a109ecdcd00fd30904a76c58040df9b79">01376</a> <span class="preprocessor">#define BURN_REASONS_LEN 4096</span> <a name="l01377"></a>01377 <span class="preprocessor"></span> <a name="l01378"></a>01378 <a name="l01379"></a>01379 <span class="comment">/* ts A70219 */</span><span class="comment"></span> <a name="l01380"></a>01380 <span class="comment">/** Examines a completed setup for burn_disc_write() whether it is permissible</span> <a name="l01381"></a>01381 <span class="comment"> with drive and media. This function is called by burn_disc_write() but</span> <a name="l01382"></a>01382 <span class="comment"> an application might be interested in this check in advance.</span> <a name="l01383"></a>01383 <span class="comment"> @param o The options for the writing operation.</span> <a name="l01384"></a>01384 <span class="comment"> @param disc The descrition of the disc to be created</span> <a name="l01385"></a>01385 <span class="comment"> @param reasons Eventually returns a list of rejection reason statements</span> <a name="l01386"></a>01386 <span class="comment"> @param silent 1= do not issue error messages , 0= report problems</span> <a name="l01387"></a>01387 <span class="comment"> @return 1 ok, -1= no recordable media detected, 0= other failure</span> <a name="l01388"></a>01388 <span class="comment"> @since 0.3.4</span> <a name="l01389"></a>01389 <span class="comment">*/</span> <a name="l01390"></a>01390 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#ac54e4d92a672b870088ad305c9b17054" title="Examines a completed setup for burn_disc_write() whether it is permissible with drive...">burn_precheck_write</a>(<span class="keyword">struct</span> burn_write_opts *o, <span class="keyword">struct</span> burn_disc *disc, <a name="l01391"></a>01391 <span class="keywordtype">char</span> reasons[<a class="code" href="libburn_8h.html#a109ecdcd00fd30904a76c58040df9b79" title="The length of a rejection reasons string for burn_precheck_write() and burn_write_opts_auto_write_ty...">BURN_REASONS_LEN</a>], <span class="keywordtype">int</span> silent); <a name="l01392"></a>01392 <a name="l01393"></a>01393 <span class="comment"></span> <a name="l01394"></a>01394 <span class="comment">/** Write a disc in the drive. The drive must be grabbed successfully before</span> <a name="l01395"></a>01395 <span class="comment"> calling this function. Always ensure that the drive reports a status of</span> <a name="l01396"></a>01396 <span class="comment"> BURN_DISC_BLANK ot BURN_DISC_APPENDABLE before calling this function.</span> <a name="l01397"></a>01397 <span class="comment"> Note: write_type BURN_WRITE_SAO is currently not capable of writing a mix</span> <a name="l01398"></a>01398 <span class="comment"> of data and audio tracks. You must use BURN_WRITE_TAO for such sessions.</span> <a name="l01399"></a>01399 <span class="comment"> To be set by burn_write_opts_set_write_type(). </span> <a name="l01400"></a>01400 <span class="comment"> Note: This function is not suitable for overwriting data in the middle of</span> <a name="l01401"></a>01401 <span class="comment"> a valid data area because it is allowed to append trailing data.</span> <a name="l01402"></a>01402 <span class="comment"> For exact random access overwriting use burn_random_access_write().</span> <a name="l01403"></a>01403 <span class="comment"> @param o The options for the writing operation.</span> <a name="l01404"></a>01404 <span class="comment"> @param disc The struct burn_disc * that described the disc to be created</span> <a name="l01405"></a>01405 <span class="comment">*/</span> <a name="l01406"></a>01406 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a75d3d59e9c3cd7cd42c9735bee83bd91" title="Write a disc in the drive.">burn_disc_write</a>(<span class="keyword">struct</span> burn_write_opts *o, <span class="keyword">struct</span> burn_disc *disc); <a name="l01407"></a>01407 <a name="l01408"></a>01408 <a name="l01409"></a>01409 <span class="comment">/* ts A90227 */</span><span class="comment"></span> <a name="l01410"></a>01410 <span class="comment">/** Control stream recording during the write run and eventually set the start</span> <a name="l01411"></a>01411 <span class="comment"> LBA for stream recording.</span> <a name="l01412"></a>01412 <span class="comment"> Stream recording is set from struct burn_write_opts when the write run</span> <a name="l01413"></a>01413 <span class="comment"> gets started. See burn_write_opts_set_stream_recording().</span> <a name="l01414"></a>01414 <span class="comment"> The call described here can be used later to override this setting and</span> <a name="l01415"></a>01415 <span class="comment"> to program automatic switching at a given LBA. It also affects subsequent</span> <a name="l01416"></a>01416 <span class="comment"> calls to burn_random_access_write().</span> <a name="l01417"></a>01417 <span class="comment"> @param drive The drive which performs the write operation.</span> <a name="l01418"></a>01418 <span class="comment"> @param recmode -1= disable stream recording</span> <a name="l01419"></a>01419 <span class="comment"> 0= leave setting as is</span> <a name="l01420"></a>01420 <span class="comment"> 1= enable stream recording</span> <a name="l01421"></a>01421 <span class="comment"> @param start The LBA where actual stream recording shall start.</span> <a name="l01422"></a>01422 <span class="comment"> (0 means unconditional stream recording)</span> <a name="l01423"></a>01423 <span class="comment"> @param flag Bitfield for control purposes (unused yet, submit 0).</span> <a name="l01424"></a>01424 <span class="comment"> @return 1=success , <=0 failure</span> <a name="l01425"></a>01425 <span class="comment"> @since 0.6.4</span> <a name="l01426"></a>01426 <span class="comment">*/</span> <a name="l01427"></a>01427 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a1f0efc4b7648b851defa131ae368000d" title="Control stream recording during the write run and eventually set the start LBA for...">burn_drive_set_stream_recording</a>(<span class="keyword">struct</span> burn_drive *drive, <span class="keywordtype">int</span> recmode, <a name="l01428"></a>01428 <span class="keywordtype">int</span> start, <span class="keywordtype">int</span> flag); <a name="l01429"></a>01429 <span class="comment"></span> <a name="l01430"></a>01430 <span class="comment">/** Cancel an operation on a drive.</span> <a name="l01431"></a>01431 <span class="comment"> This will only work when the drive's busy state is BURN_DRIVE_READING or</span> <a name="l01432"></a>01432 <span class="comment"> BURN_DRIVE_WRITING.</span> <a name="l01433"></a>01433 <span class="comment"> @param drive The drive on which to cancel the current operation.</span> <a name="l01434"></a>01434 <span class="comment">*/</span> <a name="l01435"></a>01435 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a79b6c12da69105be4d0cc5b376f62a6e" title="Cancel an operation on a drive.">burn_drive_cancel</a>(<span class="keyword">struct</span> burn_drive *drive); <a name="l01436"></a>01436 <a name="l01437"></a>01437 <a name="l01438"></a>01438 <span class="comment">/* ts A61223 */</span><span class="comment"></span> <a name="l01439"></a>01439 <span class="comment">/** Inquire whether the most recent write run was successful. Reasons for</span> <a name="l01440"></a>01440 <span class="comment"> non-success may be: rejection of burn parameters, abort during fatal errors</span> <a name="l01441"></a>01441 <span class="comment"> during write, a call to burn_drive_cancel() by the application thread.</span> <a name="l01442"></a>01442 <span class="comment"> @param d The drive to inquire.</span> <a name="l01443"></a>01443 <span class="comment"> @return 1=burn seems to have went well, 0=burn failed </span> <a name="l01444"></a>01444 <span class="comment"> @since 0.2.6</span> <a name="l01445"></a>01445 <span class="comment">*/</span> <a name="l01446"></a>01446 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a84c17975af3585efb2b76930ecbcabfa" title="Inquire whether the most recent write run was successful.">burn_drive_wrote_well</a>(<span class="keyword">struct</span> burn_drive *d); <a name="l01447"></a>01447 <a name="l01448"></a>01448 <span class="comment"></span> <a name="l01449"></a>01449 <span class="comment">/** Convert a minute-second-frame (MSF) value to sector count</span> <a name="l01450"></a>01450 <span class="comment"> @param m Minute component</span> <a name="l01451"></a>01451 <span class="comment"> @param s Second component</span> <a name="l01452"></a>01452 <span class="comment"> @param f Frame component</span> <a name="l01453"></a>01453 <span class="comment"> @return The sector count</span> <a name="l01454"></a>01454 <span class="comment">*/</span> <a name="l01455"></a>01455 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a6483685e361402cafd9a69b98c21769c" title="Convert a minute-second-frame (MSF) value to sector count.">burn_msf_to_sectors</a>(<span class="keywordtype">int</span> m, <span class="keywordtype">int</span> s, <span class="keywordtype">int</span> f); <a name="l01456"></a>01456 <span class="comment"></span> <a name="l01457"></a>01457 <span class="comment">/** Convert a sector count to minute-second-frame (MSF)</span> <a name="l01458"></a>01458 <span class="comment"> @param sectors The sector count</span> <a name="l01459"></a>01459 <span class="comment"> @param m Returns the minute component</span> <a name="l01460"></a>01460 <span class="comment"> @param s Returns the second component</span> <a name="l01461"></a>01461 <span class="comment"> @param f Returns the frame component</span> <a name="l01462"></a>01462 <span class="comment">*/</span> <a name="l01463"></a>01463 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#abfdcbe3cc001ce0368e3298ebbe860cf" title="Convert a sector count to minute-second-frame (MSF).">burn_sectors_to_msf</a>(<span class="keywordtype">int</span> sectors, <span class="keywordtype">int</span> *m, <span class="keywordtype">int</span> *s, <span class="keywordtype">int</span> *f); <a name="l01464"></a>01464 <span class="comment"></span> <a name="l01465"></a>01465 <span class="comment">/** Convert a minute-second-frame (MSF) value to an lba</span> <a name="l01466"></a>01466 <span class="comment"> @param m Minute component</span> <a name="l01467"></a>01467 <span class="comment"> @param s Second component</span> <a name="l01468"></a>01468 <span class="comment"> @param f Frame component</span> <a name="l01469"></a>01469 <span class="comment"> @return The lba</span> <a name="l01470"></a>01470 <span class="comment">*/</span> <a name="l01471"></a>01471 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a101da6a60057a739af66bdd2128cf995" title="Convert a minute-second-frame (MSF) value to an lba.">burn_msf_to_lba</a>(<span class="keywordtype">int</span> m, <span class="keywordtype">int</span> s, <span class="keywordtype">int</span> f); <a name="l01472"></a>01472 <span class="comment"></span> <a name="l01473"></a>01473 <span class="comment">/** Convert an lba to minute-second-frame (MSF)</span> <a name="l01474"></a>01474 <span class="comment"> @param lba The lba</span> <a name="l01475"></a>01475 <span class="comment"> @param m Returns the minute component</span> <a name="l01476"></a>01476 <span class="comment"> @param s Returns the second component</span> <a name="l01477"></a>01477 <span class="comment"> @param f Returns the frame component</span> <a name="l01478"></a>01478 <span class="comment">*/</span> <a name="l01479"></a>01479 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a7f1f9c02d7255b7370d56a7ca212dedc" title="Convert an lba to minute-second-frame (MSF).">burn_lba_to_msf</a>(<span class="keywordtype">int</span> lba, <span class="keywordtype">int</span> *m, <span class="keywordtype">int</span> *s, <span class="keywordtype">int</span> *f); <a name="l01480"></a>01480 <span class="comment"></span> <a name="l01481"></a>01481 <span class="comment">/** Create a new disc</span> <a name="l01482"></a>01482 <span class="comment"> @return Pointer to a burn_disc object or NULL on failure.</span> <a name="l01483"></a>01483 <span class="comment">*/</span> <a name="l01484"></a>01484 <span class="keyword">struct </span>burn_disc *<a class="code" href="libburn_8h.html#a9514679bfc2d3c3079bb06f0ddfc2216" title="Create a new disc.">burn_disc_create</a>(<span class="keywordtype">void</span>); <a name="l01485"></a>01485 <span class="comment"></span> <a name="l01486"></a>01486 <span class="comment">/** Delete disc and decrease the reference count on all its sessions</span> <a name="l01487"></a>01487 <span class="comment"> @param d The disc to be freed</span> <a name="l01488"></a>01488 <span class="comment">*/</span> <a name="l01489"></a>01489 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#aca06a415d81da71a3fd3aad31e83c698" title="Delete disc and decrease the reference count on all its sessions.">burn_disc_free</a>(<span class="keyword">struct</span> burn_disc *d); <a name="l01490"></a>01490 <span class="comment"></span> <a name="l01491"></a>01491 <span class="comment">/** Create a new session</span> <a name="l01492"></a>01492 <span class="comment"> @return Pointer to a burn_session object or NULL on failure.</span> <a name="l01493"></a>01493 <span class="comment"> */</span> <a name="l01494"></a>01494 <span class="keyword">struct </span>burn_session *<a class="code" href="libburn_8h.html#a2dceb26e334833c240391cacfde555f7" title="Create a new session.">burn_session_create</a>(<span class="keywordtype">void</span>); <a name="l01495"></a>01495 <span class="comment"></span> <a name="l01496"></a>01496 <span class="comment">/** Free a session (and decrease reference count on all tracks inside)</span> <a name="l01497"></a>01497 <span class="comment"> @param s Session to be freed</span> <a name="l01498"></a>01498 <span class="comment">*/</span> <a name="l01499"></a>01499 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a21765aec4a5b1a9c21c027f855f9c2a0" title="Free a session (and decrease reference count on all tracks inside).">burn_session_free</a>(<span class="keyword">struct</span> burn_session *s); <a name="l01500"></a>01500 <span class="comment"></span> <a name="l01501"></a>01501 <span class="comment">/** Add a session to a disc at a specific position, increasing the </span> <a name="l01502"></a>01502 <span class="comment"> sessions's reference count.</span> <a name="l01503"></a>01503 <span class="comment"> @param d Disc to add the session to</span> <a name="l01504"></a>01504 <span class="comment"> @param s Session to add to the disc</span> <a name="l01505"></a>01505 <span class="comment"> @param pos position to add at (BURN_POS_END is "at the end")</span> <a name="l01506"></a>01506 <span class="comment"> @return 0 for failure, 1 for success</span> <a name="l01507"></a>01507 <span class="comment">*/</span> <a name="l01508"></a>01508 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a77730a5108688fbee754fea7b56e048a" title="Add a session to a disc at a specific position, increasing the sessions&#39;s reference...">burn_disc_add_session</a>(<span class="keyword">struct</span> burn_disc *d, <span class="keyword">struct</span> burn_session *s, <a name="l01509"></a>01509 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pos); <a name="l01510"></a>01510 <span class="comment"></span> <a name="l01511"></a>01511 <span class="comment">/** Remove a session from a disc</span> <a name="l01512"></a>01512 <span class="comment"> @param d Disc to remove session from</span> <a name="l01513"></a>01513 <span class="comment"> @param s Session pointer to find and remove</span> <a name="l01514"></a>01514 <span class="comment">*/</span> <a name="l01515"></a>01515 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#ae533f88cf603f09ad4e38e106437cddd" title="Remove a session from a disc.">burn_disc_remove_session</a>(<span class="keyword">struct</span> burn_disc *d, <span class="keyword">struct</span> burn_session *s); <a name="l01516"></a>01516 <a name="l01517"></a>01517 <span class="comment"></span> <a name="l01518"></a>01518 <span class="comment">/** Create a track (for TAO recording, or to put in a session) */</span> <a name="l01519"></a>01519 <span class="keyword">struct </span>burn_track *<a class="code" href="libburn_8h.html#aab87a2670415403982e499002fff0ca8" title="Create a track (for TAO recording, or to put in a session).">burn_track_create</a>(<span class="keywordtype">void</span>); <a name="l01520"></a>01520 <span class="comment"></span> <a name="l01521"></a>01521 <span class="comment">/** Free a track</span> <a name="l01522"></a>01522 <span class="comment"> @param t Track to free</span> <a name="l01523"></a>01523 <span class="comment">*/</span> <a name="l01524"></a>01524 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a105c516de4f9242d91f7e92d0b399110" title="Free a track.">burn_track_free</a>(<span class="keyword">struct</span> burn_track *t); <a name="l01525"></a>01525 <span class="comment"></span> <a name="l01526"></a>01526 <span class="comment">/** Add a track to a session at specified position</span> <a name="l01527"></a>01527 <span class="comment"> @param s Session to add to</span> <a name="l01528"></a>01528 <span class="comment"> @param t Track to insert in session</span> <a name="l01529"></a>01529 <span class="comment"> @param pos position to add at (BURN_POS_END is "at the end")</span> <a name="l01530"></a>01530 <span class="comment"> @return 0 for failure, 1 for success</span> <a name="l01531"></a>01531 <span class="comment">*/</span> <a name="l01532"></a>01532 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a2062793258361e9e84e7ddbf5f9ab06a" title="Add a track to a session at specified position.">burn_session_add_track</a>(<span class="keyword">struct</span> burn_session *s, <span class="keyword">struct</span> burn_track *t, <a name="l01533"></a>01533 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pos); <a name="l01534"></a>01534 <span class="comment"></span> <a name="l01535"></a>01535 <span class="comment">/** Remove a track from a session</span> <a name="l01536"></a>01536 <span class="comment"> @param s Session to remove track from</span> <a name="l01537"></a>01537 <span class="comment"> @param t Track pointer to find and remove</span> <a name="l01538"></a>01538 <span class="comment"> @return 0 for failure, 1 for success</span> <a name="l01539"></a>01539 <span class="comment">*/</span> <a name="l01540"></a>01540 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#aaecff0bdf2b602845b49af13589f76c0" title="Remove a track from a session.">burn_session_remove_track</a>(<span class="keyword">struct</span> burn_session *s, <span class="keyword">struct</span> burn_track *t); <a name="l01541"></a>01541 <a name="l01542"></a>01542 <span class="comment"></span> <a name="l01543"></a>01543 <span class="comment">/** Define the data in a track</span> <a name="l01544"></a>01544 <span class="comment"> @param t the track to define</span> <a name="l01545"></a>01545 <span class="comment"> @param offset The lib will write this many 0s before start of data</span> <a name="l01546"></a>01546 <span class="comment"> @param tail The number of extra 0s to write after data</span> <a name="l01547"></a>01547 <span class="comment"> @param pad 1 means the lib should pad the last sector with 0s if the</span> <a name="l01548"></a>01548 <span class="comment"> track isn't exactly sector sized. (otherwise the lib will</span> <a name="l01549"></a>01549 <span class="comment"> begin reading from the next track)</span> <a name="l01550"></a>01550 <span class="comment"> @param mode data format (bitfield)</span> <a name="l01551"></a>01551 <span class="comment">*/</span> <a name="l01552"></a>01552 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#aef2fd880f00065082691a848edcaf01e" title="Define the data in a track.">burn_track_define_data</a>(<span class="keyword">struct</span> burn_track *t, <span class="keywordtype">int</span> offset, <span class="keywordtype">int</span> tail, <a name="l01553"></a>01553 <span class="keywordtype">int</span> pad, <span class="keywordtype">int</span> mode); <a name="l01554"></a>01554 <a name="l01555"></a>01555 <a name="l01556"></a>01556 <span class="comment">/* ts A61024 */</span><span class="comment"></span> <a name="l01557"></a>01557 <span class="comment">/** Define whether a track shall swap bytes of its input stream.</span> <a name="l01558"></a>01558 <span class="comment"> @param t The track to change</span> <a name="l01559"></a>01559 <span class="comment"> @param swap_source_bytes 0=do not swap, 1=swap byte pairs</span> <a name="l01560"></a>01560 <span class="comment"> @return 1=success , 0=unacceptable value</span> <a name="l01561"></a>01561 <span class="comment"> @since 0.2.6</span> <a name="l01562"></a>01562 <span class="comment">*/</span> <a name="l01563"></a>01563 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a0f12266b32c5ea4e0721216dc93f8477" title="Define whether a track shall swap bytes of its input stream.">burn_track_set_byte_swap</a>(<span class="keyword">struct</span> burn_track *t, <span class="keywordtype">int</span> swap_source_bytes); <a name="l01564"></a>01564 <a name="l01565"></a>01565 <span class="comment"></span> <a name="l01566"></a>01566 <span class="comment">/** Set the ISRC details for a track</span> <a name="l01567"></a>01567 <span class="comment"> @param t The track to change</span> <a name="l01568"></a>01568 <span class="comment"> @param country the 2 char country code. Each character must be</span> <a name="l01569"></a>01569 <span class="comment"> only numbers or letters.</span> <a name="l01570"></a>01570 <span class="comment"> @param owner 3 char owner code. Each character must be only numbers</span> <a name="l01571"></a>01571 <span class="comment"> or letters.</span> <a name="l01572"></a>01572 <span class="comment"> @param year 2 digit year. A number in 0-99 (Yep, not Y2K friendly).</span> <a name="l01573"></a>01573 <span class="comment"> @param serial 5 digit serial number. A number in 0-99999.</span> <a name="l01574"></a>01574 <span class="comment">*/</span> <a name="l01575"></a>01575 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a999f3e0fc624e32da898cc7870106ea2" title="Set the ISRC details for a track.">burn_track_set_isrc</a>(<span class="keyword">struct</span> burn_track *t, <span class="keywordtype">char</span> *country, <span class="keywordtype">char</span> *owner, <a name="l01576"></a>01576 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> year, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> serial); <a name="l01577"></a>01577 <span class="comment"></span> <a name="l01578"></a>01578 <span class="comment">/** Disable ISRC parameters for a track</span> <a name="l01579"></a>01579 <span class="comment"> @param t The track to change</span> <a name="l01580"></a>01580 <span class="comment">*/</span> <a name="l01581"></a>01581 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a5c2cdaad0a0256e069fcc72f963e56c0" title="Disable ISRC parameters for a track.">burn_track_clear_isrc</a>(<span class="keyword">struct</span> burn_track *t); <a name="l01582"></a>01582 <span class="comment"></span> <a name="l01583"></a>01583 <span class="comment">/** Hide the first track in the "pre gap" of the disc</span> <a name="l01584"></a>01584 <span class="comment"> @param s session to change</span> <a name="l01585"></a>01585 <span class="comment"> @param onoff 1 to enable hiding, 0 to disable</span> <a name="l01586"></a>01586 <span class="comment">*/</span> <a name="l01587"></a>01587 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#aacbca35b8cde18ba737827eb0a3fe6fd" title="Hide the first track in the &quot;pre gap&quot; of the disc.">burn_session_hide_first_track</a>(<span class="keyword">struct</span> burn_session *s, <span class="keywordtype">int</span> onoff); <a name="l01588"></a>01588 <span class="comment"></span> <a name="l01589"></a>01589 <span class="comment">/** Get the drive's disc struct - free when done</span> <a name="l01590"></a>01590 <span class="comment"> @param d drive to query</span> <a name="l01591"></a>01591 <span class="comment"> @return the disc struct or NULL on failure</span> <a name="l01592"></a>01592 <span class="comment">*/</span> <a name="l01593"></a>01593 <span class="keyword">struct </span>burn_disc *<a class="code" href="libburn_8h.html#ae1f79a66275524984bcab34a561230cc" title="Get the drive&#39;s disc struct - free when done.">burn_drive_get_disc</a>(<span class="keyword">struct</span> burn_drive *d); <a name="l01594"></a>01594 <span class="comment"></span> <a name="l01595"></a>01595 <span class="comment">/** Set the track's data source</span> <a name="l01596"></a>01596 <span class="comment"> @param t The track to set the data source for</span> <a name="l01597"></a>01597 <span class="comment"> @param s The data source to use for the contents of the track</span> <a name="l01598"></a>01598 <span class="comment"> @return An error code stating if the source is ready for use for</span> <a name="l01599"></a>01599 <span class="comment"> writing the track, or if an error occured</span> <a name="l01600"></a>01600 <span class="comment"> </span> <a name="l01601"></a>01601 <span class="comment">*/</span> <a name="l01602"></a>01602 <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#aa5ddf1fe21e47ff4d4a44262c1d7da9b" title="Possible data source return values.">burn_source_status</a> <a class="code" href="libburn_8h.html#a27400c91868946c04b013c2cc2ac632a" title="Set the track&#39;s data source.">burn_track_set_source</a>(<span class="keyword">struct</span> burn_track *t, <a name="l01603"></a>01603 <span class="keyword">struct</span> <a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *s); <a name="l01604"></a>01604 <a name="l01605"></a>01605 <a name="l01606"></a>01606 <span class="comment">/* ts A70218 */</span><span class="comment"></span> <a name="l01607"></a>01607 <span class="comment">/** Set a default track size to be used only if the track turns out to be of</span> <a name="l01608"></a>01608 <span class="comment"> unpredictable length and if the effective write type demands a fixed size.</span> <a name="l01609"></a>01609 <span class="comment"> This can be useful to enable write types CD SAO or DVD DAO together with</span> <a name="l01610"></a>01610 <span class="comment"> a track source like stdin. If the track source delivers fewer bytes than</span> <a name="l01611"></a>01611 <span class="comment"> announced then the track will be padded up with zeros.</span> <a name="l01612"></a>01612 <span class="comment"> @param t The track to change</span> <a name="l01613"></a>01613 <span class="comment"> @param size The size to set</span> <a name="l01614"></a>01614 <span class="comment"> @return 0=failure 1=sucess</span> <a name="l01615"></a>01615 <span class="comment"> @since 0.3.4</span> <a name="l01616"></a>01616 <span class="comment">*/</span> <a name="l01617"></a>01617 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a94d7d359a93918b04356ce2bac51a096" title="Set a default track size to be used only if the track turns out to be of unpredictable...">burn_track_set_default_size</a>(<span class="keyword">struct</span> burn_track *t, off_t size); <a name="l01618"></a>01618 <span class="comment"></span> <a name="l01619"></a>01619 <span class="comment">/** Free a burn_source (decrease its refcount and maybe free it)</span> <a name="l01620"></a>01620 <span class="comment"> @param s Source to free</span> <a name="l01621"></a>01621 <span class="comment">*/</span> <a name="l01622"></a>01622 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a1a03f8b3088b8ce6305e7a48c3e034eb" title="Free a burn_source (decrease its refcount and maybe free it).">burn_source_free</a>(<span class="keyword">struct</span> <a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *s); <a name="l01623"></a>01623 <span class="comment"></span> <a name="l01624"></a>01624 <span class="comment">/** Creates a data source for an image file (and maybe subcode file)</span> <a name="l01625"></a>01625 <span class="comment"> @param path The file address for the main channel payload.</span> <a name="l01626"></a>01626 <span class="comment"> @param subpath Eventual address for subchannel data. Only used in exotic</span> <a name="l01627"></a>01627 <span class="comment"> raw write modes. Submit NULL for normal tasks.</span> <a name="l01628"></a>01628 <span class="comment"> @return Pointer to a burn_source object, NULL indicates failure</span> <a name="l01629"></a>01629 <span class="comment">*/</span> <a name="l01630"></a>01630 <span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *<a class="code" href="libburn_8h.html#aca8c7115fa2b60c2822deb48be8fd0c1" title="Creates a data source for an image file (and maybe subcode file).">burn_file_source_new</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path, <a name="l01631"></a>01631 <span class="keyword">const</span> <span class="keywordtype">char</span> *subpath); <a name="l01632"></a>01632 <span class="comment"></span> <a name="l01633"></a>01633 <span class="comment">/** Creates a data source for an image file (a track) from an open</span> <a name="l01634"></a>01634 <span class="comment"> readable filedescriptor, an eventually open readable subcodes file</span> <a name="l01635"></a>01635 <span class="comment"> descriptor and eventually a fixed size in bytes.</span> <a name="l01636"></a>01636 <span class="comment"> @param datafd The source of data.</span> <a name="l01637"></a>01637 <span class="comment"> @param subfd The eventual source of subchannel data. Only used in exotic</span> <a name="l01638"></a>01638 <span class="comment"> raw write modes. Submit -1 for normal tasks.</span> <a name="l01639"></a>01639 <span class="comment"> @param size The eventual fixed size of eventually both fds. </span> <a name="l01640"></a>01640 <span class="comment"> If this value is 0, the size will be determined from datafd.</span> <a name="l01641"></a>01641 <span class="comment"> @return Pointer to a burn_source object, NULL indicates failure</span> <a name="l01642"></a>01642 <span class="comment">*/</span> <a name="l01643"></a>01643 <span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *<a class="code" href="libburn_8h.html#a2e1504f4c949b13cea988e31af9c150a" title="Creates a data source for an image file (a track) from an open readable filedescriptor...">burn_fd_source_new</a>(<span class="keywordtype">int</span> datafd, <span class="keywordtype">int</span> subfd, off_t size); <a name="l01644"></a>01644 <a name="l01645"></a>01645 <a name="l01646"></a>01646 <span class="comment">/* ts A70930 */</span><span class="comment"></span> <a name="l01647"></a>01647 <span class="comment">/** Creates a fifo which acts as proxy for an already existing data source.</span> <a name="l01648"></a>01648 <span class="comment"> The fifo provides a ring buffer which shall smoothen the data stream</span> <a name="l01649"></a>01649 <span class="comment"> between burn_source and writer thread. Each fifo serves only for one</span> <a name="l01650"></a>01650 <span class="comment"> data source and gets attached to one track as its only data source</span> <a name="l01651"></a>01651 <span class="comment"> by burn_track_set_source().</span> <a name="l01652"></a>01652 <span class="comment"> A fifo starts its life in "standby" mode with no buffer space allocated.</span> <a name="l01653"></a>01653 <span class="comment"> As soon as its track requires bytes, the fifo establishes a worker thread</span> <a name="l01654"></a>01654 <span class="comment"> and allocates its buffer. After input has ended and all buffer content is</span> <a name="l01655"></a>01655 <span class="comment"> consumed, the buffer space gets freed and the worker thread ends.</span> <a name="l01656"></a>01656 <span class="comment"> This happens asynchronously. So expect two buffers and worker threads to</span> <a name="l01657"></a>01657 <span class="comment"> exist for a short time between tracks. Be modest in your size demands if</span> <a name="l01658"></a>01658 <span class="comment"> multiple tracks are to be expected. </span> <a name="l01659"></a>01659 <span class="comment"> @param inp The burn_source for which the fifo shall act as proxy.</span> <a name="l01660"></a>01660 <span class="comment"> It can be disposed by burn_source_free() immediately</span> <a name="l01661"></a>01661 <span class="comment"> after this call.</span> <a name="l01662"></a>01662 <span class="comment"> @param chunksize The size in bytes of a chunk. Use 2048 for sources</span> <a name="l01663"></a>01663 <span class="comment"> suitable for BURN_BLOCK_MODE1 and 2352 for sources</span> <a name="l01664"></a>01664 <span class="comment"> which deliver for BURN_BLOCK_AUDIO.</span> <a name="l01665"></a>01665 <span class="comment"> Some variations of burn_source might work only with</span> <a name="l01666"></a>01666 <span class="comment"> a particular chunksize. E.g. libisofs demands 2048.</span> <a name="l01667"></a>01667 <span class="comment"> @param chunks The number of chunks to be allocated in ring buffer.</span> <a name="l01668"></a>01668 <span class="comment"> This value must be >= 2.</span> <a name="l01669"></a>01669 <span class="comment"> @param flag Bitfield for control purposes (unused yet, submit 0).</span> <a name="l01670"></a>01670 <span class="comment"> @return A pointer to the newly created burn_source.</span> <a name="l01671"></a>01671 <span class="comment"> Later both burn_sources, inp and the returned fifo, have</span> <a name="l01672"></a>01672 <span class="comment"> to be disposed by calling burn_source_free() for each.</span> <a name="l01673"></a>01673 <span class="comment"> inp can be freed immediately, the returned fifo may be</span> <a name="l01674"></a>01674 <span class="comment"> kept as handle for burn_fifo_inquire_status().</span> <a name="l01675"></a>01675 <span class="comment"> @since 0.4.0</span> <a name="l01676"></a>01676 <span class="comment">*/</span> <a name="l01677"></a>01677 <span class="keyword">struct </span><a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *<a class="code" href="libburn_8h.html#a2d7a2faac8565ddd40d9e6ddae0bd922" title="Creates a fifo which acts as proxy for an already existing data source.">burn_fifo_source_new</a>(<span class="keyword">struct</span> <a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *inp, <a name="l01678"></a>01678 <span class="keywordtype">int</span> chunksize, <span class="keywordtype">int</span> chunks, <span class="keywordtype">int</span> flag); <a name="l01679"></a>01679 <a name="l01680"></a>01680 <span class="comment">/* ts A71003 */</span><span class="comment"></span> <a name="l01681"></a>01681 <span class="comment">/** Inquires state and fill parameters of a fifo burn_source which was created</span> <a name="l01682"></a>01682 <span class="comment"> by burn_fifo_source_new() . Do not use with other burn_source variants.</span> <a name="l01683"></a>01683 <span class="comment"> @param fifo The fifo object to inquire</span> <a name="l01684"></a>01684 <span class="comment"> @param size The total size of the fifo</span> <a name="l01685"></a>01685 <span class="comment"> @param free_bytes The current free capacity of the fifo</span> <a name="l01686"></a>01686 <span class="comment"> @param status_text Returns a pointer to a constant text, see below</span> <a name="l01687"></a>01687 <span class="comment"> @return <0 reply invalid, >=0 fifo status code:</span> <a name="l01688"></a>01688 <span class="comment"> bit0+1=input status, bit2=consumption status, i.e:</span> <a name="l01689"></a>01689 <span class="comment"> 0="standby" : data processing not started yet</span> <a name="l01690"></a>01690 <span class="comment"> 1="active" : input and consumption are active</span> <a name="l01691"></a>01691 <span class="comment"> 2="ending" : input has ended without error</span> <a name="l01692"></a>01692 <span class="comment"> 3="failing" : input had error and ended,</span> <a name="l01693"></a>01693 <span class="comment"> 4="unused" : ( consumption has ended before processing start )</span> <a name="l01694"></a>01694 <span class="comment"> 5="abandoned" : consumption has ended prematurely</span> <a name="l01695"></a>01695 <span class="comment"> 6="ended" : consumption has ended without input error</span> <a name="l01696"></a>01696 <span class="comment"> 7="aborted" : consumption has ended after input error</span> <a name="l01697"></a>01697 <span class="comment"> @since 0.4.0</span> <a name="l01698"></a>01698 <span class="comment">*/</span> <a name="l01699"></a>01699 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#af655df46b73a4d774cc1d27b0c57677d" title="Inquires state and fill parameters of a fifo burn_source which was created by burn_fifo_source_new()...">burn_fifo_inquire_status</a>(<span class="keyword">struct</span> <a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *fifo, <span class="keywordtype">int</span> *size, <a name="l01700"></a>01700 <span class="keywordtype">int</span> *free_bytes, <span class="keywordtype">char</span> **status_text); <a name="l01701"></a>01701 <a name="l01702"></a>01702 <a name="l01703"></a>01703 <span class="comment">/* ts A80713 */</span><span class="comment"></span> <a name="l01704"></a>01704 <span class="comment">/** Obtain a preview of the first input data of a fifo which was created</span> <a name="l01705"></a>01705 <span class="comment"> by burn_fifo_source_new(). The data will later be delivered normally to</span> <a name="l01706"></a>01706 <span class="comment"> the consumer track of the fifo.</span> <a name="l01707"></a>01707 <span class="comment"> bufsize may not be larger than the fifo size (chunk_size * chunks).</span> <a name="l01708"></a>01708 <span class="comment"> This call will succeed only if data consumption by the track has not</span> <a name="l01709"></a>01709 <span class="comment"> started yet, i.e. best before the call to burn_disc_write().</span> <a name="l01710"></a>01710 <span class="comment"> It will start the worker thread of the fifo with the expectable side</span> <a name="l01711"></a>01711 <span class="comment"> effects on the external data source. Then it waits either until enough</span> <a name="l01712"></a>01712 <span class="comment"> data have arrived or until it becomes clear that this will not happen.</span> <a name="l01713"></a>01713 <span class="comment"> The call may be repeated with increased bufsize. It will always yield</span> <a name="l01714"></a>01714 <span class="comment"> the bytes beginning from the first one in the fifo.</span> <a name="l01715"></a>01715 <span class="comment"> @param fifo The fifo object to inquire</span> <a name="l01716"></a>01716 <span class="comment"> @param buf Pointer to memory of at least bufsize bytes where to</span> <a name="l01717"></a>01717 <span class="comment"> deliver the peeked data</span> <a name="l01718"></a>01718 <span class="comment"> @param bufsize Number of bytes to peek from the start of the fifo data</span> <a name="l01719"></a>01719 <span class="comment"> @param flag Bitfield for control purposes (unused yet, submit 0).</span> <a name="l01720"></a>01720 <span class="comment"> @return <0 on severe error, 0 if not enough data, 1 if bufsize bytes read</span> <a name="l01721"></a>01721 <span class="comment"> @since 0.5.0</span> <a name="l01722"></a>01722 <span class="comment">*/</span> <a name="l01723"></a>01723 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a3baa18f7bb4bb3f2f63dc951a07018f6" title="Obtain a preview of the first input data of a fifo which was created by burn_fifo_source_new()...">burn_fifo_peek_data</a>(<span class="keyword">struct</span> <a class="code" href="structburn__source.html" title="Data source interface for tracks.">burn_source</a> *source, <span class="keywordtype">char</span> *buf, <span class="keywordtype">int</span> bufsize, <a name="l01724"></a>01724 <span class="keywordtype">int</span> flag); <a name="l01725"></a>01725 <a name="l01726"></a>01726 <a name="l01727"></a>01727 <span class="comment">/* ts A70328 */</span><span class="comment"></span> <a name="l01728"></a>01728 <span class="comment">/** Sets a fixed track size after the data source object has already been</span> <a name="l01729"></a>01729 <span class="comment"> created.</span> <a name="l01730"></a>01730 <span class="comment"> @param t The track to operate on</span> <a name="l01731"></a>01731 <span class="comment"> @param size the number of bytes to use as track size</span> <a name="l01732"></a>01732 <span class="comment"> @return <=0 indicates failure , >0 success</span> <a name="l01733"></a>01733 <span class="comment"> @since 0.3.6</span> <a name="l01734"></a>01734 <span class="comment">*/</span> <a name="l01735"></a>01735 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a587a8bb93d8b0a310923185239489fef" title="Sets a fixed track size after the data source object has already been created.">burn_track_set_size</a>(<span class="keyword">struct</span> burn_track *t, off_t size); <a name="l01736"></a>01736 <a name="l01737"></a>01737 <span class="comment"></span> <a name="l01738"></a>01738 <span class="comment">/** Tells how long a track will be on disc</span> <a name="l01739"></a>01739 <span class="comment"> >>> NOTE: Not reliable with tracks of undefined length</span> <a name="l01740"></a>01740 <span class="comment">*/</span> <a name="l01741"></a>01741 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#ae752962388862d9234da258136f4a195" title="Tells how long a track will be on disc &gt;&gt;&gt; NOTE: Not reliable with tracks...">burn_track_get_sectors</a>(<span class="keyword">struct</span> burn_track *); <a name="l01742"></a>01742 <a name="l01743"></a>01743 <a name="l01744"></a>01744 <span class="comment">/* ts A61101 */</span><span class="comment"></span> <a name="l01745"></a>01745 <span class="comment">/** Tells how many source bytes have been read and how many data bytes have</span> <a name="l01746"></a>01746 <span class="comment"> been written by the track during burn.</span> <a name="l01747"></a>01747 <span class="comment"> @param t The track to inquire</span> <a name="l01748"></a>01748 <span class="comment"> @param read_bytes Number of bytes read from the track source</span> <a name="l01749"></a>01749 <span class="comment"> @param written_bytes Number of bytes written to track</span> <a name="l01750"></a>01750 <span class="comment"> @since 0.2.6</span> <a name="l01751"></a>01751 <span class="comment">*/</span> <a name="l01752"></a>01752 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a60b4fde0b22e540ce0fbcae0da5f6619" title="Tells how many source bytes have been read and how many data bytes have been written...">burn_track_get_counters</a>(<span class="keyword">struct</span> burn_track *t, <a name="l01753"></a>01753 off_t *read_bytes, off_t *written_bytes); <a name="l01754"></a>01754 <a name="l01755"></a>01755 <span class="comment"></span> <a name="l01756"></a>01756 <span class="comment">/** Sets drive read and write speed</span> <a name="l01757"></a>01757 <span class="comment"> Note: "k" is 1000, not 1024. 1xCD = 176.4 k/s, 1xDVD = 1385 k/s.</span> <a name="l01758"></a>01758 <span class="comment"> Fractional speeds should be rounded up. Like 4xCD = 706.</span> <a name="l01759"></a>01759 <span class="comment"> @param d The drive to set speed for</span> <a name="l01760"></a>01760 <span class="comment"> @param read Read speed in k/s (0 is max, -1 is min).</span> <a name="l01761"></a>01761 <span class="comment"> @param write Write speed in k/s (0 is max, -1 is min). </span> <a name="l01762"></a>01762 <span class="comment">*/</span> <a name="l01763"></a>01763 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a62aa53e04ff9fb848178ab85d38a9c5a" title="Sets drive read and write speed Note: &quot;k&quot; is 1000, not 1024.">burn_drive_set_speed</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keywordtype">int</span> <a class="code" href="structburn__source.html#a200c110bc2478463843b7779b8a25493" title="Read data from the source.">read</a>, <span class="keywordtype">int</span> write); <a name="l01764"></a>01764 <a name="l01765"></a>01765 <a name="l01766"></a>01766 <span class="comment">/* ts A70711 */</span><span class="comment"></span> <a name="l01767"></a>01767 <span class="comment">/** Controls the behavior with writing when the drive buffer is suspected to</span> <a name="l01768"></a>01768 <span class="comment"> be full. To check and wait for enough free buffer space before writing</span> <a name="l01769"></a>01769 <span class="comment"> will move the task of waiting from the operating system's device driver</span> <a name="l01770"></a>01770 <span class="comment"> to libburn. While writing is going on and waiting is enabled, any write</span> <a name="l01771"></a>01771 <span class="comment"> operation will be checked whether it will fill the drive buffer up to</span> <a name="l01772"></a>01772 <span class="comment"> more than max_percent. If so, then waiting will happen until the buffer</span> <a name="l01773"></a>01773 <span class="comment"> fill is predicted with at most min_percent.</span> <a name="l01774"></a>01774 <span class="comment"> Thus: if min_percent < max_percent then transfer rate will oscillate. </span> <a name="l01775"></a>01775 <span class="comment"> This may allow the driver to operate on other devices, e.g. a disk from</span> <a name="l01776"></a>01776 <span class="comment"> which to read the input for writing. On the other hand, this checking might</span> <a name="l01777"></a>01777 <span class="comment"> reduce maximum throughput to the drive or even get misled by faulty buffer</span> <a name="l01778"></a>01778 <span class="comment"> fill replies from the drive.</span> <a name="l01779"></a>01779 <span class="comment"> If a setting parameter is < 0, then this setting will stay unchanged</span> <a name="l01780"></a>01780 <span class="comment"> by the call.</span> <a name="l01781"></a>01781 <span class="comment"> Known burner or media specific pitfalls:</span> <a name="l01782"></a>01782 <span class="comment"> To have max_percent larger than the burner's best reported buffer fill has</span> <a name="l01783"></a>01783 <span class="comment"> the same effect as min_percent==max_percent. Some burners do not report</span> <a name="l01784"></a>01784 <span class="comment"> their full buffer with all media types. Some are not suitable because</span> <a name="l01785"></a>01785 <span class="comment"> they report their buffer fill with delay.</span> <a name="l01786"></a>01786 <span class="comment"> @param d The drive to control</span> <a name="l01787"></a>01787 <span class="comment"> @param enable 0= disable , 1= enable waiting , (-1 = do not change setting)</span> <a name="l01788"></a>01788 <span class="comment"> @param min_usec Shortest possible sleeping period (given in micro seconds)</span> <a name="l01789"></a>01789 <span class="comment"> @param max_usec Longest possible sleeping period (given in micro seconds)</span> <a name="l01790"></a>01790 <span class="comment"> @param timeout_sec If a single write has to wait longer than this number</span> <a name="l01791"></a>01791 <span class="comment"> of seconds, then waiting gets disabled and mindless</span> <a name="l01792"></a>01792 <span class="comment"> writing starts. A value of 0 disables this timeout.</span> <a name="l01793"></a>01793 <span class="comment"> @param min_percent Minimum of desired buffer oscillation: 25 to 100</span> <a name="l01794"></a>01794 <span class="comment"> @param max_percent Maximum of desired buffer oscillation: 25 to 100</span> <a name="l01795"></a>01795 <span class="comment"> @return 1=success , 0=failure</span> <a name="l01796"></a>01796 <span class="comment"> @since 0.3.8</span> <a name="l01797"></a>01797 <span class="comment">*/</span> <a name="l01798"></a>01798 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#afb5c044ffb72418e3b5db37f8927b97e" title="Controls the behavior with writing when the drive buffer is suspected to be full...">burn_drive_set_buffer_waiting</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keywordtype">int</span> enable, <a name="l01799"></a>01799 <span class="keywordtype">int</span> min_usec, <span class="keywordtype">int</span> max_usec, <span class="keywordtype">int</span> timeout_sec, <a name="l01800"></a>01800 <span class="keywordtype">int</span> min_percent, <span class="keywordtype">int</span> max_percent); <a name="l01801"></a>01801 <a name="l01802"></a>01802 <a name="l01803"></a>01803 <span class="comment">/* these are for my debugging, they will disappear */</span> <a name="l01804"></a>01804 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#afadc78399024a650d4217e716702250f">burn_structure_print_disc</a>(<span class="keyword">struct</span> burn_disc *d); <a name="l01805"></a>01805 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a1789084376a6b6758228793a170e48cb">burn_structure_print_session</a>(<span class="keyword">struct</span> burn_session *s); <a name="l01806"></a>01806 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a98bd768226029cebe65f56a0ac320ca8">burn_structure_print_track</a>(<span class="keyword">struct</span> burn_track *t); <a name="l01807"></a>01807 <span class="comment"></span> <a name="l01808"></a>01808 <span class="comment">/** Sets the write type for the write_opts struct.</span> <a name="l01809"></a>01809 <span class="comment"> Note: write_type BURN_WRITE_SAO is currently not capable of writing a mix</span> <a name="l01810"></a>01810 <span class="comment"> of data and audio tracks. You must use BURN_WRITE_TAO for such sessions.</span> <a name="l01811"></a>01811 <span class="comment"> @param opts The write opts to change</span> <a name="l01812"></a>01812 <span class="comment"> @param write_type The write type to use</span> <a name="l01813"></a>01813 <span class="comment"> @param block_type The block type to use</span> <a name="l01814"></a>01814 <span class="comment"> @return Returns 1 on success and 0 on failure.</span> <a name="l01815"></a>01815 <span class="comment">*/</span> <a name="l01816"></a>01816 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#afdf5a48b759ef14995dbd03b59ff60f5" title="Sets the write type for the write_opts struct.">burn_write_opts_set_write_type</a>(<span class="keyword">struct</span> burn_write_opts *opts, <a name="l01817"></a>01817 <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9b" title="Possible disc writing style/modes.">burn_write_types</a> write_type, <a name="l01818"></a>01818 <span class="keywordtype">int</span> block_type); <a name="l01819"></a>01819 <a name="l01820"></a>01820 <a name="l01821"></a>01821 <span class="comment">/* ts A70207 */</span><span class="comment"></span> <a name="l01822"></a>01822 <span class="comment">/** As an alternative to burn_write_opts_set_write_type() this function tries</span> <a name="l01823"></a>01823 <span class="comment"> to find a suitable write type and block type for a given write job</span> <a name="l01824"></a>01824 <span class="comment"> described by opts and disc. To be used after all other setups have been</span> <a name="l01825"></a>01825 <span class="comment"> made, i.e. immediately before burn_disc_write().</span> <a name="l01826"></a>01826 <span class="comment"> @param opts The nearly complete write opts to change</span> <a name="l01827"></a>01827 <span class="comment"> @param disc The already composed session and track model</span> <a name="l01828"></a>01828 <span class="comment"> @param reasons This text string collects reasons for decision resp. failure</span> <a name="l01829"></a>01829 <span class="comment"> @param flag Bitfield for control purposes:</span> <a name="l01830"></a>01830 <span class="comment"> bit0= do not choose type but check the one that is already set</span> <a name="l01831"></a>01831 <span class="comment"> bit1= do not issue error messages via burn_msgs queue</span> <a name="l01832"></a>01832 <span class="comment"> (is automatically set with bit0)</span> <a name="l01833"></a>01833 <span class="comment"> @return Chosen write type. BURN_WRITE_NONE on failure.</span> <a name="l01834"></a>01834 <span class="comment"> @since 0.3.2</span> <a name="l01835"></a>01835 <span class="comment">*/</span> <a name="l01836"></a>01836 <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9b" title="Possible disc writing style/modes.">burn_write_types</a> <a class="code" href="libburn_8h.html#a88a9d0adaf11e19cb4ed8b08f7740b5b" title="As an alternative to burn_write_opts_set_write_type() this function tries to find...">burn_write_opts_auto_write_type</a>( <a name="l01837"></a>01837 <span class="keyword">struct</span> burn_write_opts *opts, <span class="keyword">struct</span> burn_disc *disc, <a name="l01838"></a>01838 <span class="keywordtype">char</span> reasons[<a class="code" href="libburn_8h.html#a109ecdcd00fd30904a76c58040df9b79" title="The length of a rejection reasons string for burn_precheck_write() and burn_write_opts_auto_write_ty...">BURN_REASONS_LEN</a>], <span class="keywordtype">int</span> flag); <a name="l01839"></a>01839 <a name="l01840"></a>01840 <span class="comment"></span> <a name="l01841"></a>01841 <span class="comment">/** Supplies toc entries for writing - not normally required for cd mastering</span> <a name="l01842"></a>01842 <span class="comment"> @param opts The write opts to change</span> <a name="l01843"></a>01843 <span class="comment"> @param count The number of entries</span> <a name="l01844"></a>01844 <span class="comment"> @param toc_entries</span> <a name="l01845"></a>01845 <span class="comment">*/</span> <a name="l01846"></a>01846 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a747ef4071f1754e202dd892429b5238c" title="Supplies toc entries for writing - not normally required for cd mastering.">burn_write_opts_set_toc_entries</a>(<span class="keyword">struct</span> burn_write_opts *opts, <a name="l01847"></a>01847 <span class="keywordtype">int</span> count, <a name="l01848"></a>01848 <span class="keyword">struct</span> <a class="code" href="structburn__toc__entry.html" title="Information about a track on a disc - this is from the q sub channel of the lead-in...">burn_toc_entry</a> *toc_entries); <a name="l01849"></a>01849 <span class="comment"></span> <a name="l01850"></a>01850 <span class="comment">/** Sets the session format for a disc</span> <a name="l01851"></a>01851 <span class="comment"> @param opts The write opts to change</span> <a name="l01852"></a>01852 <span class="comment"> @param format The session format to set</span> <a name="l01853"></a>01853 <span class="comment">*/</span> <a name="l01854"></a>01854 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a2d796ff9e75a078c1969c74cc4ee7804" title="Sets the session format for a disc.">burn_write_opts_set_format</a>(<span class="keyword">struct</span> burn_write_opts *opts, <span class="keywordtype">int</span> format); <a name="l01855"></a>01855 <span class="comment"></span> <a name="l01856"></a>01856 <span class="comment">/** Sets the simulate value for the write_opts struct . </span> <a name="l01857"></a>01857 <span class="comment"> This corresponds to the Test Write bit in MMC mode page 05h. Several media</span> <a name="l01858"></a>01858 <span class="comment"> types do not support this. See struct burn_multi_caps.might_simulate for</span> <a name="l01859"></a>01859 <span class="comment"> actual availability of this feature. </span> <a name="l01860"></a>01860 <span class="comment"> If the media is suitable, the drive will perform burn_write_disc() as a</span> <a name="l01861"></a>01861 <span class="comment"> simulation instead of effective write operations. This means that the</span> <a name="l01862"></a>01862 <span class="comment"> media content and burn_disc_get_status() stay unchanged.</span> <a name="l01863"></a>01863 <span class="comment"> Note: With stdio-drives, the target file gets eventually created, opened,</span> <a name="l01864"></a>01864 <span class="comment"> lseeked, and closed, but not written. So there are effects on it.</span> <a name="l01865"></a>01865 <span class="comment"> Warning: Call burn_random_access_write() will never do simulation because</span> <a name="l01866"></a>01866 <span class="comment"> it does not get any burn_write_opts.</span> <a name="l01867"></a>01867 <span class="comment"> @param opts The write opts to change</span> <a name="l01868"></a>01868 <span class="comment"> @param sim Non-zero enables simulation, 0 enables real writing</span> <a name="l01869"></a>01869 <span class="comment"> @return Returns 1 on success and 0 on failure.</span> <a name="l01870"></a>01870 <span class="comment">*/</span> <a name="l01871"></a>01871 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a05f68d91d1074a103fa8e17bb664b6d8" title="Sets the simulate value for the write_opts struct .">burn_write_opts_set_simulate</a>(<span class="keyword">struct</span> burn_write_opts *opts, <span class="keywordtype">int</span> sim); <a name="l01872"></a>01872 <span class="comment"></span> <a name="l01873"></a>01873 <span class="comment">/** Controls buffer underrun prevention</span> <a name="l01874"></a>01874 <span class="comment"> @param opts The write opts to change</span> <a name="l01875"></a>01875 <span class="comment"> @param underrun_proof if non-zero, buffer underrun protection is enabled</span> <a name="l01876"></a>01876 <span class="comment"> @return Returns 1 on success and 0 on failure.</span> <a name="l01877"></a>01877 <span class="comment">*/</span> <a name="l01878"></a>01878 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a3fdc2e3cc51bec2072ab91b99d4e52d9" title="Controls buffer underrun prevention.">burn_write_opts_set_underrun_proof</a>(<span class="keyword">struct</span> burn_write_opts *opts, <a name="l01879"></a>01879 <span class="keywordtype">int</span> underrun_proof); <a name="l01880"></a>01880 <span class="comment"></span> <a name="l01881"></a>01881 <span class="comment">/** Sets whether to use opc or not with the write_opts struct</span> <a name="l01882"></a>01882 <span class="comment"> @param opts The write opts to change</span> <a name="l01883"></a>01883 <span class="comment"> @param opc If non-zero, optical power calibration will be performed at</span> <a name="l01884"></a>01884 <span class="comment"> start of burn</span> <a name="l01885"></a>01885 <span class="comment"> </span> <a name="l01886"></a>01886 <span class="comment">*/</span> <a name="l01887"></a>01887 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a8e4ed29facd80f19c866b3686dea125f" title="Sets whether to use opc or not with the write_opts struct.">burn_write_opts_set_perform_opc</a>(<span class="keyword">struct</span> burn_write_opts *opts, <span class="keywordtype">int</span> opc); <a name="l01888"></a>01888 <a name="l01889"></a>01889 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a2a8323651c8ae802bbce47f21313a90b">burn_write_opts_set_has_mediacatalog</a>(<span class="keyword">struct</span> burn_write_opts *opts, <span class="keywordtype">int</span> has_mediacatalog); <a name="l01890"></a>01890 <a name="l01891"></a>01891 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#ae126c262f45e93792115c6743208006c">burn_write_opts_set_mediacatalog</a>(<span class="keyword">struct</span> burn_write_opts *opts, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> mediacatalog[13]); <a name="l01892"></a>01892 <a name="l01893"></a>01893 <a name="l01894"></a>01894 <span class="comment">/* ts A61106 */</span><span class="comment"></span> <a name="l01895"></a>01895 <span class="comment">/** Sets the multi flag which eventually marks the emerging session as not</span> <a name="l01896"></a>01896 <span class="comment"> being the last one and thus creating a BURN_DISC_APPENDABLE media.</span> <a name="l01897"></a>01897 <span class="comment"> @param opts The option object to be manipulated</span> <a name="l01898"></a>01898 <span class="comment"> @param multi 1=media will be appendable, 0=media will be closed (default) </span> <a name="l01899"></a>01899 <span class="comment"> @since 0.2.6</span> <a name="l01900"></a>01900 <span class="comment">*/</span> <a name="l01901"></a>01901 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#ad04dc50d1223d78a8e8c3134df96fd82" title="Sets the multi flag which eventually marks the emerging session as not being the...">burn_write_opts_set_multi</a>(<span class="keyword">struct</span> burn_write_opts *opts, <span class="keywordtype">int</span> multi); <a name="l01902"></a>01902 <a name="l01903"></a>01903 <a name="l01904"></a>01904 <span class="comment">/* ts A61222 */</span><span class="comment"></span> <a name="l01905"></a>01905 <span class="comment">/** Sets a start address for writing to media and write modes which allow to</span> <a name="l01906"></a>01906 <span class="comment"> choose this address at all (for now: DVD+RW, DVD-RAM, formatted DVD-RW).</span> <a name="l01907"></a>01907 <span class="comment"> now). The address is given in bytes. If it is not -1 then a write run</span> <a name="l01908"></a>01908 <span class="comment"> will fail if choice of start address is not supported or if the block</span> <a name="l01909"></a>01909 <span class="comment"> alignment of the address is not suitable for media and write mode.</span> <a name="l01910"></a>01910 <span class="comment"> Alignment to 32 kB blocks is supposed to be safe with DVD media.</span> <a name="l01911"></a>01911 <span class="comment"> Call burn_disc_get_multi_caps() can obtain the necessary media info. See</span> <a name="l01912"></a>01912 <span class="comment"> resulting struct burn_multi_caps elements .start_adr , .start_alignment ,</span> <a name="l01913"></a>01913 <span class="comment"> .start_range_low , .start_range_high .</span> <a name="l01914"></a>01914 <span class="comment"> @param opts The write opts to change</span> <a name="l01915"></a>01915 <span class="comment"> @param value The address in bytes (-1 = start at default address)</span> <a name="l01916"></a>01916 <span class="comment"> @since 0.3.0</span> <a name="l01917"></a>01917 <span class="comment">*/</span> <a name="l01918"></a>01918 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#ab92f19198fb72d66ce96fd3ac522ec18" title="Sets a start address for writing to media and write modes which allow to choose this...">burn_write_opts_set_start_byte</a>(<span class="keyword">struct</span> burn_write_opts *opts, off_t value); <a name="l01919"></a>01919 <a name="l01920"></a>01920 <a name="l01921"></a>01921 <span class="comment">/* ts A70213 */</span><span class="comment"></span> <a name="l01922"></a>01922 <span class="comment">/** Caution: still immature and likely to change. Problems arose with</span> <a name="l01923"></a>01923 <span class="comment"> sequential DVD-RW on one drive.</span> <a name="l01924"></a>01924 <span class="comment"></span> <a name="l01925"></a>01925 <span class="comment"> Controls whether the whole available space of the media shall be filled up</span> <a name="l01926"></a>01926 <span class="comment"> by the last track of the last session.</span> <a name="l01927"></a>01927 <span class="comment"> @param opts The write opts to change</span> <a name="l01928"></a>01928 <span class="comment"> @param fill_up_media If 1 : fill up by last track, if 0 = do not fill up</span> <a name="l01929"></a>01929 <span class="comment"> @since 0.3.4</span> <a name="l01930"></a>01930 <span class="comment">*/</span> <a name="l01931"></a>01931 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a3ba4130a7e8ab9eb3b6a9f08a00e7164" title="Caution: still immature and likely to change.">burn_write_opts_set_fillup</a>(<span class="keyword">struct</span> burn_write_opts *opts, <a name="l01932"></a>01932 <span class="keywordtype">int</span> fill_up_media); <a name="l01933"></a>01933 <a name="l01934"></a>01934 <a name="l01935"></a>01935 <span class="comment">/* ts A70303 */</span><span class="comment"></span> <a name="l01936"></a>01936 <span class="comment">/** Eventually makes libburn ignore the failure of some conformance checks:</span> <a name="l01937"></a>01937 <span class="comment"> - the check whether CD write+block type is supported by the drive</span> <a name="l01938"></a>01938 <span class="comment"> - the check whether the media profile supports simulated burning </span> <a name="l01939"></a>01939 <span class="comment"> @param opts The write opts to change</span> <a name="l01940"></a>01940 <span class="comment"> @param use_force 1=ignore above checks, 0=refuse work on failed check</span> <a name="l01941"></a>01941 <span class="comment"> @since 0.3.4</span> <a name="l01942"></a>01942 <span class="comment">*/</span> <a name="l01943"></a>01943 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a865d45c675c4e78dcca39a2962b5017f" title="Eventually makes libburn ignore the failure of some conformance checks:the check...">burn_write_opts_set_force</a>(<span class="keyword">struct</span> burn_write_opts *opts, <span class="keywordtype">int</span> use_force); <a name="l01944"></a>01944 <a name="l01945"></a>01945 <a name="l01946"></a>01946 <span class="comment">/* ts A80412 */</span><span class="comment"></span> <a name="l01947"></a>01947 <span class="comment">/** Eventually makes use of the more modern write command AAh WRITE12 and</span> <a name="l01948"></a>01948 <span class="comment"> sets the Streaming bit. With DVD-RAM and BD this can override the</span> <a name="l01949"></a>01949 <span class="comment"> traditional slowdown to half nominal speed. But if it speeds up writing</span> <a name="l01950"></a>01950 <span class="comment"> then it also disables error management and correction. Weigh your</span> <a name="l01951"></a>01951 <span class="comment"> priorities. This affects the write operations of burn_disc_write()</span> <a name="l01952"></a>01952 <span class="comment"> and subsequent calls of burn_random_access_write().</span> <a name="l01953"></a>01953 <span class="comment"> @param opts The write opts to change</span> <a name="l01954"></a>01954 <span class="comment"> @param value 0=use 2Ah WRITE10, 1=use AAh WRITE12 with Streaming bit</span> <a name="l01955"></a>01955 <span class="comment"> @since 0.6.4:</span> <a name="l01956"></a>01956 <span class="comment"> >=16 use WRITE12 but not before the LBA given by value</span> <a name="l01957"></a>01957 <span class="comment"> @since 0.4.6</span> <a name="l01958"></a>01958 <span class="comment">*/</span> <a name="l01959"></a>01959 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a34fc796f7de79696daefe2b2f3799179" title="Eventually makes use of the more modern write command AAh WRITE12 and sets the Streaming...">burn_write_opts_set_stream_recording</a>(<span class="keyword">struct</span> burn_write_opts *opts, <a name="l01960"></a>01960 <span class="keywordtype">int</span> value); <a name="l01961"></a>01961 <a name="l01962"></a>01962 <span class="comment"></span> <a name="l01963"></a>01963 <span class="comment">/** Sets whether to read in raw mode or not</span> <a name="l01964"></a>01964 <span class="comment"> @param opts The read opts to change</span> <a name="l01965"></a>01965 <span class="comment"> @param raw_mode If non-zero, reading will be done in raw mode, so that everything in the data tracks on the</span> <a name="l01966"></a>01966 <span class="comment"> disc is read, including headers.</span> <a name="l01967"></a>01967 <span class="comment">*/</span> <a name="l01968"></a>01968 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#aef01a05014f038710673771bd2e6445b" title="Sets whether to read in raw mode or not.">burn_read_opts_set_raw</a>(<span class="keyword">struct</span> burn_read_opts *opts, <span class="keywordtype">int</span> raw_mode); <a name="l01969"></a>01969 <span class="comment"></span> <a name="l01970"></a>01970 <span class="comment">/** Sets whether to report c2 errors or not </span> <a name="l01971"></a>01971 <span class="comment"> @param opts The read opts to change</span> <a name="l01972"></a>01972 <span class="comment"> @param c2errors If non-zero, report c2 errors.</span> <a name="l01973"></a>01973 <span class="comment">*/</span> <a name="l01974"></a>01974 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a44603f4b06c35b706fc3d54145f173ab" title="Sets whether to report c2 errors or not.">burn_read_opts_set_c2errors</a>(<span class="keyword">struct</span> burn_read_opts *opts, <span class="keywordtype">int</span> c2errors); <a name="l01975"></a>01975 <span class="comment"></span> <a name="l01976"></a>01976 <span class="comment">/** Sets whether to read subcodes from audio tracks or not</span> <a name="l01977"></a>01977 <span class="comment"> @param opts The read opts to change</span> <a name="l01978"></a>01978 <span class="comment"> @param subcodes_audio If non-zero, read subcodes from audio tracks on the disc.</span> <a name="l01979"></a>01979 <span class="comment">*/</span> <a name="l01980"></a>01980 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a425f9b20c8fb832016358836acd9d26d" title="Sets whether to read subcodes from audio tracks or not.">burn_read_opts_read_subcodes_audio</a>(<span class="keyword">struct</span> burn_read_opts *opts, <a name="l01981"></a>01981 <span class="keywordtype">int</span> subcodes_audio); <a name="l01982"></a>01982 <span class="comment"></span> <a name="l01983"></a>01983 <span class="comment">/** Sets whether to read subcodes from data tracks or not </span> <a name="l01984"></a>01984 <span class="comment"> @param opts The read opts to change</span> <a name="l01985"></a>01985 <span class="comment"> @param subcodes_data If non-zero, read subcodes from data tracks on the disc.</span> <a name="l01986"></a>01986 <span class="comment">*/</span> <a name="l01987"></a>01987 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a41785eb8a968dd31a042f74bb6a172b4" title="Sets whether to read subcodes from data tracks or not.">burn_read_opts_read_subcodes_data</a>(<span class="keyword">struct</span> burn_read_opts *opts, <a name="l01988"></a>01988 <span class="keywordtype">int</span> subcodes_data); <a name="l01989"></a>01989 <span class="comment"></span> <a name="l01990"></a>01990 <span class="comment">/** Sets whether to recover errors if possible</span> <a name="l01991"></a>01991 <span class="comment"> @param opts The read opts to change</span> <a name="l01992"></a>01992 <span class="comment"> @param hardware_error_recovery If non-zero, attempt to recover errors if possible.</span> <a name="l01993"></a>01993 <span class="comment">*/</span> <a name="l01994"></a>01994 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#aacb5c8af3ad06e88eac31e5e923e00db" title="Sets whether to recover errors if possible.">burn_read_opts_set_hardware_error_recovery</a>(<span class="keyword">struct</span> burn_read_opts *opts, <a name="l01995"></a>01995 <span class="keywordtype">int</span> hardware_error_recovery); <a name="l01996"></a>01996 <span class="comment"></span> <a name="l01997"></a>01997 <span class="comment">/** Sets whether to report recovered errors or not</span> <a name="l01998"></a>01998 <span class="comment"> @param opts The read opts to change</span> <a name="l01999"></a>01999 <span class="comment"> @param report_recovered_errors If non-zero, recovered errors will be reported.</span> <a name="l02000"></a>02000 <span class="comment">*/</span> <a name="l02001"></a>02001 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#ab4e92c9a9e23e3abe76d00c5e99cb538" title="Sets whether to report recovered errors or not.">burn_read_opts_report_recovered_errors</a>(<span class="keyword">struct</span> burn_read_opts *opts, <a name="l02002"></a>02002 <span class="keywordtype">int</span> report_recovered_errors); <a name="l02003"></a>02003 <span class="comment"></span> <a name="l02004"></a>02004 <span class="comment">/** Sets whether blocks with unrecoverable errors should be read or not</span> <a name="l02005"></a>02005 <span class="comment"> @param opts The read opts to change</span> <a name="l02006"></a>02006 <span class="comment"> @param transfer_damaged_blocks If non-zero, blocks with unrecoverable errors will still be read.</span> <a name="l02007"></a>02007 <span class="comment">*/</span> <a name="l02008"></a>02008 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a1014e8feca4fe3f81c15239b8ada8b25" title="Sets whether blocks with unrecoverable errors should be read or not.">burn_read_opts_transfer_damaged_blocks</a>(<span class="keyword">struct</span> burn_read_opts *opts, <a name="l02009"></a>02009 <span class="keywordtype">int</span> transfer_damaged_blocks); <a name="l02010"></a>02010 <span class="comment"></span> <a name="l02011"></a>02011 <span class="comment">/** Sets the number of retries to attempt when trying to correct an error</span> <a name="l02012"></a>02012 <span class="comment"> @param opts The read opts to change</span> <a name="l02013"></a>02013 <span class="comment"> @param hardware_error_retries The number of retries to attempt when correcting an error.</span> <a name="l02014"></a>02014 <span class="comment">*/</span> <a name="l02015"></a>02015 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a25a9caeb2ddc0a2a0b10011b9bc0e1b7" title="Sets the number of retries to attempt when trying to correct an error.">burn_read_opts_set_hardware_error_retries</a>(<span class="keyword">struct</span> burn_read_opts *opts, <a name="l02016"></a>02016 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> hardware_error_retries); <a name="l02017"></a>02017 <a name="l02018"></a>02018 <a name="l02019"></a>02019 <span class="comment">/* ts A90815 */</span><span class="comment"></span> <a name="l02020"></a>02020 <span class="comment">/** Gets the list of profile codes supported by the drive.</span> <a name="l02021"></a>02021 <span class="comment"> Profiles depict the feature sets which constitute media types. For</span> <a name="l02022"></a>02022 <span class="comment"> known profile codes and names see burn_disc_get_profile().</span> <a name="l02023"></a>02023 <span class="comment"> @param d is the drive to query</span> <a name="l02024"></a>02024 <span class="comment"> @param num_profiles returns the number of supported profiles</span> <a name="l02025"></a>02025 <span class="comment"> @param profiles returns the profile codes</span> <a name="l02026"></a>02026 <span class="comment"> @param is_current returns the status of the corresponding profile code:</span> <a name="l02027"></a>02027 <span class="comment"> 1= current, i.e. the matching media is loaded</span> <a name="l02028"></a>02028 <span class="comment"> 0= not current, i.e. the matching media is not loaded</span> <a name="l02029"></a>02029 <span class="comment"> @return always 1 for now</span> <a name="l02030"></a>02030 <span class="comment"> @since 0.7.0</span> <a name="l02031"></a>02031 <span class="comment">*/</span> <a name="l02032"></a>02032 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a002089b0c6d2ca30344d8fa8205418d1" title="Gets the list of profile codes supported by the drive.">burn_drive_get_all_profiles</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keywordtype">int</span> *num_profiles, <a name="l02033"></a>02033 <span class="keywordtype">int</span> profiles[64], <span class="keywordtype">char</span> is_current[64]); <a name="l02034"></a>02034 <a name="l02035"></a>02035 <a name="l02036"></a>02036 <span class="comment">/* ts A90815 */</span><span class="comment"></span> <a name="l02037"></a>02037 <span class="comment">/** Obtains the profile name associated with a profile code.</span> <a name="l02038"></a>02038 <span class="comment"> @param profile_code the profile code to be translated</span> <a name="l02039"></a>02039 <span class="comment"> @param name returns the profile name (e.g. "DVD+RW") </span> <a name="l02040"></a>02040 <span class="comment"> @return 1= known profile code , 0= unknown profile code</span> <a name="l02041"></a>02041 <span class="comment"> @since 0.7.0</span> <a name="l02042"></a>02042 <span class="comment">*/</span> <a name="l02043"></a>02043 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a9a45e2a03bd53cc11b85ee510edb7f5b" title="Obtains the profile name associated with a profile code.">burn_obtain_profile_name</a>(<span class="keywordtype">int</span> profile_code, <span class="keywordtype">char</span> name[80]); <a name="l02044"></a>02044 <a name="l02045"></a>02045 <span class="comment"></span> <a name="l02046"></a>02046 <span class="comment">/** Gets the maximum write speed for a drive and eventually loaded media.</span> <a name="l02047"></a>02047 <span class="comment"> The return value might change by the media type of already loaded media,</span> <a name="l02048"></a>02048 <span class="comment"> again by call burn_drive_grab() and again by call burn_disc_read_atip(). </span> <a name="l02049"></a>02049 <span class="comment"> @param d Drive to query</span> <a name="l02050"></a>02050 <span class="comment"> @return Maximum write speed in K/s</span> <a name="l02051"></a>02051 <span class="comment">*/</span> <a name="l02052"></a>02052 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#ae953edfc670f94184196464deff4b547" title="Gets the maximum write speed for a drive and eventually loaded media.">burn_drive_get_write_speed</a>(<span class="keyword">struct</span> burn_drive *d); <a name="l02053"></a>02053 <a name="l02054"></a>02054 <a name="l02055"></a>02055 <span class="comment">/* ts A61021 */</span><span class="comment"></span> <a name="l02056"></a>02056 <span class="comment">/** Gets the minimum write speed for a drive and eventually loaded media.</span> <a name="l02057"></a>02057 <span class="comment"> The return value might change by the media type of already loaded media, </span> <a name="l02058"></a>02058 <span class="comment"> again by call burn_drive_grab() and again by call burn_disc_read_atip().</span> <a name="l02059"></a>02059 <span class="comment"> @param d Drive to query</span> <a name="l02060"></a>02060 <span class="comment"> @return Minimum write speed in K/s</span> <a name="l02061"></a>02061 <span class="comment"> @since 0.2.6</span> <a name="l02062"></a>02062 <span class="comment">*/</span> <a name="l02063"></a>02063 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a0814d573850c46b03db80e5056df7fc7" title="Gets the minimum write speed for a drive and eventually loaded media.">burn_drive_get_min_write_speed</a>(<span class="keyword">struct</span> burn_drive *d); <a name="l02064"></a>02064 <a name="l02065"></a>02065 <span class="comment"></span> <a name="l02066"></a>02066 <span class="comment">/** Gets the maximum read speed for a drive</span> <a name="l02067"></a>02067 <span class="comment"> @param d Drive to query</span> <a name="l02068"></a>02068 <span class="comment"> @return Maximum read speed in K/s</span> <a name="l02069"></a>02069 <span class="comment">*/</span> <a name="l02070"></a>02070 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#ad9f0a67b3515ecc82769b34248b42544" title="Gets the maximum read speed for a drive.">burn_drive_get_read_speed</a>(<span class="keyword">struct</span> burn_drive *d); <a name="l02071"></a>02071 <a name="l02072"></a>02072 <a name="l02073"></a>02073 <span class="comment">/* ts A61226 */</span><span class="comment"></span> <a name="l02074"></a>02074 <span class="comment">/** Obtain a copy of the current speed descriptor list. The drive's list gets</span> <a name="l02075"></a>02075 <span class="comment"> updated on various occasions such as burn_drive_grab() but the copy</span> <a name="l02076"></a>02076 <span class="comment"> obtained here stays untouched. It has to be disposed via</span> <a name="l02077"></a>02077 <span class="comment"> burn_drive_free_speedlist() when it is not longer needed. Speeds</span> <a name="l02078"></a>02078 <span class="comment"> may appear several times in the list. The list content depends much on</span> <a name="l02079"></a>02079 <span class="comment"> drive and media type. It seems that .source == 1 applies mostly to CD media</span> <a name="l02080"></a>02080 <span class="comment"> whereas .source == 2 applies to any media.</span> <a name="l02081"></a>02081 <span class="comment"> @param d Drive to query</span> <a name="l02082"></a>02082 <span class="comment"> @param speed_list The copy. If empty, *speed_list gets returned as NULL.</span> <a name="l02083"></a>02083 <span class="comment"> @return 1=success , 0=list empty , <0 severe error</span> <a name="l02084"></a>02084 <span class="comment"> @since 0.3.0</span> <a name="l02085"></a>02085 <span class="comment">*/</span> <a name="l02086"></a>02086 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a9279b769ceca828bc9ac1f5ad715a8b6" title="Obtain a copy of the current speed descriptor list.">burn_drive_get_speedlist</a>(<span class="keyword">struct</span> burn_drive *d, <a name="l02087"></a>02087 <span class="keyword">struct</span> <a class="code" href="structburn__speed__descriptor.html" title="Description of a speed capability as reported by the drive in conjunction with eventually...">burn_speed_descriptor</a> **speed_list); <a name="l02088"></a>02088 <a name="l02089"></a>02089 <span class="comment">/* ts A70713 */</span><span class="comment"></span> <a name="l02090"></a>02090 <span class="comment">/** Look up the fastest speed descriptor which is not faster than the given</span> <a name="l02091"></a>02091 <span class="comment"> speed_goal. If it is 0, then the fastest one is chosen among the</span> <a name="l02092"></a>02092 <span class="comment"> descriptors with the highest end_lba. If it is -1 then the slowest speed</span> <a name="l02093"></a>02093 <span class="comment"> descriptor is chosen regardless of end_lba. Parameter flag decides whether</span> <a name="l02094"></a>02094 <span class="comment"> the speed goal means write speed or read speed.</span> <a name="l02095"></a>02095 <span class="comment"> @param d Drive to query</span> <a name="l02096"></a>02096 <span class="comment"> @param speed_goal Upper limit for speed,</span> <a name="l02097"></a>02097 <span class="comment"> 0=search for maximum speed , -1 search for minimum speed</span> <a name="l02098"></a>02098 <span class="comment"> @param best_descr Result of the search, NULL if no match</span> <a name="l02099"></a>02099 <span class="comment"> @param flag Bitfield for control purposes</span> <a name="l02100"></a>02100 <span class="comment"> bit0= look for best read speed rather than write speed</span> <a name="l02101"></a>02101 <span class="comment"> bit1= look for any source type (else look for source==2 first</span> <a name="l02102"></a>02102 <span class="comment"> and for any other source type only with CD media)</span> <a name="l02103"></a>02103 <span class="comment"> @return >0 indicates a valid best_descr, 0 = no valid best_descr</span> <a name="l02104"></a>02104 <span class="comment"> @since 0.3.8</span> <a name="l02105"></a>02105 <span class="comment">*/</span> <a name="l02106"></a>02106 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#aff3c4b54f7a076961c3ad7c0d0c0b09c" title="Look up the fastest speed descriptor which is not faster than the given speed_goal...">burn_drive_get_best_speed</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keywordtype">int</span> speed_goal, <a name="l02107"></a>02107 <span class="keyword">struct</span> <a class="code" href="structburn__speed__descriptor.html" title="Description of a speed capability as reported by the drive in conjunction with eventually...">burn_speed_descriptor</a> **best_descr, <span class="keywordtype">int</span> flag); <a name="l02108"></a>02108 <a name="l02109"></a>02109 <a name="l02110"></a>02110 <span class="comment">/* ts A61226 */</span><span class="comment"></span> <a name="l02111"></a>02111 <span class="comment">/** Dispose a speed descriptor list copy which was obtained by</span> <a name="l02112"></a>02112 <span class="comment"> burn_drive_get_speedlist().</span> <a name="l02113"></a>02113 <span class="comment"> @param speed_list The list copy. *speed_list gets set to NULL.</span> <a name="l02114"></a>02114 <span class="comment"> @return 1=list disposed , 0= *speedlist was already NULL</span> <a name="l02115"></a>02115 <span class="comment"> @since 0.3.0</span> <a name="l02116"></a>02116 <span class="comment">*/</span> <a name="l02117"></a>02117 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a50e5fca1d407d2ec972572a7b8ed5806" title="Dispose a speed descriptor list copy which was obtained by burn_drive_get_speedlist()...">burn_drive_free_speedlist</a>(<span class="keyword">struct</span> <a class="code" href="structburn__speed__descriptor.html" title="Description of a speed capability as reported by the drive in conjunction with eventually...">burn_speed_descriptor</a> **speed_list); <a name="l02118"></a>02118 <a name="l02119"></a>02119 <a name="l02120"></a>02120 <span class="comment">/* ts A70203 */</span> <a name="l02121"></a>02121 <span class="comment">/* @since 0.3.2 */</span><span class="comment"></span> <a name="l02122"></a>02122 <span class="comment">/** The reply structure for burn_disc_get_multi_caps()</span> <a name="l02123"></a>02123 <span class="comment">*/</span> <a name="l02124"></a><a class="code" href="structburn__multi__caps.html">02124</a> <span class="keyword">struct </span><a class="code" href="structburn__multi__caps.html" title="The reply structure for burn_disc_get_multi_caps().">burn_multi_caps</a> { <a name="l02125"></a>02125 <a name="l02126"></a>02126 <span class="comment">/* Multi-session capability allows to keep the media appendable after</span> <a name="l02127"></a>02127 <span class="comment"> writing a session. It also guarantees that the drive will be able</span> <a name="l02128"></a>02128 <span class="comment"> to predict and use the appropriate Next Writeable Address to place</span> <a name="l02129"></a>02129 <span class="comment"> the next session on the media without overwriting the existing ones.</span> <a name="l02130"></a>02130 <span class="comment"> It does not guarantee that the selected write type is able to do</span> <a name="l02131"></a>02131 <span class="comment"> an appending session after the next session. (E.g. CD SAO is capable</span> <a name="l02132"></a>02132 <span class="comment"> of multi-session by keeping a disc appendable. But .might_do_sao</span> <a name="l02133"></a>02133 <span class="comment"> will be 0 afterwards, when checking the appendable media.)</span> <a name="l02134"></a>02134 <span class="comment"> 1= media may be kept appendable by burn_write_opts_set_multi(o,1)</span> <a name="l02135"></a>02135 <span class="comment"> 0= media will not be appendable</span> <a name="l02136"></a>02136 <span class="comment"> */</span> <a name="l02137"></a><a class="code" href="structburn__multi__caps.html#a61675e235467d9bc20ef2e30bfea1570">02137</a> <span class="keywordtype">int</span> <a class="code" href="structburn__multi__caps.html#a61675e235467d9bc20ef2e30bfea1570">multi_session</a>; <a name="l02138"></a>02138 <a name="l02139"></a>02139 <span class="comment">/* Multi-track capability allows to write more than one track source</span> <a name="l02140"></a>02140 <span class="comment"> during a single session. The written tracks can later be found in</span> <a name="l02141"></a>02141 <span class="comment"> libburn's TOC model with their start addresses and sizes.</span> <a name="l02142"></a>02142 <span class="comment"> 1= multiple tracks per session are allowed</span> <a name="l02143"></a>02143 <span class="comment"> 0= only one track per session allowed</span> <a name="l02144"></a>02144 <span class="comment"> */</span> <a name="l02145"></a><a class="code" href="structburn__multi__caps.html#a0d989622eeb1100973e0ebc19f863c64">02145</a> <span class="keywordtype">int</span> <a class="code" href="structburn__multi__caps.html#a0d989622eeb1100973e0ebc19f863c64">multi_track</a>; <a name="l02146"></a>02146 <a name="l02147"></a>02147 <span class="comment">/* Start-address capability allows to set a non-zero address with</span> <a name="l02148"></a>02148 <span class="comment"> burn_write_opts_set_start_byte(). Eventually this has to respect</span> <a name="l02149"></a>02149 <span class="comment"> .start_alignment and .start_range_low, .start_range_high in this</span> <a name="l02150"></a>02150 <span class="comment"> structure.</span> <a name="l02151"></a>02151 <span class="comment"> 1= non-zero start address is allowed</span> <a name="l02152"></a>02152 <span class="comment"> 0= only start address 0 is allowed (to depict the drive's own idea</span> <a name="l02153"></a>02153 <span class="comment"> about the appropriate write start)</span> <a name="l02154"></a>02154 <span class="comment"> */</span> <a name="l02155"></a><a class="code" href="structburn__multi__caps.html#a1b1a1e3085839b0a7b4df2ed53498845">02155</a> <span class="keywordtype">int</span> <a class="code" href="structburn__multi__caps.html#a1b1a1e3085839b0a7b4df2ed53498845">start_adr</a>; <a name="l02156"></a>02156 <span class="comment"></span> <a name="l02157"></a>02157 <span class="comment"> /** The alignment for start addresses.</span> <a name="l02158"></a>02158 <span class="comment"> ( start_address % start_alignment ) must be 0.</span> <a name="l02159"></a>02159 <span class="comment"> */</span> <a name="l02160"></a><a class="code" href="structburn__multi__caps.html#a519b04f6b54a310d1e86a78adf5b22a6">02160</a> off_t <a class="code" href="structburn__multi__caps.html#a519b04f6b54a310d1e86a78adf5b22a6" title="The alignment for start addresses.">start_alignment</a>; <a name="l02161"></a>02161 <span class="comment"></span> <a name="l02162"></a>02162 <span class="comment"> /** The lowest permissible start address.</span> <a name="l02163"></a>02163 <span class="comment"> */</span> <a name="l02164"></a><a class="code" href="structburn__multi__caps.html#aabf4f21d9de9a31545f3c348da38c19f">02164</a> off_t <a class="code" href="structburn__multi__caps.html#aabf4f21d9de9a31545f3c348da38c19f" title="The lowest permissible start address.">start_range_low</a>; <a name="l02165"></a>02165 <span class="comment"></span> <a name="l02166"></a>02166 <span class="comment"> /** The highest addressable start address.</span> <a name="l02167"></a>02167 <span class="comment"> */</span> <a name="l02168"></a><a class="code" href="structburn__multi__caps.html#ac973d37f56ff25f237a9ca1120d58325">02168</a> off_t <a class="code" href="structburn__multi__caps.html#ac973d37f56ff25f237a9ca1120d58325" title="The highest addressable start address.">start_range_high</a>; <a name="l02169"></a>02169 <span class="comment"></span> <a name="l02170"></a>02170 <span class="comment"> /** Potential availability of write modes</span> <a name="l02171"></a>02171 <span class="comment"> 4= needs no size prediction, not to be chosen automatically</span> <a name="l02172"></a>02172 <span class="comment"> 3= needs size prediction, not to be chosen automatically</span> <a name="l02173"></a>02173 <span class="comment"> 2= available, no size prediction necessary</span> <a name="l02174"></a>02174 <span class="comment"> 1= available, needs exact size prediction</span> <a name="l02175"></a>02175 <span class="comment"> 0= not available</span> <a name="l02176"></a>02176 <span class="comment"> With CD media (profiles 0x09 and 0x0a) check also the elements</span> <a name="l02177"></a>02177 <span class="comment"> *_block_types of the according write mode.</span> <a name="l02178"></a>02178 <span class="comment"> */</span> <a name="l02179"></a><a class="code" href="structburn__multi__caps.html#a68c109d373077b5bc21db28315f5f2d3">02179</a> <span class="keywordtype">int</span> <a class="code" href="structburn__multi__caps.html#a68c109d373077b5bc21db28315f5f2d3" title="Potential availability of write modes 4= needs no size prediction, not to be chosen...">might_do_tao</a>; <a name="l02180"></a><a class="code" href="structburn__multi__caps.html#a42630498dc307952cb0c4f8c65969cff">02180</a> <span class="keywordtype">int</span> <a class="code" href="structburn__multi__caps.html#a42630498dc307952cb0c4f8c65969cff">might_do_sao</a>; <a name="l02181"></a><a class="code" href="structburn__multi__caps.html#aa4c0b2b2c109ee59d734c4007751208a">02181</a> <span class="keywordtype">int</span> <a class="code" href="structburn__multi__caps.html#aa4c0b2b2c109ee59d734c4007751208a">might_do_raw</a>; <a name="l02182"></a>02182 <span class="comment"></span> <a name="l02183"></a>02183 <span class="comment"> /** Generally advised write mode.</span> <a name="l02184"></a>02184 <span class="comment"> Not necessarily the one chosen by burn_write_opts_auto_write_type()</span> <a name="l02185"></a>02185 <span class="comment"> because the burn_disc structure might impose particular demands.</span> <a name="l02186"></a>02186 <span class="comment"> */</span> <a name="l02187"></a><a class="code" href="structburn__multi__caps.html#ae00a5738bb0166dae5586f2aa5cc433c">02187</a> <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9b" title="Possible disc writing style/modes.">burn_write_types</a> <a class="code" href="structburn__multi__caps.html#ae00a5738bb0166dae5586f2aa5cc433c" title="Generally advised write mode.">advised_write_mode</a>; <a name="l02188"></a>02188 <span class="comment"></span> <a name="l02189"></a>02189 <span class="comment"> /** Write mode as given by parameter wt of burn_disc_get_multi_caps().</span> <a name="l02190"></a>02190 <span class="comment"> */</span> <a name="l02191"></a><a class="code" href="structburn__multi__caps.html#aba8782a26d0613a007be54383d9947f8">02191</a> <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9b" title="Possible disc writing style/modes.">burn_write_types</a> <a class="code" href="structburn__multi__caps.html#aba8782a26d0613a007be54383d9947f8" title="Write mode as given by parameter wt of burn_disc_get_multi_caps().">selected_write_mode</a>; <a name="l02192"></a>02192 <span class="comment"></span> <a name="l02193"></a>02193 <span class="comment"> /** Profile number which was current when the reply was generated */</span> <a name="l02194"></a><a class="code" href="structburn__multi__caps.html#a01290aeefd1f73b18ef5616376348e2b">02194</a> <span class="keywordtype">int</span> <a class="code" href="structburn__multi__caps.html#a01290aeefd1f73b18ef5616376348e2b" title="Profile number which was current when the reply was generated.">current_profile</a>; <a name="l02195"></a>02195 <span class="comment"></span> <a name="l02196"></a>02196 <span class="comment"> /** Wether the current profile indicates CD media. 1=yes, 0=no */</span> <a name="l02197"></a><a class="code" href="structburn__multi__caps.html#ae3d49fca8523c26c2f7b29813b160f66">02197</a> <span class="keywordtype">int</span> <a class="code" href="structburn__multi__caps.html#ae3d49fca8523c26c2f7b29813b160f66" title="Wether the current profile indicates CD media.">current_is_cd_profile</a>; <a name="l02198"></a>02198 <a name="l02199"></a>02199 <span class="comment">/* ts A70528 */</span> <a name="l02200"></a>02200 <span class="comment">/* @since 0.3.8 */</span><span class="comment"></span> <a name="l02201"></a>02201 <span class="comment"> /** Wether the current profile is able to perform simulated write */</span> <a name="l02202"></a><a class="code" href="structburn__multi__caps.html#a37995ae8329572046bacf19bbaad9300">02202</a> <span class="keywordtype">int</span> <a class="code" href="structburn__multi__caps.html#a37995ae8329572046bacf19bbaad9300" title="Wether the current profile is able to perform simulated write.">might_simulate</a>; <a name="l02203"></a>02203 }; <a name="l02204"></a>02204 <span class="comment"></span> <a name="l02205"></a>02205 <span class="comment">/** Allocates a struct burn_multi_caps (see above) and fills it with values</span> <a name="l02206"></a>02206 <span class="comment"> which are appropriate for the drive and the loaded media. The drive</span> <a name="l02207"></a>02207 <span class="comment"> must be grabbed for this call. The returned structure has to be disposed</span> <a name="l02208"></a>02208 <span class="comment"> via burn_disc_free_multi_caps() when no longer needed.</span> <a name="l02209"></a>02209 <span class="comment"> @param d The drive to inquire</span> <a name="l02210"></a>02210 <span class="comment"> @param wt With BURN_WRITE_NONE the best capabilities of all write modes</span> <a name="l02211"></a>02211 <span class="comment"> get returned. If set to a write mode like BURN_WRITE_SAO the</span> <a name="l02212"></a>02212 <span class="comment"> capabilities with that particular mode are returned and the</span> <a name="l02213"></a>02213 <span class="comment"> return value is 0 if the desired mode is not possible.</span> <a name="l02214"></a>02214 <span class="comment"> @param caps returns the info structure</span> <a name="l02215"></a>02215 <span class="comment"> @param flag Bitfield for control purposes (unused yet, submit 0)</span> <a name="l02216"></a>02216 <span class="comment"> @return < 0 : error , 0 : writing seems impossible , 1 : writing possible </span> <a name="l02217"></a>02217 <span class="comment"> @since 0.3.2</span> <a name="l02218"></a>02218 <span class="comment">*/</span> <a name="l02219"></a>02219 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a37d658f483c9e8fe9564f7fbdfe009ab" title="Allocates a struct burn_multi_caps (see above) and fills it with values which are...">burn_disc_get_multi_caps</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keyword">enum</span> <a class="code" href="libburn_8h.html#a98506c0d72c878ea6cbecc4004451d9b" title="Possible disc writing style/modes.">burn_write_types</a> wt, <a name="l02220"></a>02220 <span class="keyword">struct</span> <a class="code" href="structburn__multi__caps.html" title="The reply structure for burn_disc_get_multi_caps().">burn_multi_caps</a> **caps, <span class="keywordtype">int</span> flag); <a name="l02221"></a>02221 <span class="comment"></span> <a name="l02222"></a>02222 <span class="comment">/** Removes from memory a multi session info structure which was returned by</span> <a name="l02223"></a>02223 <span class="comment"> burn_disc_get_multi_caps(). The pointer *caps gets set to NULL.</span> <a name="l02224"></a>02224 <span class="comment"> @param caps the info structure to dispose (note: pointer to pointer)</span> <a name="l02225"></a>02225 <span class="comment"> @return 0 : *caps was already NULL, 1 : memory object was disposed</span> <a name="l02226"></a>02226 <span class="comment"> @since 0.3.2</span> <a name="l02227"></a>02227 <span class="comment">*/</span> <a name="l02228"></a>02228 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#aa6a271605b35544c12e10ce3be46bcb9" title="Removes from memory a multi session info structure which was returned by burn_disc_get_multi_caps()...">burn_disc_free_multi_caps</a>(<span class="keyword">struct</span> <a class="code" href="structburn__multi__caps.html" title="The reply structure for burn_disc_get_multi_caps().">burn_multi_caps</a> **caps); <a name="l02229"></a>02229 <a name="l02230"></a>02230 <span class="comment"></span> <a name="l02231"></a>02231 <span class="comment">/** Gets a copy of the toc_entry structure associated with a track</span> <a name="l02232"></a>02232 <span class="comment"> @param t Track to get the entry from</span> <a name="l02233"></a>02233 <span class="comment"> @param entry Struct for the library to fill out</span> <a name="l02234"></a>02234 <span class="comment">*/</span> <a name="l02235"></a>02235 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a1c6fd2feb273ee94d7093a709be33e28" title="Gets a copy of the toc_entry structure associated with a track.">burn_track_get_entry</a>(<span class="keyword">struct</span> burn_track *t, <span class="keyword">struct</span> <a class="code" href="structburn__toc__entry.html" title="Information about a track on a disc - this is from the q sub channel of the lead-in...">burn_toc_entry</a> *entry); <a name="l02236"></a>02236 <span class="comment"></span> <a name="l02237"></a>02237 <span class="comment">/** Gets a copy of the toc_entry structure associated with a session's lead out</span> <a name="l02238"></a>02238 <span class="comment"> @param s Session to get the entry from</span> <a name="l02239"></a>02239 <span class="comment"> @param entry Struct for the library to fill out</span> <a name="l02240"></a>02240 <span class="comment">*/</span> <a name="l02241"></a>02241 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a5751fe7099b485802bf8e04da953bd43" title="Gets a copy of the toc_entry structure associated with a session&#39;s lead out.">burn_session_get_leadout_entry</a>(<span class="keyword">struct</span> burn_session *s, <a name="l02242"></a>02242 <span class="keyword">struct</span> <a class="code" href="structburn__toc__entry.html" title="Information about a track on a disc - this is from the q sub channel of the lead-in...">burn_toc_entry</a> *entry); <a name="l02243"></a>02243 <span class="comment"></span> <a name="l02244"></a>02244 <span class="comment">/** Gets an array of all the sessions for the disc</span> <a name="l02245"></a>02245 <span class="comment"> THIS IS NO LONGER VALID AFTER YOU ADD OR REMOVE A SESSION</span> <a name="l02246"></a>02246 <span class="comment"> @param d Disc to get session array for</span> <a name="l02247"></a>02247 <span class="comment"> @param num Returns the number of sessions in the array</span> <a name="l02248"></a>02248 <span class="comment"> @return array of sessions</span> <a name="l02249"></a>02249 <span class="comment">*/</span> <a name="l02250"></a>02250 <span class="keyword">struct </span>burn_session **<a class="code" href="libburn_8h.html#ac4b2ac498703c6b7807c94554065d5a9" title="Gets an array of all the sessions for the disc THIS IS NO LONGER VALID AFTER YOU...">burn_disc_get_sessions</a>(<span class="keyword">struct</span> burn_disc *d, <a name="l02251"></a>02251 <span class="keywordtype">int</span> *num); <a name="l02252"></a>02252 <a name="l02253"></a>02253 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#ab4f3aa17c51c4eb614aad0508febfbd2">burn_disc_get_sectors</a>(<span class="keyword">struct</span> burn_disc *d); <a name="l02254"></a>02254 <span class="comment"></span> <a name="l02255"></a>02255 <span class="comment">/** Gets an array of all the tracks for a session</span> <a name="l02256"></a>02256 <span class="comment"> THIS IS NO LONGER VALID AFTER YOU ADD OR REMOVE A TRACK</span> <a name="l02257"></a>02257 <span class="comment"> @param s session to get track array for</span> <a name="l02258"></a>02258 <span class="comment"> @param num Returns the number of tracks in the array</span> <a name="l02259"></a>02259 <span class="comment"> @return array of tracks</span> <a name="l02260"></a>02260 <span class="comment">*/</span> <a name="l02261"></a>02261 <span class="keyword">struct </span>burn_track **<a class="code" href="libburn_8h.html#a8b461f982486a660e0de4d5a128c4695" title="Gets an array of all the tracks for a session THIS IS NO LONGER VALID AFTER YOU ADD...">burn_session_get_tracks</a>(<span class="keyword">struct</span> burn_session *s, <a name="l02262"></a>02262 <span class="keywordtype">int</span> *num); <a name="l02263"></a>02263 <a name="l02264"></a>02264 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a0cc8be95a9c4bca2b596ea4a90af357e">burn_session_get_sectors</a>(<span class="keyword">struct</span> burn_session *s); <a name="l02265"></a>02265 <span class="comment"></span> <a name="l02266"></a>02266 <span class="comment">/** Gets the mode of a track</span> <a name="l02267"></a>02267 <span class="comment"> @param track the track to query</span> <a name="l02268"></a>02268 <span class="comment"> @return the track's mode</span> <a name="l02269"></a>02269 <span class="comment">*/</span> <a name="l02270"></a>02270 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a3183869c1bfa988e52ca35dcdcda8ecd" title="Gets the mode of a track.">burn_track_get_mode</a>(<span class="keyword">struct</span> burn_track *track); <a name="l02271"></a>02271 <span class="comment"></span> <a name="l02272"></a>02272 <span class="comment">/** Returns whether the first track of a session is hidden in the pregap</span> <a name="l02273"></a>02273 <span class="comment"> @param session the session to query</span> <a name="l02274"></a>02274 <span class="comment"> @return non-zero means the first track is hidden</span> <a name="l02275"></a>02275 <span class="comment">*/</span> <a name="l02276"></a>02276 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#abb85aad46cf6b64ca65eac57d58fe0d6" title="Returns whether the first track of a session is hidden in the pregap.">burn_session_get_hidefirst</a>(<span class="keyword">struct</span> burn_session *session); <a name="l02277"></a>02277 <span class="comment"></span> <a name="l02278"></a>02278 <span class="comment">/** Returns the library's version in its parts.</span> <a name="l02279"></a>02279 <span class="comment"> This is the runtime counterpart of the three build time macros </span> <a name="l02280"></a>02280 <span class="comment"> burn_header_version_* below.</span> <a name="l02281"></a>02281 <span class="comment"> @param major The major version number</span> <a name="l02282"></a>02282 <span class="comment"> @param minor The minor version number</span> <a name="l02283"></a>02283 <span class="comment"> @param micro The micro version number</span> <a name="l02284"></a>02284 <span class="comment">*/</span> <a name="l02285"></a>02285 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a34825ec33e41d3857240789ca4a9988b" title="Returns the library&#39;s version in its parts.">burn_version</a>(<span class="keywordtype">int</span> *major, <span class="keywordtype">int</span> *minor, <span class="keywordtype">int</span> *micro); <a name="l02286"></a>02286 <a name="l02287"></a>02287 <a name="l02288"></a>02288 <span class="comment">/* ts A80129 */</span> <a name="l02289"></a>02289 <span class="comment">/* @since 0.4.4 */</span><span class="comment"></span> <a name="l02290"></a>02290 <span class="comment">/** These three release version numbers tell the revision of this header file</span> <a name="l02291"></a>02291 <span class="comment"> and of the API it describes. They are memorized by applications at build</span> <a name="l02292"></a>02292 <span class="comment"> time.</span> <a name="l02293"></a>02293 <span class="comment"> Immediately after burn_initialize() an application should do this check:</span> <a name="l02294"></a>02294 <span class="comment"> burn_version(&major, &minor, &micro);</span> <a name="l02295"></a>02295 <span class="comment"> if(major > burn_header_version_major</span> <a name="l02296"></a>02296 <span class="comment"> || (major == burn_header_version_major</span> <a name="l02297"></a>02297 <span class="comment"> && (minor > burn_header_version_minor</span> <a name="l02298"></a>02298 <span class="comment"> || (minor == burn_header_version_minor</span> <a name="l02299"></a>02299 <span class="comment"> && micro >= burn_header_version_micro)))) {</span> <a name="l02300"></a>02300 <span class="comment"> ... Young enough. Go on with program run ....</span> <a name="l02301"></a>02301 <span class="comment"> } else {</span> <a name="l02302"></a>02302 <span class="comment"> ... Too old. Do not use this libburn version ...</span> <a name="l02303"></a>02303 <span class="comment"> }</span> <a name="l02304"></a>02304 <span class="comment"></span> <a name="l02305"></a>02305 <span class="comment">*/</span> <a name="l02306"></a><a class="code" href="libburn_8h.html#a9ff66a6e05b8811524fcc7c45293f1cf">02306</a> <span class="preprocessor">#define burn_header_version_major 0</span> <a name="l02307"></a><a class="code" href="libburn_8h.html#a041b127af3ef1816d75d8e209527b413">02307</a> <span class="preprocessor"></span><span class="preprocessor">#define burn_header_version_minor 7</span> <a name="l02308"></a><a class="code" href="libburn_8h.html#a60acc6372753ab34a0d610136cc41c97">02308</a> <span class="preprocessor"></span><span class="preprocessor">#define burn_header_version_micro 0</span> <a name="l02309"></a>02309 <span class="preprocessor"></span><span class="comment">/** Note:</span> <a name="l02310"></a>02310 <span class="comment"> Above version numbers are also recorded in configure.ac because libtool</span> <a name="l02311"></a>02311 <span class="comment"> wants them as parameters at build time.</span> <a name="l02312"></a>02312 <span class="comment"> For the library compatibility check BURN_*_VERSION in configure.ac</span> <a name="l02313"></a>02313 <span class="comment"> are not decisive. Only the three numbers above do matter.</span> <a name="l02314"></a>02314 <span class="comment">*/</span><span class="comment"></span> <a name="l02315"></a>02315 <span class="comment">/** Usage discussion:</span> <a name="l02316"></a>02316 <span class="comment"></span> <a name="l02317"></a>02317 <span class="comment">Some developers of the libburnia project have differing</span> <a name="l02318"></a>02318 <span class="comment">opinions how to ensure the compatibility of libaries</span> <a name="l02319"></a>02319 <span class="comment">and applications.</span> <a name="l02320"></a>02320 <span class="comment"></span> <a name="l02321"></a>02321 <span class="comment">It is about whether to use at compile time and at runtime</span> <a name="l02322"></a>02322 <span class="comment">the version numbers isoburn_header_version_* provided here.</span> <a name="l02323"></a>02323 <span class="comment">Thomas Schmitt advises to use them.</span> <a name="l02324"></a>02324 <span class="comment">Vreixo Formoso advises to use other means.</span> <a name="l02325"></a>02325 <span class="comment"></span> <a name="l02326"></a>02326 <span class="comment">At compile time:</span> <a name="l02327"></a>02327 <span class="comment"></span> <a name="l02328"></a>02328 <span class="comment">Vreixo Formoso advises to leave proper version matching</span> <a name="l02329"></a>02329 <span class="comment">to properly programmed checks in the the application's</span> <a name="l02330"></a>02330 <span class="comment">build system, which will eventually refuse compilation.</span> <a name="l02331"></a>02331 <span class="comment"></span> <a name="l02332"></a>02332 <span class="comment">Thomas Schmitt advises to use the macros defined here</span> <a name="l02333"></a>02333 <span class="comment">for comparison with the application's requirements of</span> <a name="l02334"></a>02334 <span class="comment">library revisions and to eventually break compilation.</span> <a name="l02335"></a>02335 <span class="comment"></span> <a name="l02336"></a>02336 <span class="comment">Both advises are combinable. I.e. be master of your</span> <a name="l02337"></a>02337 <span class="comment">build system and have #if checks in the source code</span> <a name="l02338"></a>02338 <span class="comment">of your application, nevertheless.</span> <a name="l02339"></a>02339 <span class="comment"></span> <a name="l02340"></a>02340 <span class="comment">At runtime (via *_is_compatible()):</span> <a name="l02341"></a>02341 <span class="comment"></span> <a name="l02342"></a>02342 <span class="comment">Vreixo Formoso advises to compare the application's</span> <a name="l02343"></a>02343 <span class="comment">requirements of library revisions with the runtime</span> <a name="l02344"></a>02344 <span class="comment">library. This is to allow runtime libraries which are</span> <a name="l02345"></a>02345 <span class="comment">young enough for the application but too old for</span> <a name="l02346"></a>02346 <span class="comment">the lib*.h files seen at compile time.</span> <a name="l02347"></a>02347 <span class="comment"></span> <a name="l02348"></a>02348 <span class="comment">Thomas Schmitt advises to compare the header</span> <a name="l02349"></a>02349 <span class="comment">revisions defined here with the runtime library.</span> <a name="l02350"></a>02350 <span class="comment">This is to enforce a strictly monotonous chain</span> <a name="l02351"></a>02351 <span class="comment">of revisions from app to header to library,</span> <a name="l02352"></a>02352 <span class="comment">at the cost of excluding some older libraries.</span> <a name="l02353"></a>02353 <span class="comment"></span> <a name="l02354"></a>02354 <span class="comment">These two advises are mutually exclusive.</span> <a name="l02355"></a>02355 <span class="comment"></span> <a name="l02356"></a>02356 <span class="comment">*/</span> <a name="l02357"></a>02357 <a name="l02358"></a>02358 <a name="l02359"></a>02359 <span class="comment">/* ts A60924 : ticket 74 */</span><span class="comment"></span> <a name="l02360"></a>02360 <span class="comment">/** Control queueing and stderr printing of messages from libburn.</span> <a name="l02361"></a>02361 <span class="comment"> Severity may be one of "NEVER", "ABORT", "FATAL", "FAILURE", "SORRY",</span> <a name="l02362"></a>02362 <span class="comment"> "WARNING", "HINT", "NOTE", "UPDATE", "DEBUG", "ALL".</span> <a name="l02363"></a>02363 <span class="comment"> @param queue_severity Gives the minimum limit for messages to be queued.</span> <a name="l02364"></a>02364 <span class="comment"> Default: "NEVER". If you queue messages then you</span> <a name="l02365"></a>02365 <span class="comment"> must consume them by burn_msgs_obtain().</span> <a name="l02366"></a>02366 <span class="comment"> @param print_severity Does the same for messages to be printed directly</span> <a name="l02367"></a>02367 <span class="comment"> to stderr. Default: "FATAL".</span> <a name="l02368"></a>02368 <span class="comment"> @param print_id A text prefix to be printed before the message.</span> <a name="l02369"></a>02369 <span class="comment"> @return >0 for success, <=0 for error</span> <a name="l02370"></a>02370 <span class="comment"> @since 0.2.6</span> <a name="l02371"></a>02371 <span class="comment">*/</span> <a name="l02372"></a>02372 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a634106ec331c7b7db40a142c467cfb48" title="Note: Above version numbers are also recorded in configure.ac because libtool wants...">burn_msgs_set_severities</a>(<span class="keywordtype">char</span> *queue_severity, <a name="l02373"></a>02373 <span class="keywordtype">char</span> *print_severity, <span class="keywordtype">char</span> *print_id); <a name="l02374"></a>02374 <a name="l02375"></a>02375 <span class="comment">/* ts A60924 : ticket 74 */</span> <a name="l02376"></a>02376 <span class="comment">/* @since 0.2.6 */</span> <a name="l02377"></a><a class="code" href="libburn_8h.html#a662b8d435f303812327c61304807b7ff">02377</a> <span class="preprocessor">#define BURN_MSGS_MESSAGE_LEN 4096</span> <a name="l02378"></a>02378 <span class="preprocessor"></span><span class="comment"></span> <a name="l02379"></a>02379 <span class="comment">/** Obtain the oldest pending libburn message from the queue which has at</span> <a name="l02380"></a>02380 <span class="comment"> least the given minimum_severity. This message and any older message of</span> <a name="l02381"></a>02381 <span class="comment"> lower severity will get discarded from the queue and is then lost forever.</span> <a name="l02382"></a>02382 <span class="comment"> @param minimum_severity may be one of "NEVER", "ABORT", "FATAL",</span> <a name="l02383"></a>02383 <span class="comment"> "FAILURE", "SORRY", "WARNING", "HINT", "NOTE", "UPDATE",</span> <a name="l02384"></a>02384 <span class="comment"> "DEBUG", "ALL".</span> <a name="l02385"></a>02385 <span class="comment"> To call with minimum_severity "NEVER" will discard the</span> <a name="l02386"></a>02386 <span class="comment"> whole queue.</span> <a name="l02387"></a>02387 <span class="comment"> @param error_code Will become a unique error code as liste in</span> <a name="l02388"></a>02388 <span class="comment"> libburn/libdax_msgs.h</span> <a name="l02389"></a>02389 <span class="comment"> @param msg_text Must provide at least BURN_MSGS_MESSAGE_LEN bytes.</span> <a name="l02390"></a>02390 <span class="comment"> @param os_errno Will become the eventual errno related to the message</span> <a name="l02391"></a>02391 <span class="comment"> @param severity Will become the severity related to the message and</span> <a name="l02392"></a>02392 <span class="comment"> should provide at least 80 bytes.</span> <a name="l02393"></a>02393 <span class="comment"> @return 1 if a matching item was found, 0 if not, <0 for severe errors</span> <a name="l02394"></a>02394 <span class="comment"> @since 0.2.6</span> <a name="l02395"></a>02395 <span class="comment">*/</span> <a name="l02396"></a>02396 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a12ad779d35af3a3dcc1fe40c3b7fec22" title="Obtain the oldest pending libburn message from the queue which has at least the given...">burn_msgs_obtain</a>(<span class="keywordtype">char</span> *minimum_severity, <a name="l02397"></a>02397 <span class="keywordtype">int</span> *error_code, <span class="keywordtype">char</span> msg_text[], <span class="keywordtype">int</span> *os_errno, <a name="l02398"></a>02398 <span class="keywordtype">char</span> severity[]); <a name="l02399"></a>02399 <a name="l02400"></a>02400 <a name="l02401"></a>02401 <span class="comment">/* ts A70922 */</span><span class="comment"></span> <a name="l02402"></a>02402 <span class="comment">/** Submit a message to the libburn queueing system. It will be queued or</span> <a name="l02403"></a>02403 <span class="comment"> printed as if it was generated by libburn itself.</span> <a name="l02404"></a>02404 <span class="comment"> @param error_code The unique error code of your message.</span> <a name="l02405"></a>02405 <span class="comment"> Submit 0 if you do not have reserved error codes within</span> <a name="l02406"></a>02406 <span class="comment"> the libburnia project.</span> <a name="l02407"></a>02407 <span class="comment"> @param msg_text Not more than BURN_MSGS_MESSAGE_LEN characters of</span> <a name="l02408"></a>02408 <span class="comment"> message text.</span> <a name="l02409"></a>02409 <span class="comment"> @param os_errno Eventual errno related to the message. Submit 0 if</span> <a name="l02410"></a>02410 <span class="comment"> the message is not related to a operating system error.</span> <a name="l02411"></a>02411 <span class="comment"> @param severity One of "ABORT", "FATAL", "FAILURE", "SORRY", "WARNING",</span> <a name="l02412"></a>02412 <span class="comment"> "HINT", "NOTE", "UPDATE", "DEBUG". Defaults to "FATAL".</span> <a name="l02413"></a>02413 <span class="comment"> @param d An eventual drive to which the message shall be related.</span> <a name="l02414"></a>02414 <span class="comment"> Submit NULL if the message is not specific to a</span> <a name="l02415"></a>02415 <span class="comment"> particular drive object.</span> <a name="l02416"></a>02416 <span class="comment"> @return 1 if message was delivered, <=0 if failure</span> <a name="l02417"></a>02417 <span class="comment"> @since 0.4.0</span> <a name="l02418"></a>02418 <span class="comment">*/</span> <a name="l02419"></a>02419 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#acded90fa10faa3230190a6ee653055a9" title="Submit a message to the libburn queueing system.">burn_msgs_submit</a>(<span class="keywordtype">int</span> error_code, <span class="keywordtype">char</span> msg_text[], <span class="keywordtype">int</span> os_errno, <a name="l02420"></a>02420 <span class="keywordtype">char</span> severity[], <span class="keyword">struct</span> burn_drive *d); <a name="l02421"></a>02421 <a name="l02422"></a>02422 <a name="l02423"></a>02423 <span class="comment">/* ts A71016 */</span><span class="comment"></span> <a name="l02424"></a>02424 <span class="comment">/** Convert a severity name into a severity number, which gives the severity</span> <a name="l02425"></a>02425 <span class="comment"> rank of the name.</span> <a name="l02426"></a>02426 <span class="comment"> @param severity_name A name as with burn_msgs_submit(), e.g. "SORRY".</span> <a name="l02427"></a>02427 <span class="comment"> @param severity_number The rank number: the higher, the more severe.</span> <a name="l02428"></a>02428 <span class="comment"> @param flag Bitfield for control purposes (unused yet, submit 0)</span> <a name="l02429"></a>02429 <span class="comment"> @return >0 success, <=0 failure</span> <a name="l02430"></a>02430 <span class="comment"> @since 0.4.0</span> <a name="l02431"></a>02431 <span class="comment">*/</span> <a name="l02432"></a>02432 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a26135682896aac8154caadc5b0ecb61b" title="Convert a severity name into a severity number, which gives the severity rank of...">burn_text_to_sev</a>(<span class="keywordtype">char</span> *severity_name, <span class="keywordtype">int</span> *severity_number, <span class="keywordtype">int</span> flag); <a name="l02433"></a>02433 <a name="l02434"></a>02434 <a name="l02435"></a>02435 <span class="comment">/* ts A80202 */</span><span class="comment"></span> <a name="l02436"></a>02436 <span class="comment">/** Convert a severity number into a severity name</span> <a name="l02437"></a>02437 <span class="comment"> @since 0.4.4</span> <a name="l02438"></a>02438 <span class="comment"> @param severity_number The rank number: the higher, the more severe.</span> <a name="l02439"></a>02439 <span class="comment"> @param severity_name A name as with burn_msgs_submit(), e.g. "SORRY".</span> <a name="l02440"></a>02440 <span class="comment"> @param flag Bitfield for control purposes (unused yet, submit 0)</span> <a name="l02441"></a>02441 <span class="comment"> @since 0.4.4</span> <a name="l02442"></a>02442 <span class="comment">*/</span> <a name="l02443"></a>02443 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#ab9e7ce07297e2bb8858396063389b904" title="Convert a severity number into a severity name.">burn_sev_to_text</a>(<span class="keywordtype">int</span> severity_number, <span class="keywordtype">char</span> **severity_name, <span class="keywordtype">int</span> flag); <a name="l02444"></a>02444 <a name="l02445"></a>02445 <a name="l02446"></a>02446 <a name="l02447"></a>02447 <span class="comment">/* ts A70915 */</span><span class="comment"></span> <a name="l02448"></a>02448 <span class="comment">/** Replace the messenger object handle of libburn by a compatible handle</span> <a name="l02449"></a>02449 <span class="comment"> obtained from a related library. </span> <a name="l02450"></a>02450 <span class="comment"> See also: libisofs, API function iso_get_messenger().</span> <a name="l02451"></a>02451 <span class="comment"> @param messenger The foreign but compatible message handle.</span> <a name="l02452"></a>02452 <span class="comment"> @return 1 : success, <=0 : failure</span> <a name="l02453"></a>02453 <span class="comment"> @since 0.4.0</span> <a name="l02454"></a>02454 <span class="comment">*/</span> <a name="l02455"></a>02455 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a400b4b99f5298fd284917a0b509d50e4" title="Replace the messenger object handle of libburn by a compatible handle obtained from...">burn_set_messenger</a>(<span class="keywordtype">void</span> *messenger); <a name="l02456"></a>02456 <a name="l02457"></a>02457 <a name="l02458"></a>02458 <span class="comment">/* ts A61002 */</span> <a name="l02459"></a>02459 <span class="comment">/* @since 0.2.6 */</span><span class="comment"></span> <a name="l02460"></a>02460 <span class="comment">/** The prototype of a handler function suitable for burn_set_abort_handling().</span> <a name="l02461"></a>02461 <span class="comment"> Such a function has to return -2 if it does not want the process to</span> <a name="l02462"></a>02462 <span class="comment"> exit with value 1.</span> <a name="l02463"></a>02463 <span class="comment">*/</span> <a name="l02464"></a><a class="code" href="libburn_8h.html#ac66a27f187f59cf6490ecb47f935e989">02464</a> <span class="keyword">typedef</span> int (*<a class="code" href="libburn_8h.html#ac66a27f187f59cf6490ecb47f935e989" title="The prototype of a handler function suitable for burn_set_abort_handling().">burn_abort_handler_t</a>)(<span class="keywordtype">void</span> *handle, <span class="keywordtype">int</span> signum, <span class="keywordtype">int</span> flag); <a name="l02465"></a>02465 <span class="comment"></span> <a name="l02466"></a>02466 <span class="comment">/** Control builtin signal handling. See also burn_abort().</span> <a name="l02467"></a>02467 <span class="comment"> @param handle Opaque handle eventually pointing to an application</span> <a name="l02468"></a>02468 <span class="comment"> provided memory object</span> <a name="l02469"></a>02469 <span class="comment"> @param handler A function to be called on signals. It will get handle as</span> <a name="l02470"></a>02470 <span class="comment"> argument. It should finally call burn_abort(). See there.</span> <a name="l02471"></a>02471 <span class="comment"> @param mode : 0 call handler(handle, signum, 0) on nearly all signals</span> <a name="l02472"></a>02472 <span class="comment"> 1 enable system default reaction on all signals</span> <a name="l02473"></a>02473 <span class="comment"> 2 try to ignore nearly all signals</span> <a name="l02474"></a>02474 <span class="comment"> 10 like mode 2 but handle SIGABRT like with mode 0</span> <a name="l02475"></a>02475 <span class="comment"> Arguments (text, NULL, 0) activate the builtin abort handler. It will</span> <a name="l02476"></a>02476 <span class="comment"> eventually call burn_abort() and then perform exit(1). If text is not NULL</span> <a name="l02477"></a>02477 <span class="comment"> then it is used as prefix for pacifier messages of burn_abort_pacifier().</span> <a name="l02478"></a>02478 <span class="comment"> @since 0.2.6</span> <a name="l02479"></a>02479 <span class="comment">*/</span> <a name="l02480"></a>02480 <span class="keywordtype">void</span> <a class="code" href="libburn_8h.html#a47b6e05ca3f53ca00f0ef4103eb5cd18" title="Control builtin signal handling.">burn_set_signal_handling</a>(<span class="keywordtype">void</span> *handle, <a class="code" href="libburn_8h.html#ac66a27f187f59cf6490ecb47f935e989" title="The prototype of a handler function suitable for burn_set_abort_handling().">burn_abort_handler_t</a> handler, <a name="l02481"></a>02481 <span class="keywordtype">int</span> mode); <a name="l02482"></a>02482 <a name="l02483"></a>02483 <a name="l02484"></a>02484 <span class="comment">/* ts A70811 */</span><span class="comment"></span> <a name="l02485"></a>02485 <span class="comment">/** Write data in random access mode.</span> <a name="l02486"></a>02486 <span class="comment"> The drive must be grabbed successfully before calling this function which</span> <a name="l02487"></a>02487 <span class="comment"> circumvents usual libburn session processing and rather writes data without</span> <a name="l02488"></a>02488 <span class="comment"> preparations or finalizing. This will work only with overwriteable media</span> <a name="l02489"></a>02489 <span class="comment"> which are also suitable for burn_write_opts_set_start_byte(). The same</span> <a name="l02490"></a>02490 <span class="comment"> address alignment restrictions as with this function apply. I.e. for DVD</span> <a name="l02491"></a>02491 <span class="comment"> it is best to align to 32 KiB blocks (= 16 LBA units). The amount of data</span> <a name="l02492"></a>02492 <span class="comment"> to be written is subject to the same media dependent alignment rules.</span> <a name="l02493"></a>02493 <span class="comment"> Again, 32 KiB is most safe.</span> <a name="l02494"></a>02494 <span class="comment"> Call burn_disc_get_multi_caps() can obtain the necessary media info. See</span> <a name="l02495"></a>02495 <span class="comment"> resulting struct burn_multi_caps elements .start_adr , .start_alignment ,</span> <a name="l02496"></a>02496 <span class="comment"> .start_range_low , .start_range_high .</span> <a name="l02497"></a>02497 <span class="comment"> Other than burn_disc_write() this is a synchronous call which returns</span> <a name="l02498"></a>02498 <span class="comment"> only after the write transaction has ended (sucessfully or not). So it is</span> <a name="l02499"></a>02499 <span class="comment"> wise not to transfer giant amounts of data in a single call.</span> <a name="l02500"></a>02500 <span class="comment"> Important: Data have to fit into the already formatted area of the media.</span> <a name="l02501"></a>02501 <span class="comment"> @param d The drive to which to write </span> <a name="l02502"></a>02502 <span class="comment"> @param byte_address The start address of the write in byte</span> <a name="l02503"></a>02503 <span class="comment"> (1 LBA unit = 2048 bytes) (do respect media alignment)</span> <a name="l02504"></a>02504 <span class="comment"> @param data The bytes to be written</span> <a name="l02505"></a>02505 <span class="comment"> @param data_count The number of those bytes (do respect media alignment)</span> <a name="l02506"></a>02506 <span class="comment"> data_count == 0 is permitted (e.g. to flush the</span> <a name="l02507"></a>02507 <span class="comment"> drive buffer without further data transfer).</span> <a name="l02508"></a>02508 <span class="comment"> @param flag Bitfield for control purposes:</span> <a name="l02509"></a>02509 <span class="comment"> bit0 = flush the drive buffer after eventual writing</span> <a name="l02510"></a>02510 <span class="comment"> @return 1=sucessful , <=0 : number of transfered bytes * -1</span> <a name="l02511"></a>02511 <span class="comment"> @since 0.4.0</span> <a name="l02512"></a>02512 <span class="comment">*/</span> <a name="l02513"></a>02513 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#aaad77fbdb1d3bc667f5d5b754c8eb470" title="Write data in random access mode.">burn_random_access_write</a>(<span class="keyword">struct</span> burn_drive *d, off_t byte_address, <a name="l02514"></a>02514 <span class="keywordtype">char</span> *data, off_t data_count, <span class="keywordtype">int</span> flag); <a name="l02515"></a>02515 <a name="l02516"></a>02516 <a name="l02517"></a>02517 <span class="comment">/* ts A81215 */</span><span class="comment"></span> <a name="l02518"></a>02518 <span class="comment">/** Inquire the maximum amount of readable data.</span> <a name="l02519"></a>02519 <span class="comment"> It is supposed that all LBAs in the range from 0 to media_read_acpacity-1</span> <a name="l02520"></a>02520 <span class="comment"> can be read via burn_read_data() although some of them may never have been</span> <a name="l02521"></a>02521 <span class="comment"> recorded. If tracks are recognizable then it is better to only read</span> <a name="l02522"></a>02522 <span class="comment"> LBAs which are part of some track.</span> <a name="l02523"></a>02523 <span class="comment"> @param d The drive from which to read</span> <a name="l02524"></a>02524 <span class="comment"> @param capacity Will return the result if valid</span> <a name="l02525"></a>02525 <span class="comment"> @param flag Bitfield for control purposes: Unused yet, submit 0.</span> <a name="l02526"></a>02526 <span class="comment"> @return 1=sucessful , <=0 an error occured</span> <a name="l02527"></a>02527 <span class="comment"> @since 0.6.0</span> <a name="l02528"></a>02528 <span class="comment">*/</span> <a name="l02529"></a>02529 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#adcc8119cd08ead349868a4e81dae0d3a" title="Inquire the maximum amount of readable data.">burn_get_read_capacity</a>(<span class="keyword">struct</span> burn_drive *d, <span class="keywordtype">int</span> *capacity, <span class="keywordtype">int</span> flag); <a name="l02530"></a>02530 <a name="l02531"></a>02531 <a name="l02532"></a>02532 <span class="comment">/* ts A70812 */</span><span class="comment"></span> <a name="l02533"></a>02533 <span class="comment">/** Read data in random access mode.</span> <a name="l02534"></a>02534 <span class="comment"> The drive must be grabbed successfully before calling this function.</span> <a name="l02535"></a>02535 <span class="comment"> With all currently supported drives and media the byte_address has to</span> <a name="l02536"></a>02536 <span class="comment"> be aligned to 2048 bytes. Only data tracks with 2048 bytes per sector</span> <a name="l02537"></a>02537 <span class="comment"> can be read this way. I.e. not CD-audio, not CD-video-stream ...</span> <a name="l02538"></a>02538 <span class="comment"> This is a synchronous call which returns only after the full read job</span> <a name="l02539"></a>02539 <span class="comment"> has ended (sucessfully or not). So it is wise not to read giant amounts</span> <a name="l02540"></a>02540 <span class="comment"> of data in a single call.</span> <a name="l02541"></a>02541 <span class="comment"> @param d The drive from which to read</span> <a name="l02542"></a>02542 <span class="comment"> @param byte_address The start address of the read in byte (aligned to 2048)</span> <a name="l02543"></a>02543 <span class="comment"> @param data A memory buffer capable of taking data_size bytes</span> <a name="l02544"></a>02544 <span class="comment"> @param data_size The amount of data to be read. This does not have to</span> <a name="l02545"></a>02545 <span class="comment"> be aligned to any block size.</span> <a name="l02546"></a>02546 <span class="comment"> @param data_count The amount of data actually read (interesting on error)</span> <a name="l02547"></a>02547 <span class="comment"> @param flag Bitfield for control purposes:</span> <a name="l02548"></a>02548 <span class="comment"> bit0= - reserved -</span> <a name="l02549"></a>02549 <span class="comment"> bit1= do not submit error message if read error</span> <a name="l02550"></a>02550 <span class="comment"> bit2= on error do not try to read a second time</span> <a name="l02551"></a>02551 <span class="comment"> with single block steps. @since 0.5.2 </span> <a name="l02552"></a>02552 <span class="comment"> @return 1=sucessful , <=0 an error occured</span> <a name="l02553"></a>02553 <span class="comment"> @since 0.4.0</span> <a name="l02554"></a>02554 <span class="comment">*/</span> <a name="l02555"></a>02555 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#a18223c871859b22e0a53bcc9509d21c5" title="Read data in random access mode.">burn_read_data</a>(<span class="keyword">struct</span> burn_drive *d, off_t byte_address, <a name="l02556"></a>02556 <span class="keywordtype">char</span> data[], off_t data_size, off_t *data_count, <span class="keywordtype">int</span> flag); <a name="l02557"></a>02557 <a name="l02558"></a>02558 <a name="l02559"></a>02559 <span class="comment">/* A70904 */</span><span class="comment"></span> <a name="l02560"></a>02560 <span class="comment">/** Inquire whether the drive object is a real MMC drive or a pseudo-drive</span> <a name="l02561"></a>02561 <span class="comment"> created by a stdio: address.</span> <a name="l02562"></a>02562 <span class="comment"> @param d The drive to inquire</span> <a name="l02563"></a>02563 <span class="comment"> @return 0= null-drive</span> <a name="l02564"></a>02564 <span class="comment"> 1= real MMC drive</span> <a name="l02565"></a>02565 <span class="comment"> 2= stdio-drive, random access, read-write</span> <a name="l02566"></a>02566 <span class="comment"> 3= stdio-drive, sequential, write-only</span> <a name="l02567"></a>02567 <span class="comment"> @since 0.4.0</span> <a name="l02568"></a>02568 <span class="comment">*/</span> <a name="l02569"></a>02569 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#aa483359023f9266cef7937e6c42cc3af" title="Inquire whether the drive object is a real MMC drive or a pseudo-drive created by...">burn_drive_get_drive_role</a>(<span class="keyword">struct</span> burn_drive *d); <a name="l02570"></a>02570 <a name="l02571"></a>02571 <a name="l02572"></a>02572 <span class="comment">/* ts A70923 */</span><span class="comment"></span> <a name="l02573"></a>02573 <span class="comment">/** Find out whether a given address string would lead to the given drive</span> <a name="l02574"></a>02574 <span class="comment"> object. This should be done in advance for track source addresses</span> <a name="l02575"></a>02575 <span class="comment"> with parameter drive_role set to 2. </span> <a name="l02576"></a>02576 <span class="comment"> Although a real MMC drive should hardly exist as two drive objects at</span> <a name="l02577"></a>02577 <span class="comment"> the same time, this can easily happen with stdio-drives. So if more than</span> <a name="l02578"></a>02578 <span class="comment"> one drive is used by the application, then this gesture is advised:</span> <a name="l02579"></a>02579 <span class="comment"> burn_drive_d_get_adr(d2, adr2);</span> <a name="l02580"></a>02580 <span class="comment"> if (burn_drive_equals_adr(d1, adr2, burn_drive_get_drive_role(d2)))</span> <a name="l02581"></a>02581 <span class="comment"> ... Both drive objects point to the same storage facility ...</span> <a name="l02582"></a>02582 <span class="comment"> </span> <a name="l02583"></a>02583 <span class="comment"> @param d1 Existing drive object</span> <a name="l02584"></a>02584 <span class="comment"> @param adr2 Address string to be tested. Prefix "stdio:" overrides</span> <a name="l02585"></a>02585 <span class="comment"> parameter drive_role2 by either 0 or 2 as appropriate.</span> <a name="l02586"></a>02586 <span class="comment"> The string must be shorter than BURN_DRIVE_ADR_LEN.</span> <a name="l02587"></a>02587 <span class="comment"> @param drive_role2 Role as burn_drive_get_drive_role() would attribute</span> <a name="l02588"></a>02588 <span class="comment"> to adr2 if it was a drive. Use value 2 for checking track</span> <a name="l02589"></a>02589 <span class="comment"> sources resp. pseudo-drive addresses without "stdio:".</span> <a name="l02590"></a>02590 <span class="comment"> Use 1 for checking drive addresses including those with</span> <a name="l02591"></a>02591 <span class="comment"> prefix "stdio:".</span> <a name="l02592"></a>02592 <span class="comment"> @return 1= adr2 leads to d1 , 0= adr2 seems not to lead to d1,</span> <a name="l02593"></a>02593 <span class="comment"> -1 = adr2 is bad</span> <a name="l02594"></a>02594 <span class="comment"> @since 0.4.0</span> <a name="l02595"></a>02595 <span class="comment">*/</span> <a name="l02596"></a>02596 <span class="keywordtype">int</span> <a class="code" href="libburn_8h.html#aa7e8bad6260f9851c4e20c29a422048b" title="Find out whether a given address string would lead to the given drive object.">burn_drive_equals_adr</a>(<span class="keyword">struct</span> burn_drive *d1, <span class="keywordtype">char</span> *adr2, <span class="keywordtype">int</span> drive_role2); <a name="l02597"></a>02597 <a name="l02598"></a>02598 <a name="l02599"></a>02599 <a name="l02600"></a>02600 <span class="preprocessor">#ifndef DOXYGEN</span> <a name="l02601"></a>02601 <span class="preprocessor"></span> <a name="l02602"></a>02602 BURN_END_DECLS <a name="l02603"></a>02603 <a name="l02604"></a>02604 <span class="preprocessor">#endif</span> <a name="l02605"></a>02605 <span class="preprocessor"></span> <a name="l02606"></a>02606 <span class="preprocessor">#endif </span><span class="comment">/*LIBBURN_H*/</span> </pre></div></div> <hr size="1"/><address style="text-align: right;"><small>Generated on 30 Sep 2009 for libburn by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>