diff options
Diffstat (limited to 'src/systemd')
-rw-r--r-- | src/systemd/sd-bus-vtable.h | 28 | ||||
-rw-r--r-- | src/systemd/sd-bus.h | 1 |
2 files changed, 17 insertions, 12 deletions
diff --git a/src/systemd/sd-bus-vtable.h b/src/systemd/sd-bus-vtable.h index 18fc30bd20..e6e0a72f8a 100644 --- a/src/systemd/sd-bus-vtable.h +++ b/src/systemd/sd-bus-vtable.h @@ -31,28 +31,32 @@ typedef struct sd_bus_vtable sd_bus_vtable; #include "sd-bus.h" enum { - _SD_BUS_VTABLE_START = '<', - _SD_BUS_VTABLE_END = '>', - _SD_BUS_VTABLE_METHOD = 'M', - _SD_BUS_VTABLE_SIGNAL = 'S', - _SD_BUS_VTABLE_PROPERTY = 'P', + _SD_BUS_VTABLE_START = '<', + _SD_BUS_VTABLE_END = '>', + _SD_BUS_VTABLE_METHOD = 'M', + _SD_BUS_VTABLE_SIGNAL = 'S', + _SD_BUS_VTABLE_PROPERTY = 'P', _SD_BUS_VTABLE_WRITABLE_PROPERTY = 'W', - _SD_BUS_VTABLE_CHILDREN = 'C' + _SD_BUS_VTABLE_CHILDREN = 'C', }; enum { - SD_BUS_VTABLE_DEPRECATED = 1, - SD_BUS_VTABLE_METHOD_NO_REPLY = 2, - SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE = 4, - SD_BUS_VTABLE_PROPERTY_INVALIDATE_ONLY = 8, + SD_BUS_VTABLE_DEPRECATED = 1ULL << 0, + SD_BUS_VTABLE_METHOD_NO_REPLY = 1ULL << 1, + SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE = 1ULL << 2, + SD_BUS_VTABLE_PROPERTY_INVALIDATE_ONLY = 1ULL << 3, + SD_BUS_VTABLE_UNPRIVILEGED = 1ULL << 4, + _SD_BUS_VTABLE_CAPABILITY_MASK = 0xFFFFULL << 40 }; +#define SD_BUS_VTABLE_CAPABILITY(x) ((uint64_t) (((x)+1) & 0xFFFF) << 40) + struct sd_bus_vtable { /* Please do not initialize this structure directly, use the * macros below instead */ - int type; - int flags; + uint8_t type:8; + uint64_t flags:56; union { struct { size_t element_size; diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h index 1c0d12a0cc..402fc55f93 100644 --- a/src/systemd/sd-bus.h +++ b/src/systemd/sd-bus.h @@ -103,6 +103,7 @@ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]); int sd_bus_set_bus_client(sd_bus *bus, int b); int sd_bus_set_server(sd_bus *bus, int b, sd_id128_t server_id); int sd_bus_set_anonymous(sd_bus *bus, int b); +int sd_bus_set_trusted(sd_bus *bus, int b); int sd_bus_negotiate_fds(sd_bus *bus, int b); int sd_bus_negotiate_attach_timestamp(sd_bus *bus, int b); int sd_bus_negotiate_attach_creds(sd_bus *bus, uint64_t creds_mask); |