1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * soup-version.c: Version information
5 * Copyright (C) 2012 Igalia S.L.
12 #include "soup-version.h"
15 * SECTION:soup-version
16 * @short_description: Variables and functions to check the libsoup version
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.
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.
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.
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)
55 * Macro to test the version of libsoup being compiled against.
57 * Returns: %TRUE if the version of the libsoup header files
58 * is the same as or newer than the passed-in version.
64 * soup_get_major_version:
66 * Returns the major version number of the libsoup library.
67 * (e.g. in libsoup version 2.42.0 this is 2.)
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.
74 * Returns: the major version number of the libsoup library
79 soup_get_major_version (void)
81 return SOUP_MAJOR_VERSION;
85 * soup_get_minor_version:
87 * Returns the minor version number of the libsoup library.
88 * (e.g. in libsoup version 2.42.0 this is 42.)
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.
95 * Returns: the minor version number of the libsoup library
100 soup_get_minor_version (void)
102 return SOUP_MINOR_VERSION;
106 * soup_get_micro_version:
108 * Returns the micro version number of the libsoup library.
109 * (e.g. in libsoup version 2.42.0 this is 0.)
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.
116 * Returns: the micro version number of the libsoup library
121 soup_get_micro_version (void)
123 return SOUP_MICRO_VERSION;
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
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
137 * Returns: %TRUE if the version of the libsoup currently loaded
138 * is the same as or newer than the passed-in version.
143 soup_check_version (guint major,
147 return SOUP_CHECK_VERSION (major, minor, micro);
151 * SOUP_VERSION_MIN_REQUIRED:
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, ...
157 * This macro defines the earliest version of libsoup that the package
158 * is required to be able to compile against.
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).
169 * SOUP_VERSION_MAX_ALLOWED:
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, ...
175 * This macro defines the latest version of the libsoup API that the
176 * package is allowed to make use of.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.