core/trivial: add code comment for NMDeviceCheckDevAvailableFlags and NMDeviceCheckConAvailableFlags

This commit is contained in:
Thomas Haller 2018-10-17 12:13:49 +02:00
parent c37b028aba
commit e6523fbbbc

View file

@ -168,9 +168,21 @@ typedef enum NMActStageReturn NMActStageReturn;
typedef enum { /*< skip >*/
NM_DEVICE_CHECK_CON_AVAILABLE_NONE = 0,
/* since NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST is a collection of flags with more fine grained
* parts, this flag in general indicates that this is a user-request. */
_NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST = (1L << 0),
/* we also consider devices which have no carrier but are still waiting for the driver
* to detect carrier. Usually, such devices are not yet available, however for a user-request
* they are. They might fail later if carrier doesn't come. */
_NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST_WAITING_CARRIER = (1L << 1),
/* usually, a profile is only available if the Wi-Fi AP is in range. For an
* explicit user request, we also consider profiles for APs that are not (yet)
* visible. */
_NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST_IGNORE_AP = (1L << 2),
/* a collection of flags, that are commonly set for an explict user-request. */
NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST = _NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST
| _NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST_WAITING_CARRIER
| _NM_DEVICE_CHECK_CON_AVAILABLE_FOR_USER_REQUEST_IGNORE_AP,
@ -191,7 +203,12 @@ struct _NMDevice {
typedef enum { /*< skip >*/
NM_DEVICE_CHECK_DEV_AVAILABLE_NONE = 0,
/* the device is considered available, even if it has no carrier.
*
* For various device types (software devices) we ignore carrier based
* on the type. So, for them, this flag has no effect anyway. */
_NM_DEVICE_CHECK_DEV_AVAILABLE_IGNORE_CARRIER = (1L << 0),
NM_DEVICE_CHECK_DEV_AVAILABLE_FOR_USER_REQUEST = _NM_DEVICE_CHECK_DEV_AVAILABLE_IGNORE_CARRIER,
NM_DEVICE_CHECK_DEV_AVAILABLE_ALL = (1L << 1) - 1,