summaryrefslogtreecommitdiff
path: root/src/libelogind/sd-bus/bus-common-errors.h
diff options
context:
space:
mode:
authorNathaniel McCallum <npmccallum@redhat.com>2018-01-22 16:26:44 -0500
committerSven Eden <yamakuzure@gmx.net>2018-05-30 07:50:14 +0200
commit8b42f5e6cdc1c819741ef9492b7cec23971ccc4c (patch)
treee3596c5b52899b308cecfea1f945c5a2219a2bbe /src/libelogind/sd-bus/bus-common-errors.h
parent269ddd6aecc9307853384bfc44a22c9ade596f34 (diff)
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.
Diffstat (limited to 'src/libelogind/sd-bus/bus-common-errors.h')
0 files changed, 0 insertions, 0 deletions