Browse Source

New API call isoburn_sync_after_write()

master
Thomas Schmitt 15 years ago
parent
commit
de2a2025dd
  1. 10
      libisoburn/isoburn.c
  2. 24
      libisoburn/libisoburn.h
  3. 2
      xorriso/xorriso_timestamp.h
  4. 3
      xorriso/xorrisoburn.c

10
libisoburn/isoburn.c

@ -414,6 +414,9 @@ int isoburn_prepare_new_image(struct burn_drive *d, struct burn_disc **disc,
}
/* API @since 0.1.0
@param flag bit0= this is a regular end, not an abort
*/
int isoburn_cancel_prepared_write(struct burn_drive *d, int flag)
{
int ret;
@ -433,6 +436,13 @@ 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)
{
return isoburn_cancel_prepared_write(d, 1);
}
void isoburn_version(int *major, int *minor, int *micro)
{
*major= isoburn_header_version_major;

24
libisoburn/libisoburn.h

@ -657,7 +657,7 @@ int isoburn_get_min_start_byte(struct burn_drive *d, off_t *start_byte,
@param disc Returns the newly created burn_disc object.
@return <=0 error , 1 = success
*/
int isoburn_prepare_disc(struct burn_drive *d, struct burn_disc **disc,
int isoburn_prepare_disc(struct burn_drive *drive, struct burn_disc **disc,
struct isoburn_imgen_opts *opts);
@ -686,17 +686,20 @@ 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
/** @since 0.1.0
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 input_drive The drive resp. in_drive which was used with the
preparation call.
@param flag Bitfield, submit 0 for now.
bit0= -reserved for internal use-
@return <=0 error , 1 = success
*/
int isoburn_cancel_prepared_write(struct burn_drive *d, int flag);
int isoburn_cancel_prepared_write(struct burn_drive *input_drive, int flag);
/** Start writing of the new session.
@ -749,6 +752,19 @@ int isoburn_drive_wrote_well(struct burn_drive *d);
int isoburn_activate_session(struct burn_drive *drive);
/** @since 0.1.0
Wait after normal end of operations until libisofs ended all write
threads and freed resource reservations.
This call is not mandatory. But without it, messages from the ending
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 flag Bitfield, submit 0 for now.
@return <=0 error , 1 = success
*/
int isoburn_sync_after_write(struct burn_drive *input_drive, int flag);
#if 0
/* >>> NOT YET IMPLEMENTED <<< */
/** Write a new session to a disc.

2
xorriso/xorriso_timestamp.h

@ -1 +1 @@
#define Xorriso_timestamP "2008.02.04.093106"
#define Xorriso_timestamP "2008.02.04.154405"

3
xorriso/xorrisoburn.c

@ -838,6 +838,9 @@ no_track:;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FATAL", 0);
goto ex;
}
/* To wait for the end of the libisofs threads and their messages. */
isoburn_sync_after_write(source_drive, 1);
Xorriso_process_msg_queues(xorriso,0);
sprintf(xorriso->info_text, "Writing completed sucessfully.\n\n");
Xorriso_info(xorriso, 0);

Loading…
Cancel
Save