libnm-util, libnm-glib: add versioned deprecation/availability macros
authorDan Winship <danw@gnome.org>
Wed, 12 Feb 2014 17:28:52 +0000 (12:28 -0500)
committerDan Winship <danw@gnome.org>
Thu, 13 Feb 2014 16:24:37 +0000 (11:24 -0500)
Add versioned NM_DEPRECATED_IN_* and NM_AVAILABLE_IN_* macros, and tag
new/deprecated functions accordingly. (All currently-deprecated
functions are assumed to have been deprecated in 0.9.10.)

Add NM_VERSION_MIN_REQUIRED and NM_VERSION_MAX_ALLOWED macros which
can be set to determine which versions will cause warnings.

With the current settings, external consumers of the
libnm-util/libnm-glib APIs will have MIN_REQUIRED and MAX_ALLOWED both
set to NM_VERSION_0_9_8 by default, meaning they will get warnings
about functions added in 0.9.10. NM internally sets
NM_VERSION_MAX_ALLOWED to NM_VERSION_NEXT_STABLE to ensure that it is
always allowed to use all APIs.

50 files changed:
callouts/Makefile.am
cli/src/Makefile.am
docs/libnm-glib/Makefile.am
docs/libnm-util/Makefile.am
include/nm-version.h.in
libnm-glib/Makefile.am
libnm-glib/nm-access-point.h
libnm-glib/nm-active-connection.h
libnm-glib/nm-client.h
libnm-glib/nm-device-generic.h
libnm-glib/nm-device-team.h
libnm-glib/nm-device.h
libnm-glib/nm-ip4-config.h
libnm-glib/nm-ip6-config.h
libnm-glib/nm-object.h
libnm-glib/nm-remote-connection.h
libnm-glib/nm-remote-settings.h
libnm-glib/nm-secret-agent.h
libnm-glib/nm-vpn-plugin-ui-interface.h
libnm-glib/nm-vpn-plugin.h
libnm-util/Makefile.am
libnm-util/nm-connection.h
libnm-util/nm-setting-bond.h
libnm-util/nm-setting-connection.h
libnm-util/nm-setting-dcb.h
libnm-util/nm-setting-generic.h
libnm-util/nm-setting-gsm.h
libnm-util/nm-setting-team-port.h
libnm-util/nm-setting-team.h
libnm-util/nm-setting-wired.h
libnm-util/nm-setting-wireless.h
libnm-util/nm-setting.h
libnm-util/nm-utils.h
libnm-util/tests/Makefile.am
src/Makefile.am
src/platform/tests/Makefile.am
src/settings/plugins/example/Makefile.am
src/settings/plugins/ifcfg-rh/Makefile.am
src/settings/plugins/ifcfg-rh/tests/Makefile.am
src/settings/plugins/ifcfg-suse/Makefile.am
src/settings/plugins/ifnet/Makefile.am
src/settings/plugins/ifnet/tests/Makefile.am
src/settings/plugins/ifupdown/Makefile.am
src/settings/plugins/ifupdown/tests/Makefile.am
src/settings/plugins/keyfile/Makefile.am
src/settings/plugins/keyfile/tests/Makefile.am
src/tests/Makefile.am
test/Makefile.am
tools/Makefile.am
tui/Makefile.am

index e357948..8b018be 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
        -I${top_builddir}/libnm-util \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        -DNMCONFDIR=\"$(nmconfdir)\" \
        -DSYSCONFDIR=\"$(sysconfdir)\" \
        -DLIBEXECDIR=\"$(libexecdir)\"
index 17b163c..af99bb9 100644 (file)
@@ -10,6 +10,7 @@ AM_CPPFLAGS = \
        -I${top_srcdir}/libnm-glib \
        $(DBUS_CFLAGS) \
        $(GLIB_CFLAGS) \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        -DNMCLI_LOCALEDIR=\"$(datadir)/locale\"
 
 nmcli_SOURCES = \
index 84807e2..c6c9edf 100644 (file)
@@ -76,6 +76,7 @@ GTKDOC_CFLAGS =                               \
        -I$(top_builddir)/libnm-util    \
        -I$(top_srcdir)/libnm-glib      \
        -I$(top_builddir)/libnm-glib    \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS)                  \
        $(DBUS_CFLAGS)
 
index 8b8b5aa..2e49495 100644 (file)
@@ -50,6 +50,7 @@ extra_files =
 GTKDOC_CFLAGS =                                \
        -I$(top_srcdir)/include         \
        -I$(top_srcdir)/libnm-util      \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS)                  \
        $(DBUS_CFLAGS)
 
index ee2e108..711bfa9 100644 (file)
      (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \
      (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION == (minor) && NM_MICRO_VERSION >= (micro)))
 
