Version Information

Version Information

Synopsis

extern const guint  tracker_major_version;
extern const guint  tracker_minor_version;
extern const guint  tracker_micro_version;
extern const guint  tracker_binary_age;
extern const guint  tracker_interface_age;
const gchar *       tracker_check_version               (guint required_major,
                                                         guint required_minor,
                                                         guint required_micro);

#define             TRACKER_CHECK_VERSION               (major,
                                                         minor,
                                                         micro)

Description

Details

tracker_major_version

extern const guint tracker_major_version;


tracker_minor_version

extern const guint tracker_minor_version;


tracker_micro_version

extern const guint tracker_micro_version;


tracker_binary_age

extern const guint tracker_binary_age;


tracker_interface_age

extern const guint tracker_interface_age;


tracker_check_version ()

const gchar *       tracker_check_version               (guint required_major,
                                                         guint required_minor,
                                                         guint required_micro);

Checks that the Tracker library in use is compatible with the given version. Generally you would pass in the constants TRACKER_MAJOR_VERSION, TRACKER_MINOR_VERSION, TRACKER_MICRO_VERSION as the three arguments to this function; that produces a check that the library in use is compatible with the version of Tracker 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 required_major.required_minor.required_micro. Second the running library must be binary compatible with the version required_major.required_minor.required_micro (same major version.)

required_major :

the required major version.

required_minor :

the required minor version.

required_micro :

the required micro version.

Returns :

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

Since 0.10


TRACKER_CHECK_VERSION()

#define             TRACKER_CHECK_VERSION(major,minor,micro)

This macro essentially does the same thing as tracker_check_version() but as a pre-processor operation rather than a run-time operation. It will evaluate true or false based the version passed in and the version available.

Example 2. Simple version check example

An example of how to make sure you have the version of Tracker installed to run your code.
if (!TRACKER_CHECK_VERSION (0, 10, 7)) {
        g_error ("Tracker version 0.10.7 or above is needed");
}


major :

the required major version.

minor :

the required minor version.

micro :

the required micro version.

Since 0.10