Commit c3f6356a authored by Thomas Haller's avatar Thomas Haller

docs: use numeric values in enum definitions in public headers

The public headers are parsed with gtk-doc. Define enum values
as plain numbers, otherwise the documentation might have problems
picking up the right value.

#126
!83
parent 83c1a189
Pipeline #19933 passed with stages
in 88 minutes and 18 seconds
......@@ -981,13 +981,13 @@ typedef enum { /*< flags >*/
typedef enum { /*< flags >*/
NM_ACTIVATION_STATE_FLAG_NONE = 0,
NM_ACTIVATION_STATE_FLAG_IS_MASTER = (1LL << 0),
NM_ACTIVATION_STATE_FLAG_IS_SLAVE = (1LL << 1),
NM_ACTIVATION_STATE_FLAG_LAYER2_READY = (1LL << 2),
NM_ACTIVATION_STATE_FLAG_IP4_READY = (1LL << 3),
NM_ACTIVATION_STATE_FLAG_IP6_READY = (1LL << 4),
NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES = (1LL << 5),
NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY = (1LL << 6),
NM_ACTIVATION_STATE_FLAG_IS_MASTER = 0x1,
NM_ACTIVATION_STATE_FLAG_IS_SLAVE = 0x2,
NM_ACTIVATION_STATE_FLAG_LAYER2_READY = 0x4,
NM_ACTIVATION_STATE_FLAG_IP4_READY = 0x8,
NM_ACTIVATION_STATE_FLAG_IP6_READY = 0x10,
NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES = 0x20,
NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY = 0x40,
} NMActivationStateFlags;
/**
......@@ -1026,12 +1026,12 @@ typedef enum { /*< flags >*/
*/
typedef enum { /*< flags >*/
NM_SETTINGS_UPDATE2_FLAG_NONE = 0,
NM_SETTINGS_UPDATE2_FLAG_TO_DISK = (1LL << 0),
NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY = (1LL << 1),
NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_DETACHED = (1LL << 2),
NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY = (1LL << 3),
NM_SETTINGS_UPDATE2_FLAG_VOLATILE = (1LL << 4),
NM_SETTINGS_UPDATE2_FLAG_BLOCK_AUTOCONNECT = (1LL << 5),
NM_SETTINGS_UPDATE2_FLAG_TO_DISK = 0x1,
NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY = 0x2,
NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_DETACHED = 0x4,
NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY = 0x8,
NM_SETTINGS_UPDATE2_FLAG_VOLATILE = 0x10,
NM_SETTINGS_UPDATE2_FLAG_BLOCK_AUTOCONNECT = 0x20,
} NMSettingsUpdate2Flags;
/**
......
......@@ -90,12 +90,11 @@ typedef enum { /*< underscore_name=nm_setting_802_1x_ck_scheme >*/
*/
typedef enum { /*< underscore_name=nm_setting_802_1x_auth_flags >*/
NM_SETTING_802_1X_AUTH_FLAGS_NONE = 0,
NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_DISABLE = (1 << 0),
NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_DISABLE = (1 << 1),
NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_DISABLE = (1 << 2),
NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_0_DISABLE = 0x1,
NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_1_DISABLE = 0x2,
NM_SETTING_802_1X_AUTH_FLAGS_TLS_1_2_DISABLE = 0x4,
_NM_SETTING_802_1X_AUTH_FLAGS_LAST, /*< skip >*/
NM_SETTING_802_1X_AUTH_FLAGS_ALL = (((_NM_SETTING_802_1X_AUTH_FLAGS_LAST - 1) << 1) - 1),
NM_SETTING_802_1X_AUTH_FLAGS_ALL = 0x7,
} NMSetting8021xAuthFlags;
#define NM_TYPE_SETTING_802_1X (nm_setting_802_1x_get_type ())
......
......@@ -94,9 +94,9 @@ void nm_ip_route_unref (NMIPRoute *route);
gboolean nm_ip_route_equal (NMIPRoute *route,
NMIPRoute *other);
enum {
enum { /*< flags >*/
NM_IP_ROUTE_EQUAL_CMP_FLAGS_NONE = 0,
NM_IP_ROUTE_EQUAL_CMP_FLAGS_WITH_ATTRS = (1LL << 0),
NM_IP_ROUTE_EQUAL_CMP_FLAGS_WITH_ATTRS = 0x1,
};
NM_AVAILABLE_IN_1_10
......
......@@ -43,9 +43,9 @@ G_BEGIN_DECLS
*/
typedef enum { /*< flags >*/
NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_NONE = 0, /*< skip >*/
NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_VALIDATE_ACTIVE = (1 << 1),
NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_VALIDATE_INACTIVE = (1 << 2),
NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_SEND_ALWAYS = (1 << 3)
NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_VALIDATE_ACTIVE = 0x2,
NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_VALIDATE_INACTIVE = 0x4,
NM_TEAM_LINK_WATCHER_ARP_PING_FLAG_SEND_ALWAYS = 0x8,
} NMTeamLinkWatcherArpPingFlags;
#define NM_TEAM_LINK_WATCHER_ETHTOOL "ethtool"
......
......@@ -63,20 +63,20 @@ G_BEGIN_DECLS
* Since: 1.2
*/
typedef enum { /*< flags >*/
NM_SETTING_WIRED_WAKE_ON_LAN_NONE = 0, /*< skip >*/
NM_SETTING_WIRED_WAKE_ON_LAN_PHY = (1 << 1),
NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST = (1 << 2),
NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST = (1 << 3),
NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST = (1 << 4),
NM_SETTING_WIRED_WAKE_ON_LAN_ARP = (1 << 5),
NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC = (1 << 6),
_NM_SETTING_WIRED_WAKE_ON_LAN_LAST_OPT, /*< skip >*/
NM_SETTING_WIRED_WAKE_ON_LAN_ALL = (((_NM_SETTING_WIRED_WAKE_ON_LAN_LAST_OPT - 1) << 1) - 1) - (1 << 0 /*DEFAULT*/), /*< skip >*/
NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT = (1 << 0),
NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE = (1 << 15),
NM_SETTING_WIRED_WAKE_ON_LAN_EXCLUSIVE_FLAGS = NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT | NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE, /*< skip >*/
NM_SETTING_WIRED_WAKE_ON_LAN_NONE = 0, /*< skip >*/
NM_SETTING_WIRED_WAKE_ON_LAN_PHY = 0x2,
NM_SETTING_WIRED_WAKE_ON_LAN_UNICAST = 0x4,
NM_SETTING_WIRED_WAKE_ON_LAN_MULTICAST = 0x8,
NM_SETTING_WIRED_WAKE_ON_LAN_BROADCAST = 0x10,
NM_SETTING_WIRED_WAKE_ON_LAN_ARP = 0x20,
NM_SETTING_WIRED_WAKE_ON_LAN_MAGIC = 0x40,
NM_SETTING_WIRED_WAKE_ON_LAN_ALL = 0x7E, /*< skip >*/
NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT = 0x1,
NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE = 0x8000,
NM_SETTING_WIRED_WAKE_ON_LAN_EXCLUSIVE_FLAGS = NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT
| NM_SETTING_WIRED_WAKE_ON_LAN_IGNORE, /*< skip >*/
} NMSettingWiredWakeOnLan;
#define NM_SETTING_WIRED_PORT "port"
......
......@@ -66,21 +66,21 @@ G_BEGIN_DECLS
*/
typedef enum { /*< flags >*/
NM_SETTING_WIRELESS_WAKE_ON_WLAN_NONE = 0, /*< skip >*/
NM_SETTING_WIRELESS_WAKE_ON_WLAN_ANY = (1 << 1),
NM_SETTING_WIRELESS_WAKE_ON_WLAN_DISCONNECT = (1 << 2),
NM_SETTING_WIRELESS_WAKE_ON_WLAN_MAGIC = (1 << 3),
NM_SETTING_WIRELESS_WAKE_ON_WLAN_GTK_REKEY_FAILURE = (1 << 4),
NM_SETTING_WIRELESS_WAKE_ON_WLAN_EAP_IDENTITY_REQUEST = (1 << 5),
NM_SETTING_WIRELESS_WAKE_ON_WLAN_4WAY_HANDSHAKE = (1 << 6),
NM_SETTING_WIRELESS_WAKE_ON_WLAN_RFKILL_RELEASE = (1 << 7),
NM_SETTING_WIRELESS_WAKE_ON_WLAN_TCP = (1 << 8),
_NM_SETTING_WIRELESS_WAKE_ON_WLAN_NUM, /*< skip >*/
NM_SETTING_WIRELESS_WAKE_ON_WLAN_LAST = _NM_SETTING_WIRELESS_WAKE_ON_WLAN_NUM - 1, /*< skip >*/
NM_SETTING_WIRELESS_WAKE_ON_WLAN_ALL = ((NM_SETTING_WIRELESS_WAKE_ON_WLAN_LAST << 1) - 1) - (1 << 0 /*DEFAULT*/), /*< skip >*/
NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT = (1 << 0),
NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE = (1 << 15),
NM_SETTING_WIRELESS_WAKE_ON_WLAN_EXCLUSIVE_FLAGS = NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT | NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE, /*< skip >*/
NM_SETTING_WIRELESS_WAKE_ON_WLAN_ANY = 0x2,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_DISCONNECT = 0x4,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_MAGIC = 0x8,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_GTK_REKEY_FAILURE = 0x10,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_EAP_IDENTITY_REQUEST = 0x20,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_4WAY_HANDSHAKE = 0x40,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_RFKILL_RELEASE = 0x80,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_TCP = 0x100,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_ALL = 0x1FE,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT = 0x1,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE = 0x8000,
NM_SETTING_WIRELESS_WAKE_ON_WLAN_EXCLUSIVE_FLAGS = NM_SETTING_WIRELESS_WAKE_ON_WLAN_DEFAULT | NM_SETTING_WIRELESS_WAKE_ON_WLAN_IGNORE, /*< skip >*/
} NMSettingWirelessWakeOnWLan;
#define NM_SETTING_WIRELESS_SSID "ssid"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment