diff options
Diffstat (limited to 'src/core/nm-rfkill-manager.h')
| -rw-r--r-- | src/core/nm-rfkill-manager.h | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/src/core/nm-rfkill-manager.h b/src/core/nm-rfkill-manager.h index d3f66349..88d0421a 100644 --- a/src/core/nm-rfkill-manager.h +++ b/src/core/nm-rfkill-manager.h @@ -7,23 +7,33 @@ #ifndef __NM_RFKILL_MANAGER_H__ #define __NM_RFKILL_MANAGER_H__ -typedef enum { /*< skip >*/ - RFKILL_UNBLOCKED = 0, - RFKILL_SOFT_BLOCKED = 1, - RFKILL_HARD_BLOCKED = 2 -} RfKillState; - -typedef enum { /*< skip >*/ - RFKILL_TYPE_WLAN = 0, - RFKILL_TYPE_WWAN = 1, - - /* UNKNOWN and MAX should always be 1 more than - * the last rfkill type since RFKILL_TYPE_MAX is +typedef enum { + NM_RFKILL_STATE_UNAVAILABLE = 0, + NM_RFKILL_STATE_UNBLOCKED = 1, + NM_RFKILL_STATE_SOFT_BLOCKED = 2, + NM_RFKILL_STATE_HARD_BLOCKED = 3, + /* NM_RFKILL_STATE_HARD_BLOCKED_OS_NOT_OWNER means that the CSME firmware + * is currently controlling the device. This feature is implmented on Intel + * wifi devices only. + * The NetworkManager can get ownership on the device, but it requires to + * first ask ownership through the iwlmei kernel module. + */ + NM_RFKILL_STATE_HARD_BLOCKED_OS_NOT_OWNER = 4, +} NMRfkillState; + +typedef enum { + NM_RFKILL_TYPE_WLAN = 0, + NM_RFKILL_TYPE_WWAN = 1, + + /* UNKNOWN and MAX should always be 1 more than + * the last rfkill type since NM_RFKILL_TYPE_MAX is * used as an array size. */ - RFKILL_TYPE_UNKNOWN, /* KEEP LAST */ - RFKILL_TYPE_MAX = RFKILL_TYPE_UNKNOWN -} RfKillType; + NM_RFKILL_TYPE_UNKNOWN, /* KEEP LAST */ + NM_RFKILL_TYPE_MAX = NM_RFKILL_TYPE_UNKNOWN, +} NMRfkillType; + +const char *nm_rfkill_type_to_string(NMRfkillType rtype); #define NM_TYPE_RFKILL_MANAGER (nm_rfkill_manager_get_type()) #define NM_RFKILL_MANAGER(obj) \ @@ -43,6 +53,8 @@ GType nm_rfkill_manager_get_type(void); NMRfkillManager *nm_rfkill_manager_new(void); -RfKillState nm_rfkill_manager_get_rfkill_state(NMRfkillManager *manager, RfKillType rtype); +NMRfkillState nm_rfkill_manager_get_rfkill_state(NMRfkillManager *manager, NMRfkillType rtype); + +NMRadioFlags nm_rfkill_type_to_radio_available_flag(NMRfkillType type); #endif /* __NM_RFKILL_MANAGER_H__ */ |