diff options
author | Dan Winship <danw@gnome.org> | 2014-07-30 10:46:24 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-09-04 09:20:10 -0400 |
commit | f4957eb0b7b0c6c28121d728e8ab2da30bd49ac7 (patch) | |
tree | dfab8151d73958c3cd600b7993da375166fb8ca7 /libnm-core/nm-setting-private.h | |
parent | ca9938f458521b24b262be79a6f86a89f6d630a6 (diff) | |
download | NetworkManager-f4957eb0b7b0c6c28121d728e8ab2da30bd49ac7.tar.gz |
libnm-core: add _nm_setting_class_transform_property()
Add a new kind of setting property override, for indicating that a
property exists in both the NMSetting and the D-Bus representation,
but in different formats, requiring conversion from one to the other.
Also, if a property is transformable, then compare the transformed
forms in nm_setting_compare() (since the D-Bus property types have
more metadata built-in).
Diffstat (limited to 'libnm-core/nm-setting-private.h')
-rw-r--r-- | libnm-core/nm-setting-private.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libnm-core/nm-setting-private.h b/libnm-core/nm-setting-private.h index 9d9a4caa4f..aad7e51697 100644 --- a/libnm-core/nm-setting-private.h +++ b/libnm-core/nm-setting-private.h @@ -158,4 +158,13 @@ void _nm_setting_class_override_property (NMSettingClass *setting_class, NMSettingPropertySetFunc set_func, NMSettingPropertyNotSetFunc not_set_func); +typedef void (*NMSettingPropertyTransformFunc) (const GValue *from, + GValue *to); + +void _nm_setting_class_transform_property (NMSettingClass *setting_class, + const char *property_name, + GType dbus_type, + NMSettingPropertyTransformFunc to_dbus, + NMSettingPropertyTransformFunc from_dbus); + #endif /* NM_SETTING_PRIVATE_H */ |