Widget that shows current IP address and a list of available WiFi networks.
Network is available when it is listed in /etc/wpa_supplicant.conf or it is open network without security.
Protocol of communication between this widget and underlying WiFi controller is highly asynchronous due to use of wpa_supplicant, which uses asynchronous message passing to communicate with client software.
- Upon construction widget requests status from WiFi controller.
- Upon construction widget requests scan from WiFi controller (so every time this widget is opened it will ask WiFi controller to rescan networks, no "Rescan" button is needed).
- On status response it shows IP address and connection status.
- On Scan response it refreshes list of available networks (and shows them instead of "Scanning..." message). It also clears internal network info model and repopulates it with new information.
- On selecting new network in a network list widget moves to "connecting" state and then tries to connect.
- After "connect" request widget expects "disconnected" signal and then "connected" signal. 6.1. Planned "disconnected" signal is ignored since widget is already in "connecting" state. 6.2. "connected" signal moves widget to "connected" state and causes to refresh ip address and connection status indication. 6.3. If widget does not receive "connected" signal in time, it will move to "errored" state (with proper indication).
- If a widget gets unplanned "disconnect" signal from WiFi controller, it will move to "notConnected" state and initiate network scan.
- Receiving "scanFinished" signal will cause widget to refresh available networks list.
- It is possible to receive unplanned "connected" signal, widget will update connection information accordingly.