Adapted version checking to new library situation

This commit is contained in:
2010-05-21 13:37:25 +00:00
parent d3f770827f
commit bcc6a38094
6 changed files with 219 additions and 78 deletions

View File

@ -1,12 +1,29 @@
/* Command line oriented batch and dialog tool which creates, loads,
manipulates and burns ISO 9660 filesystem images.
/* xorriso - libisoburn higher level API which creates, loads, manipulates
and burns ISO 9660 filesystem images.
Copyright 2007-2010 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
This file contains the public option interface of xorriso.
This file contains the public API of xorriso which covers all of its
operations.
An example of its usage is xorriso_main.c which checks version compatibility,
creates a xorriso object, initializes the libraries, and runs the command
interpreters of the API to constitute the command line oriented batch and
dialog tool xorriso.
Alternatively to command interpreters it is possible to run all options of
xorriso directly via the calls of the "Options API".
The "Problem Status and Message API" shall then be used to obtain the
text output of the options.
Mandatory calls are:
Xorriso_new(), Xorriso_startup_libraries(), Xorriso_destroy()
There is a lower level of API which consists of libisofs.h, libburn.h and
libisoburn.h. One should not mix those calls with the ones of xorriso.h .
*/
#ifndef Xorriso_includeD
@ -16,9 +33,6 @@
struct XorrisO;
#define Xorriso_program_versioN "0.5.7"
#define Xorriso_program_patch_leveL ""
/* This may be changed to Xorriso_GNU_xorrisO in order to create GNU xorriso
under GPLv3+ derived from above GPLv2+.
@ -29,13 +43,71 @@ struct XorrisO;
/* --------------------- Fundamental Management ------------------- */
/* Get the version text (e.g. "0.4.2") of the program code.
This may differ from Xorriso_program_versioN if xorriso is dynamically
linked to an application.
@param flag unused yet, submit 0
@return readonly character string
/** 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
at build time.
@since 0.5.8
*/
char *Xorriso__get_version_text(int flag);
#define Xorriso_header_version_majoR 0
#define Xorriso_header_version_minoR 5
#define Xorriso_header_version_micrO 7
/** Eventually something like ".pl01" to indicate a bug fix. Normally empty.
@since 0.5.8
*/
#define Xorriso_program_patch_leveL ""
/** Obtain the three release version numbers of the library. These are the
numbers encountered by the application when linking with libisoburn,
i.e. possibly not before run time.
Better do not base the fundamental compatibility decision of an application
on these numbers. For a reliable check use Xorriso__is_compatible().
@since 0.5.8
@param major The maturity version (0 for now, as we are still learning)
@param minor The development goal version.
@param micro The development step version. This has an additional meaning:
Pare numbers indicate a version with frozen API. I.e. you can
rely on the same set of features to be present in all
published releases with that major.minor.micro combination.
Features of a pare release will stay available and ABI
compatible as long as the SONAME of libisoburn stays "1".
Currently there are no plans to ever change the SONAME.
Odd numbers indicate that API upgrades are in progress.
I.e. new features might be already present or they might
be still missing. Newly introduced features may be changed
incompatibly or even be revoked before release of a pare
version.
So micro revisions {1,3,5,7,9} should never be used for
dynamic linking unless the proper library match can be
guaranteed by external circumstances.
@return 1 success, <=0 might in future become an error indication
*/
void Xorriso__version(int *major, int *minor, int *micro);
/** Check whether all features of header file xorriso.h from the given
major.minor.micro revision triple can be delivered by the library version
which is performing this call.
if (! Xorriso__is_compatible(Xorriso_header_version_majoR,
Xorriso_header_version_minoR,
Xorriso_header_version_micrO, 0))
...refuse to start the program with this dynamic library version...
@since 0.5.8
@param major obtained at build time
@param minor obtained at build time
@param micro obtained at build time
@param flag Bitfield for control purposes. Unused yet. Submit 0.
@return 1= library can work for caller
0= library is not usable in some aspects. Caller must restrict
itself to an earlier API version or must not use this libray
at all.
*/
int Xorriso__is_compatible(int major, int minor, int micro, int flag);
/* Get the patch level text (e.g. "" or ".pl01") of the program code.
@ -430,6 +502,7 @@ struct Xorriso_lsT *Xorriso_lst_get_prev(struct Xorriso_lsT *entry, int flag);
/** Destroy all list items which are directly or indirectly connected to
the given link item.
All pointers obtained by Xorriso_lst_get_text() become invalid by this.
Apply this to each of the two list handles obtained by
Xorriso_pull_outlists() when the lists are no longer needed.
@param lstring *lstring will be freed and set to NULL.