1 # lws minimal dbus client
3 This demonstrates nonblocking, asynchronous dbus method calls as the client.
7 Using libdbus requires additional non-default include paths setting, same as
8 is necessary for lws build described in ./lib/roles/dbus/README.md
10 CMake can guess one path and the library name usually, see the README above
11 for details of how to override for custom libdbus and cross build.
15 $ cmake .. -DLWS_DBUS_INCLUDE2="/usr/lib64/dbus-1.0/include"
21 $ cmake .. -DLWS_DBUS_INCLUDE2="/usr/lib/x86_64-linux-gnu/dbus-1.0/include"
27 Commandline option|Meaning
29 -d <loglevel>|Debug verbosity in decimal, eg, -d15
31 The minimal client connects to the minimal dbus server example, which is
32 expected to be listening on its default abstract unix domain socket path.
34 It call the server Echo method with "Hello!" and returns to the event loop.
35 When the reply comes, it prints the returned message.
37 Afterwards it just sits there receiving unsolicited messages from the server
38 example, until closed by the user.
41 $ ./lws-minimal-dbus-client
43 [2018/10/05 06:08:31:4901] NOTICE: pending_call_notify
44 [2018/10/05 06:08:31:4929] USER: pending_call_notify: received 'Hello!'
45 ^C[2018/10/05 06:09:22:4409] NOTICE: destroy_dbus_client_conn
46 [2018/10/05 06:09:22:4691] NOTICE: Exiting cleanly