~noskcaj/ubuntu/trusty/tumbler/0.1.30

« back to all changes in this revision

Viewing changes to tumbler/tumbler-config.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2010-11-07 16:34:58 UTC
  • Revision ID: james.westby@ubuntu.com-20101107163458-skwfq34vnuavipne
Tags: upstream-0.1.4
ImportĀ upstreamĀ versionĀ 0.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* vi:set et ai sw=2 sts=2 ts=2: */
 
2
/*-
 
3
 * Copyright (c) 2009 Jannis Pohlmann <jannis@xfce.org>
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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.
 
19
 */
 
20
 
 
21
#ifdef HAVE_CONFIG_H
 
22
#include <config.h>
 
23
#endif
 
24
 
 
25
#include <tumbler/tumbler-config.h>
 
26
 
 
27
 
 
28
 
 
29
/**
 
30
 * SECTION:tumbler-config
 
31
 * @title: Version Information and Compatibility Checks
 
32
 * @include: tumbler/tumbler.h
 
33
 */
 
34
 
 
35
 
 
36
 
 
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;
 
40
 
 
41
 
 
42
 
 
43
/**
 
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.
 
48
 *
 
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
 
55
 * compiled against.
 
56
 *
 
57
 * <example>
 
58
 * <title>Checking the runtime version of the tumbler library</title>
 
59
 * <programlisting>
 
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);
 
66
 * </programlisting>
 
67
 * </example>
 
68
 *
 
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.
 
73
 **/
 
74
const gchar *
 
75
tumbler_check_version (guint required_major,
 
76
                       guint required_minor,
 
77
                       guint required_micro)
 
78
{
 
79
  return NULL;
 
80
}