device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm-util / nm-version.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /*
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the
15  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  * Boston, MA 02110-1301 USA.
17  *
18  * Copyright 2011 Red Hat, Inc.
19  */
20
21 #ifndef NM_VERSION_H
22 #define NM_VERSION_H
23
24 #include <glib.h>
25
26 #include <nm-version-macros.h>
27
28 /* Deprecation / Availability macros */
29
30 #if !defined (NM_VERSION_MIN_REQUIRED) || (NM_VERSION_MIN_REQUIRED == 0)
31 # undef NM_VERSION_MIN_REQUIRED
32 # define NM_VERSION_MIN_REQUIRED (NM_VERSION_CUR_STABLE)
33 #endif
34
35 #if !defined (NM_VERSION_MAX_ALLOWED) || (NM_VERSION_MAX_ALLOWED == 0)
36 # undef NM_VERSION_MAX_ALLOWED
37 # define NM_VERSION_MAX_ALLOWED (NM_VERSION_CUR_STABLE)
38 #endif
39
40 /* sanity checks */
41 #if NM_VERSION_MIN_REQUIRED > NM_VERSION_NEXT_STABLE
42 #error "NM_VERSION_MIN_REQUIRED must be <= NM_VERSION_NEXT_STABLE"
43 #endif
44 #if NM_VERSION_MAX_ALLOWED < NM_VERSION_MIN_REQUIRED
45 #error "NM_VERSION_MAX_ALLOWED must be >= NM_VERSION_MIN_REQUIRED"
46 #endif
47 #if NM_VERSION_MIN_REQUIRED < NM_VERSION_0_9_8
48 #error "NM_VERSION_MIN_REQUIRED must be >= NM_VERSION_0_9_8"
49 #endif
50
51 #if NM_VERSION_MIN_REQUIRED >= NM_VERSION_0_9_10
52 # define NM_DEPRECATED_IN_0_9_10        G_DEPRECATED
53 # define NM_DEPRECATED_IN_0_9_10_FOR(f) G_DEPRECATED_FOR(f)
54 #else
55 # define NM_DEPRECATED_IN_0_9_10
56 # define NM_DEPRECATED_IN_0_9_10_FOR(f)
57 #endif
58
59 #if NM_VERSION_MAX_ALLOWED < NM_VERSION_0_9_10
60 # define NM_AVAILABLE_IN_0_9_10         G_UNAVAILABLE(0.9,10)
61 #else
62 # define NM_AVAILABLE_IN_0_9_10
63 #endif
64
65 #if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_0
66 # define NM_DEPRECATED_IN_1_0           G_DEPRECATED
67 # define NM_DEPRECATED_IN_1_0_FOR(f)    G_DEPRECATED_FOR(f)
68 #else
69 # define NM_DEPRECATED_IN_1_0
70 # define NM_DEPRECATED_IN_1_0_FOR(f)
71 #endif
72
73 #if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_0
74 # define NM_AVAILABLE_IN_1_0            G_UNAVAILABLE(1,0)
75 #else
76 # define NM_AVAILABLE_IN_1_0
77 #endif
78
79 #if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_2
80 # define NM_DEPRECATED_IN_1_2           G_DEPRECATED
81 # define NM_DEPRECATED_IN_1_2_FOR(f)    G_DEPRECATED_FOR(f)
82 #else
83 # define NM_DEPRECATED_IN_1_2
84 # define NM_DEPRECATED_IN_1_2_FOR(f)
85 #endif
86
87 #if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_2
88 # define NM_AVAILABLE_IN_1_2            G_UNAVAILABLE(1,2)
89 #else
90 # define NM_AVAILABLE_IN_1_2
91 #endif
92
93 #endif  /* NM_VERSION_H */