+
+/* Deprecation / Availability macros */
+
+#define NM_ENCODE_VERSION(major,minor,micro) ((major) << 16 | (minor) << 8 | (micro))
+
+#define NM_VERSION_0_9_8  (NM_ENCODE_VERSION (0, 9, 8))
+#define NM_VERSION_0_9_10 (NM_ENCODE_VERSION (0, 9, 10))
+
+#if (NM_MICRO_VERSION % 2)
+#define NM_VERSION_CUR_STABLE (NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION - 1))
+#else
+#define NM_VERSION_CUR_STABLE (NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION))
+#endif
+
+#if (NM_MICRO_VERSION % 2)
+#define NM_VERSION_NEXT_STABLE (NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION +1))
+#else
+#define NM_VERSION_NEXT_STABLE (NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION + 2))
+#endif
+
+#if !defined (NM_VERSION_MIN_REQUIRED) || (NM_VERSION_MIN_REQUIRED == 0)
+# undef NM_VERSION_MIN_REQUIRED
+# define NM_VERSION_MIN_REQUIRED (NM_VERSION_CUR_STABLE)
+#endif
+
+#if !defined (NM_VERSION_MAX_ALLOWED) || (NM_VERSION_MAX_ALLOWED == 0)
+# undef NM_VERSION_MAX_ALLOWED
+# define NM_VERSION_MAX_ALLOWED (NM_VERSION_CUR_STABLE)
+#endif
+
+/* sanity checks */
+#if NM_VERSION_MIN_REQUIRED > NM_VERSION_NEXT_STABLE
+#error "NM_VERSION_MIN_REQUIRED must be <= NM_VERSION_NEXT_STABLE"
+#endif
+#if NM_VERSION_MAX_ALLOWED < NM_VERSION_MIN_REQUIRED
+#error "NM_VERSION_MAX_ALLOWED must be >= NM_VERSION_MIN_REQUIRED"
+#endif
+#if NM_VERSION_MIN_REQUIRED < NM_VERSION_0_9_8
+#error "NM_VERSION_MIN_REQUIRED must be >= NM_VERSION_0_9_8"
+#endif
+
+#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_0_9_10
+# define NM_DEPRECATED_IN_0_9_10        G_DEPRECATED
+# define NM_DEPRECATED_IN_0_9_10_FOR(f) G_DEPRECATED_FOR(f)
+#else
+# define NM_DEPRECATED_IN_0_9_10
+# define NM_DEPRECATED_IN_0_9_10_FOR(f)
+#endif
+
+#if NM_VERSION_MAX_ALLOWED < NM_VERSION_0_9_10
+# define NM_AVAILABLE_IN_0_9_10         G_UNAVAILABLE(0.9,10)
+#else
+# define NM_AVAILABLE_IN_0_9_10
+#endif
+
 #endif  /* NM_VERSION_H */
 
index d67fef6..970c5ee 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
        -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(DBUS_CFLAGS) \
        $(GLIB_CFLAGS)
 
index 76275f0..4862e6b 100644 (file)
@@ -90,6 +90,7 @@ gboolean               nm_access_point_connection_valid   (NMAccessPoint *ap,
                                                            NMConnection *connection);
 
 /* DEPRECATED */
+NM_DEPRECATED_IN_0_9_10
 const char *           nm_access_point_get_hw_address   (NMAccessPoint *ap);
 
 G_END_DECLS
