bump version to 2.43.0
[platform/upstream/libsoup.git] / libsoup / soup-version.h.in
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 (@SOUP_MAJOR_VERSION@)
16 #define SOUP_MINOR_VERSION (@SOUP_MINOR_VERSION@)
17 #define SOUP_MICRO_VERSION (@SOUP_MICRO_VERSION@)
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 guint    soup_get_major_version (void);
26
27 guint    soup_get_minor_version (void);
28
29 guint    soup_get_micro_version (void);
30
31 gboolean soup_check_version     (guint major,
32                                  guint minor,
33                                  guint micro);
34
35 /* Deprecation / Availability macros */
36
37 #define SOUP_ENCODE_VERSION(major,minor) ((major) << 16 | (minor) << 8)
38
39 #define SOUP_VERSION_2_24 (SOUP_ENCODE_VERSION (2, 24))
40 #define SOUP_VERSION_2_26 (SOUP_ENCODE_VERSION (2, 26))
41 #define SOUP_VERSION_2_28 (SOUP_ENCODE_VERSION (2, 28))
42 #define SOUP_VERSION_2_30 (SOUP_ENCODE_VERSION (2, 30))
43 #define SOUP_VERSION_2_32 (SOUP_ENCODE_VERSION (2, 32))
44 #define SOUP_VERSION_2_34 (SOUP_ENCODE_VERSION (2, 34))
45 #define SOUP_VERSION_2_36 (SOUP_ENCODE_VERSION (2, 36))
46 #define SOUP_VERSION_2_38 (SOUP_ENCODE_VERSION (2, 38))
47 #define SOUP_VERSION_2_40 (SOUP_ENCODE_VERSION (2, 40))
48 #define SOUP_VERSION_2_42 (SOUP_ENCODE_VERSION (2, 42))
49
50 /* evaluates to the current stable version; for development cycles,
51  * this means the next stable target
52  */
53 #if (SOUP_MINOR_VERSION % 2)
54 #define SOUP_VERSION_CUR_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION + 1))
55 #else
56 #define SOUP_VERSION_CUR_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION))
57 #endif
58
59 /* evaluates to the previous stable version */
60 #if (SOUP_MINOR_VERSION % 2)
61 #define SOUP_VERSION_PREV_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 1))
62 #else
63 #define SOUP_VERSION_PREV_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 2))
64 #endif
65
66 #ifndef SOUP_VERSION_MIN_REQUIRED
67 # define SOUP_VERSION_MIN_REQUIRED (SOUP_VERSION_CUR_STABLE)
68 #elif SOUP_VERSION_MIN_REQUIRED == 0
69 # undef  SOUP_VERSION_MIN_REQUIRED
70 # define SOUP_VERSION_MIN_REQUIRED (SOUP_VERSION_CUR_STABLE + 2)
71 #endif
72
73 #if !defined (SOUP_VERSION_MAX_ALLOWED) || (SOUP_VERSION_MAX_ALLOWED == 0)
74 # undef SOUP_VERSION_MAX_ALLOWED
75 # define SOUP_VERSION_MAX_ALLOWED (SOUP_VERSION_CUR_STABLE)
76 #endif
77
78 /* sanity checks */
79 #if SOUP_VERSION_MIN_REQUIRED > SOUP_VERSION_CUR_STABLE
80 #error "SOUP_VERSION_MIN_REQUIRED must be <= SOUP_VERSION_CUR_STABLE"
81 #endif
82 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_MIN_REQUIRED
83 #error "SOUP_VERSION_MAX_ALLOWED must be >= SOUP_VERSION_MIN_REQUIRED"
84 #endif
85 #if SOUP_VERSION_MIN_REQUIRED < SOUP_VERSION_2_24
86 #error "SOUP_VERSION_MIN_REQUIRED must be >= SOUP_VERSION_2_24"
87 #endif
88
89 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_24
90 # define SOUP_DEPRECATED_IN_2_24                GLIB_DEPRECATED
91 # define SOUP_DEPRECATED_IN_2_24_FOR(f)         GLIB_DEPRECATED_FOR(f)
92 #else
93 # define SOUP_DEPRECATED_IN_2_24
94 # define SOUP_DEPRECATED_IN_2_24_FOR(f)
95 #endif
96
97 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_24
98 # define SOUP_AVAILABLE_IN_2_24                 GLIB_UNAVAILABLE(2, 24)
99 #else
100 # define SOUP_AVAILABLE_IN_2_24
101 #endif
102
103 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_26
104 # define SOUP_DEPRECATED_IN_2_26                GLIB_DEPRECATED
105 # define SOUP_DEPRECATED_IN_2_26_FOR(f)         GLIB_DEPRECATED_FOR(f)
106 #else
107 # define SOUP_DEPRECATED_IN_2_26
108 # define SOUP_DEPRECATED_IN_2_26_FOR(f)
109 #endif
110
111 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_26
112 # define SOUP_AVAILABLE_IN_2_26                 GLIB_UNAVAILABLE(2, 26)
113 #else
114 # define SOUP_AVAILABLE_IN_2_26
115 #endif
116
117 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_28
118 # define SOUP_DEPRECATED_IN_2_28                GLIB_DEPRECATED
119 # define SOUP_DEPRECATED_IN_2_28_FOR(f)         GLIB_DEPRECATED_FOR(f)
120 #else
121 # define SOUP_DEPRECATED_IN_2_28
122 # define SOUP_DEPRECATED_IN_2_28_FOR(f)
123 #endif
124
125 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_28
126 # define SOUP_AVAILABLE_IN_2_28                 GLIB_UNAVAILABLE(2, 28)
127 #else
128 # define SOUP_AVAILABLE_IN_2_28
129 #endif
130
131 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_30
132 # define SOUP_DEPRECATED_IN_2_30                GLIB_DEPRECATED
133 # define SOUP_DEPRECATED_IN_2_30_FOR(f)         GLIB_DEPRECATED_FOR(f)
134 #else
135 # define SOUP_DEPRECATED_IN_2_30
136 # define SOUP_DEPRECATED_IN_2_30_FOR(f)
137 #endif
138
139 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_30
140 # define SOUP_AVAILABLE_IN_2_30                 GLIB_UNAVAILABLE(2, 30)
141 #else
142 # define SOUP_AVAILABLE_IN_2_30
143 #endif
144
145 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_32
146 # define SOUP_DEPRECATED_IN_2_32                GLIB_DEPRECATED
147 # define SOUP_DEPRECATED_IN_2_32_FOR(f)         GLIB_DEPRECATED_FOR(f)
148 #else
149 # define SOUP_DEPRECATED_IN_2_32
150 # define SOUP_DEPRECATED_IN_2_32_FOR(f)
151 #endif
152
153 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_32
154 # define SOUP_AVAILABLE_IN_2_32                 GLIB_UNAVAILABLE(2, 32)
155 #else
156 # define SOUP_AVAILABLE_IN_2_32
157 #endif
158
159 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_34
160 # define SOUP_DEPRECATED_IN_2_34                GLIB_DEPRECATED
161 # define SOUP_DEPRECATED_IN_2_34_FOR(f)         GLIB_DEPRECATED_FOR(f)
162 #else
163 # define SOUP_DEPRECATED_IN_2_34
164 # define SOUP_DEPRECATED_IN_2_34_FOR(f)
165 #endif
166
167 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_34
168 # define SOUP_AVAILABLE_IN_2_34                 GLIB_UNAVAILABLE(2, 34)
169 #else
170 # define SOUP_AVAILABLE_IN_2_34
171 #endif
172
173 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_36
174 # define SOUP_DEPRECATED_IN_2_36                GLIB_DEPRECATED
175 # define SOUP_DEPRECATED_IN_2_36_FOR(f)         GLIB_DEPRECATED_FOR(f)
176 #else
177 # define SOUP_DEPRECATED_IN_2_36
178 # define SOUP_DEPRECATED_IN_2_36_FOR(f)
179 #endif
180
181 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_36
182 # define SOUP_AVAILABLE_IN_2_36                 GLIB_UNAVAILABLE(2, 36)
183 #else
184 # define SOUP_AVAILABLE_IN_2_36
185 #endif
186
187 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_38
188 # define SOUP_DEPRECATED_IN_2_38                GLIB_DEPRECATED
189 # define SOUP_DEPRECATED_IN_2_38_FOR(f)         GLIB_DEPRECATED_FOR(f)
190 #else
191 # define SOUP_DEPRECATED_IN_2_38
192 # define SOUP_DEPRECATED_IN_2_38_FOR(f)
193 #endif
194
195 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_38
196 # define SOUP_AVAILABLE_IN_2_38                 GLIB_UNAVAILABLE(2, 38)
197 #else
198 # define SOUP_AVAILABLE_IN_2_38
199 #endif
200
201 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_40
202 # define SOUP_DEPRECATED_IN_2_40                GLIB_DEPRECATED
203 # define SOUP_DEPRECATED_IN_2_40_FOR(f)         GLIB_DEPRECATED_FOR(f)
204 #else
205 # define SOUP_DEPRECATED_IN_2_40
206 # define SOUP_DEPRECATED_IN_2_40_FOR(f)
207 #endif
208
209 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_40
210 # define SOUP_AVAILABLE_IN_2_40                 GLIB_UNAVAILABLE(2, 40)
211 #else
212 # define SOUP_AVAILABLE_IN_2_40
213 #endif
214
215 #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_42
216 # define SOUP_DEPRECATED_IN_2_42                GLIB_DEPRECATED
217 # define SOUP_DEPRECATED_IN_2_42_FOR(f)         GLIB_DEPRECATED_FOR(f)
218 #else
219 # define SOUP_DEPRECATED_IN_2_42
220 # define SOUP_DEPRECATED_IN_2_42_FOR(f)
221 #endif
222
223 #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_42
224 # define SOUP_AVAILABLE_IN_2_42                 GLIB_UNAVAILABLE(2, 42)
225 #else
226 # define SOUP_AVAILABLE_IN_2_42
227 #endif
228
229 G_END_DECLS
230
231 #endif /* SOUP_VERSION_H */