From df98a87ba389bdfc0359beedf47557411f3af434 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 22 Dec 2013 00:12:54 +0100 Subject: bus: introduce concept of "const" properties This way we have four kinds of properties: a) those which are constant as long as an object exists b) those which can change and PropertiesChange messages with contents are generated c) those which can change and where the PropertesChange merely includes invalidation d) those which can change but for which no events are generated Clients (through code generators run on the introspection XML) can thus aggressively cache a, b, c, with only d excluded. --- src/libsystemd-bus/bus-introspect.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libsystemd-bus/bus-introspect.c') diff --git a/src/libsystemd-bus/bus-introspect.c b/src/libsystemd-bus/bus-introspect.c index 4d5c25a23f..d528ab2a04 100644 --- a/src/libsystemd-bus/bus-introspect.c +++ b/src/libsystemd-bus/bus-introspect.c @@ -82,10 +82,12 @@ static void introspect_write_flags(struct introspect *i, int type, int flags) { fputs(" \n", i->f); if (type == _SD_BUS_VTABLE_PROPERTY || type == _SD_BUS_VTABLE_WRITABLE_PROPERTY) { - if (!(flags & SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE)) - fputs(" \n", i->f); - else if (flags & SD_BUS_VTABLE_PROPERTY_INVALIDATE_ONLY) + if (flags & SD_BUS_VTABLE_PROPERTY_CONST) + fputs(" \n", i->f); + else if (flags & SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION) fputs(" \n", i->f); + else if (!(flags & SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE)) + fputs(" \n", i->f); } if (!i->trusted && -- cgit v1.2.3-54-g00ecf