Implement SetPropertyWirelessEnabled

This commit is contained in:
Raqbit 2020-11-13 17:18:21 +01:00
parent 594bfca331
commit 97d8aa8b42
No known key found for this signature in database
GPG key ID: 0D170077BE9F5301

View file

@ -151,6 +151,7 @@ type NetworkManager interface {
// Indicates if wireless is currently enabled or not.
GetPropertyWirelessEnabled() (bool, error)
SetPropertyWirelessEnabled(bool) error
// Indicates if the wireless hardware is currently enabled, i.e. the state of the RF kill switch.
GetPropertyWirelessHardwareEnabled() (bool, error)
@ -501,6 +502,10 @@ func (nm *networkManager) GetPropertyWirelessEnabled() (bool, error) {
return nm.getBoolProperty(NetworkManagerPropertyWirelessEnabled)
}
func (nm *networkManager) SetPropertyWirelessEnabled(enabled bool) error {
return nm.setProperty(NetworkManagerPropertyWirelessEnabled, enabled)
}
func (nm *networkManager) GetPropertyWirelessHardwareEnabled() (bool, error) {
return nm.getBoolProperty(NetworkManagerPropertyWirelessHardwareEnabled)
}