From 40ca29a1370379d43e44c0ed425eecc7218dcbca Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 16 Oct 2013 06:10:04 +0200 Subject: timedated: use libsystemd-bus instead of libdbus for bus communication Among other things this also adds a few things necessary for the change: - Considerably more powerful error returning APIs in libsystemd-bus - Adapter for connecting an sd_bus to an sd_event - As I reworked the PolicyKit logic to the new library I also made it asynchronous, so that PolicyKit requests of one user cannot block out another user anymore. - We always use the macro names for common bus error. That way it is harder to mistype them since the compiler will notice --- src/libsystemd-bus/bus-internal.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/libsystemd-bus/bus-internal.h') diff --git a/src/libsystemd-bus/bus-internal.h b/src/libsystemd-bus/bus-internal.h index 31e10b2c27..1726b61841 100644 --- a/src/libsystemd-bus/bus-internal.h +++ b/src/libsystemd-bus/bus-internal.h @@ -240,14 +240,12 @@ struct sd_bus { uint64_t hello_flags; uint64_t match_cookie; -}; - -static inline void bus_unrefp(sd_bus **b) { - sd_bus_unref(*b); -} -#define _cleanup_bus_unref_ __attribute__((cleanup(bus_unrefp))) -#define _cleanup_bus_error_free_ __attribute__((cleanup(sd_bus_error_free))) + sd_event_source *input_io_event_source; + sd_event_source *output_io_event_source; + sd_event_source *time_event_source; + sd_event *event; +}; #define BUS_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC)) -- cgit v1.2.3-54-g00ecf