soup-version.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  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. #ifndef SOUP_VERSION_H
  8. #define SOUP_VERSION_H
  9. #include <glib.h>
  10. G_BEGIN_DECLS
  11. #define SOUP_MAJOR_VERSION (2)
  12. #define SOUP_MINOR_VERSION (54)
  13. #define SOUP_MICRO_VERSION (1)
  14. #define SOUP_CHECK_VERSION(major, minor, micro) \
  15. (SOUP_MAJOR_VERSION > (major) || \
  16. (SOUP_MAJOR_VERSION == (major) && SOUP_MINOR_VERSION > (minor)) || \
  17. (SOUP_MAJOR_VERSION == (major) && SOUP_MINOR_VERSION == (minor) && \
  18. SOUP_MICRO_VERSION >= (micro)))
  19. #ifndef _SOUP_EXTERN
  20. #define _SOUP_EXTERN extern
  21. #endif
  22. /* We prefix variable declarations so they can
  23. * properly get exported in Windows DLLs.
  24. */
  25. #ifndef SOUP_VAR
  26. # ifdef G_PLATFORM_WIN32
  27. # ifdef LIBSOUP_COMPILATION
  28. # ifdef DLL_EXPORT
  29. # define SOUP_VAR __declspec(dllexport)
  30. # else /* !DLL_EXPORT */
  31. # define SOUP_VAR extern
  32. # endif /* !DLL_EXPORT */
  33. # else /* !SOUP_COMPILATION */
  34. # define SOUP_VAR extern __declspec(dllimport)
  35. # endif /* !LIBSOUP_COMPILATION */
  36. # else /* !G_PLATFORM_WIN32 */
  37. # define SOUP_VAR _SOUP_EXTERN
  38. # endif /* !G_PLATFORM_WIN32 */
  39. #endif /* SOUP_VAR */
  40. /* Deprecation / Availability macros */
  41. #define SOUP_VERSION_2_24 (G_ENCODE_VERSION (2, 24))
  42. #define SOUP_VERSION_2_26 (G_ENCODE_VERSION (2, 26))
  43. #define SOUP_VERSION_2_28 (G_ENCODE_VERSION (2, 28))
  44. #define SOUP_VERSION_2_30 (G_ENCODE_VERSION (2, 30))
  45. #define SOUP_VERSION_2_32 (G_ENCODE_VERSION (2, 32))
  46. #define SOUP_VERSION_2_34 (G_ENCODE_VERSION (2, 34))
  47. #define SOUP_VERSION_2_36 (G_ENCODE_VERSION (2, 36))
  48. #define SOUP_VERSION_2_38 (G_ENCODE_VERSION (2, 38))
  49. #define SOUP_VERSION_2_40 (G_ENCODE_VERSION (2, 40))
  50. #define SOUP_VERSION_2_42 (G_ENCODE_VERSION (2, 42))
  51. #define SOUP_VERSION_2_44 (G_ENCODE_VERSION (2, 44))
  52. #define SOUP_VERSION_2_46 (G_ENCODE_VERSION (2, 46))
  53. #define SOUP_VERSION_2_48 (G_ENCODE_VERSION (2, 48))
  54. #define SOUP_VERSION_2_50 (G_ENCODE_VERSION (2, 50))
  55. #define SOUP_VERSION_2_52 (G_ENCODE_VERSION (2, 52))
  56. #define SOUP_VERSION_2_54 (G_ENCODE_VERSION (2, 54))
  57. /* evaluates to the current stable version; for development cycles,
  58. * this means the next stable target
  59. */
  60. #if (SOUP_MINOR_VERSION % 2)
  61. #define SOUP_VERSION_CUR_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION + 1))
  62. #else
  63. #define SOUP_VERSION_CUR_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION))
  64. #endif
  65. /* evaluates to the previous stable version */
  66. #if (SOUP_MINOR_VERSION % 2)
  67. #define SOUP_VERSION_PREV_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 1))
  68. #else
  69. #define SOUP_VERSION_PREV_STABLE (G_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 2))
  70. #endif
  71. #ifndef SOUP_VERSION_MIN_REQUIRED
  72. # define SOUP_VERSION_MIN_REQUIRED (SOUP_VERSION_CUR_STABLE)
  73. #elif SOUP_VERSION_MIN_REQUIRED == 0
  74. # undef SOUP_VERSION_MIN_REQUIRED
  75. # define SOUP_VERSION_MIN_REQUIRED (SOUP_VERSION_CUR_STABLE + 2)
  76. #endif
  77. #if !defined (SOUP_VERSION_MAX_ALLOWED) || (SOUP_VERSION_MAX_ALLOWED == 0)
  78. # undef SOUP_VERSION_MAX_ALLOWED
  79. # define SOUP_VERSION_MAX_ALLOWED (SOUP_VERSION_CUR_STABLE)
  80. #endif
  81. /* sanity checks */
  82. #if SOUP_VERSION_MIN_REQUIRED > SOUP_VERSION_CUR_STABLE
  83. #error "SOUP_VERSION_MIN_REQUIRED must be <= SOUP_VERSION_CUR_STABLE"
  84. #endif
  85. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_MIN_REQUIRED
  86. #error "SOUP_VERSION_MAX_ALLOWED must be >= SOUP_VERSION_MIN_REQUIRED"
  87. #endif
  88. #if SOUP_VERSION_MIN_REQUIRED < SOUP_VERSION_2_24
  89. #error "SOUP_VERSION_MIN_REQUIRED must be >= SOUP_VERSION_2_24"
  90. #endif
  91. #define SOUP_AVAILABLE_IN_2_4 _SOUP_EXTERN
  92. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_24
  93. # define SOUP_DEPRECATED_IN_2_24 G_DEPRECATED
  94. # define SOUP_DEPRECATED_IN_2_24_FOR(f) G_DEPRECATED_FOR(f)
  95. #else
  96. # define SOUP_DEPRECATED_IN_2_24
  97. # define SOUP_DEPRECATED_IN_2_24_FOR(f)
  98. #endif
  99. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_24
  100. # define SOUP_AVAILABLE_IN_2_24 G_UNAVAILABLE(2, 24) _SOUP_EXTERN
  101. #else
  102. # define SOUP_AVAILABLE_IN_2_24 _SOUP_EXTERN
  103. #endif
  104. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_26
  105. # define SOUP_DEPRECATED_IN_2_26 G_DEPRECATED
  106. # define SOUP_DEPRECATED_IN_2_26_FOR(f) G_DEPRECATED_FOR(f)
  107. #else
  108. # define SOUP_DEPRECATED_IN_2_26
  109. # define SOUP_DEPRECATED_IN_2_26_FOR(f)
  110. #endif
  111. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_26
  112. # define SOUP_AVAILABLE_IN_2_26 G_UNAVAILABLE(2, 26) _SOUP_EXTERN
  113. #else
  114. # define SOUP_AVAILABLE_IN_2_26 _SOUP_EXTERN
  115. #endif
  116. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_28
  117. # define SOUP_DEPRECATED_IN_2_28 G_DEPRECATED
  118. # define SOUP_DEPRECATED_IN_2_28_FOR(f) G_DEPRECATED_FOR(f)
  119. #else
  120. # define SOUP_DEPRECATED_IN_2_28
  121. # define SOUP_DEPRECATED_IN_2_28_FOR(f)
  122. #endif
  123. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_28
  124. # define SOUP_AVAILABLE_IN_2_28 G_UNAVAILABLE(2, 28) _SOUP_EXTERN
  125. #else
  126. # define SOUP_AVAILABLE_IN_2_28 _SOUP_EXTERN
  127. #endif
  128. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_30
  129. # define SOUP_DEPRECATED_IN_2_30 G_DEPRECATED
  130. # define SOUP_DEPRECATED_IN_2_30_FOR(f) G_DEPRECATED_FOR(f)
  131. #else
  132. # define SOUP_DEPRECATED_IN_2_30
  133. # define SOUP_DEPRECATED_IN_2_30_FOR(f)
  134. #endif
  135. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_30
  136. # define SOUP_AVAILABLE_IN_2_30 G_UNAVAILABLE(2, 30) _SOUP_EXTERN
  137. #else
  138. # define SOUP_AVAILABLE_IN_2_30 _SOUP_EXTERN
  139. #endif
  140. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_32
  141. # define SOUP_DEPRECATED_IN_2_32 G_DEPRECATED
  142. # define SOUP_DEPRECATED_IN_2_32_FOR(f) G_DEPRECATED_FOR(f)
  143. #else
  144. # define SOUP_DEPRECATED_IN_2_32
  145. # define SOUP_DEPRECATED_IN_2_32_FOR(f)
  146. #endif
  147. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_32
  148. # define SOUP_AVAILABLE_IN_2_32 G_UNAVAILABLE(2, 32) _SOUP_EXTERN
  149. #else
  150. # define SOUP_AVAILABLE_IN_2_32 _SOUP_EXTERN
  151. #endif
  152. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_34
  153. # define SOUP_DEPRECATED_IN_2_34 G_DEPRECATED
  154. # define SOUP_DEPRECATED_IN_2_34_FOR(f) G_DEPRECATED_FOR(f)
  155. #else
  156. # define SOUP_DEPRECATED_IN_2_34
  157. # define SOUP_DEPRECATED_IN_2_34_FOR(f)
  158. #endif
  159. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_34
  160. # define SOUP_AVAILABLE_IN_2_34 G_UNAVAILABLE(2, 34) _SOUP_EXTERN
  161. #else
  162. # define SOUP_AVAILABLE_IN_2_34 _SOUP_EXTERN
  163. #endif
  164. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_36
  165. # define SOUP_DEPRECATED_IN_2_36 G_DEPRECATED
  166. # define SOUP_DEPRECATED_IN_2_36_FOR(f) G_DEPRECATED_FOR(f)
  167. #else
  168. # define SOUP_DEPRECATED_IN_2_36
  169. # define SOUP_DEPRECATED_IN_2_36_FOR(f)
  170. #endif
  171. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_36
  172. # define SOUP_AVAILABLE_IN_2_36 G_UNAVAILABLE(2, 36) _SOUP_EXTERN
  173. #else
  174. # define SOUP_AVAILABLE_IN_2_36 _SOUP_EXTERN
  175. #endif
  176. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_38
  177. # define SOUP_DEPRECATED_IN_2_38 G_DEPRECATED
  178. # define SOUP_DEPRECATED_IN_2_38_FOR(f) G_DEPRECATED_FOR(f)
  179. #else
  180. # define SOUP_DEPRECATED_IN_2_38
  181. # define SOUP_DEPRECATED_IN_2_38_FOR(f)
  182. #endif
  183. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_38
  184. # define SOUP_AVAILABLE_IN_2_38 G_UNAVAILABLE(2, 38) _SOUP_EXTERN
  185. #else
  186. # define SOUP_AVAILABLE_IN_2_38 _SOUP_EXTERN
  187. #endif
  188. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_40
  189. # define SOUP_DEPRECATED_IN_2_40 G_DEPRECATED
  190. # define SOUP_DEPRECATED_IN_2_40_FOR(f) G_DEPRECATED_FOR(f)
  191. #else
  192. # define SOUP_DEPRECATED_IN_2_40
  193. # define SOUP_DEPRECATED_IN_2_40_FOR(f)
  194. #endif
  195. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_40
  196. # define SOUP_AVAILABLE_IN_2_40 G_UNAVAILABLE(2, 40) _SOUP_EXTERN
  197. #else
  198. # define SOUP_AVAILABLE_IN_2_40 _SOUP_EXTERN
  199. #endif
  200. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_42
  201. # define SOUP_DEPRECATED_IN_2_42 G_DEPRECATED
  202. # define SOUP_DEPRECATED_IN_2_42_FOR(f) G_DEPRECATED_FOR(f)
  203. #else
  204. # define SOUP_DEPRECATED_IN_2_42
  205. # define SOUP_DEPRECATED_IN_2_42_FOR(f)
  206. #endif
  207. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_42
  208. # define SOUP_AVAILABLE_IN_2_42 G_UNAVAILABLE(2, 42) _SOUP_EXTERN
  209. #else
  210. # define SOUP_AVAILABLE_IN_2_42 _SOUP_EXTERN
  211. #endif
  212. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_44
  213. # define SOUP_DEPRECATED_IN_2_44 G_DEPRECATED
  214. # define SOUP_DEPRECATED_IN_2_44_FOR(f) G_DEPRECATED_FOR(f)
  215. #else
  216. # define SOUP_DEPRECATED_IN_2_44
  217. # define SOUP_DEPRECATED_IN_2_44_FOR(f)
  218. #endif
  219. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_44
  220. # define SOUP_AVAILABLE_IN_2_44 G_UNAVAILABLE(2, 44) _SOUP_EXTERN
  221. #else
  222. # define SOUP_AVAILABLE_IN_2_44 _SOUP_EXTERN
  223. #endif
  224. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_46
  225. # define SOUP_DEPRECATED_IN_2_46 G_DEPRECATED
  226. # define SOUP_DEPRECATED_IN_2_46_FOR(f) G_DEPRECATED_FOR(f)
  227. #else
  228. # define SOUP_DEPRECATED_IN_2_46
  229. # define SOUP_DEPRECATED_IN_2_46_FOR(f)
  230. #endif
  231. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_46
  232. # define SOUP_AVAILABLE_IN_2_46 G_UNAVAILABLE(2, 46) _SOUP_EXTERN
  233. #else
  234. # define SOUP_AVAILABLE_IN_2_46 _SOUP_EXTERN
  235. #endif
  236. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_48
  237. # define SOUP_DEPRECATED_IN_2_48 G_DEPRECATED
  238. # define SOUP_DEPRECATED_IN_2_48_FOR(f) G_DEPRECATED_FOR(f)
  239. #else
  240. # define SOUP_DEPRECATED_IN_2_48
  241. # define SOUP_DEPRECATED_IN_2_48_FOR(f)
  242. #endif
  243. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_48
  244. # define SOUP_AVAILABLE_IN_2_48 G_UNAVAILABLE(2, 48) _SOUP_EXTERN
  245. #else
  246. # define SOUP_AVAILABLE_IN_2_48 _SOUP_EXTERN
  247. #endif
  248. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_50
  249. # define SOUP_DEPRECATED_IN_2_50 G_DEPRECATED
  250. # define SOUP_DEPRECATED_IN_2_50_FOR(f) G_DEPRECATED_FOR(f)
  251. #else
  252. # define SOUP_DEPRECATED_IN_2_50
  253. # define SOUP_DEPRECATED_IN_2_50_FOR(f)
  254. #endif
  255. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_50
  256. # define SOUP_AVAILABLE_IN_2_50 G_UNAVAILABLE(2, 50) _SOUP_EXTERN
  257. #else
  258. # define SOUP_AVAILABLE_IN_2_50 _SOUP_EXTERN
  259. #endif
  260. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_52
  261. # define SOUP_DEPRECATED_IN_2_52 G_DEPRECATED
  262. # define SOUP_DEPRECATED_IN_2_52_FOR(f) G_DEPRECATED_FOR(f)
  263. #else
  264. # define SOUP_DEPRECATED_IN_2_52
  265. # define SOUP_DEPRECATED_IN_2_52_FOR(f)
  266. #endif
  267. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_52
  268. # define SOUP_AVAILABLE_IN_2_52 G_UNAVAILABLE(2, 52) _SOUP_EXTERN
  269. #else
  270. # define SOUP_AVAILABLE_IN_2_52 _SOUP_EXTERN
  271. #endif
  272. #if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_54
  273. # define SOUP_DEPRECATED_IN_2_54 G_DEPRECATED
  274. # define SOUP_DEPRECATED_IN_2_54_FOR(f) G_DEPRECATED_FOR(f)
  275. #else
  276. # define SOUP_DEPRECATED_IN_2_54
  277. # define SOUP_DEPRECATED_IN_2_54_FOR(f)
  278. #endif
  279. #if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_54
  280. # define SOUP_AVAILABLE_IN_2_54 G_UNAVAILABLE(2, 54) _SOUP_EXTERN
  281. #else
  282. # define SOUP_AVAILABLE_IN_2_54 _SOUP_EXTERN
  283. #endif
  284. SOUP_AVAILABLE_IN_2_42
  285. guint soup_get_major_version (void);
  286. SOUP_AVAILABLE_IN_2_42
  287. guint soup_get_minor_version (void);
  288. SOUP_AVAILABLE_IN_2_42
  289. guint soup_get_micro_version (void);
  290. SOUP_AVAILABLE_IN_2_42
  291. gboolean soup_check_version (guint major,
  292. guint minor,
  293. guint micro);
  294. G_END_DECLS
  295. #endif /* SOUP_VERSION_H */