]> git.ipfire.org Git - thirdparty/systemd.git/commit
bus: introduce some sd-bus convenience helpers 15331/head
authorVito Caputo <vcaputo@pengaru.com>
Sat, 4 Apr 2020 05:35:42 +0000 (22:35 -0700)
committerVito Caputo <vcaputo@pengaru.com>
Sat, 4 Apr 2020 20:38:58 +0000 (13:38 -0700)
commit219ab1fbd00c7ee8636e4ae17e0996b5078d556d
tree982095d175ac079243965ec4121fc5c49f3676f0
parent3d9489ee457a81c0efe0bac3ea899f7470ef506a
bus: introduce some sd-bus convenience helpers

Many of the convenience functions from sd-bus operate on verbose sets
of discrete strings for destination/path/interface/member.

For most callers, destination/path/interface are uniform, and just the
member is distinct.

This commit introduces a new struct encapsulating the
destination/path/interface pointers called BusAddress, and wrapper
functions which take a BusAddress* instead of three strings, and just
pass the encapsulated strings on to the sd-bus convenience functions.

Future commits will update call sites to use these helpers throwing
out a bunch of repetitious destination/path/interface strings littered
throughout the codebase, replacing them with some appropriately named
static structs passed by pointer to these new helpers.
src/shared/bus-util.c
src/shared/bus-util.h