From 6217c1e74c093b95b16880a30286c8e60a6fb746 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 4 Aug 2014 19:57:20 -0400 Subject: libnm-core: drop :interface-name properties on virtual NMSetting types Remove the virtual :interface-name properties and their getters, and use property overrides to do backward-compat handling when serializing/deserializing. Now when constructing an NMConnection from a hash, if the virtual property is set and the NMSettingConnection property isn't, then the override for NMSettingConnection:interface-name will set that property to the value of the virtual interface-name. And when converting an NMConnection to a hash, the overrides for the virtual properties will return the value of NMSettingConnection:interface-name. --- libnm-core/nm-setting-private.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'libnm-core/nm-setting-private.h') diff --git a/libnm-core/nm-setting-private.h b/libnm-core/nm-setting-private.h index 00c66ba0db..9d9a4caa4f 100644 --- a/libnm-core/nm-setting-private.h +++ b/libnm-core/nm-setting-private.h @@ -101,15 +101,18 @@ NMSetting * _nm_setting_find_in_list_required (GSList *all_settings, const char *error_prefix_setting_name, const char *error_prefix_property_name); -NMSettingVerifyResult _nm_setting_verify_deprecated_virtual_iface_name (const char *interface_name, - gboolean allow_missing, - const char *setting_name, - const char *setting_property, - GQuark error_quark, - gint e_invalid_property, - gint e_missing_property, - GSList *all_settings, - GError **error); +NMSettingVerifyResult _nm_setting_verify_required_virtual_interface_name (GSList *all_settings, + GError **error); + +gboolean _nm_setting_get_deprecated_virtual_interface_name (NMSetting *setting, + NMConnection *connection, + const char *property, + GValue *value); +gboolean _nm_setting_set_deprecated_virtual_interface_name (NMSetting *setting, + GHashTable *connection_hash, + const char *property, + const GValue *value, + GError **error); NMSettingVerifyResult _nm_setting_verify (NMSetting *setting, GSList *all_settings, -- cgit v1.2.1