Commit 9c4d86ee authored by Dan Winship's avatar Dan Winship

libnm-util, libnm-glib: add versioned deprecation/availability macros

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.
parent 95be722e
......@@ -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)\"
......
......@@ -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 = \
......
......@@ -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)
......
......@@ -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)
......
......@@ -59,5 +59,60 @@
(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 */
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
......@@ -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 ())
......
......@@ -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
......
......@@ -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);
......
......@@ -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,
......
......@@ -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);
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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
......
......@@ -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
......
......@@ -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 ())
......
......@@ -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
......
......@@ -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/\"
......
......@@ -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.
......
......@@ -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)
......
......@@ -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) \
......
......@@ -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) \
......
......@@ -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\" \
......
......@@ -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
......
......@@ -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) \
......
......@@ -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) \
......
......@@ -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) \
......
......@@ -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) \
......
......@@ -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) \
......
......@@ -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\"
......
......@@ -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)
......
......@@ -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\"
......
......@@ -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)
......
......@@ -14,6 +14,7 @@ AM_CPPFLAGS= \
$(NEWT_CFLAGS) \
$(DBUS_CFLAGS) \
$(GUDEV_CFLAGS) \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
-DLOCALEDIR=\""$(localedir)"\" \
$(NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment