New API functions isoburn_ropt_[sg]et_auto_incharset()

This commit is contained in:
Thomas Schmitt 2009-03-20 19:29:04 +00:00
parent a3fba2995c
commit 03c4aaa4f9
5 changed files with 45 additions and 8 deletions

View File

@ -743,7 +743,7 @@ int isoburn_ropt_set_input_charset(struct isoburn_read_opts *o,
} }
int isoburn_igopt_get_in_charset(struct isoburn_read_opts *o, int isoburn_ropt_get_input_charset(struct isoburn_read_opts *o,
char **input_charset) char **input_charset)
{ {
*input_charset= o->input_charset; *input_charset= o->input_charset;
@ -751,6 +751,20 @@ int isoburn_igopt_get_in_charset(struct isoburn_read_opts *o,
} }
int isoburn_ropt_set_auto_incharset(struct isoburn_read_opts *o, int mode)
{
o->auto_input_charset= mode & 1;
return(1);
}
int isoburn_ropt_get_auto_incharset(struct isoburn_read_opts *o, int *mode)
{
*mode= o->auto_input_charset;
return(1);
}
int isoburn_ropt_get_size_what(struct isoburn_read_opts *o, int isoburn_ropt_get_size_what(struct isoburn_read_opts *o,
uint32_t *size, int *has_what) uint32_t *size, int *has_what)
{ {

View File

@ -270,6 +270,15 @@ struct isoburn_read_opts {
*/ */
char *input_charset; char *input_charset;
/**
* Enable or disable methods to automatically choose an input charset.
* This eventually overrides input_charset.
*
* bit0= allow to set the input character set automatically from
* attribute "isofs.cs" of root directory
*/
int auto_input_charset;
/* modified by the function isoburn_read_image */ /* modified by the function isoburn_read_image */
unsigned int hasRR:1; /*< It will be set to 1 if RR extensions are present, unsigned int hasRR:1; /*< It will be set to 1 if RR extensions are present,
to 0 if not. */ to 0 if not. */

View File

@ -216,9 +216,9 @@ create_blank_image:;
iso_read_opts_set_default_gid(ropts, read_opts->gid); iso_read_opts_set_default_gid(ropts, read_opts->gid);
iso_read_opts_set_input_charset(ropts, read_opts->input_charset); iso_read_opts_set_input_charset(ropts, read_opts->input_charset);
/* <<< experimental API call of libisofs #ifdef Libisofs_has_auto_input_charseT
iso_read_opts_set_error_behavior(ropts, 1); iso_read_opts_auto_input_charset(ropts, read_opts->auto_input_charset);
*/ #endif
ds = isoburn_data_source_new(d); ds = isoburn_data_source_new(d);
if(o->iso_data_source!=NULL) if(o->iso_data_source!=NULL)

View File

@ -764,7 +764,7 @@ int isoburn_ropt_get_default_dirperms(struct isoburn_read_opts *o,
/** Set the character set for reading RR file names from ISO images. /** Set the character set for reading RR file names from ISO images.
@since 0.1.0 @since 0.1.0
@param o The option set to work on @param o The option set to work on
@param input_charset Set this to NULL to use the default locale charset. @param input_charset Set this to NULL to use the default locale charset
For selecting a particular character set, submit its For selecting a particular character set, submit its
name, e.g. as listed by program iconv -l. name, e.g. as listed by program iconv -l.
Example: "UTF-8". Example: "UTF-8".
@ -775,6 +775,20 @@ int isoburn_ropt_set_input_charset(struct isoburn_read_opts *o,
int isoburn_ropt_get_input_charset(struct isoburn_read_opts *o, int isoburn_ropt_get_input_charset(struct isoburn_read_opts *o,
char **input_charset); char **input_charset);
/**
Enable or disable methods to automatically choose an input charset.
This eventually overrides the name set via isoburn_ropt_set_input_charset()
@since 0.3.8
@param mode Bitfield for control purposes:
bit0= allow to set the input character set automatically from
attribute "isofs.cs" of root directory.
Submit any other bits with value 0.
@return 1 success, <=0 failure
*/
int isoburn_ropt_set_auto_incharset(struct isoburn_read_opts *o, int mode);
int isoburn_ropt_get_auto_incharset(struct isoburn_read_opts *o, int *mode);
/** After calling function isoburn_read_image() there are informations /** After calling function isoburn_read_image() there are informations
available in the option set. available in the option set.
@ -803,7 +817,7 @@ int isoburn_ropt_get_input_charset(struct isoburn_read_opts *o,
/* ts A90122 */ /* ts A90122 */
/* >>> to be implemented: /* >>> to be implemented:
#define isoburn_ropt_has_acl 64 #define isoburn_ropt_has_acl 64
#define isoburn_ropt_ihas_ea 128 #define isoburn_ropt_has_ea 128
*/ */
int isoburn_ropt_get_size_what(struct isoburn_read_opts *o, int isoburn_ropt_get_size_what(struct isoburn_read_opts *o,

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.03.19.172806" #define Xorriso_timestamP "2009.03.20.192910"