diff options
author | Luca Boccassi <bluca@debian.org> | 2023-03-30 17:03:50 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2023-03-30 18:55:55 +0100 |
commit | ce199d12e9a88286271dec6f22cd2c61f1cd7f54 (patch) | |
tree | 94c5ca729086f8157ba607fc9c3105f7b0f22a18 /man/sd_bus_call_method.xml | |
parent | d10a5f6c3de64fcaa71855d9a94394ea8317038a (diff) | |
download | systemd-ce199d12e9a88286271dec6f22cd2c61f1cd7f54.tar.gz |
man: add example for sd_bus_call_method
Diffstat (limited to 'man/sd_bus_call_method.xml')
-rw-r--r-- | man/sd_bus_call_method.xml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/man/sd_bus_call_method.xml b/man/sd_bus_call_method.xml index 762ea11c01..7b525558d7 100644 --- a/man/sd_bus_call_method.xml +++ b/man/sd_bus_call_method.xml @@ -127,6 +127,19 @@ <xi:include href="libsystemd-pkgconfig.xml" /> <refsect1> + <title>Examples</title> + + <example> + <title>Make a call to a D-Bus method that takes a single parameter</title> + + <programlisting><xi:include href="print-unit-path-call-method.c" parse="text" /></programlisting> + <para>This defines a minimally useful program that will open a connection to the bus, call a method, + wait for the reply, and finally extract and print the answer. It does error handling and proper + memory management.</para> + </example> + </refsect1> + + <refsect1> <title>See Also</title> <para> |