1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
2 | /* |
3 | * soup-version.h: Version information |
4 | * |
5 | * Copyright (C) 2012 Igalia S.L. |
6 | */ |
7 | |
8 | #ifndef __SOUP_VERSION_H__ |
9 | #define __SOUP_VERSION_H__ |
10 | |
11 | #include <glib.h> |
12 | |
13 | G_BEGIN_DECLS |
14 | |
15 | #define SOUP_MAJOR_VERSION (2) |
16 | #define SOUP_MINOR_VERSION (64) |
17 | #define SOUP_MICRO_VERSION (2) |
18 | |
19 | #define SOUP_CHECK_VERSION(major, minor, micro) \ |
20 | (SOUP_MAJOR_VERSION > (major) || \ |
21 | (SOUP_MAJOR_VERSION == (major) && SOUP_MINOR_VERSION > (minor)) || \ |
22 | (SOUP_MAJOR_VERSION == (major) && SOUP_MINOR_VERSION == (minor) && \ |
23 | SOUP_MICRO_VERSION >= (micro))) |
24 | |
25 | #ifndef _SOUP_EXTERN |
26 | #define _SOUP_EXTERN extern |
27 | #endif |
28 | |
29 | /* We prefix variable declarations so they can |
30 | * properly get exported in Windows DLLs. |
31 | */ |
32 | #ifndef SOUP_VAR |
33 | # ifdef G_PLATFORM_WIN32 |
34 | # ifdef LIBSOUP_COMPILATION |
35 | # ifdef DLL_EXPORT |
36 | # define SOUP_VAR __declspec(dllexport) |
37 | # else /* !DLL_EXPORT */ |
38 | # define SOUP_VAR extern |
39 | # endif /* !DLL_EXPORT */ |
40 | # else /* !SOUP_COMPILATION */ |
41 | # define SOUP_VAR extern __declspec(dllimport) |
42 | # endif /* !LIBSOUP_COMPILATION */ |
43 | # else /* !G_PLATFORM_WIN32 */ |
44 | # define SOUP_VAR _SOUP_EXTERN |
45 | # endif /* !G_PLATFORM_WIN32 */ |
46 | #endif /* SOUP_VAR */ |
47 | |
48 | /* Deprecation / Availability macros */ |
49 | |
50 | #define SOUP_VERSION_2_24 (G_ENCODE_VERSION (2, 24)) |
51 | #define SOUP_VERSION_2_26 (G_ENCODE_VERSION (2, 26)) |
52 | #define SOUP_VERSION_2_28 (G_ENCODE_VERSION (2, 28)) |
53 | #define SOUP_VERSION_2_30 (G_ENCODE_VERSION (2, 30)) |
54 | #define SOUP_VERSION_2_32 (G_ENCODE_VERSION (2, 32)) |
55 | #define SOUP_VERSION_2_34 (G_ENCODE_VERSION (2, 34)) |
56 | #define SOUP_VERSION_2_36 (G_ENCODE_VERSION (2, 36)) |
57 | #define SOUP_VERSION_2_38 (G_ENCODE_VERSION (2, 38)) |
58 | #define SOUP_VERSION_2_40 (G_ENCODE_VERSION (2, 40)) |
59 | #define SOUP_VERSION_2_42 (G_ENCODE_VERSION (2, 42)) |
60 | #define SOUP_VERSION_2_44 (G_ENCODE_VERSION (2, 44)) |
61 | #define SOUP_VERSION_2_46 (G_ENCODE_VERSION (2, 46)) |
62 | #define SOUP_VERSION_2_48 (G_ENCODE_VERSION (2, 48)) |
63 | #define SOUP_VERSION_2_50 (G_ENCODE_VERSION (2, 50)) |
64 | #define SOUP_VERSION_2_52 (G_ENCODE_VERSION (2, 52)) |
65 | #define SOUP_VERSION_2_54 (G_ENCODE_VERSION (2, 54)) |
66 | #define SOUP_VERSION_2_56 (G_ENCODE_VERSION (2, 56)) |
67 | #define SOUP_VERSION_2_58 (G_ENCODE_VERSION (2, 58)) |
68 | #define SOUP_VERSION_2_62 (G_ENCODE_VERSION (2, 62)) |
69 | |
70 | /* evaluates to the current stable version; for development cycles, |
71 | * this means the next stable target |
72 | */ |
73 | #if (SOUP_MINOR_VERSION % 2) |
74 | #define SOUP_VERSION_CUR_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION + 1)) |
75 | #else |
76 | #define SOUP_VERSION_CUR_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION)) |
77 | #endif |
78 | |
79 | /* evaluates to the previous stable version */ |
80 | #if (SOUP_MINOR_VERSION % 2) |
81 | #define SOUP_VERSION_PREV_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 1)) |
82 | #else |
83 | #define SOUP_VERSION_PREV_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 2)) |
84 | #endif |
85 | |
86 | #ifndef SOUP_VERSION_MIN_REQUIRED |
87 | # define SOUP_VERSION_MIN_REQUIRED (SOUP_VERSION_CUR_STABLE) |
88 | #elif SOUP_VERSION_MIN_REQUIRED == 0 |
89 | # undef SOUP_VERSION_MIN_REQUIRED |
90 | # define SOUP_VERSION_MIN_REQUIRED (SOUP_VERSION_CUR_STABLE + 2) |
91 | #endif |
92 | |
93 | #if !defined (SOUP_VERSION_MAX_ALLOWED) || (SOUP_VERSION_MAX_ALLOWED == 0) |
94 | # undef SOUP_VERSION_MAX_ALLOWED |
95 | # define SOUP_VERSION_MAX_ALLOWED (SOUP_VERSION_CUR_STABLE) |
96 | #endif |
97 | |
98 | /* sanity checks */ |
99 | #if SOUP_VERSION_MIN_REQUIRED > SOUP_VERSION_CUR_STABLE |
100 | #error "SOUP_VERSION_MIN_REQUIRED must be <= SOUP_VERSION_CUR_STABLE" |
101 | #endif |
102 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_MIN_REQUIRED |
103 | #error "SOUP_VERSION_MAX_ALLOWED must be >= SOUP_VERSION_MIN_REQUIRED" |
104 | #endif |
105 | #if SOUP_VERSION_MIN_REQUIRED < SOUP_VERSION_2_24 |
106 | #error "SOUP_VERSION_MIN_REQUIRED must be >= SOUP_VERSION_2_24" |
107 | #endif |
108 | |
109 | #define SOUP_AVAILABLE_IN_2_4 _SOUP_EXTERN |
110 | |
111 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_24 |
112 | # define SOUP_DEPRECATED_IN_2_24 G_DEPRECATED |
113 | # define SOUP_DEPRECATED_IN_2_24_FOR(f) G_DEPRECATED_FOR(f) |
114 | #else |
115 | # define SOUP_DEPRECATED_IN_2_24 |
116 | # define SOUP_DEPRECATED_IN_2_24_FOR(f) |
117 | #endif |
118 | |
119 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_24 |
120 | # define SOUP_AVAILABLE_IN_2_24 G_UNAVAILABLE(2, 24) _SOUP_EXTERN |
121 | #else |
122 | # define SOUP_AVAILABLE_IN_2_24 _SOUP_EXTERN |
123 | #endif |
124 | |
125 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_26 |
126 | # define SOUP_DEPRECATED_IN_2_26 G_DEPRECATED |
127 | # define SOUP_DEPRECATED_IN_2_26_FOR(f) G_DEPRECATED_FOR(f) |
128 | #else |
129 | # define SOUP_DEPRECATED_IN_2_26 |
130 | # define SOUP_DEPRECATED_IN_2_26_FOR(f) |
131 | #endif |
132 | |
133 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_26 |
134 | # define SOUP_AVAILABLE_IN_2_26 G_UNAVAILABLE(2, 26) _SOUP_EXTERN |
135 | #else |
136 | # define SOUP_AVAILABLE_IN_2_26 _SOUP_EXTERN |
137 | #endif |
138 | |
139 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_28 |
140 | # define SOUP_DEPRECATED_IN_2_28 G_DEPRECATED |
141 | # define SOUP_DEPRECATED_IN_2_28_FOR(f) G_DEPRECATED_FOR(f) |
142 | #else |
143 | # define SOUP_DEPRECATED_IN_2_28 |
144 | # define SOUP_DEPRECATED_IN_2_28_FOR(f) |
145 | #endif |
146 | |
147 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_28 |
148 | # define SOUP_AVAILABLE_IN_2_28 G_UNAVAILABLE(2, 28) _SOUP_EXTERN |
149 | #else |
150 | # define SOUP_AVAILABLE_IN_2_28 _SOUP_EXTERN |
151 | #endif |
152 | |
153 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_30 |
154 | # define SOUP_DEPRECATED_IN_2_30 G_DEPRECATED |
155 | # define SOUP_DEPRECATED_IN_2_30_FOR(f) G_DEPRECATED_FOR(f) |
156 | #else |
157 | # define SOUP_DEPRECATED_IN_2_30 |
158 | # define SOUP_DEPRECATED_IN_2_30_FOR(f) |
159 | #endif |
160 | |
161 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_30 |
162 | # define SOUP_AVAILABLE_IN_2_30 G_UNAVAILABLE(2, 30) _SOUP_EXTERN |
163 | #else |
164 | # define SOUP_AVAILABLE_IN_2_30 _SOUP_EXTERN |
165 | #endif |
166 | |
167 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_32 |
168 | # define SOUP_DEPRECATED_IN_2_32 G_DEPRECATED |
169 | # define SOUP_DEPRECATED_IN_2_32_FOR(f) G_DEPRECATED_FOR(f) |
170 | #else |
171 | # define SOUP_DEPRECATED_IN_2_32 |
172 | # define SOUP_DEPRECATED_IN_2_32_FOR(f) |
173 | #endif |
174 | |
175 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_32 |
176 | # define SOUP_AVAILABLE_IN_2_32 G_UNAVAILABLE(2, 32) _SOUP_EXTERN |
177 | #else |
178 | # define SOUP_AVAILABLE_IN_2_32 _SOUP_EXTERN |
179 | #endif |
180 | |
181 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_34 |
182 | # define SOUP_DEPRECATED_IN_2_34 G_DEPRECATED |
183 | # define SOUP_DEPRECATED_IN_2_34_FOR(f) G_DEPRECATED_FOR(f) |
184 | #else |
185 | # define SOUP_DEPRECATED_IN_2_34 |
186 | # define SOUP_DEPRECATED_IN_2_34_FOR(f) |
187 | #endif |
188 | |
189 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_34 |
190 | # define SOUP_AVAILABLE_IN_2_34 G_UNAVAILABLE(2, 34) _SOUP_EXTERN |
191 | #else |
192 | # define SOUP_AVAILABLE_IN_2_34 _SOUP_EXTERN |
193 | #endif |
194 | |
195 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_36 |
196 | # define SOUP_DEPRECATED_IN_2_36 G_DEPRECATED |
197 | # define SOUP_DEPRECATED_IN_2_36_FOR(f) G_DEPRECATED_FOR(f) |
198 | #else |
199 | # define SOUP_DEPRECATED_IN_2_36 |
200 | # define SOUP_DEPRECATED_IN_2_36_FOR(f) |
201 | #endif |
202 | |
203 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_36 |
204 | # define SOUP_AVAILABLE_IN_2_36 G_UNAVAILABLE(2, 36) _SOUP_EXTERN |
205 | #else |
206 | # define SOUP_AVAILABLE_IN_2_36 _SOUP_EXTERN |
207 | #endif |
208 | |
209 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_38 |
210 | # define SOUP_DEPRECATED_IN_2_38 G_DEPRECATED |
211 | # define SOUP_DEPRECATED_IN_2_38_FOR(f) G_DEPRECATED_FOR(f) |
212 | #else |
213 | # define SOUP_DEPRECATED_IN_2_38 |
214 | # define SOUP_DEPRECATED_IN_2_38_FOR(f) |
215 | #endif |
216 | |
217 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_38 |
218 | # define SOUP_AVAILABLE_IN_2_38 G_UNAVAILABLE(2, 38) _SOUP_EXTERN |
219 | #else |
220 | # define SOUP_AVAILABLE_IN_2_38 _SOUP_EXTERN |
221 | #endif |
222 | |
223 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_40 |
224 | # define SOUP_DEPRECATED_IN_2_40 G_DEPRECATED |
225 | # define SOUP_DEPRECATED_IN_2_40_FOR(f) G_DEPRECATED_FOR(f) |
226 | #else |
227 | # define SOUP_DEPRECATED_IN_2_40 |
228 | # define SOUP_DEPRECATED_IN_2_40_FOR(f) |
229 | #endif |
230 | |
231 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_40 |
232 | # define SOUP_AVAILABLE_IN_2_40 G_UNAVAILABLE(2, 40) _SOUP_EXTERN |
233 | #else |
234 | # define SOUP_AVAILABLE_IN_2_40 _SOUP_EXTERN |
235 | #endif |
236 | |
237 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_42 |
238 | # define SOUP_DEPRECATED_IN_2_42 G_DEPRECATED |
239 | # define SOUP_DEPRECATED_IN_2_42_FOR(f) G_DEPRECATED_FOR(f) |
240 | #else |
241 | # define SOUP_DEPRECATED_IN_2_42 |
242 | # define SOUP_DEPRECATED_IN_2_42_FOR(f) |
243 | #endif |
244 | |
245 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_42 |
246 | # define SOUP_AVAILABLE_IN_2_42 G_UNAVAILABLE(2, 42) _SOUP_EXTERN |
247 | #else |
248 | # define SOUP_AVAILABLE_IN_2_42 _SOUP_EXTERN |
249 | #endif |
250 | |
251 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_44 |
252 | # define SOUP_DEPRECATED_IN_2_44 G_DEPRECATED |
253 | # define SOUP_DEPRECATED_IN_2_44_FOR(f) G_DEPRECATED_FOR(f) |
254 | #else |
255 | # define SOUP_DEPRECATED_IN_2_44 |
256 | # define SOUP_DEPRECATED_IN_2_44_FOR(f) |
257 | #endif |
258 | |
259 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_44 |
260 | # define SOUP_AVAILABLE_IN_2_44 G_UNAVAILABLE(2, 44) _SOUP_EXTERN |
261 | #else |
262 | # define SOUP_AVAILABLE_IN_2_44 _SOUP_EXTERN |
263 | #endif |
264 | |
265 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_46 |
266 | # define SOUP_DEPRECATED_IN_2_46 G_DEPRECATED |
267 | # define SOUP_DEPRECATED_IN_2_46_FOR(f) G_DEPRECATED_FOR(f) |
268 | #else |
269 | # define SOUP_DEPRECATED_IN_2_46 |
270 | # define SOUP_DEPRECATED_IN_2_46_FOR(f) |
271 | #endif |
272 | |
273 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_46 |
274 | # define SOUP_AVAILABLE_IN_2_46 G_UNAVAILABLE(2, 46) _SOUP_EXTERN |
275 | #else |
276 | # define SOUP_AVAILABLE_IN_2_46 _SOUP_EXTERN |
277 | #endif |
278 | |
279 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_48 |
280 | # define SOUP_DEPRECATED_IN_2_48 G_DEPRECATED |
281 | # define SOUP_DEPRECATED_IN_2_48_FOR(f) G_DEPRECATED_FOR(f) |
282 | #else |
283 | # define SOUP_DEPRECATED_IN_2_48 |
284 | # define SOUP_DEPRECATED_IN_2_48_FOR(f) |
285 | #endif |
286 | |
287 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_48 |
288 | # define SOUP_AVAILABLE_IN_2_48 G_UNAVAILABLE(2, 48) _SOUP_EXTERN |
289 | #else |
290 | # define SOUP_AVAILABLE_IN_2_48 _SOUP_EXTERN |
291 | #endif |
292 | |
293 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_50 |
294 | # define SOUP_DEPRECATED_IN_2_50 G_DEPRECATED |
295 | # define SOUP_DEPRECATED_IN_2_50_FOR(f) G_DEPRECATED_FOR(f) |
296 | #else |
297 | # define SOUP_DEPRECATED_IN_2_50 |
298 | # define SOUP_DEPRECATED_IN_2_50_FOR(f) |
299 | #endif |
300 | |
301 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_50 |
302 | # define SOUP_AVAILABLE_IN_2_50 G_UNAVAILABLE(2, 50) _SOUP_EXTERN |
303 | #else |
304 | # define SOUP_AVAILABLE_IN_2_50 _SOUP_EXTERN |
305 | #endif |
306 | |
307 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_52 |
308 | # define SOUP_DEPRECATED_IN_2_52 G_DEPRECATED |
309 | # define SOUP_DEPRECATED_IN_2_52_FOR(f) G_DEPRECATED_FOR(f) |
310 | #else |
311 | # define SOUP_DEPRECATED_IN_2_52 |
312 | # define SOUP_DEPRECATED_IN_2_52_FOR(f) |
313 | #endif |
314 | |
315 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_52 |
316 | # define SOUP_AVAILABLE_IN_2_52 G_UNAVAILABLE(2, 52) _SOUP_EXTERN |
317 | #else |
318 | # define SOUP_AVAILABLE_IN_2_52 _SOUP_EXTERN |
319 | #endif |
320 | |
321 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_54 |
322 | # define SOUP_DEPRECATED_IN_2_54 G_DEPRECATED |
323 | # define SOUP_DEPRECATED_IN_2_54_FOR(f) G_DEPRECATED_FOR(f) |
324 | #else |
325 | # define SOUP_DEPRECATED_IN_2_54 |
326 | # define SOUP_DEPRECATED_IN_2_54_FOR(f) |
327 | #endif |
328 | |
329 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_54 |
330 | # define SOUP_AVAILABLE_IN_2_54 G_UNAVAILABLE(2, 54) _SOUP_EXTERN |
331 | #else |
332 | # define SOUP_AVAILABLE_IN_2_54 _SOUP_EXTERN |
333 | #endif |
334 | |
335 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_56 |
336 | # define SOUP_DEPRECATED_IN_2_56 G_DEPRECATED |
337 | # define SOUP_DEPRECATED_IN_2_56_FOR(f) G_DEPRECATED_FOR(f) |
338 | #else |
339 | # define SOUP_DEPRECATED_IN_2_56 |
340 | # define SOUP_DEPRECATED_IN_2_56_FOR(f) |
341 | #endif |
342 | |
343 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_56 |
344 | # define SOUP_AVAILABLE_IN_2_56 G_UNAVAILABLE(2, 56) _SOUP_EXTERN |
345 | #else |
346 | # define SOUP_AVAILABLE_IN_2_56 _SOUP_EXTERN |
347 | #endif |
348 | |
349 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_58 |
350 | # define SOUP_DEPRECATED_IN_2_58 G_DEPRECATED |
351 | # define SOUP_DEPRECATED_IN_2_58_FOR(f) G_DEPRECATED_FOR(f) |
352 | #else |
353 | # define SOUP_DEPRECATED_IN_2_58 |
354 | # define SOUP_DEPRECATED_IN_2_58_FOR(f) |
355 | #endif |
356 | |
357 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_58 |
358 | # define SOUP_AVAILABLE_IN_2_58 G_UNAVAILABLE(2, 58) _SOUP_EXTERN |
359 | #else |
360 | # define SOUP_AVAILABLE_IN_2_58 _SOUP_EXTERN |
361 | #endif |
362 | |
363 | #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_62 |
364 | # define SOUP_DEPRECATED_IN_2_62 G_DEPRECATED |
365 | # define SOUP_DEPRECATED_IN_2_62_FOR(f) G_DEPRECATED_FOR(f) |
366 | #else |
367 | # define SOUP_DEPRECATED_IN_2_62 |
368 | # define SOUP_DEPRECATED_IN_2_62_FOR(f) |
369 | #endif |
370 | |
371 | #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_62 |
372 | # define SOUP_AVAILABLE_IN_2_62 G_UNAVAILABLE(2, 62) _SOUP_EXTERN |
373 | #else |
374 | # define SOUP_AVAILABLE_IN_2_62 _SOUP_EXTERN |
375 | #endif |
376 | |
377 | SOUP_AVAILABLE_IN_2_42 |
378 | guint soup_get_major_version (void); |
379 | |
380 | SOUP_AVAILABLE_IN_2_42 |
381 | guint soup_get_minor_version (void); |
382 | |
383 | SOUP_AVAILABLE_IN_2_42 |
384 | guint soup_get_micro_version (void); |
385 | |
386 | SOUP_AVAILABLE_IN_2_42 |
387 | gboolean soup_check_version (guint major, |
388 | guint minor, |
389 | guint micro); |
390 | |
391 | G_END_DECLS |
392 | |
393 | #endif /* __SOUP_VERSION_H__ */ |
394 | |