about summary refs log tree commit diff
path: root/clients/cli/nmcli.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-06-04 00:08:31 +0200
committerMichael Biebl <biebl@debian.org>2018-06-04 00:08:31 +0200
commit0dd9df69fdbd475c48a0c8d5b0a1882550fe7321 (patch)
tree249cf25643b1fe408e10679bb61613bc6540e894 /clients/cli/nmcli.h
parent2e94a3b93171ab3fb95bf689aab1664d23988809 (diff)
parent04bc9e1cd3544445d883ad29ea108c1645c8e7b7 (diff)
Update upstream source from tag 'upstream/1.11.4'
Update to upstream version '1.11.4'
with Debian dir d0638aa2e32d5bae4e8daa021b9a66b7c4d6647e
Diffstat (limited to 'clients/cli/nmcli.h')
-rw-r--r--clients/cli/nmcli.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/clients/cli/nmcli.h b/clients/cli/nmcli.h
index 0f3d29cd..61bf86de 100644
--- a/clients/cli/nmcli.h
+++ b/clients/cli/nmcli.h
@@ -14,7 +14,7 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Copyright 2010 - 2017 Red Hat, Inc.
+ * Copyright 2010 - 2018 Red Hat, Inc.
  */
 
 #ifndef NMC_NMCLI_H
@@ -93,24 +93,18 @@ struct _NmcOutputField {
 	gboolean value_is_array;        /* Whether value is char** instead of char* */
 	gboolean free_value;            /* Whether to free the value */
 	NmcOfFlags flags;               /* Flags - whether and how to print values/field names/headers */
-	NMMetaTermColor color;             /* Use this color to print value */
-	NMMetaTermFormat color_fmt;        /* Use this terminal format to print value */
+	NMMetaColor color;              /* Use this color to print value */
 };
 
-typedef enum {
-	NMC_USE_COLOR_AUTO,
-	NMC_USE_COLOR_YES,
-	NMC_USE_COLOR_NO,
-} NmcColorOption;
-
 typedef struct _NmcConfig {
 	NMCPrintOutput print_output;                      /* Output mode */
-	NmcColorOption use_colors;                        /* Whether to use colors for output: option '--color' */
+	gboolean use_colors;                              /* Whether to use colors for output: option '--color' */
 	bool multiline_output;                            /* Multiline output instead of default tabular */
 	bool escape_values;                               /* Whether to escape ':' and '\' in terse tabular mode */
 	bool in_editor;                                   /* Whether running the editor - nmcli con edit' */
 	bool show_secrets;                                /* Whether to display secrets (both input and output): option '--show-secrets' */
 	bool overview;                                    /* Overview mode (hide default values) */
+	const char *palette[_NM_META_COLOR_NUM];          /* Color palette */
 } NmcConfig;
 
 typedef struct _NmcOutputData {
@@ -143,9 +137,15 @@ typedef struct _NmCli {
 	gboolean complete;                                /* Autocomplete the command line */
 	gboolean editor_status_line;                      /* Whether to display status line in connection editor */
 	gboolean editor_save_confirmation;                /* Whether to ask for confirmation on saving connections with 'autoconnect=yes' */
-	NMMetaTermColor editor_prompt_color;              /* Color of prompt in connection editor */
+
+	char *palette_buffer;                             /* Buffer with sequences for terminal-colors.d(5)-based coloring. */
 } NmCli;
 
+#define NMC_RETURN(nmc, rvalue) \
+	G_STMT_START { \
+		return ((nmc)->return_value = (rvalue)); \
+	} G_STMT_END
+
 extern NmCli nm_cli;
 
 /* Error quark for GError domain */