1
/* vi:set et ai sw=2 sts=2 ts=2: */
3
* Copyright (c) 2009 Jannis Pohlmann <jannis@xfce.org>
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Library General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Library General Public License for more details.
15
* You should have received a copy of the GNU Library General
16
* Public License along with this library; if not, write to the
17
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
* Boston, MA 02110-1301, USA.
25
#include <tumbler/tumbler-config.h>
30
* SECTION:tumbler-config
31
* @title: Version Information and Compatibility Checks
32
* @include: tumbler/tumbler.h
37
const guint tumbler_major_version = TUMBLER_MAJOR_VERSION;
38
const guint tumbler_minor_version = TUMBLER_MINOR_VERSION;
39
const guint tumbler_micro_version = TUMBLER_MICRO_VERSION;
44
* tumbler_check_version:
45
* @required_major : the required major version.
46
* @required_minor : the required minor version.
47
* @required_micro : the required micro version.
49
* Checks that the <systemitem class="library">tumbler</systemitem> library
50
* in use is compatible with the given version. Generally you would pass in
51
* the constants #TUMBLER_MAJOR_VERSION, #TUMBLER_MINOR_VERSION and
52
* #TUMBLER_MICRO_VERSION as the three arguments to this function; that
53
* produces a check that the library in use is compatible with the version
54
* of <systemitem class="library">tumbler</systemitem> the application was
58
* <title>Checking the runtime version of the tumbler library</title>
60
* const gchar *mismatch;
61
* mismatch = tumbler_check_version (TUMBLER_VERSION_MAJOR,
62
* TUMBLER_VERSION_MINOR,
63
* TUMBLER_VERSION_MICRO);
64
* if (G_UNLIKELY (mismatch != NULL))
65
* g_error ("Version mismatch: %<!---->s", mismatch);
69
* Return value: %NULL if the library is compatible with the given version,
70
* or a string describing the version mismatch. The returned
71
* string is owned by the library and must not be freed or
72
* modified by the caller.
75
tumbler_check_version (guint required_major,