Add device auto-connect setter

This commit is contained in:
Christian Müller 2023-01-19 10:18:21 +01:00
parent 58824d8cc3
commit f7fd789c27

View file

@ -128,6 +128,7 @@ type Device interface {
// GetPropertyAutoConnect If TRUE, indicates the device is allowed to autoconnect. If FALSE, manual intervention is required before the device will automatically connect to a known network, such as activating a connection using the device, or setting this property to TRUE. This property cannot be set to TRUE for default-unmanaged devices, since they never autoconnect. // GetPropertyAutoConnect If TRUE, indicates the device is allowed to autoconnect. If FALSE, manual intervention is required before the device will automatically connect to a known network, such as activating a connection using the device, or setting this property to TRUE. This property cannot be set to TRUE for default-unmanaged devices, since they never autoconnect.
GetPropertyAutoConnect() (bool, error) GetPropertyAutoConnect() (bool, error)
SetPropertyAutoConnect(bool) error
// GetPropertyFirmwareMissing If TRUE, indicates the device is likely missing firmware necessary for its operation. // GetPropertyFirmwareMissing If TRUE, indicates the device is likely missing firmware necessary for its operation.
GetPropertyFirmwareMissing() (bool, error) GetPropertyFirmwareMissing() (bool, error)
@ -270,6 +271,10 @@ func (d *device) GetPropertyAutoConnect() (bool, error) {
return d.getBoolProperty(DevicePropertyAutoconnect) return d.getBoolProperty(DevicePropertyAutoconnect)
} }
func (d *device) SetPropertyAutoConnect(managed bool) error {
return d.setProperty(DevicePropertyAutoconnect, managed)
}
func (d *device) GetPropertyFirmwareMissing() (bool, error) { func (d *device) GetPropertyFirmwareMissing() (bool, error) {
return d.getBoolProperty(DevicePropertyFirmwareMissing) return d.getBoolProperty(DevicePropertyFirmwareMissing)
} }