main: Add D-Bus Daemon.GetInfo method
PATCH 1/1 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.
---
I'm not happy with the name of the interface and the name of the method but couldn't find better names that would work well and satisfy everybody. "net.connman.IWD" or "net.connman.iwd.Control" are other names I considered, and as for GetInfo the alternative could be using properties similar to how org.freedesktop.NetworkManager exposes Version, org.freedesktop.ColorManager exposes DaemonVersion, org.gnome.DisplayManager exposes Version{Major,Minor,Micro}, etc.
--- 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
Hi Andrew,
Quoted 6 lines
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.
---
Quoted 8 lines
I'm not happy with the name of the interface and the name of the method but couldn't find better names that would work well and satisfy everybody. "net.connman.IWD" or "net.connman.iwd.Control" are other names I considered, and as for GetInfo the alternative could be using properties similar to how org.freedesktop.NetworkManager exposes Version, org.freedesktop.ColorManager exposes DaemonVersion, org.gnome.DisplayManager exposes Version{Major,Minor,Micro}, etc.
---
so I am actually fine with the naming. Lets use net.connman.iwd.Daemon.GetInfo() and StateDirectory and Version as you have in this patch. Just also document it in doc/daemon-api.txt as well and then we can merge this.
Regards
Marcel