Version Information

Version Information — variables and functions to check the version of GPlugin.

Functions

Types and Values

Description

GPlugin provided version information, primarily useful when building against GPlugin. Applications will not typically use the features described here unless checking for new versions during builds.

Functions

GPLUGIN_VERSION_CHECK()

#define             GPLUGIN_VERSION_CHECK(major,minor,micro)

Checks the version of the GPlugin library that is being compiled against.

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.


gplugin_version_check ()

const gchar *
gplugin_version_check (guint major,
                       guint minor,
                       guint micro);

Checks that the GPlugin library in use is compatible with the given version. Generally you would pass in the constants GPLUGIN_MAJOR_VERSION, GPLUGIN_MINOR_VERSION, GPLUGIN_MICRO_VERSION as the three arguments to this function; that produces a check that the library in use is compatible with the version of GPlugin the application or module was compiled against.

Compatibility is defined by two things: first the version of the running library is newer than the version major .minor .micro . Second the running library must be binary compatible with the version major .minor .micro (same major version).

Parameters

major

The required major version.

 

minor

The required minor version.

 

micro

The required micro version.

 

Returns

NULL if the GPlugin library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by GPlugin and must not be modified or freed.


gplugin_version_compare ()

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

A semantic version checker which ignores any characters after the micro version.

Parameters

v1

The first version to compare.

 

v2

The second version to compare.

 

Returns

less than 0 if v1 is less than v2 , 0 if v1 is equal to v1 , and greater than 0 if v1 is greater 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 (33)

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.33.0"

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