Version information

Version information — Checking the telepathy-glib version

Functions

Types and Values

Object Hierarchy


Includes

#include <telepathy-glib/telepathy-glib.h>

Description

Since 0.19.0, telepathy-glib provides version information similar to that used in GLib.

Typical usage from configure.ac is similar to GLib's:

1
2
3
4
AC_DEFINE([TP_VERSION_MIN_REQUIRED], [TP_VERSION_0_18],
  [Ignore deprecations newer than this branch])
AC_DEFINE([TP_VERSION_MAX_ALLOWED], [TP_VERSION_0_20],
  [Prevent use of APIs newer than this branch])

or you can define the macros directly on the compiler command line if required:

1
2
3
4
cc -o foo foo.c \
    -DTP_VERSION_MIN_REQUIRED=TP_VERSION_0_18 \
    -DTP_VERSION_MAX_ALLOWED=TP_VERSION_0_20 \
    ${TP_CFLAGS} ${TP_LIBS}

This functionality was added in telepathy-glib 0.19.0, but it is safe to define the TP_VERSION_MIN_REQUIRED and TP_VERSION_MAX_ALLOWED macros even for older versions of telepathy-glib, as long as you do not try to expand them.

Functions

TP_VERSION_1_0

#define TP_VERSION_1_0 (_TP_ENCODE_VERSION (1, 0))

A constant representing the telepathy-glib 1.0 stable branch, and the 0.99 development branch that led to it.


TP_VERSION_MIN_REQUIRED

# define TP_VERSION_MIN_REQUIRED (_TP_VERSION_CUR_STABLE)

A version-number constant like TP_VERSION_1_0.

This may be defined to a value like TP_VERSION_1_0 by users of telepathy-glib, to set the minimum version they wish to require. Warnings will be issued for functions deprecated in or before that version.

If not defined, the default value is the previous stable branch.


TP_VERSION_MAX_ALLOWED

# define TP_VERSION_MAX_ALLOWED (_TP_VERSION_CUR_STABLE)

A version-number constant like TP_VERSION_1_0.

This may be defined to a value like TP_VERSION_1_0 by users of telepathy-glib, to set the maximum version they wish to depend on. Warnings will be issued for functions deprecated in or before that version.

If not defined, the default value in stable branches is that stable branch, and the default value in development branches is the next stable branch.

Types and Values

TP_MAJOR_VERSION

#define TP_MAJOR_VERSION 0

The major version of telepathy-glib (e.g. the 1 in 1.2.3) at the time your code was compiled.


TP_MINOR_VERSION

#define TP_MINOR_VERSION 99

The minor version of telepathy-glib (e.g. the 2 in 1.2.3) at the time your code was compiled.

Odd minor versions indicate a development branch; even minor versions indicate a stable branch.


TP_MICRO_VERSION

#define TP_MICRO_VERSION 11

The micro version of telepathy-glib (e.g. the 3 in 1.2.3) at the time your code was compiled.

Within a stable branch (even minor version), micro versions fix bugs but do not add features.

Within a development branch (odd minor version), micro versions can fix bugs and/or add features.