sdbus++: support 'readonly' flag
The previous documentation of 'const' did not match the
specification at a D-Bus level nor the implementation in sdbus++.
Correct the documentation for 'const' and add a new 'readonly' flag
which enables the previously documented behavior for 'const.
This was reported by a user outside of the openbmc project which had
already been using the 'readonly' flag in their YAML to identify this
condition. Previously, sdbus++ silently ignored flags it didn't
explicitly support but as of 20255a5fce55a0743dc3d307d1168f18ed553751
this turned into an error.
There are cases of interfaces in 'phosphor-dbus-interfaces' currently
using 'const' where they likely desire a 'readonly' instead. We are
not changing the behavior of 'const' with this commit, so there would
be no regressions induced by this code change.
Resolves openbmc/sdbusplus#48.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I690cb424f5fd00da190343a345ae57ccae393041
diff --git a/test/server/Test.interface.yaml b/test/server/Test.interface.yaml
index d015c99..7daea7d 100644
--- a/test/server/Test.interface.yaml
+++ b/test/server/Test.interface.yaml
@@ -3,3 +3,12 @@
properties:
- name: SomeValue
type: int64
+ - name: ReadonlyValue
+ type: int64
+ flags:
+ - readonly
+ - emits_change
+ - name: ConstValue
+ type: int64
+ flags:
+ - const