diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2020-04-10 00:34:37 -0700 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-04-10 11:30:05 +0200 |
commit | df91e319a9a94566436064f633909e1be52a2d70 (patch) | |
tree | 831564c0b54c92919c7518f4632debdb05c83de9 | |
parent | a028ef14c99b10691a8155af27b2168fc1c99c5f (diff) | |
download | systemd-df91e319a9a94566436064f633909e1be52a2d70.tar.gz |
bus: add sd_bus_message_new_method_call() helper
adds BusLocator variant called bus_message_new_method_call()
-rw-r--r-- | src/shared/bus-util.c | 11 | ||||
-rw-r--r-- | src/shared/bus-util.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c index ddc80d835c..81683e5afe 100644 --- a/src/shared/bus-util.c +++ b/src/shared/bus-util.c @@ -1538,3 +1538,14 @@ int bus_match_signal_async( return sd_bus_match_signal_async(bus, ret, locator->destination, locator->path, locator->interface, member, callback, install_callback, userdata); } + +int bus_message_new_method_call( + sd_bus *bus, + sd_bus_message **m, + const BusLocator *locator, + const char *member) { + + assert(locator); + + return sd_bus_message_new_method_call(bus, m, locator->destination, locator->path, locator->interface, member); +} diff --git a/src/shared/bus-util.h b/src/shared/bus-util.h index 65082e866f..fd1820ca7e 100644 --- a/src/shared/bus-util.h +++ b/src/shared/bus-util.h @@ -198,3 +198,4 @@ int bus_get_property_strv(sd_bus *bus, const BusLocator *locator, const char *me int bus_set_property(sd_bus *bus, const BusLocator *locator, const char *member, sd_bus_error *error, const char *type, ...); int bus_match_signal(sd_bus *bus, sd_bus_slot **ret, const BusLocator *locator, const char *member, sd_bus_message_handler_t callback, void *userdata); int bus_match_signal_async(sd_bus *bus, sd_bus_slot **ret, const BusLocator *locator, const char *member, sd_bus_message_handler_t callback, sd_bus_message_handler_t install_callback, void *userdata); +int bus_message_new_method_call(sd_bus *bus, sd_bus_message **m, const BusLocator *locator, const char *member); |