diff options
author | Thomas Haller <thaller@redhat.com> | 2022-10-24 10:59:53 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-10-27 09:11:22 +0200 |
commit | 0fd7691b096a11d375e68c5b2dc9508ef3877595 (patch) | |
tree | 7987b12eb537ab8c16cefd6e618ea73fcf89df07 | |
parent | bb9a9b8ee10b5b29b3165d1cfb75d1eba3613412 (diff) | |
download | NetworkManager-0fd7691b096a11d375e68c5b2dc9508ef3877595.tar.gz |
libnm: add NMSettInfoProperty.{,dbus_}deprecated flag to mark deprecated properties
-rw-r--r-- | src/libnm-core-intern/nm-core-internal.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/libnm-core-intern/nm-core-internal.h b/src/libnm-core-intern/nm-core-internal.h index a288dc43ce..563811305c 100644 --- a/src/libnm-core-intern/nm-core-internal.h +++ b/src/libnm-core-intern/nm-core-internal.h @@ -826,6 +826,37 @@ struct _NMSettInfoProperty { * Set this flag to force always converting the property even if the value * is the default. */ bool to_dbus_including_default : 1; + + /* Whether the property is deprecated. + * + * Note that we have various representations of profiles, e.g. on D-Bus, keyfile, + * nmcli, libnm/NMSetting. Usually a property (in the general sense) is named and + * applies similarly to all those. But not always, for example, on D-Bus we + * have the field "ethernet.assigned-mac-address", but that exists nowhere + * as a property in the other parts (the real property is called + * "ethernet.cloned-mac-address"). + * + * This flag indicates whether a property is deprecated. Here "property" means + * no specific representation. When a property is deprecated this way, it will + * also indirectly apply to setting the property on D-Bus, keyfile, nmcli, etc. + * It means the general concept of this thing is no longer useful/recommended. + */ + bool is_deprecated : 1; + + /* Whether the property is deprecated in the D-Bus API. + * + * This has no real effect (for now). It is only self-documenting code that + * this property is discouraged on D-Bus. We might honor this when generating + * documentation, or we might use it to find properties that are deprecated. + * + * Note what this means. For example, "802-1x.phase2-subject-match" is deprecated + * as a property altogether, but that does not mean it's deprecated specifically on + * D-Bus. + * "ethernet.cloned-mac-address" is deprecated on D-Bus in favor of + * "ethernet.assigned-mac-address", but the property clone-mac-address itself + * is not deprecated. This flag is about the deprecation of the D-Bus representation + * of a property. */ + bool dbus_deprecated : 1; }; typedef struct { |