Handle connecting/disconnecting states
This commit is contained in:
parent
1477d909b0
commit
02b93a3ef0
6 changed files with 176 additions and 41 deletions
|
|
@ -241,6 +241,15 @@ func GetConnectedSSID() string {
|
|||
return props.Name
|
||||
}
|
||||
|
||||
// GetConnectionState returns the current WiFi connection state
|
||||
func GetConnectionState() string {
|
||||
state, err := station.GetState()
|
||||
if err != nil {
|
||||
return string(iwd.StateDisconnected)
|
||||
}
|
||||
return string(state)
|
||||
}
|
||||
|
||||
// StartEventMonitoring initializes D-Bus signal monitoring and WebSocket broadcasting
|
||||
func StartEventMonitoring() error {
|
||||
// Initialize broadcaster
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue