libnm: mark deprecated D-Bus properties in meta data

This has no effect (yet), but we will generate documentation
from this information. Also, it's just self-documenting code.
This commit is contained in:
Thomas Haller 2022-10-24 11:01:15 +02:00
parent 0fd7691b09
commit 05d0b81130
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
11 changed files with 48 additions and 30 deletions

View file

@ -3384,7 +3384,8 @@ nm_setting_802_1x_class_init(NMSetting8021xClass *klass)
PROP_SUBJECT_MATCH,
NM_SETTING_PARAM_NONE,
NMSetting8021xPrivate,
subject_match);
subject_match,
.is_deprecated = TRUE, );
/**
* NMSetting8021x:altsubject-matches:
@ -3797,7 +3798,8 @@ nm_setting_802_1x_class_init(NMSetting8021xClass *klass)
PROP_PHASE2_SUBJECT_MATCH,
NM_SETTING_PARAM_NONE,
NMSetting8021xPrivate,
phase2_subject_match);
phase2_subject_match,
.is_deprecated = TRUE, );
/**
* NMSetting8021x:phase2-altsubject-matches:

View file

@ -1313,7 +1313,8 @@ nm_setting_bond_class_init(NMSettingBondClass *klass)
*/
_nm_properties_override_dbus(properties_override,
"interface-name",
&nm_sett_info_propert_type_deprecated_interface_name);
&nm_sett_info_propert_type_deprecated_interface_name,
.dbus_deprecated = TRUE, );
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);

View file

@ -1454,7 +1454,8 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
NM_SETTING_PARAM_INFERRABLE,
NMSettingBridge,
_priv.mac_address,
.direct_set_string_mac_address_len = ETH_ALEN);
.direct_set_string_mac_address_len = ETH_ALEN,
.is_deprecated = TRUE, );
/**
* NMSettingBridge:stp:
@ -1748,7 +1749,8 @@ nm_setting_bridge_class_init(NMSettingBridgeClass *klass)
*/
_nm_properties_override_dbus(properties_override,
"interface-name",
&nm_sett_info_propert_type_deprecated_interface_name);
&nm_sett_info_propert_type_deprecated_interface_name,
.dbus_deprecated = TRUE, );
/**
* NMSettingBridge:group-address:

View file

@ -545,7 +545,8 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
PROP_NUMBER,
NM_SETTING_PARAM_NONE,
NMSettingGsmPrivate,
number);
number,
.is_deprecated = TRUE, );
/**
* NMSettingGsm:username:
@ -744,10 +745,12 @@ nm_setting_gsm_class_init(NMSettingGsmClass *klass)
/* Ignore incoming deprecated properties */
_nm_properties_override_dbus(properties_override,
"allowed-bands",
&nm_sett_info_propert_type_deprecated_ignore_u);
&nm_sett_info_propert_type_deprecated_ignore_u,
.dbus_deprecated = TRUE, );
_nm_properties_override_dbus(properties_override,
"network-type",
&nm_sett_info_propert_type_deprecated_ignore_i);
&nm_sett_info_propert_type_deprecated_ignore_i,
.dbus_deprecated = TRUE, );
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);

View file

@ -1004,15 +1004,16 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aau"),
.to_dbus_fcn = ip4_addresses_to_dbus,
.compare_fcn = _nm_setting_ip_config_compare_fcn_addresses,
.from_dbus_fcn = ip4_addresses_from_dbus, ));
.from_dbus_fcn = ip4_addresses_from_dbus, ),
.dbus_deprecated = TRUE, );
_nm_properties_override_dbus(
properties_override,
"address-labels",
NM_SETT_INFO_PROPERT_TYPE_DBUS(G_VARIANT_TYPE_STRING_ARRAY,
.to_dbus_fcn = ip4_address_labels_to_dbus,
.compare_fcn = _nm_setting_property_compare_fcn_ignore,
/* from_dbus() is handled by ip4_addresses_from_dbus(). */
));
/* from_dbus() is handled by ip4_addresses_from_dbus(). */),
.dbus_deprecated = TRUE, );
/* ---dbus---
* property: address-data
@ -1141,7 +1142,8 @@ nm_setting_ip4_config_class_init(NMSettingIP4ConfigClass *klass)
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("aau"),
.to_dbus_fcn = ip4_routes_to_dbus,
.compare_fcn = _nm_setting_ip_config_compare_fcn_routes,
.from_dbus_fcn = ip4_routes_from_dbus, ));
.from_dbus_fcn = ip4_routes_from_dbus, ),
.dbus_deprecated = TRUE, );
/* ---dbus---
* property: route-data

View file

@ -1014,7 +1014,8 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("a(ayuay)"),
.to_dbus_fcn = ip6_addresses_to_dbus,
.compare_fcn = _nm_setting_ip_config_compare_fcn_addresses,
.from_dbus_fcn = ip6_addresses_from_dbus, ));
.from_dbus_fcn = ip6_addresses_from_dbus, ),
.dbus_deprecated = TRUE, );
/* ---dbus---
* property: address-data
@ -1132,7 +1133,8 @@ nm_setting_ip6_config_class_init(NMSettingIP6ConfigClass *klass)
NM_SETT_INFO_PROPERT_TYPE_DBUS(NM_G_VARIANT_TYPE("a(ayuayu)"),
.to_dbus_fcn = ip6_routes_to_dbus,
.compare_fcn = _nm_setting_ip_config_compare_fcn_routes,
.from_dbus_fcn = ip6_routes_from_dbus, ));
.from_dbus_fcn = ip6_routes_from_dbus, ),
.dbus_deprecated = TRUE, );
/* ---dbus---
* property: route-data

View file

@ -1829,7 +1829,8 @@ nm_setting_team_class_init(NMSettingTeamClass *klass)
*/
_nm_properties_override_dbus(properties_override,
"interface-name",
&nm_sett_info_propert_type_deprecated_interface_name);
&nm_sett_info_propert_type_deprecated_interface_name,
.dbus_deprecated = TRUE);
g_object_class_install_properties(object_class, G_N_ELEMENTS(obj_properties), obj_properties);

