diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-08-25 01:45:33 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-08-25 01:50:59 +0200 |
commit | 337020515d932b1d27e96715576cd5d1ea5b6d88 (patch) | |
tree | 8ae9961c74f883fe562c7267230f1de8da4c87bb /src/libsystemd/sd-bus/bus-introspect.c | |
parent | 53496ca9adc383bd8aa28e8f75f1b21c2cc82b05 (diff) |
sd-bus: introduce new SD_BUS_VTABLE_PROPERTY_EXPLICIT flag
This allows marking properties as "explicit". Properties marked like
this are included in the introspection, but are avoided in GetAll()
property queries, PropertiesChanged() signals and in in GetManaged()
object manager calls and InterfacesAdded() signals.
Expensive properties may be marked that way, and they will be
retrievable when explicitly being requested, but never in "blanket"
all-property queries and signals.
This flag may be combined with the flags for "const" and
"emit-validation" properties, but not with "emit-validation", as that
is only useful for properties whose value shall be sent in "blanket"
all-property signals.
The "explicit" flag is also exposed in the introspection data via a new
annotation.
Diffstat (limited to 'src/libsystemd/sd-bus/bus-introspect.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-introspect.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-introspect.c b/src/libsystemd/sd-bus/bus-introspect.c index c2233d0cf3..3107d00092 100644 --- a/src/libsystemd/sd-bus/bus-introspect.c +++ b/src/libsystemd/sd-bus/bus-introspect.c @@ -81,6 +81,9 @@ static void introspect_write_flags(struct introspect *i, int type, int flags) { fputs(" <annotation name=\"org.freedesktop.DBus.Method.NoReply\" value=\"true\"/>\n", i->f); if (type == _SD_BUS_VTABLE_PROPERTY || type == _SD_BUS_VTABLE_WRITABLE_PROPERTY) { + if (flags & SD_BUS_VTABLE_PROPERTY_EXPLICIT) + fputs(" <annotation name=\"org.freedesktop.systemd1.Explicit\" value=\"true\"/>\n", i->f); + if (flags & SD_BUS_VTABLE_PROPERTY_CONST) fputs(" <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\"/>\n", i->f); else if (flags & SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION) |