summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-05-09 15:02:57 -0400
committerDan Winship <danw@gnome.org>2014-08-01 14:34:05 -0400
commit054c12ea30f7e41505ca54655c28abdc14fe05bc (patch)
tree66e2d2d16ae33880d6501d7681dd3a267e452ffe
parentb9fef07fff7ecc806563162b8311a070e98b23e6 (diff)
downloadNetworkManager-054c12ea30f7e41505ca54655c28abdc14fe05bc.tar.gz
libnm: remove all deprecated functions and types
Remove deprecated functions and enum types. For now, deprecated properties are still around, because removing them would cause warnings when talking to older implementations.
-rw-r--r--clients/cli/settings.c113
-rw-r--r--libnm-core/NetworkManager.h3
-rw-r--r--libnm-core/nm-setting-gsm.c58
-rw-r--r--libnm-core/nm-setting-gsm.h102
-rw-r--r--libnm-core/nm-setting-wireless.c22
-rw-r--r--libnm-core/nm-setting-wireless.h4
-rw-r--r--libnm-core/nm-setting.c29
-rw-r--r--libnm-core/nm-setting.h3
-rw-r--r--libnm-core/nm-utils.c62
-rw-r--r--libnm-core/nm-utils.h5
-rw-r--r--libnm/libnm.ver10
-rw-r--r--libnm/nm-access-point.c22
-rw-r--r--libnm/nm-access-point.h4
-rw-r--r--libnm/nm-client.c13
-rw-r--r--libnm/nm-client.h1
-rw-r--r--libnm/nm-device.h4
-rw-r--r--libnm/nm-vpn-plugin-ui-interface.c18
-rw-r--r--libnm/nm-vpn-plugin-ui-interface.h21
-rw-r--r--src/settings/plugins/keyfile/tests/test-keyfile.c1
19 files changed, 24 insertions, 471 deletions
diff --git a/clients/cli/settings.c b/clients/cli/settings.c
index a34f3c8338..3e7a7e2259 100644
--- a/clients/cli/settings.c
+++ b/clients/cli/settings.c
@@ -421,11 +421,9 @@ NmcOutputField nmc_fields_setting_gsm[] = {
SETTING_FIELD (NM_SETTING_GSM_PASSWORD_FLAGS, 20), /* 4 */
SETTING_FIELD (NM_SETTING_GSM_APN, 25), /* 5 */
SETTING_FIELD (NM_SETTING_GSM_NETWORK_ID, 12), /* 6 */
- SETTING_FIELD (NM_SETTING_GSM_NETWORK_TYPE, 15), /* 7 */
- SETTING_FIELD (NM_SETTING_GSM_ALLOWED_BANDS, 15), /* 8 */
- SETTING_FIELD (NM_SETTING_GSM_PIN, 10), /* 9 */
- SETTING_FIELD (NM_SETTING_GSM_PIN_FLAGS, 20), /* 10 */
- SETTING_FIELD (NM_SETTING_GSM_HOME_ONLY, 10), /* 11 */
+ SETTING_FIELD (NM_SETTING_GSM_PIN, 10), /* 7 */
+ SETTING_FIELD (NM_SETTING_GSM_PIN_FLAGS, 20), /* 8 */
+ SETTING_FIELD (NM_SETTING_GSM_HOME_ONLY, 10), /* 9 */
{NULL, NULL, 0, NULL, FALSE, FALSE, 0}
};
#define NMC_FIELDS_SETTING_GSM_ALL "name"","\
@@ -435,8 +433,6 @@ NmcOutputField nmc_fields_setting_gsm[] = {
NM_SETTING_GSM_PASSWORD_FLAGS","\
NM_SETTING_GSM_APN","\
NM_SETTING_GSM_NETWORK_ID","\
- NM_SETTING_GSM_NETWORK_TYPE","\
- NM_SETTING_GSM_ALLOWED_BANDS","\
NM_SETTING_GSM_PIN","\
NM_SETTING_GSM_PIN_FLAGS","\
NM_SETTING_GSM_HOME_ONLY
@@ -693,56 +689,6 @@ byte_array_to_string (const GByteArray *array)
}
static char *
-allowed_bands_to_string (guint32 bands)
-{
- GString *band_str;
-
- if (bands == NM_SETTING_GSM_BAND_UNKNOWN)
- return g_strdup (_("0 (unknown)"));
-
- band_str = g_string_new (NULL);
- g_string_printf (band_str, "%d (", bands);
-
- if (bands & NM_SETTING_GSM_BAND_ANY)
- g_string_append (band_str, _("any, "));
- if (bands & NM_SETTING_GSM_BAND_EGSM)
- g_string_append (band_str, _("900 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_DCS)
- g_string_append (band_str, _("1800 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_PCS)
- g_string_append (band_str, _("1900 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_G850)
- g_string_append (band_str, _("850 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_U2100)
- g_string_append (band_str, _("WCDMA 3GPP UMTS 2100 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_U1800)
- g_string_append (band_str, _("WCDMA 3GPP UMTS 1800 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_U17IV)
- g_string_append (band_str, _("WCDMA 3GPP UMTS 1700/2100 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_U800)
- g_string_append (band_str, _("WCDMA 3GPP UMTS 800 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_U850)
- g_string_append (band_str, _("WCDMA 3GPP UMTS 850 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_U900)
- g_string_append (band_str, _("WCDMA 3GPP UMTS 900 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_U17IX)
- g_string_append (band_str, _("WCDMA 3GPP UMTS 1700 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_U1900)
- g_string_append (band_str, _("WCDMA 3GPP UMTS 1900 MHz, "));
- if (bands & NM_SETTING_GSM_BAND_U2600)
- g_string_append (band_str, _("WCDMA 3GPP UMTS 2600 MHz, "));
-
- if (band_str->str[band_str->len-1] == '(')
- g_string_append (band_str, _("unknown"));
- else
- g_string_truncate (band_str, band_str->len-2); /* chop off trailing ', ' */
-
- g_string_append_c (band_str, ')');
-
- return g_string_free (band_str, FALSE);
-}
-
-static char *
vlan_flags_to_string (guint32 flags)
{
GString *flag_str;
@@ -1245,17 +1191,6 @@ DEFINE_GETTER (nmc_property_gsm_get_password, NM_SETTING_GSM_PASSWORD)
DEFINE_SECRET_FLAGS_GETTER (nmc_property_gsm_get_password_flags, NM_SETTING_GSM_PASSWORD_FLAGS)
DEFINE_GETTER (nmc_property_gsm_get_apn, NM_SETTING_GSM_APN)
DEFINE_GETTER (nmc_property_gsm_get_network_id, NM_SETTING_GSM_NETWORK_ID)
-DEFINE_GETTER (nmc_property_gsm_get_network_type, NM_SETTING_GSM_NETWORK_TYPE)
-
-static char *
-nmc_property_gsm_get_allowed_bands (NMSetting *setting)
-{
- NMSettingGsm *s_gsm = NM_SETTING_GSM (setting);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- return allowed_bands_to_string (nm_setting_gsm_get_allowed_bands (s_gsm));
-G_GNUC_END_IGNORE_DEPRECATIONS
-}
-
DEFINE_GETTER (nmc_property_gsm_get_pin, NM_SETTING_GSM_PIN)
DEFINE_SECRET_FLAGS_GETTER (nmc_property_gsm_get_pin_flags, NM_SETTING_GSM_PIN_FLAGS)
DEFINE_GETTER (nmc_property_gsm_get_home_only, NM_SETTING_GSM_HOME_ONLY)
@@ -2087,26 +2022,6 @@ nmc_property_set_string (NMSetting *setting, const char *prop, const char *val,
}
static gboolean
-nmc_property_set_int (NMSetting *setting, const char *prop, const char *val, GError **error)
-{
- long val_int;
-
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-
- if (!nmc_string_to_int (val, TRUE, G_MININT, G_MAXINT, &val_int)) {
- g_set_error (error, 1, 0, _("'%s' is not a valid number (or out of range)"), val);
- return FALSE;
- }
-
- /* Validate the number according to the property spec */
- if (!validate_int (setting, prop, (gint) val_int, error))
- return FALSE;
-
- g_object_set (setting, prop, val_int, NULL);
- return TRUE;
-}
-
-static gboolean
nmc_property_set_uint (NMSetting *setting, const char *prop, const char *val, GError **error)
{
unsigned long val_int;
@@ -5285,20 +5200,6 @@ nmc_properties_init (void)
NULL,
NULL,
NULL);
- nmc_add_prop_funcs (GLUE (GSM, NETWORK_TYPE),
- nmc_property_gsm_get_network_type,
- nmc_property_set_int,
- NULL,
- NULL,
- NULL,
- NULL);
- nmc_add_prop_funcs (GLUE (GSM, ALLOWED_BANDS),
- nmc_property_gsm_get_allowed_bands,
- nmc_property_set_uint,
- NULL,
- NULL,
- NULL,
- nmc_property_out2in_cut_paren);
nmc_add_prop_funcs (GLUE (GSM, PIN),
nmc_property_gsm_get_pin,
nmc_property_set_string,
@@ -6860,11 +6761,9 @@ setting_gsm_details (NMSetting *setting, NmCli *nmc, const char *one_prop)
set_val_str (arr, 4, nmc_property_gsm_get_password_flags (setting));
set_val_str (arr, 5, nmc_property_gsm_get_apn (setting));
set_val_str (arr, 6, nmc_property_gsm_get_network_id (setting));
- set_val_str (arr, 7, nmc_property_gsm_get_network_type (setting));
- set_val_str (arr, 8, nmc_property_gsm_get_allowed_bands (setting));
- set_val_str (arr, 9, nmc_property_gsm_get_pin (setting));
- set_val_str (arr, 10, nmc_property_gsm_get_pin_flags (setting));
- set_val_str (arr, 11, nmc_property_gsm_get_home_only (setting));
+ set_val_str (arr, 7, nmc_property_gsm_get_pin (setting));
+ set_val_str (arr, 8, nmc_property_gsm_get_pin_flags (setting));
+ set_val_str (arr, 9, nmc_property_gsm_get_home_only (setting));
g_ptr_array_add (nmc->output_data, arr);
print_data (nmc); /* Print all data */
diff --git a/libnm-core/NetworkManager.h b/libnm-core/NetworkManager.h
index 2280f2d7fa..741816dc26 100644
--- a/libnm-core/NetworkManager.h
+++ b/libnm-core/NetworkManager.h
@@ -104,9 +104,6 @@ typedef enum {
NM_STATE_CONNECTED_GLOBAL = 70
} NMState;
-/* For backwards compat */
-#define NM_STATE_CONNECTED NM_STATE_CONNECTED_GLOBAL
-
/**
* NMConnectivityState:
* @NM_CONNECTIVITY_UNKNOWN: Network connectivity is unknown.
diff --git a/libnm-core/nm-setting-gsm.c b/libnm-core/nm-setting-gsm.c
index 51ad390249..6442d9890e 100644
--- a/libnm-core/nm-setting-gsm.c
+++ b/libnm-core/nm-setting-gsm.c
@@ -196,38 +196,6 @@ nm_setting_gsm_get_network_id (NMSettingGsm *setting)
}
/**
- * nm_setting_gsm_get_network_type:
- * @setting: the #NMSettingGsm
- *
- * Returns: the #NMSettingGsm:network-type property of the setting
- *
- * Deprecated: 0.9.10: No longer used. Network type setting should be done talking to ModemManager directly.
- **/
-int
-nm_setting_gsm_get_network_type (NMSettingGsm *setting)
-{
- g_return_val_if_fail (NM_IS_SETTING_GSM (setting), -1);
-
- return NM_SETTING_GSM_GET_PRIVATE (setting)->network_type;
-}
-
-/**
- * nm_setting_gsm_get_allowed_bands:
- * @setting: the #NMSettingGsm
- *
- * Returns: the #NMSettingGsm:allowed-bands property of the setting
- *
- * Deprecated: 0.9.10: No longer used. Bands setting should be done talking to ModemManager directly.
- **/
-guint32
-nm_setting_gsm_get_allowed_bands (NMSettingGsm *setting)
-{
- g_return_val_if_fail (NM_IS_SETTING_GSM (setting), NM_SETTING_GSM_BAND_UNKNOWN);
-
- return NM_SETTING_GSM_GET_PRIVATE (setting)->allowed_bands;
-}
-
-/**
* nm_setting_gsm_get_pin:
* @setting: the #NMSettingGsm
*
@@ -636,15 +604,7 @@ nm_setting_gsm_class_init (NMSettingGsmClass *setting_class)
/**
* NMSettingGsm:network-type:
*
- * Network preference to force the device to only use specific network
- * technologies. The permitted values are %NM_SETTING_GSM_NETWORK_TYPE_ANY,
- * %NM_SETTING_GSM_NETWORK_TYPE_UMTS_HSPA,
- * %NM_SETTING_GSM_NETWORK_TYPE_GPRS_EDGE,
- * %NM_SETTING_GSM_NETWORK_TYPE_PREFER_UMTS_HSPA,
- * %NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE,
- * %NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G, and
- * %NM_SETTING_GSM_NETWORK_TYPE_4G. Note that not all devices allow network
- * preference control.
+ * (Unused)
*
* Deprecated: 0.9.10: No longer used. Network type setting should be done
* by talking to ModemManager directly.
@@ -652,9 +612,9 @@ nm_setting_gsm_class_init (NMSettingGsmClass *setting_class)
g_object_class_install_property
(object_class, PROP_NETWORK_TYPE,
g_param_spec_int (NM_SETTING_GSM_NETWORK_TYPE, "", "",
- NM_SETTING_GSM_NETWORK_TYPE_ANY,
- NM_SETTING_GSM_NETWORK_TYPE_4G,
- NM_SETTING_GSM_NETWORK_TYPE_ANY,
+ -1 /* NM_SETTING_GSM_NETWORK_TYPE_ANY */,
+ 5 /* NM_SETTING_GSM_NETWORK_TYPE_4G */,
+ -1 /* NM_SETTING_GSM_NETWORK_TYPE_ANY */,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
@@ -662,9 +622,7 @@ nm_setting_gsm_class_init (NMSettingGsmClass *setting_class)
/**
* NMSettingGsm:allowed-bands:
*
- * Bitfield of allowed frequency bands. Note that not all devices allow
- * frequency band control. Permitted values are those specified by
- * #NMSettingGsmNetworkBand.
+ * (Unused)
*
* Deprecated: 0.9.10: No longer used. Band setting should be done by
* talking to ModemManager directly.
@@ -672,9 +630,9 @@ nm_setting_gsm_class_init (NMSettingGsmClass *setting_class)
g_object_class_install_property
(object_class, PROP_ALLOWED_BANDS,
g_param_spec_uint (NM_SETTING_GSM_ALLOWED_BANDS, "", "",
- NM_SETTING_GSM_BAND_UNKNOWN,
- NM_SETTING_GSM_BANDS_MAX,
- NM_SETTING_GSM_BAND_ANY,
+ 0 /* NM_SETTING_GSM_BAND_UNKNOWN */,
+ 0x3fff /* NM_SETTING_GSM_BANDS_MAX */,
+ 1 /* NM_SETTING_GSM_BAND_ANY */,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_STRINGS));
diff --git a/libnm-core/nm-setting-gsm.h b/libnm-core/nm-setting-gsm.h
index 564a8b4b9d..4675e409b7 100644
--- a/libnm-core/nm-setting-gsm.h
+++ b/libnm-core/nm-setting-gsm.h
@@ -69,102 +69,6 @@ GQuark nm_setting_gsm_error_quark (void);
#define NM_SETTING_GSM_ALLOWED_BANDS "allowed-bands"
#define NM_SETTING_GSM_NETWORK_TYPE "network-type"
-/**
- * NMSettingGsmNetworkType:
- * @NM_SETTING_GSM_NETWORK_TYPE_ANY: any access technology may be used
- * @NM_SETTING_GSM_NETWORK_TYPE_UMTS_HSPA: only 3G-type (UMTS and HSPA)
- * technologies may be used
- * @NM_SETTING_GSM_NETWORK_TYPE_GPRS_EDGE: only 2G-type (GPRS and EDGE)
- * technologies may be used
- * @NM_SETTING_GSM_NETWORK_TYPE_PREFER_UMTS_HSPA: 3G-type technologies are
- * preferred but 2G-type technologies may be used as a fallback
- * @NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE: 2G-type technologies are
- * preferred but 3G-type technologies may be used as a fallback
- * @NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G: 4G/LTE-type technologies are
- * preferred but 3G/2/-type technologies may be used as a fallback
- * @NM_SETTING_GSM_NETWORK_TYPE_4G: only 4G/LTE type
- * technologies may be used
- *
- * #NMSettingGsmNetworkType values indicate the allowed access technologies
- * the device may use when connecting to this network.
- *
- * Deprecated: 0.9.10: No longer used.
- */
-typedef enum {
- NM_SETTING_GSM_NETWORK_TYPE_ANY = -1,
- NM_SETTING_GSM_NETWORK_TYPE_UMTS_HSPA = 0,
- NM_SETTING_GSM_NETWORK_TYPE_GPRS_EDGE = 1,
- NM_SETTING_GSM_NETWORK_TYPE_PREFER_UMTS_HSPA = 2,
- NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE = 3,
- NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G = 4,
- NM_SETTING_GSM_NETWORK_TYPE_4G = 5
-} NMSettingGsmNetworkType;
-
-/**
- * NMSettingGsmNetworkBand:
- * @NM_SETTING_GSM_BAND_UNKNOWN: unknown or no band specified
- * @NM_SETTING_GSM_BAND_ANY: any band is allowed
- * @NM_SETTING_GSM_BAND_EGSM: 900 MHz original GSM band
- * @NM_SETTING_GSM_BAND_DCS: 1800 MHz DCS band
- * @NM_SETTING_GSM_BAND_PCS: US 1900 MHz PCS band
- * @NM_SETTING_GSM_BAND_G850: US 850 MHz Cellular band
- * @NM_SETTING_GSM_BAND_U2100: WCDMA 3GPP UMTS 2100 MHz (Class I)
- * @NM_SETTING_GSM_BAND_U1800: WCDMA 3GPP UMTS 1800 MHz (Class III)
- * @NM_SETTING_GSM_BAND_U17IV: WCDMA 3GPP AWS 1700/2100 MHz (Class IV)
- * @NM_SETTING_GSM_BAND_U800: WCDMA 3GPP UMTS 800 MHz (Class VI)
- * @NM_SETTING_GSM_BAND_U850: WCDMA 3GPP UMTS 850 MHz (Class V)
- * @NM_SETTING_GSM_BAND_U900: WCDMA 3GPP UMTS 900 MHz (Class VIII)
- * @NM_SETTING_GSM_BAND_U17IX: WCDMA 3GPP UMTS 1700 MHz (Class IX)
- * @NM_SETTING_GSM_BAND_U1900: WCDMA 3GPP UMTS 1900 MHz (Class II)
- * @NM_SETTING_GSM_BAND_U2600: WCDMA 3GPP UMTS 2600 MHz (Class VII, internal)
- *
- * #NMSettingGsmNetworkBand values indicate the allowed frequency bands
- * the device may use when connecting to this network.
- *
- * Deprecated: 0.9.10: No longer used.
- */
-typedef enum {
- NM_SETTING_GSM_BAND_UNKNOWN = 0x00000000,
- NM_SETTING_GSM_BAND_ANY = 0x00000001,
- NM_SETTING_GSM_BAND_EGSM = 0x00000002, /* 900 MHz */
- NM_SETTING_GSM_BAND_DCS = 0x00000004, /* 1800 MHz */
- NM_SETTING_GSM_BAND_PCS = 0x00000008, /* 1900 MHz */
- NM_SETTING_GSM_BAND_G850 = 0x00000010, /* 850 MHz */
- NM_SETTING_GSM_BAND_U2100 = 0x00000020, /* WCDMA 3GPP UMTS 2100 MHz (Class I) */
- NM_SETTING_GSM_BAND_U1800 = 0x00000040, /* WCDMA 3GPP UMTS 1800 MHz (Class III) */
- NM_SETTING_GSM_BAND_U17IV = 0x00000080, /* WCDMA 3GPP AWS 1700/2100 MHz (Class IV) */
- NM_SETTING_GSM_BAND_U800 = 0x00000100, /* WCDMA 3GPP UMTS 800 MHz (Class VI) */
- NM_SETTING_GSM_BAND_U850 = 0x00000200, /* WCDMA 3GPP UMTS 850 MHz (Class V) */
- NM_SETTING_GSM_BAND_U900 = 0x00000400, /* WCDMA 3GPP UMTS 900 MHz (Class VIII) */
- NM_SETTING_GSM_BAND_U17IX = 0x00000800, /* WCDMA 3GPP UMTS 1700 MHz (Class IX) */
- NM_SETTING_GSM_BAND_U1900 = 0x00001000, /* WCDMA 3GPP UMTS 1900 MHz (Class II) */
- NM_SETTING_GSM_BAND_U2600 = 0x00002000, /* WCDMA 3GPP UMTS 2600 MHz (Class VII, internal) */
-} NMSettingGsmNetworkBand;
-
-/**
- * NM_SETTING_GSM_BANDS_MAX:
- *
- * #NM_SETTING_GSM_BANDS_MAX macro indicate the maximal value that can be used
- * as the allowed frequency bands (#NMSettingGsm:allowed-bands property).
- *
- * Deprecated: 0.9.10: No longer used.
- */
-#define NM_SETTING_GSM_BANDS_MAX ( NM_SETTING_GSM_BAND_UNKNOWN \
- | NM_SETTING_GSM_BAND_ANY \
- | NM_SETTING_GSM_BAND_EGSM \
- | NM_SETTING_GSM_BAND_DCS \
- | NM_SETTING_GSM_BAND_PCS \
- | NM_SETTING_GSM_BAND_G850 \
- | NM_SETTING_GSM_BAND_U2100 \
- | NM_SETTING_GSM_BAND_U1800 \
- | NM_SETTING_GSM_BAND_U17IV \
- | NM_SETTING_GSM_BAND_U800 \
- | NM_SETTING_GSM_BAND_U850 \
- | NM_SETTING_GSM_BAND_U900 \
- | NM_SETTING_GSM_BAND_U17IX \
- | NM_SETTING_GSM_BAND_U1900 \
- | NM_SETTING_GSM_BAND_U2600)
-
typedef struct {
NMSetting parent;
} NMSettingGsm;
@@ -193,12 +97,6 @@ gboolean nm_setting_gsm_get_home_only (NMSettingGsm *setting);
NMSettingSecretFlags nm_setting_gsm_get_pin_flags (NMSettingGsm *setting);
NMSettingSecretFlags nm_setting_gsm_get_password_flags (NMSettingGsm *setting);
-/* Deprecated */
-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
#endif /* NM_SETTING_GSM_H */
diff --git a/libnm-core/nm-setting-wireless.c b/libnm-core/nm-setting-wireless.c
index 24fae397b3..bbd5d41820 100644
--- a/libnm-core/nm-setting-wireless.c
+++ b/libnm-core/nm-setting-wireless.c
@@ -629,23 +629,6 @@ nm_setting_wireless_get_mtu (NMSettingWireless *setting)
}
/**
- * nm_setting_wireless_get_security:
- * @setting: the #NMSettingWireless
- *
- * Returns: the #NMSettingWireless:security property of the setting
- *
- * Deprecated: 0.9.10: No longer used. Security rescrictions are recognized by
- * the presence of NM_SETTING_WIRELESS_SECURITY_SETTING_NAME in the connection.
- **/
-const char *
-nm_setting_wireless_get_security (NMSettingWireless *setting)
-{
- g_return_val_if_fail (NM_IS_SETTING_WIRELESS (setting), NULL);
-
- return NM_SETTING_WIRELESS_GET_PRIVATE (setting)->security;
-}
-
-/**
* nm_setting_wireless_get_hidden:
* @setting: the #NMSettingWireless
*
@@ -1211,10 +1194,7 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *setting_class)
/**
* NMSettingWireless:security:
*
- * If the wireless connection has any security restrictions, like 802.1x,
- * WEP, or WPA, set this property to
- * %NM_SETTING_WIRELESS_SECURITY_SETTING_NAME and ensure the connection
- * contains a valid #NMSettingWirelessSecurity setting.
+ * (Unused)
*
* Deprecated: 0.9.10: No longer used. Security restrictions are recognized
* by the presence of a #NMSettingWirelessSecurity setting in the
diff --git a/libnm-core/nm-setting-wireless.h b/libnm-core/nm-setting-wireless.h
index 18f78cff66..3694c0a34c 100644
--- a/libnm-core/nm-setting-wireless.h
+++ b/libnm-core/nm-setting-wireless.h
@@ -165,10 +165,6 @@ gboolean nm_setting_wireless_ap_security_compatible (NMSettingWireless
NM80211ApSecurityFlags ap_rsn,
NM80211Mode ap_mode);
-/* Deprecated */
-NM_DEPRECATED_IN_0_9_10
-const char *nm_setting_wireless_get_security (NMSettingWireless *setting);
-
G_END_DECLS
#endif /* NM_SETTING_WIRELESS_H */
diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c
index 9a50a2b732..447b97ae6b 100644
--- a/libnm-core/nm-setting.c
+++ b/libnm-core/nm-setting.c
@@ -399,6 +399,10 @@ nm_setting_new_from_hash (GType setting_type, GHashTable *hash)
continue;
}
+ /* 'name' doesn't get deserialized */
+ if (strcmp (g_param_spec_get_name (param_spec), NM_SETTING_NAME) == 0)
+ continue;
+
g_value_init (dst_value, G_VALUE_TYPE (src_value));
if (g_value_transform (src_value, dst_value))
params[n_params++].name = prop_name;
@@ -1372,28 +1376,6 @@ constructor (GType type,
}
static void
-set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
-{
- NMSettingPrivate *priv = NM_SETTING_GET_PRIVATE (object);
-
- switch (prop_id) {
- case PROP_NAME:
- /* The setter for NAME is deprecated and should not be used anymore.
- * Keep the setter for NAME to remain backward compatible.
- * Only assert that the caller does not try to set the name to a different value
- * then the registered name, which would be extra wrong.
- **/
- _ensure_setting_info (object, priv);
- g_return_if_fail (!g_strcmp0 (priv->info->name, g_value_get_string (value)));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
@@ -1418,7 +1400,6 @@ nm_setting_class_init (NMSettingClass *setting_class)
/* virtual methods */
object_class->constructor = constructor;
- object_class->set_property = set_property;
object_class->get_property = get_property;
setting_class->update_one_secret = update_one_secret;
@@ -1440,6 +1421,6 @@ nm_setting_class_init (NMSettingClass *setting_class)
(object_class, PROP_NAME,
g_param_spec_string (NM_SETTING_NAME, "", "",
NULL,
- G_PARAM_READWRITE |
+ G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
}
diff --git a/libnm-core/nm-setting.h b/libnm-core/nm-setting.h
index b58137a6e7..8f250c2ef4 100644
--- a/libnm-core/nm-setting.h
+++ b/libnm-core/nm-setting.h
@@ -63,9 +63,6 @@ typedef enum
GQuark nm_setting_error_quark (void);
-/* DEPRECATED AND UNUSED */
-#define NM_SETTING_PARAM_SERIALIZE (1 << (0 + G_PARAM_USER_SHIFT))
-
/* The property of the #NMSetting is required for the setting to be valid */
#define NM_SETTING_PARAM_REQUIRED (1 << (1 + G_PARAM_USER_SHIFT))
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
index 81b8f6d330..de9a3774d9 100644
--- a/libnm-core/nm-utils.c
+++ b/libnm-core/nm-utils.c
@@ -476,21 +476,6 @@ nm_utils_gvalue_hash_dup (GHashTable *hash)
return table;
}
-/**
- * nm_utils_slist_free: (skip)
- * @list: a #GSList
- * @elem_destroy_fn: user function called for each element in @list
- *
- * Utility function to free a #GSList.
- *
- * Deprecated: use g_slist_free_full().
- **/
-void
-nm_utils_slist_free (GSList *list, GDestroyNotify elem_destroy_fn)
-{
- g_slist_free_full (list, elem_destroy_fn);
-}
-
gboolean
_nm_utils_string_in_list (const char *str, const char **valid_strings)
{
@@ -1952,34 +1937,6 @@ nm_utils_hwaddr_len (int type)
return -1;
}
-/**
- * nm_utils_hwaddr_type:
- * @len: the length of hardware address in bytes
- *
- * Returns the type (either %ARPHRD_ETHER or %ARPHRD_INFINIBAND) of
- * the raw address given its length.
- *
- * Return value: the type, either %ARPHRD_ETHER or %ARPHRD_INFINIBAND.
- * If the length is unexpected, return -1 (unsupported type/length).
- *
- * Deprecated: This could not be extended to cover other types, since
- * there is not a one-to-one mapping between types and lengths. This
- * was mostly only used to get a type to pass to
- * nm_utils_hwaddr_ntoa() or nm_utils_hwaddr_aton() when you only had
- * a length; but you can just use nm_utils_hwaddr_ntoa_len() or
- * nm_utils_hwaddr_aton_len() now instead.
- */
-int
-nm_utils_hwaddr_type (int len)
-{
- if (len == ETH_ALEN)
- return ARPHRD_ETHER;
- else if (len == INFINIBAND_ALEN)
- return ARPHRD_INFINIBAND;
- else
- return -1;
-}
-
#define HEXVAL(c) ((c) <= '9' ? (c) - '0' : ((c) & 0x4F) - 'A' + 10)
/**
@@ -2490,9 +2447,6 @@ nm_utils_check_virtual_device_compatibility (GType virtual_type, GType other_typ
/***********************************************************/
-/* Unused prototype to make the compiler happy */
-const NMUtilsPrivateData *nm_util_get_private (void);
-
static const NMUtilsPrivateData data = {
.nm_setting_ip4_config_get_address_label = nm_setting_ip4_config_get_address_label,
.nm_setting_ip4_config_add_address_with_label = nm_setting_ip4_config_add_address_with_label,
@@ -2513,19 +2467,3 @@ nm_utils_get_private (void)
{
return &data;
}
-
-/**
- * nm_util_get_private:
- *
- * You should not use this function for any reason.
- *
- * Returns: Who knows? It's a mystery.
- *
- * Since: 0.9.10
- */
-const NMUtilsPrivateData *
-nm_util_get_private (void)
-{
- /* Compat function to preserve ABI */
- return nm_utils_get_private ();
-}
diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h
index 21c30598a8..127d8d9e33 100644
--- a/libnm-core/nm-utils.h
+++ b/libnm-core/nm-utils.h
@@ -42,9 +42,6 @@ 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);
-
/**
* NMUtilsSecurityType:
* @NMU_SEC_INVALID: unknown or invalid security, placeholder and not used
@@ -135,8 +132,6 @@ 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);
diff --git a/libnm/libnm.ver b/libnm/libnm.ver
index aed087d6ed..639f0c914c 100644
--- a/libnm/libnm.ver
+++ b/libnm/libnm.ver
@@ -5,7 +5,6 @@ global:
nm_access_point_get_bssid;
nm_access_point_get_flags;
nm_access_point_get_frequency;
- nm_access_point_get_hw_address;
nm_access_point_get_max_bitrate;
nm_access_point_get_mode;
nm_access_point_get_rsn_flags;
@@ -61,7 +60,6 @@ global:
nm_client_permission_get_type;
nm_client_permission_result_get_type;
nm_client_set_logging;
- nm_client_sleep;
nm_client_wimax_get_enabled;
nm_client_wimax_hardware_get_enabled;
nm_client_wimax_set_enabled;
@@ -595,11 +593,9 @@ global:
nm_setting_get_virtual_iface_name;
nm_setting_gsm_error_get_type;
nm_setting_gsm_error_quark;
- nm_setting_gsm_get_allowed_bands;
nm_setting_gsm_get_apn;
nm_setting_gsm_get_home_only;
nm_setting_gsm_get_network_id;
- nm_setting_gsm_get_network_type;
nm_setting_gsm_get_number;
nm_setting_gsm_get_password;
nm_setting_gsm_get_password_flags;
@@ -607,8 +603,6 @@ global:
nm_setting_gsm_get_pin_flags;
nm_setting_gsm_get_type;
nm_setting_gsm_get_username;
- nm_setting_gsm_network_band_get_type;
- nm_setting_gsm_network_type_get_type;
nm_setting_gsm_new;
nm_setting_hash_flags_get_type;
nm_setting_infiniband_error_get_type;
@@ -840,7 +834,6 @@ global:
nm_setting_wireless_get_num_mac_blacklist_items;
nm_setting_wireless_get_num_seen_bssids;
nm_setting_wireless_get_rate;
- nm_setting_wireless_get_security;
nm_setting_wireless_get_seen_bssid;
nm_setting_wireless_get_ssid;
nm_setting_wireless_get_tx_power;
@@ -885,7 +878,6 @@ global:
nm_ssid_get_type;
nm_string_array_get_type;
nm_uint_array_get_type;
- nm_util_get_private;
nm_utils_ap_mode_security_valid;
nm_utils_bin2hexstr;
nm_utils_check_virtual_device_compatibility;
@@ -902,7 +894,6 @@ global:
nm_utils_hwaddr_len;
nm_utils_hwaddr_ntoa;
nm_utils_hwaddr_ntoa_len;
- nm_utils_hwaddr_type;
nm_utils_hwaddr_valid;
nm_utils_iface_valid_name;
nm_utils_inet4_ntop;
@@ -928,7 +919,6 @@ global:
nm_utils_same_ssid;
nm_utils_security_type_get_type;
nm_utils_security_valid;
- nm_utils_slist_free;
nm_utils_ssid_to_utf8;
nm_utils_uuid_generate;
nm_utils_uuid_generate_from_string;
diff --git a/libnm/nm-access-point.c b/libnm/nm-access-point.c
index b462a6b169..bd02fb584e 100644
--- a/libnm/nm-access-point.c
+++ b/libnm/nm-access-point.c
@@ -197,23 +197,6 @@ nm_access_point_get_bssid (NMAccessPoint *ap)
}
/**
- * nm_access_point_get_hw_address:
- * @ap: a #NMAccessPoint
- *
- * Gets the hardware (MAC) address of the access point.
- *
- * Returns: the hardware address of the access point. This is the internal string used by the
- * access point and must not be modified.
- *
- * Deprecated: 0.9: Use nm_access_point_get_bssid() instead.
- **/
-const char *
-nm_access_point_get_hw_address (NMAccessPoint *ap)
-{
- return nm_access_point_get_bssid (ap);
-}
-
-/**
* nm_access_point_get_mode:
* @ap: a #NMAccessPoint
*
@@ -507,6 +490,7 @@ register_properties (NMAccessPoint *ap)
{ NM_ACCESS_POINT_RSN_FLAGS, &priv->rsn_flags },
{ NM_ACCESS_POINT_SSID, &priv->ssid, demarshal_ssid },
{ NM_ACCESS_POINT_FREQUENCY, &priv->frequency },
+ /* The D-Bus property is HwAddress, but the GObject property is "bssid" */
{ NM_ACCESS_POINT_HW_ADDRESS, &priv->bssid },
{ NM_ACCESS_POINT_MODE, &priv->mode },
{ NM_ACCESS_POINT_MAX_BITRATE, &priv->max_bitrate },
@@ -624,7 +608,9 @@ nm_access_point_class_init (NMAccessPointClass *ap_class)
/**
* NMAccessPoint:hw-address:
*
- * The hardware address of the access point.
+ * Alias for #NMAccessPoint:bssid.
+ *
+ * Deprecated: 1.0: use #NMAccessPoint:bssid.
**/
g_object_class_install_property
(object_class, PROP_HW_ADDRESS,
diff --git a/libnm/nm-access-point.h b/libnm/nm-access-point.h
index d3150f8eee..df62c7cc5b 100644
--- a/libnm/nm-access-point.h
+++ b/libnm/nm-access-point.h
@@ -87,10 +87,6 @@ GSList * nm_access_point_filter_connections (NMAccessPoint *ap,
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
#endif /* NM_ACCESS_POINT_H */
diff --git a/libnm/nm-client.c b/libnm/nm-client.c
index 8a17858cbf..3c42160054 100644
--- a/libnm/nm-client.c
+++ b/libnm/nm-client.c
@@ -1088,19 +1088,6 @@ nm_client_networking_set_enabled (NMClient *client, gboolean enable)
}
/**
- * nm_client_sleep:
- * @client: a #NMClient
- * @sleep_: %TRUE to put the daemon to sleep
- *
- * Deprecated; use nm_client_networking_set_enabled() instead.
- **/
-void
-nm_client_sleep (NMClient *client, gboolean sleep_)
-{
- nm_client_networking_set_enabled (client, !sleep_);
-}
-
-/**
* nm_client_get_manager_running:
* @client: a #NMClient
*
diff --git a/libnm/nm-client.h b/libnm/nm-client.h
index ffe513cb03..0e9ec4e7a3 100644
--- a/libnm/nm-client.h
+++ b/libnm/nm-client.h
@@ -226,7 +226,6 @@ 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);
-void nm_client_sleep (NMClient *client, gboolean sleep_);
NMClientPermissionResult nm_client_get_permission_result (NMClient *client,
NMClientPermission permission);
diff --git a/libnm/nm-device.h b/libnm/nm-device.h
index 707fddf82a..87bc14fe37 100644
--- a/libnm/nm-device.h
+++ b/libnm/nm-device.h
@@ -177,10 +177,6 @@ gboolean nm_device_connection_compatible (NMDevice *device,
NM_AVAILABLE_IN_0_9_10
GType nm_device_get_setting_type (NMDevice *device);
-/* Deprecated */
-NM_DEPRECATED_IN_1_0
-typedef void (*NMDeviceDeactivateFn) (NMDevice *device, GError *error, gpointer user_data);
-
G_END_DECLS
#endif /* NM_DEVICE_H */
diff --git a/libnm/nm-vpn-plugin-ui-interface.c b/libnm/nm-vpn-plugin-ui-interface.c
index a4a10836e8..71c374cb4e 100644
--- a/libnm/nm-vpn-plugin-ui-interface.c
+++ b/libnm/nm-vpn-plugin-ui-interface.c
@@ -156,15 +156,6 @@ nm_vpn_plugin_ui_interface_get_suggested_name (NMVpnPluginUiInterface *iface,
return NULL;
}
-gboolean
-nm_vpn_plugin_ui_interface_delete_connection (NMVpnPluginUiInterface *iface,
- NMConnection *connection,
- GError **error)
-{
- /* Deprecated and no longer used */
- return TRUE;
-}
-
static void
widget_interface_init (gpointer g_iface)
@@ -236,12 +227,3 @@ nm_vpn_plugin_ui_widget_interface_update_connection (NMVpnPluginUiWidgetInterfac
return NM_VPN_PLUGIN_UI_WIDGET_INTERFACE_GET_INTERFACE (iface)->update_connection (iface, connection, error);
}
-
-gboolean
-nm_vpn_plugin_ui_widget_interface_save_secrets (NMVpnPluginUiWidgetInterface *iface,
- NMConnection *connection,
- GError **error)
-{
- /* Deprecated and no longer used */
- return TRUE;
-}
diff --git a/libnm/nm-vpn-plugin-ui-interface.h b/libnm/nm-vpn-plugin-ui-interface.h
index 9c6e49ebe6..d29d93794e 100644
--- a/libnm/nm-vpn-plugin-ui-interface.h
+++ b/libnm/nm-vpn-plugin-ui-interface.h
@@ -135,9 +135,6 @@ struct _NMVpnPluginUiInterface {
*/
char * (*get_suggested_name) (NMVpnPluginUiInterface *iface, NMConnection *connection);
- /* Deprecated and no longer used */
- gboolean (*delete_connection) (NMVpnPluginUiInterface *iface, NMConnection *connection, GError **error);
-
/* Padding for future expansion */
void (*_reserved1) (void);
void (*_reserved2) (void);
@@ -167,13 +164,6 @@ gboolean nm_vpn_plugin_ui_interface_export (NMVpnPluginUiInterface *iface,
char *nm_vpn_plugin_ui_interface_get_suggested_name (NMVpnPluginUiInterface *iface,
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);
-
-
/**************************************************/
/* UI widget interface */
/**************************************************/
@@ -200,11 +190,6 @@ struct _NMVpnPluginUiWidgetInterface {
NMConnection *connection,
GError **error);
- /* Deprecated and no longer used */
- gboolean (*save_secrets) (NMVpnPluginUiWidgetInterface *iface,
- NMConnection *connection,
- GError **error);
-
/* Emitted when the value of a UI widget changes. May trigger a validity
* check via update_connection() to write values to the connection */
void (*changed) (NMVpnPluginUiWidgetInterface *iface);
@@ -218,12 +203,6 @@ gboolean nm_vpn_plugin_ui_widget_interface_update_connection (NMVpnPluginUiWidge
NMConnection *connection,
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);
-
G_END_DECLS
#endif /* NM_VPN_PLUGIN_UI_INTERFACE_H */
diff --git a/src/settings/plugins/keyfile/tests/test-keyfile.c b/src/settings/plugins/keyfile/tests/test-keyfile.c
index e71bb2393b..4161c3ee44 100644
--- a/src/settings/plugins/keyfile/tests/test-keyfile.c
+++ b/src/settings/plugins/keyfile/tests/test-keyfile.c
@@ -2215,7 +2215,6 @@ test_write_gsm_connection (void)
NM_SETTING_GSM_PIN, "123456",
NM_SETTING_GSM_NETWORK_ID, "254098",
NM_SETTING_GSM_HOME_ONLY, TRUE,
- NM_SETTING_GSM_NETWORK_TYPE, NM_SETTING_GSM_NETWORK_TYPE_PREFER_UMTS_HSPA,
NULL);
/* Write out the connection */