New API call isoburn_cancel_prepared_write()

This commit is contained in:
2008-02-03 16:41:27 +00:00
parent b006ab11b2
commit b2b6a9bcd8
4 changed files with 37 additions and 2 deletions

View File

@ -414,6 +414,25 @@ int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc,
}
int isoburn_cancel_prepared_write(struct burn_drive *d, int flag)
{
int ret;
struct isoburn *o;
ret= isoburn_find_emulator(&o, d, 0);
if(ret<0 || o==NULL)
return(-1);
if(o->iso_source==NULL)
return(0);
if(o->iso_source->read!=NULL)
return(0);
if(o->iso_source->version<1)
return(0);
o->iso_source->cancel(o->iso_source);
return(1);
}
void isoburn_version(int *major, int *minor, int *micro)
{
*major= isoburn_header_version_major;

View File

@ -686,6 +686,19 @@ int isoburn_prepare_new_image(struct burn_drive *in_drive,
struct isoburn_imgen_opts *opts,
struct burn_drive *out_drive);
/** Revoke isoburn_prepare_new_image() or isoburn_prepare_disc() instead of
running isoburn_disc_write().
libisofs reserves resources and maybe already starts generating the
image stream when one of above two calls is performed. It is mandatory to
either run isoburn_disc_write() or to revoke the preparations by the
call described here.
@param d The input drive which was used with the preparation call.
@param flag Bitfield, submit 0 for now.
@return <=0 error , 1 = success
*/
int isoburn_cancel_prepared_write(struct burn_drive *d, int flag);
/** Start writing of the new session.
This call is asynchrounous. I.e. it returns quite soon and the progress has
to be watched by a loop with call burn_drive_get_status() until