Debian Codegraph @

lib/packagekit-glib2/pk-version.h.in

raw
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2009 Richard Hughes <[email protected]>
4 *
5 * Licensed under the GNU General Public License Version 2
6 *
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.
11 *
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.
16 *
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.
20 */
21
22 #if !defined (__PACKAGEKIT_H_INSIDE__) && !defined (PK_COMPILATION)
23 #error "Only <packagekit.h> can be included directly."
24 #endif
25
26 #ifndef __PK_VERSION_H
27 #define __PK_VERSION_H
28
29 /* compile time version
30 */
31 #define PK_MAJOR_VERSION (@PK_MAJOR_VERSION@)
32 #define PK_MINOR_VERSION (@PK_MINOR_VERSION@)
33 #define PK_MICRO_VERSION (@PK_MICRO_VERSION@)
34
35 /* check whether a PackageKit version equal to or greater than
36 * major.minor.micro.
37 */
38 #define PK_CHECK_VERSION(major,minor,micro) \
39 (PK_MAJOR_VERSION > (major) || \
40 (PK_MAJOR_VERSION == (major) && PK_MINOR_VERSION > (minor)) || \
41 (PK_MAJOR_VERSION == (major) && PK_MINOR_VERSION == (minor) && \
42 PK_MICRO_VERSION >= (micro)))
43
44 #endif /* __PK_VERSION_H */