diff options
| author | Michael Biebl <biebl@debian.org> | 2015-08-28 01:13:48 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-08-28 01:13:48 +0200 |
| commit | 81836c2d44802b4cca833d7775dd627e0797a7e2 (patch) | |
| tree | 91154e6cefc0465306603f51ec0010d9963bbea4 /clients/cli/utils.h | |
| parent | 50a58f0fabd8a34c1b6108a107e08abe3c1ccd24 (diff) | |
Imported Upstream version 1.0.6 upstream/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); |