1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
systemd/src/libsystemd
David Herrmann d95eb43e90 bus: add sd_bus_emit_object_{added/removed}()
This implements two new helpers, discussed on systemd-devel about 1 year
ago:
    sd_bus_emit_object_added()
    sd_bus_emit_object_removed()

Both calls are equivalent to their respective counterpart
sd_bus_emit_interfaces_{added/removed}(), but can figure out the list of
interfaces themselves, instead of requiring the caller to provide them.
Furthermore, both calls properly deal with builtin interfaces provided via
org.freedesktop.DBus.* and alike.

Both calls simply traverse a node and all its parent nodes to figure out a
list of all interfaces registered as vtable or fallback. It then appends
each of them, similar to the interfaces_{added/removed}() helpers.

Note that interfaces_{added/removed}() runs a parent traversal for *each*
passed interface. Therefore, it can simply bail out, once it found a
parent node that implements a given interface.
With object_{added/removed}() we cannot know the registered interfaces in
advance, thus, we cannot run one traversal per node. Instead, we run a
single traversal and remember all interfaces that we added. Therefore, a
child-interface overrides all conflicting parent-interfaces. We keep a
"Set *s" context to track those while climbing up the tree.
2014-12-30 11:37:35 +01:00
..
sd-bus bus: add sd_bus_emit_object_{added/removed}() 2014-12-30 11:37:35 +01:00
sd-daemon sd-daemon,man: ignore missing $WATCHDOG_PID 2014-10-23 00:17:18 -04:00
sd-event treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
sd-hwdb libsystemd: add sd-hwdb library 2014-12-11 13:54:35 +01:00
sd-id128 treewide: correct spacing near eol in code comments 2014-12-11 15:10:03 +01:00
sd-login login: add public sd_session_get_desktop() API 2014-09-22 14:27:02 +02:00
sd-network LLDP: Add support for networkctl 2014-12-19 08:15:05 +05:30
sd-path build-sys: export sd_path APIs 2014-07-11 03:13:24 +02:00
sd-resolve treewide: more log_*_errno() conversions 2014-11-28 14:45:55 +01:00
sd-rtnl rtnl: recv_message - don't enforce sender uid 2014-12-29 02:20:04 +01:00
sd-utf8 libsystemd: split up into subdirs 2014-01-21 14:41:35 +01:00
.gitignore build-sys: export experimental symbols only with --enable-kdbus 2014-02-19 20:53:18 +01:00
libsystemd.pc.in build-sys: update .pc.in files 2014-01-25 18:55:58 -05:00
libsystemd.sym.m4 sd-bus: rename sd_bus_open_system_container() to sd_bus_open_system_machine() 2014-12-24 16:53:04 +01:00
Makefile libsystemd-bus: rename to libsystemd 2014-01-13 18:54:19 +01:00