"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libjte/libjte.h" between
xorriso-1.5.2.tar.gz and xorriso-1.5.4.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

libjte.h  (xorriso-1.5.2):libjte.h  (xorriso-1.5.4)
skipping to change at line 28 skipping to change at line 28
struct libjte_env; struct libjte_env;
/* --------------------------- Version Inquiry --------------------------- */ /* --------------------------- Version Inquiry --------------------------- */
/** These three release version numbers tell the revision of this header file /** These three release version numbers tell the revision of this header file
and of the API which it describes. They shall be memorized by applications and of the API which it describes. They shall be memorized by applications
at build time. at build time.
@since 0.1.0 @since 0.1.0
*/ */
#define LIBJTE_VERSION_MAJOR 1 #define LIBJTE_VERSION_MAJOR 2
#define LIBJTE_VERSION_MINOR 0 #define LIBJTE_VERSION_MINOR 0
#define LIBJTE_VERSION_MICRO 0 #define LIBJTE_VERSION_MICRO 0
/** Obtain the three release version numbers of the library. These are the /** Obtain the three release version numbers of the library. These are the
numbers encountered by the application when linking with libjte numbers encountered by the application when linking with libjte
i.e. possibly not before run time. i.e. possibly not before run time.
Better do not base the fundamental compatibility decision of an application Better do not base the fundamental compatibility decision of an application
on these numbers. For a reliable check use libjte__is_compatible(). on these numbers. For a reliable check use libjte__is_compatible().
@since 0.1.0 @since 0.1.0
@param major The maturity version (0 for now, as we are still learning) @param major The maturity version (0 for now, as we are still learning)
skipping to change at line 101 skipping to change at line 101
int libjte_set_outfile(struct libjte_env *jte_handle, char *outfile); int libjte_set_outfile(struct libjte_env *jte_handle, char *outfile);
/** Enable or disable debugging verbosity. /** Enable or disable debugging verbosity.
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be manipulated. @param jte_handle The environment to be manipulated.
@param verbose If not 0 : cause verbosity @param verbose If not 0 : cause verbosity
@return >0 means success, <=0 indicates failure @return >0 means success, <=0 indicates failure
*/ */
int libjte_set_verbose(struct libjte_env *jte_handle, int verbose); int libjte_set_verbose(struct libjte_env *jte_handle, int verbose);
/** Choose the checksum algorithm that libjte will use in its checksum
calculations and expectations. Supported algorithms are "md5" and
"sha256". If this function is *not* called explicitly, libjte will
default to "md5" for backwards compatibility with older versions
of the library that only supported md5.
Choice of the checksum algorithm here is important elsewhere in
terms of sizes of buffers, formats of input, etc.:
- libjte_set_md5_path()
- libjte_set_checksum_path()
- libjte_decide_file_jigdo{,2}()
- libjte_write_match_record{,2}()
It also affects the compatibility of the jigdo and template files
created. Choosing "md5" will modify the format of the template
file, and declare the "Version" in the [Jigdo] field to be
1.2. Choosing "sha256" will declare the "Version" in the [Jigdo]
field to be 2.0 and the output will *NOT* work with older jigdo
client tools.
@since 2.0.0
@param jte_handle The environment to be manipulated.
@param algorithm If not 0 : cause verbosity
@param size Pointer to storage; if no errors, will be filled
with the size in bytes of the checksum output for
future function calls to use
@return >0 means success, <=0 indicates failure
*/
int libjte_set_checksum_algorithm(struct libjte_env *jte_handle,
char *algorithm, int *size);
/** Define the file address on hard disk for the template file. /** Define the file address on hard disk for the template file.
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be manipulated. @param jte_handle The environment to be manipulated.
@param path Will be used with fopen(path, "w") @param path Will be used with fopen(path, "w")
@return >0 means success, <=0 indicates failure @return >0 means success, <=0 indicates failure
*/ */
int libjte_set_template_path(struct libjte_env *jte_handle, char *path); int libjte_set_template_path(struct libjte_env *jte_handle, char *path);
/** Define the file address on hard disk for the jigdo file. /** Define the file address on hard disk for the jigdo file.
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be manipulated. @param jte_handle The environment to be manipulated.
@param path Will be used with fopen(path, "w") @param path Will be used with fopen(path, "w")
@return >0 means success, <=0 indicates failure @return >0 means success, <=0 indicates failure
*/ */
int libjte_set_jigdo_path(struct libjte_env *jte_handle, char *path); int libjte_set_jigdo_path(struct libjte_env *jte_handle, char *path);
/** Tell libjte the hard disk address of the .md5 file, which lists the /** Tell libjte the hard disk address of the .md5 file, which lists the
data files which might get extracted and referred in the jigdo file. data files which might get extracted and referred in the jigdo file.
Still supported in 2.0.0, but is now just an alias for
libjte_set_checksums_path(handle, path) below
\deprecated since 2.0.0
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be manipulated. @param jte_handle The environment to be manipulated.
@param path Will be used with fopen(path, "r") @param path Will be used with fopen(path, "r")
@return >0 means success, <=0 indicates failure @return >0 means success, <=0 indicates failure
*/ */
int libjte_set_md5_path(struct libjte_env *jte_handle, char *path); int libjte_set_md5_path(struct libjte_env *jte_handle, char *path);
/** Tell libjte the hard disk address of the .checksum file, which
lists the data files which might get extracted and referred in the
jigdo file.
@since 2.0.0
@param jte_handle The environment to be manipulated.
@param path Will be used with fopen(path, "r")
@return >0 means success, <=0 indicates failure
*/
int libjte_set_checksum_path(struct libjte_env *jte_handle, char *path);
/** Define a minimum size for data files to get extracted and referred in /** Define a minimum size for data files to get extracted and referred in
the jigdo file. the jigdo file.
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be manipulated. @param jte_handle The environment to be manipulated.
@param min_size Lower size limit in bytes @param min_size Lower size limit in bytes
@return >0 means success, <=0 indicates failure @return >0 means success, <=0 indicates failure
*/ */
int libjte_set_min_size(struct libjte_env *jte_handle, int min_size); int libjte_set_min_size(struct libjte_env *jte_handle, int min_size);
/** Choose one or more checksum algorithms to be applied to the emerging /** Choose one or more checksum algorithms to be applied to the emerging
skipping to change at line 189 skipping to change at line 230
*/ */
int libjte_add_exclude(struct libjte_env *jte_handle, char *pattern); int libjte_add_exclude(struct libjte_env *jte_handle, char *pattern);
/** Add a regular expression pattern to the list of files which must be /** Add a regular expression pattern to the list of files which must be
found matching in the .md5 file. found matching in the .md5 file.
The pattern will be tested against the filenames that are handed to The pattern will be tested against the filenames that are handed to
libjte_decide_file_jigdo() or libjte_begin_data_file() and do not find libjte_decide_file_jigdo() or libjte_begin_data_file() and do not find
a matching entry in the .md5 file. If it matches, then said two functions a matching entry in the .md5 file. If it matches, then said two functions
will return error resp. perform exit() if this is enabled by will return error resp. perform exit() if this is enabled by
libjte_set_error_behavior(). libjte_set_error_behavior().
Still supported in 2.0.0, but is now just an alias for
libjte_add_checksum_demand(handle, path) below
\deprecated since 2.0.0
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be manipulated. @param jte_handle The environment to be manipulated.
@param String for regcomp(3) @param String for regcomp(3)
@return >0 means success, <=0 indicates failure @return >0 means success, <=0 indicates failure
*/ */
int libjte_add_md5_demand(struct libjte_env *jte_handle, char *pattern); int libjte_add_md5_demand(struct libjte_env *jte_handle, char *pattern);
/** Add a regular expression pattern to the list of files which must be
found matching in the .checksum file.
The pattern will be tested against the filenames that are handed
to libjte_decide_file_jigdo() or libjte_begin_data_file() and do
not find a matching entry in the .checksum file. If it matches,
then said two functions will return error resp. perform exit() if
this is enabled by libjte_set_error_behavior().
@since 2.0.0
@param jte_handle The environment to be manipulated.
@param String for regcomp(3)
@return >0 means success, <=0 indicates failure
*/
int libjte_add_checksum_demand(struct libjte_env *jte_handle, char *pattern);
/** Add a To=From pair to the list of mirror name mapping. /** Add a To=From pair to the list of mirror name mapping.
The pair will be split at the '=' character. The mirror_name submitted to The pair will be split at the '=' character. The mirror_name submitted to
libjte_write_match_record() will be tested whether it begins by the From libjte_write_match_record() will be tested whether it begins by the From
string. If so, then this string will be replaced by the To string and a ':' character. string. If so, then this string will be replaced by the To string and a ':' character.
The resulting string will be used as data file name in the jigdo file. The resulting string will be used as data file name in the jigdo file.
libjte_decide_file_jigdo() gets the mirror_name from the matching line libjte_decide_file_jigdo() gets the mirror_name from the matching line
in the .md5 file and hands it to the application. in the .checksum file and hands it to the application.
libjte_begin_data_file() obtains the mirror name and processes it without libjte_begin_data_file() obtains the mirror name and processes it without
bothering the application. bothering the application.
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be manipulated. @param jte_handle The environment to be manipulated.
@param arg String of the form To=From @param arg String of the form To=From
@return >0 means success, <=0 indicates failure @return >0 means success, <=0 indicates failure
*/ */
int libjte_add_mapping(struct libjte_env *jte_handle, char *arg); int libjte_add_mapping(struct libjte_env *jte_handle, char *arg);
skipping to change at line 275 skipping to change at line 333
Before calling libjte_write_footer() : Before calling libjte_write_footer() :
libjte_set_image_size(...); libjte_set_image_size(...);
*/ */
/** Decide whether a data file shall be extracted, i.e. referred in the /** Decide whether a data file shall be extracted, i.e. referred in the
template file and listed in the jigdo file, or whether its content template file and listed in the jigdo file, or whether its content
shall be written compressed into the template file. shall be written compressed into the template file.
\deprecated since 2.0.0, use libjte_decide_file_jigdo2() in preference.
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be used. @param jte_handle The environment to be used.
@param filename The address to be used with fopen(filename, "r") @param filename The address to be used with fopen(filename, "r")
@param size Number of bytes in the data file @param size Number of bytes in the data file
@param mirror_name Returns the name which shall be listed in the jigdo @param mirror_name Returns the name which shall be listed in the jigdo
file. This is NULL or allocated memory that has to file. This is NULL or allocated memory that has to
be disposed by free(3). be disposed by free(3).
@param md5 May get filled by MD5 for libjte_write_match_record(). @param md5 May get filled by MD5 for libjte_write_match_record().
@return 0= use libjte_write_unmatched(), @return 0= use libjte_write_unmatched(),
1= use libjte_write_match_record() 1= use libjte_write_match_record()
-1= would have called exit(1) if enabled -1= would have called exit(1) if enabled, e.g. if called
after saying "sha256" in
libjte_set_checksum_algorithm().
*/ */
int libjte_decide_file_jigdo(struct libjte_env *jte_handle, int libjte_decide_file_jigdo(struct libjte_env *jte_handle,
char *filename, off_t size, char **mirror_name, char *filename, off_t size, char **mirror_name,
unsigned char md5[16]); unsigned char md5[16]);
/** Decide whether a data file shall be extracted, i.e. referred in the
template file and listed in the jigdo file, or whether its content
shall be written compressed into the template file.
@since 2.0.0
@param jte_handle The environment to be used.
@param filename The address to be used with fopen(filename, "r")
@param size Number of bytes in the data file
@param mirror_name Returns the name which shall be listed in the jigdo
file. This is NULL or allocated memory that has to
be disposed by free(3).
@param checksum May get filled by a checksum for libjte_write_match_recor
d2().
The size of the needed buffer here varies
depending on the checksum chosen in
libjte_set_checksum_algorithm() and is passed
back by that function.
@return 0= use libjte_write_unmatched(),
1= use libjte_write_match_record()
-1= would have called exit(1) if enabled
*/
int libjte_decide_file_jigdo2(struct libjte_env *jte_handle,
char *filename, off_t size, char **mirror_name,
unsigned char *checksum);
/** Register a list entry in the jigdo file and write a reference tag into /** Register a list entry in the jigdo file and write a reference tag into
the template file. This is to be called if libjte_decide_file_jigdo() the template file. This is to be called if libjte_decide_file_jigdo()
returned 1. returned 1.
\deprecated since 2.0.0, use libjte_write_match_record2() in preference.
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be used. @param jte_handle The environment to be used.
@param filename The address to be used with fopen(filename, "r"). @param filename The address to be used with fopen(filename, "r").
@param mirror_name The mirror_name returned by libjte_decide_file_jigdo(). @param mirror_name The mirror_name returned by libjte_decide_file_jigdo().
@param sector_size An eventual byte address alignment which is achieved @param sector_size An eventual byte address alignment which is achieved
in the payload image by padding file ends with zeros. in the payload image by padding file ends with zeros.
Submit 1 if no alignment is done. For ISO images: 2048. Submit 1 if no alignment is done. For ISO images: 2048.
@param size The number of bytes in the data file. @param size The number of bytes in the data file.
@param md5 The md5 buffer submitted to libjte_decide_file_jigdo(). @param md5 The md5 buffer submitted to libjte_decide_file_jigdo().
@return >0 = ok @return >0 = ok
0 = error 0 = error
-1 = would have called exit(1) if enabled -1 = would have called exit(1) if enabled, e.g. if called
after saying "sha256" in
libjte_set_checksum_algorithm().
*/ */
int libjte_write_match_record(struct libjte_env *jte_handle, int libjte_write_match_record(struct libjte_env *jte_handle,
char *filename, char *mirror_name, int sector_size, char *filename, char *mirror_name, int sector_size,
off_t size, unsigned char md5[16]); off_t size, unsigned char md5[16]);
/** Register a list entry in the jigdo file and write a reference tag into
the template file. This is to be called if libjte_decide_file_jigdo()
returned 1.
@since 2.0.0
@param jte_handle The environment to be used.
@param filename The address to be used with fopen(filename, "r").
@param mirror_name The mirror_name returned by libjte_decide_file_jigdo().
@param sector_size An eventual byte address alignment which is achieved
in the payload image by padding file ends with zeros.
Submit 1 if no alignment is done. For ISO images: 2048.
@param size The number of bytes in the data file.
@param checksum The checksum buffer submitted to libjte_decide_file_jigdo
2().
@return >0 = ok
0 = error
-1 = would have called exit(1) if enabled
*/
int libjte_write_match_record2(struct libjte_env *jte_handle,
char *filename, char *mirror_name, int sector_size
,
off_t size, unsigned char *checksum);
/** Write a payload data chunk into the template file. This is to be called /** Write a payload data chunk into the template file. This is to be called
with any data file bytes if libjte_decide_file_jigdo() returned 0. with any data file bytes if libjte_decide_file_jigdo{,2}() returned 0.
It is also to be called with any payload image bytes which are not content It is also to be called with any payload image bytes which are not content
of a data file. of a data file.
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be used. @param jte_handle The environment to be used.
@param buffer The memory buffer containing the payload bytes @param buffer The memory buffer containing the payload bytes
@param size The block size within buffer. (1 is well ok.) @param size The block size within buffer. (1 is well ok.)
@param count The number of blocks of the given size within buffer. @param count The number of blocks of the given size within buffer.
@return >0 means success, <=0 indicates failure @return >0 means success, <=0 indicates failure
*/ */
/* @return >0 = ok /* @return >0 = ok
0 = error 0 = error
-1 = would have called exit(1) if enabled -1 = would have called exit(1) if enabled
*/ */
int libjte_write_unmatched(struct libjte_env *jte_handle, void *buffer, int libjte_write_unmatched(struct libjte_env *jte_handle, void *buffer,
int size, int count); int size, int count);
/** Before calling libjte_footer() submit the number of written payload bytes. /** Before calling libjte_footer() submit the number of written payload bytes.
The Traditional Data File API does not keep track of this count. The Traditional Data File API does not keep track of this count.
@since 0.1.0 @since 0.1.0
@param jte_handle The environment to be used. @param jte_handle The environment to be used.
@param image_size Number of bytes in the image. @param image_size Number of bytes in the image.
@return >0 means success, <=0 indicates failure @return >0 means success, <=0 indicates failure
*/ */
int libjte_set_image_size(struct libjte_env *o, off_t image_size); int libjte_set_image_size(struct libjte_env *o, off_t image_size);
 End of changes. 15 change blocks. 
8 lines changed or deleted 118 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)