libnm: extend NMSettInfoSetting with an offset to the private data

NMSetting instances either have no private data, they use
g_type_add_class_private(), or they embed the private data in the
NMSetting struct.

In all cases, we can find the private data at a fixed offset. Track that
offset in the NMSettInfoSetting meta data.

This will be useful, because properties really are stored in simple
fields, like a boolean property can be stored in a "bool" field. We will
extend the property meta data to track the offset of this property
field, but we also need to know where the offset starts.
This commit is contained in:
Thomas Haller
2021-06-28 14:53:16 +02:00
parent dc649d1336
commit d6f802abcd
55 changed files with 249 additions and 176 deletions

View File

@@ -2258,8 +2258,9 @@ nm_setting_tc_config_class_init(NMSettingTCConfigClass *klass)
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);
_nm_setting_class_commit_full(setting_class,
NM_META_SETTING_TYPE_TC_CONFIG,
NULL,
properties_override);
_nm_setting_class_commit(setting_class,
NM_META_SETTING_TYPE_TC_CONFIG,
NULL,
properties_override,
0);
}