X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Flibsystemd%2Fsd-bus%2Fbus-internal.h;h=601ea5afb1f0278f66ee13caf4bc5c74529726de;hb=2b347169b9046ff2d735ef23e62a8c74f5151600;hp=042d3522615977e48283d599cb3b2275be2de5ba;hpb=19befb2d5fc087f96e40ddc432b2cc9385666209;p=elogind.git diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h index 042d35226..601ea5afb 100644 --- a/src/libsystemd/sd-bus/bus-internal.h +++ b/src/libsystemd/sd-bus/bus-internal.h @@ -126,7 +126,6 @@ struct vtable_member { }; typedef enum BusSlotType { - _BUS_SLOT_DISCONNECTED, BUS_REPLY_CALLBACK, BUS_FILTER_CALLBACK, BUS_MATCH_CALLBACK, @@ -134,14 +133,15 @@ typedef enum BusSlotType { BUS_NODE_ENUMERATOR, BUS_NODE_VTABLE, BUS_NODE_OBJECT_MANAGER, + _BUS_SLOT_INVALID = -1, } BusSlotType; struct sd_bus_slot { unsigned n_ref; sd_bus *bus; void *userdata; - BusSlotType type; - bool floating; + BusSlotType type:5; + bool floating:1; LIST_FIELDS(sd_bus_slot, slots); @@ -237,12 +237,7 @@ struct sd_bus { Hashmap *vtable_methods; Hashmap *vtable_properties; - union { - struct sockaddr sa; - struct sockaddr_un un; - struct sockaddr_in in; - struct sockaddr_in6 in6; - } sockaddr; + union sockaddr_union sockaddr; socklen_t sockaddr_size; char *kernel; @@ -303,6 +298,8 @@ struct sd_bus { sd_bus_message *current_message; sd_bus_slot *current_slot; + sd_bus_message_handler_t current_handler; + void *current_userdata; sd_bus **default_bus_ptr; pid_t tid; @@ -386,3 +383,5 @@ int bus_set_address_system_remote(sd_bus *b, const char *host); int bus_set_address_system_container(sd_bus *b, const char *machine); int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata); + +int bus_get_root_path(sd_bus *bus);