1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
3
* Copyright (C) 2009-2010 Richard Hughes <richard@hughsie.com>
5
* Licensed under the GNU General Public License Version 2
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24
* @short_description: Obtains the version for the installed UPower
26
* These compile time macros allow the user to enable parts of client code
27
* depending on the version of libupower-glib installed.
29
* See also: #UpClient, #UpDevice
32
#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
33
#error "Only <upower.h> can be included directly."
36
#ifndef __UP_VERSION_H
37
#define __UP_VERSION_H
42
* The compile-time major version
44
#define UP_MAJOR_VERSION (0)
49
* The compile-time minor version
51
#define UP_MINOR_VERSION (9)
56
* The compile-time micro version
58
#define UP_MICRO_VERSION (1)
60
/* check whether a UPower version equal to or greater than
63
#define UP_CHECK_VERSION(major,minor,micro) \
64
(UP_MAJOR_VERSION > (major) || \
65
(UP_MAJOR_VERSION == (major) && UP_MINOR_VERSION > (minor)) || \
66
(UP_MAJOR_VERSION == (major) && UP_MINOR_VERSION == (minor) && \
67
UP_MICRO_VERSION >= (micro)))
69
#endif /* __UP_VERSION_H */