From 6eaded9071fbf868476255adb8ee5f416e7ad134 Mon Sep 17 00:00:00 2001
From: Thomas Haller <email address hidden>
Date: Tue, 14 Feb 2017 12:45:38 +0100
Subject: [PATCH] device: add get_autoconnect_allowed() virtual function
It allows derived classes to override the autoconnect-allowed
state.
We already have
- NM_DEVICE_AUTOCONNECT property, which is two parts:
- NMDevicePrivate::autoconnect_user, which is settable via
D-Bus by the use, to allow the device to autoconnect.
- NMDevicePrivate::autoconnect_intern, which is set by
internal decision.
- NM_DEVICE_AUTOCONNECT_ALLOWED signal, where other devices can
subscribe to block autoconnect. Currently that is only used
by NMDeviceOlpcMesh.
These two make up for nm_device_autoconnect_allowed().
Add another way to allow derived classes to disable autoconnect
temporarily. This could also be achieved by having the device
subscribe to NM_DEVICE_AUTOCONNECT_ALLOWED of self, or by adding
a signal slot. But a plain function pointer seems easier.
I missed this commit. It should work now.
From 6eaded9071fbf86 8476255adb8ee5f 416e7ad134 Mon Sep 17 00:00:00 2001 _allowed( ) virtual function
From: Thomas Haller <email address hidden>
Date: Tue, 14 Feb 2017 12:45:38 +0100
Subject: [PATCH] device: add get_autoconnect
It allows derived classes to override the autoconnect-allowed
state.
We already have
- NM_DEVICE_ AUTOCONNECT property, which is two parts: ::autoconnect_ user, which is settable via ::autoconnect_ intern, which is set by AUTOCONNECT_ ALLOWED signal, where other devices can
- NMDevicePrivate
D-Bus by the use, to allow the device to autoconnect.
- NMDevicePrivate
internal decision.
- NM_DEVICE_
subscribe to block autoconnect. Currently that is only used
by NMDeviceOlpcMesh.
These two make up for nm_device_ autoconnect_ allowed( ).
Add another way to allow derived classes to disable autoconnect AUTOCONNECT_ ALLOWED of self, or by adding
temporarily. This could also be achieved by having the device
subscribe to NM_DEVICE_
a signal slot. But a plain function pointer seems easier.