libnm: introduce NMTernary enum

Add a new enum that can be used where we need a boolean value that can
be overridden globally.
This commit is contained in:
Beniamino Galvani
2018-05-24 13:43:32 +02:00
parent 507d078635
commit d6483592b8
2 changed files with 17 additions and 0 deletions

View File

@@ -991,4 +991,20 @@ typedef enum { /*< flags >*/
NM_SETTINGS_UPDATE2_FLAG_BLOCK_AUTOCONNECT = (1LL << 5),
} NMSettingsUpdate2Flags;
/**
* NMTernary:
* @NM_TERNARY_DEFAULT: use the globally-configured default value.
* @NM_TERNARY_FALSE: the option is disabled.
* @NM_TERNARY_TRUE: the option is enabled.
*
* An boolean value that can be overridden by a default.
*
* Since: 1.14
**/
typedef enum {
NM_TERNARY_DEFAULT = -1,
NM_TERNARY_FALSE = 0,
NM_TERNARY_TRUE = 1,
} NMTernary;
#endif /* __NM_DBUS_INTERFACE_H__ */

View File

@@ -1386,4 +1386,5 @@ global:
nm_device_wpan_get_type;
nm_setting_6lowpan_get_type;
nm_setting_wpan_get_type;
nm_ternary_get_type;
} libnm_1_12_0;