From f7fd789c270961ace171f8b3fac874a440f2ba3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCller?= Date: Thu, 19 Jan 2023 10:18:21 +0100 Subject: [PATCH] Add device auto-connect setter --- Device.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Device.go b/Device.go index e56f40e..9c6e0d0 100644 --- a/Device.go +++ b/Device.go @@ -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() (bool, error) + SetPropertyAutoConnect(bool) error // GetPropertyFirmwareMissing If TRUE, indicates the device is likely missing firmware necessary for its operation. GetPropertyFirmwareMissing() (bool, error) @@ -270,6 +271,10 @@ func (d *device) GetPropertyAutoConnect() (bool, error) { return d.getBoolProperty(DevicePropertyAutoconnect) } +func (d *device) SetPropertyAutoConnect(managed bool) error { + return d.setProperty(DevicePropertyAutoconnect, managed) +} + func (d *device) GetPropertyFirmwareMissing() (bool, error) { return d.getBoolProperty(DevicePropertyFirmwareMissing) }