From ac6a5d93daa1063ac95075f1b4ad0c66c6c22cd5 Mon Sep 17 00:00:00 2001 From: Josef Filzmaier Date: Thu, 19 Mar 2020 10:26:22 +0100 Subject: [PATCH] Implement SetPropertyManaged For the Device interface --- Device.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Device.go b/Device.go index bb80319..6cf5137 100644 --- a/Device.go +++ b/Device.go @@ -124,6 +124,7 @@ type Device interface { // Whether or not this device is managed by NetworkManager. Setting this property has a similar effect to configuring the device as unmanaged via the keyfile.unmanaged-devices setting in NetworkManager.conf. Changes to this value are not persistent and lost after NetworkManager restart. GetPropertyManaged() (bool, error) + SetPropertyManaged(bool) // 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) @@ -258,6 +259,10 @@ func (d *device) GetPropertyManaged() (bool, error) { return d.getBoolProperty(DevicePropertyManaged) } +func (d *device) SetPropertyManaged(managed bool) error { + return d.setProperty(DevicePropertyManaged, managed) +} + func (d *device) GetPropertyAutoConnect() (bool, error) { return d.getBoolProperty(DevicePropertyAutoconnect) }