Added parameter to new API calls isoburn_cancel_prepared_write, isoburn_sync_after_write
This commit is contained in:
parent
ea5daa0f80
commit
5684af273c
@ -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
|
@param flag bit0= this is a regular end, not an abort
|
||||||
give up source reference
|
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;
|
int ret;
|
||||||
struct isoburn *o;
|
struct isoburn *o= NULL;
|
||||||
|
|
||||||
ret= isoburn_find_emulator(&o, d, 0);
|
if(output_drive!=NULL) {
|
||||||
|
ret= isoburn_find_emulator(&o, output_drive, 0);
|
||||||
if(ret<0 || o==NULL)
|
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);
|
return(-1);
|
||||||
|
if(o==NULL)
|
||||||
|
return(0);
|
||||||
if(o->iso_source==NULL)
|
if(o->iso_source==NULL)
|
||||||
return(0);
|
return(0);
|
||||||
|
}
|
||||||
if(o->iso_source->read!=NULL)
|
if(o->iso_source->read!=NULL)
|
||||||
return(0);
|
return(0);
|
||||||
if(o->iso_source->version<1)
|
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 */
|
/* 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -695,11 +695,14 @@ int isoburn_prepare_new_image(struct burn_drive *in_drive,
|
|||||||
call described here.
|
call described here.
|
||||||
@param input_drive The drive resp. in_drive which was used with the
|
@param input_drive The drive resp. in_drive which was used with the
|
||||||
preparation call.
|
preparation call.
|
||||||
|
@param output_drive The out_drive used with isoburn_prepare_new_image(),
|
||||||
|
NULL if none.
|
||||||
@param flag Bitfield, submit 0 for now.
|
@param flag Bitfield, submit 0 for now.
|
||||||
bit0= -reserved for internal use-
|
bit0= -reserved for internal use-
|
||||||
@return <0 error, 0= no pending preparations detectable, 1 = canceled
|
@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.
|
/** 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.
|
threads might appear after the application ended its write procedure.
|
||||||
@param input_drive The drive resp. in_drive which was used with the
|
@param input_drive The drive resp. in_drive which was used with the
|
||||||
preparation call.
|
preparation call.
|
||||||
|
@param output_drive The out_drive used with isoburn_prepare_new_image(),
|
||||||
|
NULL if none.
|
||||||
@param flag Bitfield, submit 0 for now.
|
@param flag Bitfield, submit 0 for now.
|
||||||
@return <=0 error , 1 = success
|
@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
|
#if 0
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2008.02.04.184038"
|
#define Xorriso_timestamP "2008.02.04.214133"
|
||||||
|
@ -780,7 +780,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
|||||||
: img_sectors ),
|
: img_sectors ),
|
||||||
media_space);
|
media_space);
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||||
isoburn_cancel_prepared_write(source_drive, 0);
|
isoburn_cancel_prepared_write(source_drive, drive, 0);
|
||||||
{ret= 0; goto ex;}
|
{ret= 0; goto ex;}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -791,7 +791,7 @@ no_track:;
|
|||||||
Xorriso_process_msg_queues(xorriso,0);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
sprintf(xorriso->info_text,"Program error : no track in prepared disc");
|
sprintf(xorriso->info_text,"Program error : no track in prepared disc");
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
|
||||||
isoburn_cancel_prepared_write(source_drive, 0);
|
isoburn_cancel_prepared_write(source_drive, drive, 0);
|
||||||
{ret= -1; goto ex;}
|
{ret= -1; goto ex;}
|
||||||
}
|
}
|
||||||
tracks= burn_session_get_tracks(sessions[0], &num_tracks);
|
tracks= burn_session_get_tracks(sessions[0], &num_tracks);
|
||||||
@ -846,7 +846,7 @@ no_track:;
|
|||||||
burn_disc_free(disc);
|
burn_disc_free(disc);
|
||||||
disc= NULL;
|
disc= NULL;
|
||||||
/* To wait for the end of the libisofs threads and their messages. */
|
/* To wait for the end of the libisofs threads and their messages. */
|
||||||
isoburn_sync_after_write(source_drive, 1);
|
isoburn_sync_after_write(source_drive, drive, 0);
|
||||||
Xorriso_process_msg_queues(xorriso,0);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
|
|
||||||
sprintf(xorriso->info_text, "Writing completed sucessfully.\n\n");
|
sprintf(xorriso->info_text, "Writing completed sucessfully.\n\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user