Version Information

Version Information — variables and functions to check the GPlugin version

Functions

Types and Values

Description

GPlugin provides version information, primarily useful in configure checks for builds that have a configure script. Applications will not typically use the features described here.

Functions

GPLUGIN_VERSION_CHECK()

#define             GPLUGIN_VERSION_CHECK(major,minor,micro)

Checks the version of the GPlugin library that is being compiled against. See gplugin_version_compare() for a runtime check.

Parameters

major

the major version to compare for

 

minor

the minor version to compare for

 

micro

the micro version to compare for

 

Returns

TRUE if the version of the GPlugin header files is the same as or newer than the passed-in version.


GPluginVersionCompareFunc ()

gint
(*GPluginVersionCompareFunc) (const gchar *v1,
                              const gchar *v2,
                              GError **error);

GPluginVersionCompareFunc is used to compare two versions of a plugin. It should return -1 if v1 is greater than v2 , 0 if v1 is equal to v2 , and 1 if v1 is less than v2 .

Parameters

v1

The first version to compare

 

v2

The second version to compare

 

error

A GError return address if there are any errors.

 

Returns

-1 if v1 is greater than v2 , 0 if v1 is equal to v1 , and 1 if v1 is less than v2 .


gplugin_version_compare ()

gint
gplugin_version_compare (const gchar *v1,
                         const gchar *v2,
                         GError **error);

The default GPluginVersionCompareFunc. It handles the typical MAJOR.MINOR.MICRO format and ignore any characters after the micro version.

Parameters

v1

The first version to compare

 

v2

The second version to compare

 

error

A GError return address if there are any errors.

 

Returns

-1 if v1 is greater than v2 , 0 if v1 is equal to v1 , and 1 if v1 is less than v2 .

Types and Values

GPLUGIN_MAJOR_VERSION

#define GPLUGIN_MAJOR_VERSION (0)

This is the major version number of GPlugin that was compiled against.


GPLUGIN_MINOR_VERSION

#define GPLUGIN_MINOR_VERSION (28)

This is the minor version number of GPlugin that was compiled against.


GPLUGIN_MICRO_VERSION

#define GPLUGIN_MICRO_VERSION (0)

This is the micro version number of GPlugin that was compiled against.


GPLUGIN_EXTRA_VERSION

#define GPLUGIN_EXTRA_VERSION ""

This is the extra version string of GPlugin that was compiled against.


GPLUGIN_VERSION

#define GPLUGIN_VERSION       "0.28.0"

This is the string version number of GPlugin that was compiled against.