diff --git a/src/libnm-core-impl/nm-setting-private.h b/src/libnm-core-impl/nm-setting-private.h index 6e1a000ccf..466b78109c 100644 --- a/src/libnm-core-impl/nm-setting-private.h +++ b/src/libnm-core-impl/nm-setting-private.h @@ -331,6 +331,7 @@ extern const NMSettInfoPropertType nm_sett_info_propert_type_setting_name; extern const NMSettInfoPropertType nm_sett_info_propert_type_deprecated_interface_name; extern const NMSettInfoPropertType nm_sett_info_propert_type_deprecated_ignore_i; extern const NMSettInfoPropertType nm_sett_info_propert_type_deprecated_ignore_u; +extern const NMSettInfoPropertType nm_sett_info_propert_type_gprop_strv_oldstyle; extern const NMSettInfoPropertType nm_sett_info_propert_type_direct_boolean; extern const NMSettInfoPropertType nm_sett_info_propert_type_direct_int32; diff --git a/src/libnm-core-impl/nm-setting.c b/src/libnm-core-impl/nm-setting.c index 233005b851..7d7f298ee1 100644 --- a/src/libnm-core-impl/nm-setting.c +++ b/src/libnm-core-impl/nm-setting.c @@ -424,11 +424,7 @@ _nm_setting_class_commit(NMSettingClass *setting_class, vtype = p->param_spec->value_type; if (vtype == G_TYPE_STRV) - p->property_type = NM_SETT_INFO_PROPERT_TYPE_GPROP( - G_VARIANT_TYPE_STRING_ARRAY, - .compare_fcn = _nm_setting_property_compare_fcn_default, - .from_dbus_fcn = _nm_setting_property_from_dbus_fcn_gprop, - .from_dbus_is_full = TRUE); + p->property_type = &nm_sett_info_propert_type_gprop_strv; else nm_assert_not_reached(); @@ -3622,6 +3618,15 @@ const NMSettInfoPropertType nm_sett_info_propert_type_deprecated_ignore_u = /* No functions set. This property type is to silently ignore the value on D-Bus. */ .compare_fcn = _nm_setting_property_compare_fcn_ignore); +/* This should not be used for new strv properties. Use nm_sett_info_propert_type_direct_strv. + * + * FIXME: existing properties should migrate to nm_sett_info_propert_type_direct_strv. */ +const NMSettInfoPropertType nm_sett_info_propert_type_gprop_strv_oldstyle = + NM_SETT_INFO_PROPERT_TYPE_GPROP_INIT(G_VARIANT_TYPE_STRING_ARRAY, + .compare_fcn = _nm_setting_property_compare_fcn_default, + .from_dbus_fcn = _nm_setting_property_from_dbus_fcn_gprop, + .from_dbus_is_full = TRUE); + const NMSettInfoPropertType nm_sett_info_propert_type_direct_boolean = NM_SETT_INFO_PROPERT_TYPE_DBUS_INIT(G_VARIANT_TYPE_BOOLEAN, .direct_type = NM_VALUE_TYPE_BOOL,