From 0d211297012bc2d2d31c1e0835f4fc27f05b0e18 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 24 Dec 2019 14:35:11 +0100 Subject: [PATCH] version: add NM_DEPRECATED_IN_1_22_2/NM_AVAILABLE_IN_1_22_2 macros --- libnm-core/nm-version.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libnm-core/nm-version.h b/libnm-core/nm-version.h index 3180c7e26a..8cb0ac505c 100644 --- a/libnm-core/nm-version.h +++ b/libnm-core/nm-version.h @@ -215,6 +215,20 @@ # define NM_AVAILABLE_IN_1_22 #endif +#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_22_2 +# define NM_DEPRECATED_IN_1_22_2 G_DEPRECATED +# define NM_DEPRECATED_IN_1_22_2_FOR(f) G_DEPRECATED_FOR(f) +#else +# define NM_DEPRECATED_IN_1_22_2 +# define NM_DEPRECATED_IN_1_22_2_FOR(f) +#endif + +#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_22_2 +# define NM_AVAILABLE_IN_1_22_2 G_UNAVAILABLE(1,22.2) +#else +# define NM_AVAILABLE_IN_1_22_2 +#endif + /* * Synchronous API for calling D-Bus in libnm is deprecated. See * https://developer.gnome.org/libnm/stable/usage.html#sync-api