New API calls isoburn_igopt_set_write_type() , isoburn_igopt_get_write_type()

This commit is contained in:
2012-07-10 08:28:20 +00:00
parent c2e3a36d51
commit d674f847c2
6 changed files with 90 additions and 41 deletions

View File

@@ -149,6 +149,7 @@ int isoburn_new(struct isoburn **objpt, int flag)
o->msgs_submit= NULL;
o->msgs_submit_handle= NULL;
o->msgs_submit_flag= 0;
o->do_tao= 0;
o->prev= NULL;
o->next= NULL;
o->target_iso_head= calloc(1, o->target_iso_head_size);
@@ -435,6 +436,8 @@ int isoburn_prepare_disc_aux(struct burn_drive *in_d, struct burn_drive *out_d,
{ret= -4; goto ex;}
}
out_o->do_tao = opts->do_tao;
state = isoburn_disc_get_status(in_d);
if (state != BURN_DISC_BLANK && state != BURN_DISC_APPENDABLE &&
state != BURN_DISC_FULL) {
@@ -1099,6 +1102,7 @@ int isoburn_igopt_new(struct isoburn_imgen_opts **new_o, int flag)
memset(o->hfsp_serial_number, 0, 8);
o->hfsp_block_size= 0;
o->apm_block_size= 0;
o->do_tao= 0;
return(1);
}
@@ -1703,3 +1707,19 @@ int isoburn_igopt_get_hfsp_block_size(struct isoburn_imgen_opts *opts,
}
int isoburn_igopt_set_write_type(struct isoburn_imgen_opts *opts, int do_tao)
{
if(do_tao < -1 || do_tao > 1)
return(0);
opts->do_tao= do_tao;
return(1);
}
int isoburn_igopt_get_write_type(struct isoburn_imgen_opts *opts, int *do_tao)
{
*do_tao= opts->do_tao;
return(1);
}