diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-10 16:49:00 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-10 16:52:49 +0000 |
commit | 6e8df5f00a3874decf1e5542da3d65b25f6da1dc (patch) | |
tree | 8e06c5c861ab26d62677b1ceb0fd10e0b9f0c0e4 /src/libsystemd-bus/bus-objects.c | |
parent | adacb9575a09981fcf11279f2f661e3fc21e58ff (diff) |
bus: introduce new SD_BUS_VTABLE_HIDDEN flag for vtable members
When this flag is set then its member will not be shown in the
introspection data. Also, properties with this flag set will not be
included in GetAll() responses.
Diffstat (limited to 'src/libsystemd-bus/bus-objects.c')
-rw-r--r-- | src/libsystemd-bus/bus-objects.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-objects.c b/src/libsystemd-bus/bus-objects.c index 941c2810d8..8ffda2f95d 100644 --- a/src/libsystemd-bus/bus-objects.c +++ b/src/libsystemd-bus/bus-objects.c @@ -633,10 +633,16 @@ static int vtable_append_all_properties( assert(path); assert(c); + if (c->vtable[0].flags & SD_BUS_VTABLE_HIDDEN) + return 1; + for (v = c->vtable+1; v->type != _SD_BUS_VTABLE_END; v++) { if (v->type != _SD_BUS_VTABLE_PROPERTY && v->type != _SD_BUS_VTABLE_WRITABLE_PROPERTY) continue; + if (v->flags & SD_BUS_VTABLE_HIDDEN) + continue; + r = sd_bus_message_open_container(reply, 'e', "sv"); if (r < 0) return r; @@ -853,6 +859,9 @@ static int process_introspect( empty = false; + if (c->vtable[0].flags & SD_BUS_VTABLE_HIDDEN) + continue; + if (!streq_ptr(previous_interface, c->interface)) { if (previous_interface) |