X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fsystemd%2Fsd-bus.h;h=b31cfaab6fa922e127ad7e585cda630c91ccf11d;hb=c49b30a23583ff39daaa26696bcab478d2fee0bb;hp=48edc59188eecd463fd2ac425f4cd8a8cc433f4b;hpb=affff0b6f2b267254fee981a010e06cd55d9756a;p=elogind.git diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h index 48edc5918..b31cfaab6 100644 --- a/src/systemd/sd-bus.h +++ b/src/systemd/sd-bus.h @@ -24,15 +24,14 @@ #include #include +#include #include "sd-id128.h" #include "sd-event.h" #include "sd-memfd.h" #include "_sd-common.h" -#ifdef __cplusplus -extern "C" { -#endif +_SD_BEGIN_DECLARATIONS; /* Types */ @@ -90,9 +89,9 @@ int sd_bus_can_send(sd_bus *bus, char type); int sd_bus_get_server_id(sd_bus *bus, sd_id128_t *peer); int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial); -int sd_bus_send_with_reply(sd_bus *bus, sd_bus_message *m, sd_bus_message_handler_t callback, void *userdata, uint64_t usec, uint64_t *serial); -int sd_bus_send_with_reply_cancel(sd_bus *bus, uint64_t serial); -int sd_bus_send_with_reply_and_block(sd_bus *bus, sd_bus_message *m, uint64_t usec, sd_bus_error *error, sd_bus_message **r); +int sd_bus_call(sd_bus *bus, sd_bus_message *m, uint64_t usec, sd_bus_error *error, sd_bus_message **reply); +int sd_bus_call_async(sd_bus *bus, sd_bus_message *m, sd_bus_message_handler_t callback, void *userdata, uint64_t usec, uint64_t *serial); +int sd_bus_call_async_cancel(sd_bus *bus, uint64_t serial); int sd_bus_get_fd(sd_bus *bus); int sd_bus_get_events(sd_bus *bus); @@ -188,8 +187,10 @@ int sd_bus_message_append(sd_bus_message *m, const char *types, ...); int sd_bus_message_append_basic(sd_bus_message *m, char type, const void *p); int sd_bus_message_append_array(sd_bus_message *m, char type, const void *ptr, size_t size); int sd_bus_message_append_array_space(sd_bus_message *m, char type, size_t size, void **ptr); +int sd_bus_message_append_array_iovec(sd_bus_message *m, char type, const struct iovec *iov, unsigned n); int sd_bus_message_append_array_memfd(sd_bus_message *m, char type, sd_memfd *memfd); int sd_bus_message_append_string_space(sd_bus_message *m, size_t size, char **s); +int sd_bus_message_append_string_iovec(sd_bus_message *m, const struct iovec *iov, unsigned n); int sd_bus_message_append_string_memfd(sd_bus_message *m, sd_memfd* memfd); int sd_bus_message_append_strv(sd_bus_message *m, char **l); int sd_bus_message_open_container(sd_bus_message *m, char type, const char *contents); @@ -199,7 +200,7 @@ int sd_bus_message_copy(sd_bus_message *m, sd_bus_message *source, int all); int sd_bus_message_read(sd_bus_message *m, const char *types, ...); int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p); int sd_bus_message_read_array(sd_bus_message *m, char type, const void **ptr, size_t *size); -int sd_bus_message_read_strv(sd_bus_message *m, char ***l); +int sd_bus_message_read_strv(sd_bus_message *m, char ***l); /* free the result! */ int sd_bus_message_skip(sd_bus_message *m, const char *types); int sd_bus_message_enter_container(sd_bus_message *m, char type, const char *contents); int sd_bus_message_exit_container(sd_bus_message *m); @@ -213,6 +214,8 @@ int sd_bus_message_rewind(sd_bus_message *m, int complete); int sd_bus_call_method(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *error, sd_bus_message **reply, const char *types, ...); int sd_bus_get_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *error, sd_bus_message **reply, const char *type); int sd_bus_get_property_trivial(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *error, char type, void *ptr); +int sd_bus_get_property_string(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *error, char **ret); /* free the result! */ +int sd_bus_get_property_strv(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *error, char ***ret); /* free the result! */ int sd_bus_set_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *error, const char *type, ...); int sd_bus_reply_method_return(sd_bus *bus, sd_bus_message *call, const char *types, ...); int sd_bus_reply_method_error(sd_bus *bus, sd_bus_message *call, const sd_bus_error *e); @@ -236,7 +239,7 @@ int sd_bus_get_unique_name(sd_bus *bus, const char **unique); int sd_bus_request_name(sd_bus *bus, const char *name, int flags); int sd_bus_release_name(sd_bus *bus, const char *name); int sd_bus_list_names(sd_bus *bus, char ***l); -int sd_bus_get_owner(sd_bus *bus, const char *name, char **owner); +int sd_bus_get_owner(sd_bus *bus, const char *name, char **owner); /* free the result! */ int sd_bus_get_owner_uid(sd_bus *bus, const char *name, uid_t *uid); int sd_bus_get_owner_pid(sd_bus *bus, const char *name, pid_t *pid); int sd_bus_get_owner_machine_id(sd_bus *bus, const char *name, sd_id128_t *machine); @@ -269,8 +272,6 @@ int sd_bus_error_has_name(const sd_bus_error *e, const char *name); &(x).bytes[8], &(x).bytes[9], &(x).bytes[10], &(x).bytes[11], \ &(x).bytes[12], &(x).bytes[13], &(x).bytes[14], &(x).bytes[15] -#ifdef __cplusplus -} -#endif +_SD_END_DECLARATIONS; #endif