Comment 11 for bug 1446584

Revision history for this message
Tony Espy (awe) wrote :

Note, on IRC there was some discussion about the push-client using urfkill for both monitoring FlightMode and the state of the WiFi device, this is possible, but will requires more than a simple DBus signal listener change.

When a urfkill device changes, urfkill sends a "DeviceChanged" signal with the path of the DBus object ( eg. /org/freedesktop/URfkill/0 ). The properties of this device can then be queried using the standard DBus.Properties.GetAll() method.

Of interest in this case would 'type=1' ( WiFi ) and 'soft' property, which indicates whether or not the device is blocked. If FM is enabled, all devices are blocked initially. If the WiFi device was enabled while in FM, another "DeviceChanged" signal would be emitted...

This isn't ideal, but it would work. I will add an enhancement request/bug to urfkill that suggests the addition of BlockIdx and Block signals. This would allow a client to just listen for a 'Block' signal and examine it's 'type' and 'soft' values which is closer to the current signal logic which listens for NM 'WirelessEnabled' PropertyChanged signals.