Added parameter to new API calls isoburn_cancel_prepared_write, isoburn_sync_after_write

This commit is contained in:
2008-02-04 21:42:37 +00:00
parent ea5daa0f80
commit 5684af273c
4 changed files with 34 additions and 15 deletions

View File

@ -428,16 +428,28 @@ int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc,
@param flag bit0= this is a regular end, not an abort
give up source reference
*/
int isoburn_cancel_prepared_write(struct burn_drive *d, int flag)
int isoburn_cancel_prepared_write(struct burn_drive *d,
struct burn_drive *output_drive, int flag)
{
int ret;
struct isoburn *o;
struct isoburn *o= NULL;
ret= isoburn_find_emulator(&o, d, 0);
if(ret<0 || o==NULL)
return(-1);
if(o->iso_source==NULL)
return(0);
if(output_drive!=NULL) {
ret= isoburn_find_emulator(&o, output_drive, 0);
if(ret<0 || o==NULL)
o= NULL;
else if(o->iso_source==NULL)
o= NULL;
}
if(o==NULL) {
ret= isoburn_find_emulator(&o, d, 0);
if(ret<0)
return(-1);
if(o==NULL)
return(0);
if(o->iso_source==NULL)
return(0);
}
if(o->iso_source->read!=NULL)
return(0);
if(o->iso_source->version<1)
@ -450,9 +462,10 @@ int isoburn_cancel_prepared_write(struct burn_drive *d, int flag)
/* API @since 0.1.0 */
int isoburn_sync_after_write(struct burn_drive *d, int flag)
int isoburn_sync_after_write(struct burn_drive *d,
struct burn_drive *output_drive, int flag)
{
return isoburn_cancel_prepared_write(d, 1);
return isoburn_cancel_prepared_write(d, output_drive, 1);
}

View File

@ -695,11 +695,14 @@ int isoburn_prepare_new_image(struct burn_drive *in_drive,
call described here.
@param input_drive The drive resp. in_drive which was used with the
preparation call.
@param output_drive The out_drive used with isoburn_prepare_new_image(),
NULL if none.
@param flag Bitfield, submit 0 for now.
bit0= -reserved for internal use-
@return <0 error, 0= no pending preparations detectable, 1 = canceled
*/
int isoburn_cancel_prepared_write(struct burn_drive *input_drive, int flag);
int isoburn_cancel_prepared_write(struct burn_drive *input_drive,
struct burn_drive *output_drive, int flag);
/** Start writing of the new session.
@ -759,10 +762,13 @@ int isoburn_activate_session(struct burn_drive *drive);
threads might appear after the application ended its write procedure.
@param input_drive The drive resp. in_drive which was used with the
preparation call.
@param output_drive The out_drive used with isoburn_prepare_new_image(),
NULL if none.
@param flag Bitfield, submit 0 for now.
@return <=0 error , 1 = success
*/
int isoburn_sync_after_write(struct burn_drive *input_drive, int flag);
int isoburn_sync_after_write(struct burn_drive *input_drive,
struct burn_drive *output_drive, int flag);
#if 0