| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "shared-forward.h" |
| 5 |
|
| 6 |
typedef struct BusLocator { |
| 7 |
const char *destination; |
| 8 |
const char *path; |
| 9 |
const char *interface; |
| 10 |
} BusLocator; |
| 11 |
|
| 12 |
extern const BusLocator* const bus_home_mgr; |
| 13 |
extern const BusLocator* const bus_hostname; |
| 14 |
extern const BusLocator* const bus_import_mgr; |
| 15 |
extern const BusLocator* const bus_locale; |
| 16 |
extern const BusLocator* const bus_login_mgr; |
| 17 |
extern const BusLocator* const bus_machine_mgr; |
| 18 |
extern const BusLocator* const bus_network_mgr; |
| 19 |
extern const BusLocator* const bus_oom_mgr; |
| 20 |
extern const BusLocator* const bus_portable_mgr; |
| 21 |
extern const BusLocator* const bus_resolve_mgr; |
| 22 |
extern const BusLocator* const bus_systemd_mgr; |
| 23 |
extern const BusLocator* const bus_sysupdate_mgr; |
| 24 |
extern const BusLocator* const bus_timedate; |
| 25 |
extern const BusLocator* const bus_timesync_mgr; |
| 26 |
|
| 27 |
/* Shorthand flavors of the sd-bus convenience helpers with destination,path,interface strings encapsulated |
| 28 |
* within a single struct. */ |
| 29 |
int bus_call_method_async(sd_bus *bus, sd_bus_slot **ret_slot, const BusLocator *locator, const char *member, sd_bus_message_handler_t callback, void *userdata, const char *types, ...); |
| 30 |
int bus_call_method(sd_bus *bus, const BusLocator *locator, const char *member, sd_bus_error *reterr_error, sd_bus_message **ret_reply, const char *types, ...); |
| 31 |
int bus_get_property(sd_bus *bus, const BusLocator *locator, const char *member, sd_bus_error *reterr_error, sd_bus_message **ret_reply, const char *type); |
| 32 |
int bus_get_property_trivial(sd_bus *bus, const BusLocator *locator, const char *member, sd_bus_error *reterr_error, char type, void *ret); |
| 33 |
int bus_get_property_string(sd_bus *bus, const BusLocator *locator, const char *member, sd_bus_error *reterr_error, char **ret); |
| 34 |
int bus_get_property_strv(sd_bus *bus, const BusLocator *locator, const char *member, sd_bus_error *reterr_error, char ***ret); |
| 35 |
int bus_set_property(sd_bus *bus, const BusLocator *locator, const char *member, sd_bus_error *reterr_error, const char *type, ...); |
| 36 |
int bus_match_signal(sd_bus *bus, sd_bus_slot **ret_slot, const BusLocator *locator, const char *member, sd_bus_message_handler_t callback, void *userdata); |
| 37 |
int bus_match_signal_async(sd_bus *bus, sd_bus_slot **ret_slot, const BusLocator *locator, const char *member, sd_bus_message_handler_t callback, sd_bus_message_handler_t install_callback, void *userdata); |
| 38 |
int bus_message_new_method_call(sd_bus *bus, sd_bus_message **ret, const BusLocator *locator, const char *member); |