expose DBus interface property names as symbols
Enable a way to access the property names of a given DBus interface as a
constexpr symbol via the header [1]
4 use-cases:
- printing error / debug logs with the property name.
e.g. '${property} missing from configuration'
- accessing DBus properties in applications which do not yet use the PDI
generated bindings.
- preventing typos in DBus property names
- estimating the impact of removing a given DBus property from an
interface. When using these symbols, it would cause a build failure in
applications relying on the existence of that property.
Tested: a newly added unit test is using this feature.
References:
[1] https://discordapp.com/channels/775381525260664832/867820390406422538/1423317550732673206
Change-Id: I7b2906b6b1b445c3a49868ff1d50ced6ccaa5336
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/test/meson.build b/test/meson.build
index f67bf32..de7c0e4 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -123,6 +123,7 @@
'test_aserver_no_uninitialized_value_constructor',
'test_aserver_emit_interfaces_added_signal',
'test_aserver_multiple_interfaces',
+ 'test_property_names',
]
foreach t : uninit_tests
@@ -133,7 +134,7 @@
f'gen/@t@.cpp',
generated_sources,
include_directories: [root_inc],
- dependencies: [sdbusplus_dep, server_test_dep],
+ dependencies: [sdbusplus_dep, server_test_dep, gtest_dep],
),
)
endforeach