summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/test-bus-objects.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-25 01:45:33 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-25 01:50:59 +0200
commit337020515d932b1d27e96715576cd5d1ea5b6d88 (patch)
tree8ae9961c74f883fe562c7267230f1de8da4c87bb /src/libsystemd/sd-bus/test-bus-objects.c
parent53496ca9adc383bd8aa28e8f75f1b21c2cc82b05 (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/test-bus-objects.c')
-rw-r--r--src/libsystemd/sd-bus/test-bus-objects.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-objects.c b/src/libsystemd/sd-bus/test-bus-objects.c
index 6b3bfad5b6..195013f49a 100644
--- a/src/libsystemd/sd-bus/test-bus-objects.c
+++ b/src/libsystemd/sd-bus/test-bus-objects.c
@@ -217,6 +217,7 @@ static const sd_bus_vtable vtable2[] = {
SD_BUS_PROPERTY("Value2", "s", value_handler, 10, SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION),
SD_BUS_PROPERTY("Value3", "s", value_handler, 10, SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("Value4", "s", value_handler, 10, 0),
+ SD_BUS_PROPERTY("AnExplicitProperty", "s", NULL, offsetof(struct context, something), SD_BUS_VTABLE_PROPERTY_EXPLICIT|SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION),
SD_BUS_VTABLE_END
};