main: Add D-Bus Daemon.GetInfo method
PATCH 1/2 main: Add D-Bus Daemon.GetInfo method
Expose the state directory/storage directory path on D-Bus because it can't be known to clients until IWD runs, and client might need to occasionally fiddle with the network config files. While there also expose the IWD version string, similar to how some other D-Bus services do.
--- src/dbus.h | 1 + src/main.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+)
src/dbus.h +1 -0
@@ -24,6 +24,7 @@#define IWD_SERVICE "net.connman.iwd" +#define IWD_DAEMON_INTERFACE "net.connman.iwd.Daemon"#define IWD_AGENT_MANAGER_INTERFACE "net.connman.iwd.AgentManager"#define IWD_WIPHY_INTERFACE "net.connman.iwd.Adapter"#define IWD_DEVICE_INTERFACE "net.connman.iwd.Device"
src/main.c +42 -0
60 lines not on this page · raw message
Signature · 1 line
2.27.0
PATCH 2/2 doc: Daemon DBus interface documentation
--- doc/daemon-api.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/daemon-api.txt
doc/daemon-api.txt new file +24 -0
@@ -0,0 +1,24 @@ +Daemon hierarchy +================ + +Service net.connman.iwd +Interface net.connman.iwd.Daemon [Experimental] +Object path /net/connman/iwd + +Methods dict GetInfo() + + Returns basic IWD daemon's status and configuration + properties. Their values are global and may be useful + for D-Bus clients interacting with IWD, not so much + for the user. The returned dictionary (a{sv}) maps + string keys to values of types defined per key. + Clients should ignore unknown keys. + + The following key/value pairs are defined currently: + + string Version - IWD release version, + + string StateDirectory - Absolute path to the IWD + state directory where network configuration and + runtime state files are kept (see $STATE_DIRECTORY in + iwd(8) and iwd.network(5)).
Signature · 1 line
2.27.0
Hi Andrew,
Quoted 10 lines · Andrew Zaborowski
Expose the state directory/storage directory path on D-Bus because it can't be known to clients until IWD runs, and client might need to occasionally fiddle with the network config files. While there also expose the IWD version string, similar to how some other D-Bus services do.
--- src/dbus.h | 1 + src/main.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+)
Both applied, thanks.
Regards,
-Denis