index 716d3c2..1d3ea99 100644 (file)
@@ -84,11 +84,16 @@ const GPtrArray *nm_active_connection_get_devices         (NMActiveConnection *c
 NMActiveConnectionState nm_active_connection_get_state    (NMActiveConnection *connection);
 const char * nm_active_connection_get_master              (NMActiveConnection *connection);
 gboolean       nm_active_connection_get_default           (NMActiveConnection *connection);
+NM_AVAILABLE_IN_0_9_10
 NMIP4Config *  nm_active_connection_get_ip4_config        (NMActiveConnection *connection);
+NM_AVAILABLE_IN_0_9_10
 NMDHCP4Config *nm_active_connection_get_dhcp4_config      (NMActiveConnection *connection);
 gboolean       nm_active_connection_get_default6          (NMActiveConnection *connection);
+NM_AVAILABLE_IN_0_9_10
 NMIP6Config *  nm_active_connection_get_ip6_config        (NMActiveConnection *connection);
+NM_AVAILABLE_IN_0_9_10
 NMDHCP6Config *nm_active_connection_get_dhcp6_config      (NMActiveConnection *connection);
+NM_AVAILABLE_IN_0_9_10
 gboolean       nm_active_connection_get_vpn               (NMActiveConnection *connection);
 
 G_END_DECLS
index 34210a7..a563f0b 100644 (file)
@@ -140,6 +140,7 @@ typedef enum {
 } NMClientError;
 
 #define NM_CLIENT_ERROR nm_client_error_quark ()
+NM_AVAILABLE_IN_0_9_10
 GQuark nm_client_error_quark (void);
 
 typedef struct {
@@ -223,6 +224,7 @@ gboolean  nm_client_wimax_hardware_get_enabled (NMClient *client);
 
 const char *nm_client_get_version        (NMClient *client);
 NMState   nm_client_get_state            (NMClient *client);
+NM_AVAILABLE_IN_0_9_10
 gboolean  nm_client_get_startup          (NMClient *client);
 gboolean  nm_client_get_manager_running  (NMClient *client);
 const GPtrArray *nm_client_get_active_connections (NMClient *client);
index bdc301f..a343d98 100644 (file)
@@ -68,8 +68,10 @@ typedef struct {
        void (*_reserved6) (void);
 } NMDeviceGenericClass;
 
+NM_AVAILABLE_IN_0_9_10
 GType nm_device_generic_get_type (void);
 
+NM_AVAILABLE_IN_0_9_10
 GObject *nm_device_generic_new (DBusGConnection *connection, const char *path);
 
 const char *nm_device_generic_get_hw_address (NMDeviceGeneric *device);
index 9e848da..054f9ae 100644 (file)
@@ -47,6 +47,7 @@ typedef enum {
 } NMDeviceTeamError;
 
 #define NM_DEVICE_TEAM_ERROR nm_device_team_error_quark ()
+NM_AVAILABLE_IN_0_9_10
 GQuark nm_device_team_error_quark (void);
 
 #define NM_DEVICE_TEAM_HW_ADDRESS  "hw-address"
@@ -69,8 +70,10 @@ typedef struct {
        void (*_reserved6) (void);
 } NMDeviceTeamClass;
 
+NM_AVAILABLE_IN_0_9_10
 GType nm_device_team_get_type (void);
 
+NM_AVAILABLE_IN_0_9_10
 GObject *nm_device_team_new (DBusGConnection *connection, const char *path);
 
 const char      *nm_device_team_get_hw_address (NMDeviceTeam *device);
index 3f38cf6..fa37e71 100644 (file)
@@ -57,6 +57,7 @@ typedef enum {
 } NMDeviceError;
 
 #define NM_DEVICE_ERROR nm_device_error_quark ()
+NM_AVAILABLE_IN_0_9_10
 GQuark nm_device_error_quark (void);
 
 #define NM_DEVICE_DEVICE_TYPE "device-type"
@@ -121,7 +122,9 @@ const char *         nm_device_get_udi              (NMDevice *device);
 const char *         nm_device_get_driver           (NMDevice *device);
 const char *         nm_device_get_driver_version   (NMDevice *device);
 const char *         nm_device_get_firmware_version (NMDevice *device);
+NM_AVAILABLE_IN_0_9_10
 const char *         nm_device_get_type_description (NMDevice *device);
+NM_AVAILABLE_IN_0_9_10
 const char *         nm_device_get_hw_address       (NMDevice *device);
 NMDeviceCapabilities nm_device_get_capabilities     (NMDevice *device);
 gboolean             nm_device_get_managed          (NMDevice *device);
@@ -136,12 +139,16 @@ NMDeviceState        nm_device_get_state            (NMDevice *device);
 NMDeviceState        nm_device_get_state_reason     (NMDevice *device, NMDeviceStateReason *reason);
 NMActiveConnection * nm_device_get_active_connection(NMDevice *device);
 const GPtrArray *    nm_device_get_available_connections(NMDevice *device);
+NM_AVAILABLE_IN_0_9_10
 const char *         nm_device_get_physical_port_id (NMDevice *device);
+NM_AVAILABLE_IN_0_9_10
 guint32              nm_device_get_mtu              (NMDevice *device);
 
 const char *         nm_device_get_product           (NMDevice  *device);
 const char *         nm_device_get_vendor            (NMDevice  *device);
+NM_AVAILABLE_IN_0_9_10
 const char *         nm_device_get_description       (NMDevice  *device);
+NM_AVAILABLE_IN_0_9_10
 char **              nm_device_disambiguate_names    (NMDevice **devices,
                                                       int        num_devices);
 
index 8d17693..aa2e66e 100644 (file)
@@ -66,11 +66,13 @@ GType nm_ip4_config_get_type (void);
 
 GObject *nm_ip4_config_new (DBusGConnection *connection, const char *object_path);
 
+NM_AVAILABLE_IN_0_9_10
 const char *     nm_ip4_config_get_gateway      (NMIP4Config *config);
 const GSList *   nm_ip4_config_get_addresses    (NMIP4Config *config);
 const GSList *   nm_ip4_config_get_routes       (NMIP4Config *config);
 const GArray *   nm_ip4_config_get_nameservers  (NMIP4Config *config);
 const GPtrArray *nm_ip4_config_get_domains      (NMIP4Config *config);
+NM_AVAILABLE_IN_0_9_10
 const GPtrArray *nm_ip4_config_get_searches     (NMIP4Config *config);
 const GArray *   nm_ip4_config_get_wins_servers (NMIP4Config *config);
 
index b6198fa..feef69f 100644 (file)
@@ -65,13 +65,17 @@ GType nm_ip6_config_get_type (void);
 
 GObject *nm_ip6_config_new (DBusGConnection *connection, const char *object_path);
 
+NM_AVAILABLE_IN_0_9_10
 const char *           nm_ip6_config_get_gateway         (NMIP6Config *config);
 const GSList *         nm_ip6_config_get_addresses       (NMIP6Config *config);
 const GSList *         nm_ip6_config_get_routes          (NMIP6Config *config);
+NM_AVAILABLE_IN_0_9_10
 guint32                nm_ip6_config_get_num_nameservers (NMIP6Config *config);
+NM_AVAILABLE_IN_0_9_10
 const struct in6_addr *nm_ip6_config_get_nameserver      (NMIP6Config *config, guint32 idx);
 const GSList *         nm_ip6_config_get_nameservers     (NMIP6Config *config);
 const GPtrArray *      nm_ip6_config_get_domains         (NMIP6Config *config);
+NM_AVAILABLE_IN_0_9_10
 const GPtrArray *      nm_ip6_config_get_searches        (NMIP6Config *config);
 
 G_END_DECLS
index eac713c..ae97184 100644 (file)
@@ -28,6 +28,8 @@
 #include <glib-object.h>
 #include <dbus/dbus-glib.h>
 
+#include <nm-version.h>
+
 G_BEGIN_DECLS
 
 #define NM_TYPE_OBJECT            (nm_object_get_type ())
index 3e5ae05..d5d9033 100644 (file)
@@ -110,10 +110,12 @@ void nm_remote_connection_commit_changes (NMRemoteConnection *connection,
                                           NMRemoteConnectionResultFunc callback,
                                           gpointer user_data);
 
+NM_AVAILABLE_IN_0_9_10
 void nm_remote_connection_commit_changes_unsaved (NMRemoteConnection *connection,
                                                   NMRemoteConnectionResultFunc callback,
                                                   gpointer user_data);
 
+NM_AVAILABLE_IN_0_9_10
 void nm_remote_connection_save (NMRemoteConnection *connection,
                                 NMRemoteConnectionResultFunc callback,
                                 gpointer user_data);
@@ -127,6 +129,7 @@ void nm_remote_connection_get_secrets (NMRemoteConnection *connection,
                                        NMRemoteConnectionGetSecretsFunc callback,
                                        gpointer user_data);
 
+NM_AVAILABLE_IN_0_9_10
 gboolean nm_remote_connection_get_unsaved (NMRemoteConnection *connection);
 
 G_END_DECLS
index af2f3b2..5ca646e 100644 (file)
@@ -138,16 +138,19 @@ gboolean nm_remote_settings_add_connection (NMRemoteSettings *settings,
                                             NMRemoteSettingsAddConnectionFunc callback,
                                             gpointer user_data);
 
+NM_AVAILABLE_IN_0_9_10
 gboolean nm_remote_settings_add_connection_unsaved (NMRemoteSettings *settings,
                                                     NMConnection *connection,
                                                     NMRemoteSettingsAddConnectionFunc callback,
                                                     gpointer user_data);
 
+NM_AVAILABLE_IN_0_9_10
 gboolean nm_remote_settings_load_connections (NMRemoteSettings *settings,
                                               char **filenames,
                                               char ***failures,
                                               GError **error);
 
+NM_AVAILABLE_IN_0_9_10
 gboolean nm_remote_settings_reload_connections (NMRemoteSettings *settings,
                                                 GError **error);
 
index 4457df3..9a6103f 100644 (file)
@@ -64,6 +64,8 @@ typedef enum {
  * @NM_SECRET_AGENT_CAPABILITY_LAST: bounds checking value; should not be used.
  *
  * #NMSecretAgentCapabilities indicate various capabilities of the agent.
+ *
+ * Since: 0.9.10
  */
 typedef enum /*< flags >*/ {
        NM_SECRET_AGENT_CAPABILITY_NONE = 0x0,
index 3c611a2..7e0a680 100644 (file)
@@ -170,6 +170,7 @@ char *nm_vpn_plugin_ui_interface_get_suggested_name (NMVpnPluginUiInterface *ifa
                                                      NMConnection *connection);
 
 /* Deprecated and no longer used */
+NM_DEPRECATED_IN_0_9_10
 gboolean nm_vpn_plugin_ui_interface_delete_connection (NMVpnPluginUiInterface *iface,
                                                        NMConnection *connection,
                                                        GError **error);
@@ -220,6 +221,7 @@ gboolean nm_vpn_plugin_ui_widget_interface_update_connection (NMVpnPluginUiWidge
                                                               GError **error);
 
 /* Deprecated and no longer used */
+NM_DEPRECATED_IN_0_9_10
 gboolean nm_vpn_plugin_ui_widget_interface_save_secrets (NMVpnPluginUiWidgetInterface *iface,
                                                          NMConnection *connection,
                                                          GError **error);
index 0c037e4..4f020f3 100644 (file)
@@ -149,6 +149,7 @@ NMVPNServiceState  nm_vpn_plugin_get_state      (NMVPNPlugin *plugin);
 void               nm_vpn_plugin_set_state      (NMVPNPlugin *plugin,
                                                  NMVPNServiceState state);
 
+NM_AVAILABLE_IN_0_9_10
 void               nm_vpn_plugin_secrets_required (NMVPNPlugin *plugin,
                                                    const char *message,
                                                    const char **hints);
index f5b7773..0e99da2 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
        -I${top_srcdir} \
        -I${top_srcdir}/include \
        -I${top_builddir}/include \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(UUID_CFLAGS)
index 79f6504..c13f456 100644 (file)
@@ -144,6 +144,7 @@ gboolean      nm_connection_replace_settings (NMConnection *connection,
                                               GHashTable *new_settings,
                                               GError **error);
 
+NM_AVAILABLE_IN_0_9_10
 gboolean      nm_connection_replace_settings_from_connection (NMConnection *connection,
                                                               NMConnection *new_connection,
                                                               GError **error);
@@ -200,18 +201,23 @@ const char *  nm_connection_get_uuid        (NMConnection *connection);
 
 const char *  nm_connection_get_id          (NMConnection *connection);
 
+NM_AVAILABLE_IN_0_9_10
 char *        nm_connection_get_virtual_device_description (NMConnection *connection);
 
 NMSetting8021x *           nm_connection_get_setting_802_1x            (NMConnection *connection);
 NMSettingBluetooth *       nm_connection_get_setting_bluetooth         (NMConnection *connection);
 NMSettingBond *            nm_connection_get_setting_bond              (NMConnection *connection);
+NM_AVAILABLE_IN_0_9_10
 NMSettingTeam *            nm_connection_get_setting_team              (NMConnection *connection);
+NM_AVAILABLE_IN_0_9_10
 NMSettingTeamPort *        nm_connection_get_setting_team_port         (NMConnection *connection);
 NMSettingBridge *          nm_connection_get_setting_bridge            (NMConnection *connection);
 NMSettingBridgePort *      nm_connection_get_setting_bridge_port       (NMConnection *connection);
 NMSettingCdma *            nm_connection_get_setting_cdma              (NMConnection *connection);
 NMSettingConnection *      nm_connection_get_setting_connection        (NMConnection *connection);
+NM_AVAILABLE_IN_0_9_10
 NMSettingDcb *             nm_connection_get_setting_dcb               (NMConnection *connection);
+NM_AVAILABLE_IN_0_9_10
 NMSettingGeneric *         nm_connection_get_setting_generic           (NMConnection *connection);
 NMSettingGsm *             nm_connection_get_setting_gsm               (NMConnection *connection);
 NMSettingInfiniband *      nm_connection_get_setting_infiniband        (NMConnection *connection);
index 383e0ea..f3358c7 100644 (file)
@@ -105,6 +105,7 @@ gboolean     nm_setting_bond_add_option         (NMSettingBond *setting,
 gboolean     nm_setting_bond_remove_option      (NMSettingBond *setting,
                                                  const char *name);
 
+NM_AVAILABLE_IN_0_9_10
 gboolean     nm_setting_bond_validate_option    (const char *name,
                                                  const char *value);
 
index 945ff77..5e3147e 100644 (file)
@@ -107,6 +107,7 @@ GType nm_setting_connection_get_type (void);
 NMSetting * nm_setting_connection_new                  (void);
 const char *nm_setting_connection_get_id               (NMSettingConnection *setting);
 const char *nm_setting_connection_get_uuid             (NMSettingConnection *setting);
+NM_AVAILABLE_IN_0_9_10
 const char *nm_setting_connection_get_interface_name   (NMSettingConnection *setting);
 const char *nm_setting_connection_get_connection_type  (NMSettingConnection *setting);
 gboolean    nm_setting_connection_get_autoconnect      (NMSettingConnection *setting);
@@ -136,6 +137,7 @@ const char *nm_setting_connection_get_secondary        (NMSettingConnection *set
 gboolean    nm_setting_connection_add_secondary        (NMSettingConnection *setting, const char *sec_uuid);
 void        nm_setting_connection_remove_secondary     (NMSettingConnection *setting, guint32 idx);
 
+NM_AVAILABLE_IN_0_9_10
 guint32     nm_setting_connection_get_gateway_ping_timeout (NMSettingConnection *setting);
 
 G_END_DECLS
index a8523d2..37dd36e 100644 (file)
@@ -127,8 +127,10 @@ typedef struct {
        void (*_reserved4) (void);
 } NMSettingDcbClass;
 
+NM_AVAILABLE_IN_0_9_10
 GType nm_setting_dcb_get_type (void);
 
+NM_AVAILABLE_IN_0_9_10
 NMSetting *       nm_setting_dcb_new                      (void);
 
 NMSettingDcbFlags nm_setting_dcb_get_app_fcoe_flags     (NMSettingDcb *setting);
index 5a151fd..1cabae0 100644 (file)
@@ -67,8 +67,10 @@ typedef struct {
        void (*_reserved4) (void);
 } NMSettingGenericClass;
 
+NM_AVAILABLE_IN_0_9_10
 GType nm_setting_generic_get_type (void);
 
+NM_AVAILABLE_IN_0_9_10
 NMSetting * nm_setting_generic_new              (void);
 
 G_END_DECLS
index 3bd234e..6d8e46d 100644 (file)
@@ -197,8 +197,10 @@ NMSettingSecretFlags nm_setting_gsm_get_pin_flags      (NMSettingGsm *setting);
 NMSettingSecretFlags nm_setting_gsm_get_password_flags (NMSettingGsm *setting);
 
 /* Deprecated */
-G_DEPRECATED int     nm_setting_gsm_get_network_type  (NMSettingGsm *setting);
-G_DEPRECATED guint32 nm_setting_gsm_get_allowed_bands (NMSettingGsm *setting);
+NM_DEPRECATED_IN_0_9_10
+int     nm_setting_gsm_get_network_type  (NMSettingGsm *setting);
+NM_DEPRECATED_IN_0_9_10
+guint32 nm_setting_gsm_get_allowed_bands (NMSettingGsm *setting);
 
 G_END_DECLS
 
index cd74b6b..50b9f7e 100644 (file)
@@ -66,9 +66,12 @@ typedef struct {
        void (*_reserved4) (void);
 } NMSettingTeamPortClass;
 
+NM_AVAILABLE_IN_0_9_10
 GType nm_setting_team_port_get_type (void);
 
+NM_AVAILABLE_IN_0_9_10
 NMSetting *  nm_setting_team_port_new (void);
+
 const char * nm_setting_team_port_get_config (NMSettingTeamPort *setting);
 
 G_END_DECLS
index d40b01c..978eed0 100644 (file)
@@ -67,9 +67,12 @@ typedef struct {
        void (*_reserved4) (void);
 } NMSettingTeamClass;
 
+NM_AVAILABLE_IN_0_9_10
 GType nm_setting_team_get_type (void);
 
+NM_AVAILABLE_IN_0_9_10
 NMSetting *  nm_setting_team_new                (void);
+
 const char * nm_setting_team_get_interface_name (NMSettingTeam *setting);
 const char * nm_setting_team_get_config (NMSettingTeam *setting);
 
index 45bec73..d26ef19 100644 (file)
@@ -92,11 +92,15 @@ const GByteArray *nm_setting_wired_get_mac_address      (NMSettingWired *setting
 const GByteArray *nm_setting_wired_get_cloned_mac_address (NMSettingWired *setting);
 
 const GSList     *nm_setting_wired_get_mac_address_blacklist   (NMSettingWired *setting);
+NM_AVAILABLE_IN_0_9_10
 guint32           nm_setting_wired_get_num_mac_blacklist_items (NMSettingWired *setting);
+NM_AVAILABLE_IN_0_9_10
 const char *      nm_setting_wired_get_mac_blacklist_item      (NMSettingWired *setting,
                                                                 guint32 idx);
+NM_AVAILABLE_IN_0_9_10
 gboolean          nm_setting_wired_add_mac_blacklist_item      (NMSettingWired *setting,
                                                                 const char *mac);
+NM_AVAILABLE_IN_0_9_10
 void              nm_setting_wired_remove_mac_blacklist_item   (NMSettingWired *setting,
                                                                 guint32 idx);
 
@@ -117,6 +121,7 @@ gboolean          nm_setting_wired_add_s390_option      (NMSettingWired *setting
                                                          const char *value);
 gboolean          nm_setting_wired_remove_s390_option   (NMSettingWired *setting,
                                                          const char *key);
+NM_AVAILABLE_IN_0_9_10
 const char **     nm_setting_wired_get_valid_s390_options (NMSettingWired *setting);
 
 G_END_DECLS
index dbc1959..6ad82f6 100644 (file)
@@ -134,11 +134,15 @@ const GByteArray *nm_setting_wireless_get_mac_address        (NMSettingWireless
 const GByteArray *nm_setting_wireless_get_cloned_mac_address (NMSettingWireless *setting);
 
 const GSList     *nm_setting_wireless_get_mac_address_blacklist   (NMSettingWireless *setting);
+NM_AVAILABLE_IN_0_9_10
 guint32           nm_setting_wireless_get_num_mac_blacklist_items (NMSettingWireless *setting);
+NM_AVAILABLE_IN_0_9_10
 const char *      nm_setting_wireless_get_mac_blacklist_item      (NMSettingWireless *setting,
                                                                    guint32 idx);
+NM_AVAILABLE_IN_0_9_10
 gboolean          nm_setting_wireless_add_mac_blacklist_item      (NMSettingWireless *setting,
                                                                    const char *mac);
+NM_AVAILABLE_IN_0_9_10
 void              nm_setting_wireless_remove_mac_blacklist_item   (NMSettingWireless *setting,
                                                                    guint32 idx);
 
@@ -160,7 +164,8 @@ gboolean          nm_setting_wireless_ap_security_compatible (NMSettingWireless
                                                               NM80211Mode ap_mode);
 
 /* Deprecated */
-G_DEPRECATED const char *nm_setting_wireless_get_security (NMSettingWireless *setting);
+NM_DEPRECATED_IN_0_9_10
+const char *nm_setting_wireless_get_security (NMSettingWireless *setting);
 
 G_END_DECLS
 
index 07e0747..51e7de4 100644 (file)
@@ -29,6 +29,8 @@
 #include <glib.h>
 #include <glib-object.h>
 
+#include <nm-version.h>
+
 G_BEGIN_DECLS
 
 #define NM_TYPE_SETTING            (nm_setting_get_type ())
index f6fdf36..12b3e8d 100644 (file)
@@ -47,6 +47,7 @@ char *      nm_utils_ssid_to_utf8  (const GByteArray *ssid);
 
 GHashTable *nm_utils_gvalue_hash_dup  (GHashTable *hash);
 
+NM_DEPRECATED_IN_0_9_10
 void        nm_utils_slist_free    (GSList *list, GDestroyNotify elem_destroy_fn);
 
 /**
@@ -136,18 +137,25 @@ gboolean nm_utils_wifi_is_channel_valid (guint32 channel, const char *band);
 #define NM_UTILS_HWADDR_LEN_MAX 20 /* INFINIBAND_ALEN */
 
 int         nm_utils_hwaddr_len   (int type) G_GNUC_PURE;
+NM_DEPRECATED_IN_0_9_10
 int         nm_utils_hwaddr_type  (int len) G_GNUC_PURE;
 char       *nm_utils_hwaddr_ntoa  (gconstpointer addr, int type);
 GByteArray *nm_utils_hwaddr_atoba (const char *asc, int type);
 guint8     *nm_utils_hwaddr_aton  (const char *asc, int type, gpointer buffer);
 
+NM_AVAILABLE_IN_0_9_10
 char       *nm_utils_hwaddr_ntoa_len  (gconstpointer addr, gsize length);
+NM_AVAILABLE_IN_0_9_10
 guint8     *nm_utils_hwaddr_aton_len  (const char *asc, gpointer buffer, gsize length);
 
+NM_AVAILABLE_IN_0_9_10
 gboolean    nm_utils_hwaddr_valid (const char *asc);
 
+NM_AVAILABLE_IN_0_9_10
 char *nm_utils_bin2hexstr (const char *bytes, int len, int final_len);
+NM_AVAILABLE_IN_0_9_10
 int   nm_utils_hex2byte   (const char *hex);
+NM_AVAILABLE_IN_0_9_10
 char *nm_utils_hexstr2bin (const char *hex, size_t len);
 
 gboolean    nm_utils_iface_valid_name(const char *name);
@@ -161,7 +169,9 @@ gboolean nm_utils_is_uuid (const char *str);
  * for both nm_utils_inet4_ntop() and nm_utils_inet6_ntop().
  **/
 #define NM_UTILS_INET_ADDRSTRLEN     INET6_ADDRSTRLEN
+NM_AVAILABLE_IN_0_9_10
 const char *nm_utils_inet4_ntop (in_addr_t inaddr, char *dst);
+NM_AVAILABLE_IN_0_9_10
 const char *nm_utils_inet6_ntop (const struct in6_addr *in6addr, char *dst);
 
 G_END_DECLS
index b5bbacc..0ef1bc0 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
        -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
        -DTEST_CERT_DIR=\"$(top_srcdir)/libnm-util/tests/certs/\"
index 96de112..27802c7 100644 (file)
@@ -30,7 +30,8 @@ AM_CPPFLAGS =                         \
        -I${top_srcdir}/libgsystem      \
        -I$(top_srcdir)/libnm-util      \
        -I$(top_builddir)/libnm-util    \
-       -I$(top_srcdir)/callouts
+       -I$(top_srcdir)/callouts        \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE
 
 # add each subdirectory that contains a libNM source file. $(sort) is being used
 # primarily for its side effect of removing duplicates.
index 6162b2e..b94e12e 100644 (file)
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
        -I${top_srcdir}/libnm-util \
        -I${top_builddir}/libnm-util \
        -I${srcdir}/.. \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(GUDEV_CFLAGS) \
        $(LIBNL_CFLAGS)
index 9bcb76c..937b477 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
        -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(POLKIT_CFLAGS) \
index 8185f6e..f0bc54b 100644 (file)
@@ -36,6 +36,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/libnm-glib \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(POLKIT_CFLAGS) \
index de02b11..6df9ac1 100644 (file)
@@ -19,6 +19,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/wifi \
        -I$(top_srcdir)/src/posix-signals \
        -I$(srcdir)/../ \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        -DTEST_IFCFG_DIR=\"$(abs_srcdir)\" \
        -DTEST_SCRATCH_DIR=\"$(abs_builddir)/\" \
        -DSYSCONFDIR=\"nonexistent\" \
index 1bcc4f1..a6c20f9 100644 (file)
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
        -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-util \
        -I$(top_srcdir)/libnm-glib \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        -DSYSCONFDIR=\"$(sysconfdir)\"
 
 pkglib_LTLIBRARIES = libnm-settings-plugin-ifcfg-suse.la
index d6579fd..a849552 100644 (file)
@@ -12,6 +12,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/libnm-glib \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(POLKIT_CFLAGS) \
index 67184d4..31d35db 100644 (file)
@@ -13,6 +13,7 @@ AM_CPPFLAGS= \
        -I$(top_srcdir)/src/config \
        -I$(top_srcdir)/src/settings \
        -I$(top_srcdir)/src/wifi \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(CHECK_CFLAGS) \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
index c363e1a..baaebf6 100644 (file)
@@ -12,6 +12,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/libnm-glib \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(POLKIT_CFLAGS) \
index d27f7e6..9c2edc3 100644 (file)
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src \
        -I$(top_srcdir)/src/settings \
        -I$(srcdir)/../ \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(POLKIT_CFLAGS) \
index 388186f..c2e8fda 100644 (file)
@@ -10,6 +10,7 @@ AM_CPPFLAGS = \
        -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(POLKIT_CFLAGS) \
index f260729..f4855fc 100644 (file)
@@ -17,6 +17,7 @@ AM_CPPFLAGS = \
        $(DBUS_CFLAGS) \
        $(POLKIT_CFLAGS) \
        $(CODE_COVERAGE_CFLAGS) \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        -DTEST_KEYFILES_DIR=\"$(abs_srcdir)/keyfiles\" \
        -DTEST_SCRATCH_DIR=\"$(abs_builddir)/keyfiles\" \
        -DNMCONFDIR=\"nonexistent\"
index eef2650..4dda163 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/dhcp-manager \
        -I$(top_srcdir)/src \
        -I$(top_builddir)/src \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS)
 
index 0e3e230..4a79b79 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
        -I${top_builddir}/include \
        $(DBUS_CFLAGS) \
        $(GLIB_CFLAGS) \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        -DBINDIR=\"$(bindir)\" \
        -DDATADIR=\"$(datadir)\" \
        -DNMLOCALEDIR=\"$(datadir)/locale\"
index 812100c..2fea947 100644 (file)
@@ -5,6 +5,7 @@ AM_CPPFLAGS = \
        -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        $(GLIB_CFLAGS) \
        $(DBUS_CFLAGS)
 
index ab6d810..5b66a16 100644 (file)
@@ -14,6 +14,7 @@ AM_CPPFLAGS= \
        $(NEWT_CFLAGS) \
        $(DBUS_CFLAGS) \
        $(GUDEV_CFLAGS) \
+       -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        -DLOCALEDIR=\""$(localedir)"\" \
        $(NULL)