From 81836c2d44802b4cca833d7775dd627e0797a7e2 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 28 Aug 2015 01:13:48 +0200 Subject: Imported Upstream version 1.0.6 --- clients/cli/utils.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clients/cli/utils.h') 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); -- cgit 1.3.0-6-gf8a5