1SD_BUS_CALL_METHOD(3)         sd_bus_call_method         SD_BUS_CALL_METHOD(3)
2
3
4

NAME

6       sd_bus_call_method, sd_bus_call_methodv, sd_bus_call_method_async,
7       sd_bus_call_method_asyncv - Initialize a bus message object and invoke
8       the corresponding D-Bus method call
9

SYNOPSIS

11       #include <systemd/sd-bus.h>
12
13       typedef int (*sd_bus_message_handler_t)(sd_bus_message *m,
14                                               void *userdata,
15                                               sd_bus_error *ret_error);
16
17       int sd_bus_call_method(sd_bus *bus, const char *destination,
18                              const char *path, const char *interface,
19                              const char *member, sd_bus_error *ret_error,
20                              sd_bus_message **reply, const char *types, ...);
21
22       int sd_bus_call_methodv(sd_bus *bus, const char *destination,
23                               const char *path, const char *interface,
24                               const char *member, sd_bus_error *ret_error,
25                               sd_bus_message **reply, const char *types,
26                               va_list ap);
27
28       int sd_bus_call_method_async(sd_bus *bus, sd_bus_slot **slot,
29                                    const char *destination, const char *path,
30                                    const char *interface, const char *member,
31                                    sd_bus_message_handler_t callback,
32                                    void *userdata, const char *types, ...);
33
34       int sd_bus_call_method_asyncv(sd_bus *bus, sd_bus_slot **slot,
35                                     const char *destination,
36                                     const char *path, const char *interface,
37                                     const char *member,
38                                     sd_bus_message_handler_t callback,
39                                     void *userdata, const char *types,
40                                     va_list ap);
41

DESCRIPTION

43       sd_bus_call_method() is a convenience function for initializing a bus
44       message object and calling the corresponding D-Bus method. It combines
45       the sd_bus_message_new_method_call(3), sd_bus_message_append(3) and
46       sd_bus_call(3) functions into a single function call.
47
48       sd_bus_call_method_async() is a convenience function for initializing a
49       bus message object and calling the corresponding D-Bus method
50       asynchronously. It combines the sd_bus_message_new_method_call(3),
51       sd_bus_message_append(3) and sd_bus_call_async(3) functions into a
52       single function call.
53

RETURN VALUE

55       On success, these functions return a non-negative integer. On failure,
56       they return a negative errno-style error code.
57
58   Errors
59       See the man pages of sd_bus_message_new_method_call(3),
60       sd_bus_message_append(3), sd_bus_call(3) and sd_bus_call_async(3) for a
61       list of possible errors.
62

NOTES

64       These APIs are implemented as a shared library, which can be compiled
65       and linked to with the libsystemd pkg-config(1) file.
66

SEE ALSO

68       systemd(1), sd-bus(3), sd_bus_message_new_method_call(3),
69       sd_bus_message_append(3), sd_bus_call(3), sd_bus_set_property(3),
70       sd_bus_emit_signal(3)
71
72
73
74systemd 249                                              SD_BUS_CALL_METHOD(3)
Impressum