Systemd/src/libsystemd/sd-bus
Nathaniel McCallum 45b1f410ba Add support for SD_BUS_DEFAULT*
Currently, sd-bus supports the ability to have thread-local default busses.
However, this is less useful than it can be since all functions which
require an sd_bus* as input require the caller to pass it. This patch adds
a new macro which allows the developer to pass a constant SD_BUS_DEFAULT,
SD_BUS_DEFAULT_USER or SD_BUS_DEFAULT_SYSTEM instead. This reduces work for
the caller.

For example:

    r = sd_bus_default(&bus);
    r = sd_bus_call_method(bus, ...);
    sd_bus_unref(bus);

Becomes:

    r = sd_bus_call_method(SD_BUS_DEFAULT, ...);

If the specified thread-local default bus does not exist, the function
calls will return -ENOPKG. No bus will ever be implicitly created.
2018-01-23 09:40:25 -05:00
..
bus-common-errors.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-common-errors.h resolved: implement D-Bus API for DNS-SD 2017-12-08 14:29:27 +02:00
bus-container.c tree-wide: make use of wait_for_terminate_and_check() at various places 2018-01-04 13:27:27 +01:00
bus-container.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-control.c Add support for SD_BUS_DEFAULT* 2018-01-23 09:40:25 -05:00
bus-control.h sd-bus: add asynchronous version of sd_bus_match() 2018-01-05 13:58:32 +01:00
bus-convenience.c Add support for SD_BUS_DEFAULT* 2018-01-23 09:40:25 -05:00
bus-creds.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-creds.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-dump.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-dump.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-error.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-error.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-gvariant.c log: minimize includes in log.h 2018-01-11 14:44:31 +01:00
bus-gvariant.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-internal.c sd-bus: when debug logging about messages, show the same bits of it everywhere 2018-01-05 13:55:08 +01:00
bus-internal.h Add support for SD_BUS_DEFAULT* 2018-01-23 09:40:25 -05:00
bus-introspect.c tree-wide: use __fsetlocking() instead of fxyz_unlocked() 2017-12-14 10:42:25 +01:00
bus-introspect.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-kernel.c sd-bus: get rid of kdbus flags cruft 2018-01-05 13:55:08 +01:00
bus-kernel.h sd-bus: get rid of kdbus flags cruft 2018-01-05 13:55:08 +01:00
bus-match.c tree-wide: use __fsetlocking() instead of fxyz_unlocked() 2017-12-14 10:42:25 +01:00
bus-match.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-message.c bus-message: avoid -Wnull-pointer-arithmetic warning on new clang 2018-01-18 17:38:35 +11:00
bus-message.h sd-bus: drop some unused fields from the sd_bus_message structure 2018-01-05 13:58:32 +01:00
bus-objects.c Add support for SD_BUS_DEFAULT* 2018-01-23 09:40:25 -05:00
bus-objects.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-protocol.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-signature.c log: minimize includes in log.h 2018-01-11 14:44:31 +01:00
bus-signature.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-slot.c sd-bus: when disconnecting a slot, also reset its memory 2018-01-05 13:58:32 +01:00
bus-slot.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-socket.c Merge pull request #7855 from poettering/log-h-includes 2018-01-15 13:43:09 +04:00
bus-socket.h sd-bus: optionally, use inotify to wait for bus sockets to appear 2018-01-05 13:55:08 +01:00
bus-track.c Add support for SD_BUS_DEFAULT* 2018-01-23 09:40:25 -05:00
bus-track.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
bus-type.c log: minimize includes in log.h 2018-01-11 14:44:31 +01:00
bus-type.h log: minimize includes in log.h 2018-01-11 14:44:31 +01:00
GVARIANT-SERIALIZATION sd-bus: drop kdbus-related docs (#5533) 2017-03-07 07:51:35 +01:00
sd-bus.c Add support for SD_BUS_DEFAULT* 2018-01-23 09:40:25 -05:00
test-bus-benchmark.c tree-wide: use EXIT_SUCCESS/EXIT_FAILURE in exit() where we can 2017-12-25 11:48:21 +01:00
test-bus-chat.c tree-wide: install matches asynchronously 2018-01-05 13:58:32 +01:00
test-bus-cleanup.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-bus-creds.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-bus-error.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-bus-gvariant.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-bus-introspect.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-bus-marshal.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-bus-match.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-bus-objects.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-bus-server.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-bus-signature.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
test-bus-track.c log: minimize includes in log.h 2018-01-11 14:44:31 +01:00
test-bus-vtable-cc.cc tests,meson: add test-bus-vtable, compiled as C and C++ 2017-05-13 15:50:44 -04:00
test-bus-vtable.c test-bus-vtable: it's OK if dbus is not running 2017-05-30 21:17:46 -04:00
test-bus-watch-bind.c sd-bus: optionally, use inotify to wait for bus sockets to appear 2018-01-05 13:55:08 +01:00