NetworkManager/src/devices/bluetooth
Thomas Haller f0731dc716 device: refactor autoconnect blocking by introducing NMDeviceAutoconnectBlockedFlags enum
The flags allow for more then two reasons. Currently the only reasons
for allowing or disallowing autoconnect are "user" and "intern".

It's a bit odd, that NMDeviceAutoconnectBlockedFlags has a negative
meaning. So
  nm_device_set_autoconnect_intern (device, FALSE);
gets replaced by
  nm_device_set_autoconnect_blocked_set (device, NM_DEVICE_AUTOCONNECT_BLOCKED_INTERN);
and so on.

However, it's chosen this way, because autoconnect shall be allowed,
unless any blocked-reason is set. That is, to check whether autoconnect
is allowed, we do
  if (!nm_device_get_autoconnect_blocked (device, NM_DEVICE_AUTOCONNECT_BLOCKED_ALL))
The alternative check would be
  if (nm_device_get_autoconnect_allowed (device, NM_DEVICE_AUTOCONNECT_ALLOWED_ALL) == NM_DEVICE_AUTOCONNECT_ALLOWED_ALL)
which seems odd too.

So, add the inverse flags to block autoconnect.

Beside refactoring and inverting the meaning of the autoconnect
settings, there is no change in behavior.

(cherry picked from commit 5279ab5be6)
2017-11-08 12:35:10 +01:00
..
nm-bluez-common.h bluetooth: expose known HCI adapters to devices 2017-06-01 11:28:57 +02:00
nm-bluez-device.c settings: get rid of callback arguments for nm_settings_connection_delete() 2017-10-25 14:04:36 +02:00
nm-bluez-device.h bluetooth: drop unused function declaration 2017-09-18 18:56:50 +02:00
nm-bluez-manager.c core: fix crash with bluetooth device factory wrongly claiming NAP connection 2017-08-06 07:50:48 +02:00
nm-bluez4-adapter.c core,clients: use our own string hashing function nm_str_hash() 2017-10-18 13:05:00 +02:00
nm-bluez4-adapter.h src/devices: use macros for property and signal names 2017-09-18 15:40:31 +02:00
nm-bluez4-manager.c src/devices: use macros for property and signal names 2017-09-18 15:40:31 +02:00
nm-bluez4-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-bluez5-dun.c core: use nm_close() 2017-10-19 15:49:58 +02:00
nm-bluez5-dun.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-bluez5-manager.c all: avoid coverity warnings about "Wrong Check of Return Value" 2017-10-30 14:10:56 +01:00
nm-bluez5-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-bt-error.c all: use NM_CACHED_QUARK_FCN() to define cached quarks 2017-02-10 14:33:52 +01:00
nm-bt-error.h bluez: split out errors 2014-10-13 14:27:33 +02:00
nm-device-bt.c device: refactor autoconnect blocking by introducing NMDeviceAutoconnectBlockedFlags enum 2017-11-08 12:35:10 +01:00
nm-device-bt.h modem: add define for ModemManager D-Bus path 2017-05-12 17:29:33 +02:00