summaryrefslogtreecommitdiff
path: root/libnm-core/nm-version.h
blob: be402760b2324f528b6c1483c046198424c49b71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
// SPDX-License-Identifier: LGPL-2.1+
/*
 * Copyright 2011, 2015 Red Hat, Inc.
 */

#ifndef NM_VERSION_H
#define NM_VERSION_H

#include <glib.h>

#include "nm-version-macros.h"

/* Deprecation / Availability macros */

#if !defined (NM_VERSION_MIN_REQUIRED) || (NM_VERSION_MIN_REQUIRED == 0)
# undef NM_VERSION_MIN_REQUIRED
# define NM_VERSION_MIN_REQUIRED (NM_API_VERSION)
#endif

#if !defined (NM_VERSION_MAX_ALLOWED) || (NM_VERSION_MAX_ALLOWED == 0)
# undef NM_VERSION_MAX_ALLOWED
# define NM_VERSION_MAX_ALLOWED (NM_API_VERSION)
#endif

/* sanity checks */
#if NM_VERSION_MIN_REQUIRED > NM_API_VERSION
#error "NM_VERSION_MIN_REQUIRED must be <= NM_API_VERSION"
#endif
#if NM_VERSION_MAX_ALLOWED < NM_VERSION_MIN_REQUIRED
#error "NM_VERSION_MAX_ALLOWED must be >= NM_VERSION_MIN_REQUIRED"
#endif
#if NM_VERSION_MIN_REQUIRED < NM_VERSION_0_9_8
#error "NM_VERSION_MIN_REQUIRED must be >= NM_VERSION_0_9_8"
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_0_9_10
# define NM_DEPRECATED_IN_0_9_10        G_DEPRECATED
# define NM_DEPRECATED_IN_0_9_10_FOR(f) G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_0_9_10
# define NM_DEPRECATED_IN_0_9_10_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_0_9_10
# define NM_AVAILABLE_IN_0_9_10         G_UNAVAILABLE(0.9,10)
#else
# define NM_AVAILABLE_IN_0_9_10
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_0
# define NM_DEPRECATED_IN_1_0           G_DEPRECATED
# define NM_DEPRECATED_IN_1_0_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_0
# define NM_DEPRECATED_IN_1_0_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_0
# define NM_AVAILABLE_IN_1_0            G_UNAVAILABLE(1,0)
#else
# define NM_AVAILABLE_IN_1_0
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_2
# define NM_DEPRECATED_IN_1_2           G_DEPRECATED
# define NM_DEPRECATED_IN_1_2_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_2
# define NM_DEPRECATED_IN_1_2_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_2
# define NM_AVAILABLE_IN_1_2            G_UNAVAILABLE(1,2)
#else
# define NM_AVAILABLE_IN_1_2
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_4
# define NM_DEPRECATED_IN_1_4           G_DEPRECATED
# define NM_DEPRECATED_IN_1_4_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_4
# define NM_DEPRECATED_IN_1_4_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_4
# define NM_AVAILABLE_IN_1_4            G_UNAVAILABLE(1,4)
#else
# define NM_AVAILABLE_IN_1_4
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_6
# define NM_DEPRECATED_IN_1_6           G_DEPRECATED
# define NM_DEPRECATED_IN_1_6_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_6
# define NM_DEPRECATED_IN_1_6_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_6
# define NM_AVAILABLE_IN_1_6            G_UNAVAILABLE(1,6)
#else
# define NM_AVAILABLE_IN_1_6
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_8
# define NM_DEPRECATED_IN_1_8           G_DEPRECATED
# define NM_DEPRECATED_IN_1_8_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_8
# define NM_DEPRECATED_IN_1_8_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_8
# define NM_AVAILABLE_IN_1_8            G_UNAVAILABLE(1,8)
#else
# define NM_AVAILABLE_IN_1_8
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_10
# define NM_DEPRECATED_IN_1_10           G_DEPRECATED
# define NM_DEPRECATED_IN_1_10_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_10
# define NM_DEPRECATED_IN_1_10_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_10
# define NM_AVAILABLE_IN_1_10            G_UNAVAILABLE(1,10)
#else
# define NM_AVAILABLE_IN_1_10
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_12
# define NM_DEPRECATED_IN_1_12           G_DEPRECATED
# define NM_DEPRECATED_IN_1_12_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_12
# define NM_DEPRECATED_IN_1_12_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_12
# define NM_AVAILABLE_IN_1_12            G_UNAVAILABLE(1,12)
#else
# define NM_AVAILABLE_IN_1_12
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_14
# define NM_DEPRECATED_IN_1_14           G_DEPRECATED
# define NM_DEPRECATED_IN_1_14_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_14
# define NM_DEPRECATED_IN_1_14_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_14
# define NM_AVAILABLE_IN_1_14            G_UNAVAILABLE(1,14)
#else
# define NM_AVAILABLE_IN_1_14
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_16
# define NM_DEPRECATED_IN_1_16           G_DEPRECATED
# define NM_DEPRECATED_IN_1_16_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_16
# define NM_DEPRECATED_IN_1_16_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_16
# define NM_AVAILABLE_IN_1_16            G_UNAVAILABLE(1,16)
#else
# define NM_AVAILABLE_IN_1_16
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_18
# define NM_DEPRECATED_IN_1_18           G_DEPRECATED
# define NM_DEPRECATED_IN_1_18_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_18
# define NM_DEPRECATED_IN_1_18_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_18
# define NM_AVAILABLE_IN_1_18            G_UNAVAILABLE(1,18)
#else
# define NM_AVAILABLE_IN_1_18
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_20
# define NM_DEPRECATED_IN_1_20           G_DEPRECATED
# define NM_DEPRECATED_IN_1_20_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_20
# define NM_DEPRECATED_IN_1_20_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_20
# define NM_AVAILABLE_IN_1_20            G_UNAVAILABLE(1,20)
#else
# define NM_AVAILABLE_IN_1_20
#endif

#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_22
# define NM_DEPRECATED_IN_1_22           G_DEPRECATED
# define NM_DEPRECATED_IN_1_22_FOR(f)    G_DEPRECATED_FOR(f)
#else
# define NM_DEPRECATED_IN_1_22
# define NM_DEPRECATED_IN_1_22_FOR(f)
#endif

#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_22
# define NM_AVAILABLE_IN_1_22            G_UNAVAILABLE(1,22)
#else
# define NM_AVAILABLE_IN_1_22
#endif

#endif  /* NM_VERSION_H */