Remove build warning
[platform/upstream/libsoup.git] / libsoup / soup-version.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * soup-version.c: Version information
4  *
5  * Copyright (C) 2012 Igalia S.L.
6  */
7
8 #ifdef HAVE_CONFIG_H
9 #include <config.h>
10 #endif
11
12 #include "soup-version.h"
13
14 /**
15  * SECTION:soup-version
16  * @short_description: Variables and functions to check the libsoup version
17  **/
18
19 /**
20  * SOUP_MAJOR_VERSION:
21  *
22  * Like soup_get_major_version(), but from the headers used at
23  * application compile time, rather than from the library linked
24  * against at application run time.
25  *
26  * Since: 2.42
27  */
28
29 /**
30  * SOUP_MINOR_VERSION:
31  *
32  * Like soup_get_minor_version(), but from the headers used at
33  * application compile time, rather than from the library linked
34  * against at application run time.
35  *
36  * Since: 2.42
37  */
38
39 /**
40  * SOUP_MICRO_VERSION:
41  *
42  * Like soup_get_micro_version(), but from the headers used at
43  * application compile time, rather than from the library linked
44  * against at application run time.
45  *
46  * Since: 2.42
47  */
48
49 /**
50  * SOUP_CHECK_VERSION:
51  * @major: major version (e.g. 2 for version 2.42.0)
52  * @minor: minor version (e.g. 42 for version 2.42.0)
53  * @micro: micro version (e.g. 0 for version 2.42.0)
54  *
55  * Macro to test the version of libsoup being compiled against.
56  *
57  * Returns: %TRUE if the version of the libsoup header files
58  * is the same as or newer than the passed-in version.
59  *
60  * Since: 2.42
61  */
62
63 /**
64  * soup_get_major_version:
65  *
66  * Returns the major version number of the libsoup library.
67  * (e.g. in libsoup version 2.42.0 this is 2.)
68  *
69  * This function is in the library, so it represents the libsoup library
70  * your code is running against. Contrast with the #SOUP_MAJOR_VERSION
71  * macro, which represents the major version of the libsoup headers you
72  * have included when compiling your code.
73  *
74  * Returns: the major version number of the libsoup library
75  *
76  * Since: 2.42
77  */
78 guint
79 soup_get_major_version (void)
80 {
81     return SOUP_MAJOR_VERSION;
82 }
83
84 /**
85  * soup_get_minor_version:
86  *
87  * Returns the minor version number of the libsoup library.
88  * (e.g. in libsoup version 2.42.0 this is 42.)
89  *
90  * This function is in the library, so it represents the libsoup library
91  * your code is running against. Contrast with the #SOUP_MINOR_VERSION
92  * macro, which represents the minor version of the libsoup headers you
93  * have included when compiling your code.
94  *
95  * Returns: the minor version number of the libsoup library
96  *
97  * Since: 2.42
98  */
99 guint
100 soup_get_minor_version (void)
101 {
102     return SOUP_MINOR_VERSION;
103 }
104
105 /**
106  * soup_get_micro_version:
107  *
108  * Returns the micro version number of the libsoup library.
109  * (e.g. in libsoup version 2.42.0 this is 0.)
110  *
111  * This function is in the library, so it represents the libsoup library
112  * your code is running against. Contrast with the #SOUP_MICRO_VERSION
113  * macro, which represents the micro version of the libsoup headers you
114  * have included when compiling your code.
115  *
116  * Returns: the micro version number of the libsoup library
117  *
118  * Since: 2.42
119  */
120 guint
121 soup_get_micro_version (void)
122 {
123     return SOUP_MICRO_VERSION;
124 }
125
126 /**
127  * soup_check_version:
128  * @major: the major version to check
129  * @minor: the minor version to check
130  * @micro: the micro version to check
131  *
132  * Like SOUP_CHECK_VERSION, but the check for soup_check_version is
133  * at runtime instead of compile time. This is useful for compiling
134  * against older versions of libsoup, but using features from newer
135  * versions.
136  *
137  * Returns: %TRUE if the version of the libsoup currently loaded
138  * is the same as or newer than the passed-in version.
139  *
140  * Since: 2.42
141  */
142 gboolean
143 soup_check_version (guint major,
144                     guint minor,
145                     guint micro)
146 {
147     return SOUP_CHECK_VERSION (major, minor, micro);
148 }
149
150 /**
151  * SOUP_VERSION_MIN_REQUIRED:
152  *
153  * A macro that should be defined by the user prior to including
154  * libsoup.h. The definition should be one of the predefined libsoup
155  * version macros: %SOUP_VERSION_2_24, %SOUP_VERSION_2_26, ...
156  *
157  * This macro defines the earliest version of libsoup that the package
158  * is required to be able to compile against.
159  *
160  * If the compiler is configured to warn about the use of deprecated
161  * functions, then using functions that were deprecated in version
162  * %SOUP_VERSION_MIN_REQUIRED or earlier will cause warnings (but
163  * using functions deprecated in later releases will not).
164  *
165  * Since: 2.42
166  */
167
168 /**
169  * SOUP_VERSION_MAX_ALLOWED:
170  *
171  * A macro that should be defined by the user prior to including
172  * libsoup.h. The definition should be one of the predefined libsoup
173  * version macros: %SOUP_VERSION_2_24, %SOUP_VERSION_2_26, ...
174  *
175  * This macro defines the latest version of the libsoup API that the
176  * package is allowed to make use of.
177  *
178  * If the compiler is configured to warn about the use of deprecated
179  * functions, then using functions added after version
180  * %SOUP_VERSION_MAX_ALLOWED will cause warnings.
181  *
182  * Unless you are using SOUP_CHECK_VERSION() or the like to compile
183  * different code depending on the libsoup version, then this should be
184  * set to the same value as %SOUP_VERSION_MIN_REQUIRED.
185  *
186  * Since: 2.42
187  */
188
189 /**
190  * SOUP_VERSION_2_24:
191  *
192  * A macro that evaluates to the 2.24 version of libsoup, in a format
193  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
194  * %SOUP_VERSION_MAX_ALLOWED.
195  *
196  * Since: 2.42
197  */
198
199 /**
200  * SOUP_VERSION_2_26:
201  *
202  * A macro that evaluates to the 2.26 version of libsoup, in a format
203  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
204  * %SOUP_VERSION_MAX_ALLOWED.
205  *
206  * Since: 2.42
207  */
208
209 /**
210  * SOUP_VERSION_2_28:
211  *
212  * A macro that evaluates to the 2.28 version of libsoup, in a format
213  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
214  * %SOUP_VERSION_MAX_ALLOWED.
215  *
216  * Since: 2.42
217  */
218
219 /**
220  * SOUP_VERSION_2_30:
221  *
222  * A macro that evaluates to the 2.30 version of libsoup, in a format
223  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
224  * %SOUP_VERSION_MAX_ALLOWED.
225  *
226  * Since: 2.42
227  */
228
229 /**
230  * SOUP_VERSION_2_32:
231  *
232  * A macro that evaluates to the 2.32 version of libsoup, in a format
233  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
234  * %SOUP_VERSION_MAX_ALLOWED.
235  *
236  * Since: 2.42
237  */
238
239 /**
240  * SOUP_VERSION_2_34:
241  *
242  * A macro that evaluates to the 2.34 version of libsoup, in a format
243  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
244  * %SOUP_VERSION_MAX_ALLOWED.
245  *
246  * Since: 2.42
247  */
248
249 /**
250  * SOUP_VERSION_2_36:
251  *
252  * A macro that evaluates to the 2.36 version of libsoup, in a format
253  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
254  * %SOUP_VERSION_MAX_ALLOWED.
255  *
256  * Since: 2.42
257  */
258
259 /**
260  * SOUP_VERSION_2_38:
261  *
262  * A macro that evaluates to the 2.38 version of libsoup, in a format
263  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
264  * %SOUP_VERSION_MAX_ALLOWED.
265  *
266  * Since: 2.42
267  */
268
269 /**
270  * SOUP_VERSION_2_40:
271  *
272  * A macro that evaluates to the 2.40 version of libsoup, in a format
273  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
274  * %SOUP_VERSION_MAX_ALLOWED.
275  *
276  * Since: 2.42
277  */
278
279 /**
280  * SOUP_VERSION_2_42:
281  *
282  * A macro that evaluates to the 2.42 version of libsoup, in a format
283  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
284  * %SOUP_VERSION_MAX_ALLOWED.
285  *
286  * Since: 2.42
287  */
288
289 /**
290  * SOUP_VERSION_2_44:
291  *
292  * A macro that evaluates to the 2.44 version of libsoup, in a format
293  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
294  * %SOUP_VERSION_MAX_ALLOWED.
295  *
296  * Since: 2.44
297  */
298
299 /**
300  * SOUP_VERSION_2_46:
301  *
302  * A macro that evaluates to the 2.46 version of libsoup, in a format
303  * that can be used by %SOUP_VERSION_MIN_REQUIRED and
304  * %SOUP_VERSION_MAX_ALLOWED.
305  *
306  * Since: 2.46
307  */