diff options
| author | Michael Biebl <biebl@debian.org> | 2015-08-28 01:14:03 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-08-28 01:14:03 +0200 |
| commit | 235f4801bff27219c6448c83874b5d9f8686ce58 (patch) | |
| tree | 7084e0f7d7a63901c21b56b67fbd3e203d5dbb80 /clients/cli/utils.h | |
| parent | 79436717ed9d593754a40402b6dc1b0cabac605e (diff) | |
| parent | 81836c2d44802b4cca833d7775dd627e0797a7e2 (diff) | |
Merge tag 'upstream/1.0.6'
Upstream version 1.0.6
Diffstat (limited to 'clients/cli/utils.h')
| -rw-r--r-- | clients/cli/utils.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clients/cli/utils.h b/clients/cli/utils.h index 77e697af..ba649f8f 100644 --- a/clients/cli/utils.h +++ b/clients/cli/utils.h @@ -32,6 +32,12 @@ typedef struct { gboolean found; } nmc_arg_t; +typedef enum { + NMC_TRI_STATE_NO, + NMC_TRI_STATE_YES, + NMC_TRI_STATE_UNKNOWN, +} NMCTriStateValue; + /* === Functions === */ int matches (const char *cmd, const char *pattern); int next_arg (int *argc, char ***argv); @@ -62,6 +68,7 @@ gboolean nmc_string_to_uint (const char *str, unsigned long int max, unsigned long int *value); gboolean nmc_string_to_bool (const char *str, gboolean *val_bool, GError **error); +gboolean nmc_string_to_tristate (const char *str, NMCTriStateValue *val, GError **error); char *nmc_ip4_address_as_string (guint32 ip, GError **error); char *nmc_ip6_address_as_string (const struct in6_addr *ip, GError **error); void nmc_terminal_erase_line (void); |