View file

@ -976,7 +976,8 @@ nm_setting_vlan_class_init(NMSettingVlanClass *klass)
*/
_nm_properties_override_dbus(properties_override,
"interface-name",
&nm_sett_info_propert_type_deprecated_interface_name);
&nm_sett_info_propert_type_deprecated_interface_name,
.dbus_deprecated = TRUE, );
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);

View file

@ -178,7 +178,8 @@ nm_setting_wimax_class_init(NMSettingWimaxClass *klass)
PROP_NETWORK_NAME,
NM_SETTING_PARAM_NONE,
NMSettingWimaxPrivate,
network_name);
network_name,
.is_deprecated = TRUE, );
/**
* NMSettingWimax:mac-address:
@ -196,7 +197,8 @@ nm_setting_wimax_class_init(NMSettingWimaxClass *klass)
NM_SETTING_PARAM_NONE,
NMSettingWimaxPrivate,
mac_address,
.direct_set_string_mac_address_len = ETH_ALEN);
.direct_set_string_mac_address_len = ETH_ALEN,
.is_deprecated = TRUE, );
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);

View file

@ -1387,11 +1387,11 @@ nm_setting_wired_class_init(NMSettingWiredClass *klass)
obj_properties[PROP_CLONED_MAC_ADDRESS],
NM_SETT_INFO_PROPERT_TYPE_DBUS(
G_VARIANT_TYPE_BYTESTRING,
.compare_fcn = compare_fcn_cloned_mac_address,
.to_dbus_fcn = _nm_sett_info_prop_to_dbus_fcn_cloned_mac_address,
.from_dbus_fcn = _nm_sett_info_prop_from_dbus_fcn_cloned_mac_address,
.missing_from_dbus_fcn =
_nm_sett_info_prop_missing_from_dbus_fcn_cloned_mac_address, ));
.compare_fcn = compare_fcn_cloned_mac_address,
.to_dbus_fcn = _nm_sett_info_prop_to_dbus_fcn_cloned_mac_address,
.from_dbus_fcn = _nm_sett_info_prop_from_dbus_fcn_cloned_mac_address,
.missing_from_dbus_fcn = _nm_sett_info_prop_missing_from_dbus_fcn_cloned_mac_address, ),
.dbus_deprecated = TRUE);
/* ---dbus---
* property: assigned-mac-address

View file

@ -1569,11 +1569,11 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass)
obj_properties[PROP_CLONED_MAC_ADDRESS],
NM_SETT_INFO_PROPERT_TYPE_DBUS(
G_VARIANT_TYPE_BYTESTRING,
.compare_fcn = compare_fcn_cloned_mac_address,
.to_dbus_fcn = _nm_sett_info_prop_to_dbus_fcn_cloned_mac_address,
.from_dbus_fcn = _nm_sett_info_prop_from_dbus_fcn_cloned_mac_address,
.missing_from_dbus_fcn =
_nm_sett_info_prop_missing_from_dbus_fcn_cloned_mac_address, ));
.compare_fcn = compare_fcn_cloned_mac_address,
.to_dbus_fcn = _nm_sett_info_prop_to_dbus_fcn_cloned_mac_address,
.from_dbus_fcn = _nm_sett_info_prop_from_dbus_fcn_cloned_mac_address,
.missing_from_dbus_fcn = _nm_sett_info_prop_missing_from_dbus_fcn_cloned_mac_address, ),
.dbus_deprecated = TRUE, );
/* ---dbus---
* property: assigned-mac-address
@ -1811,7 +1811,8 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass)
NM_SETTING_MAC_RANDOMIZATION_DEFAULT,
NM_SETTING_PARAM_NONE,
NMSettingWirelessPrivate,
mac_address_randomization);
mac_address_randomization,
.is_deprecated = TRUE, );
/* Compatibility for deprecated property */
/* ---ifcfg-rh---
@ -1833,7 +1834,8 @@ nm_setting_wireless_class_init(NMSettingWirelessClass *klass)
"security",
NM_SETT_INFO_PROPERT_TYPE_DBUS(G_VARIANT_TYPE_STRING,
.to_dbus_fcn = security_to_dbus,
.compare_fcn = _nm_setting_property_compare_fcn_ignore, ));
.compare_fcn = _nm_setting_property_compare_fcn_ignore, ),
.dbus_deprecated = TRUE, );
/**
* NMSettingWireless:wake-on-wlan: