summaryrefslogtreecommitdiff
path: root/clients/cli/nmcli.h
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2015-02-13 08:54:32 +0100
committerJiří Klimeš <jklimes@redhat.com>2015-02-23 09:24:21 +0100
commitb77ec93d9910b49b511cce2d1f3fc0bc18683e88 (patch)
treeadde259dfed288c11d868faf012aa421773d8f26 /clients/cli/nmcli.h
parent4e0e61f66998830ec868570807d50b7873b3de60 (diff)
downloadNetworkManager-b77ec93d9910b49b511cce2d1f3fc0bc18683e88.tar.gz
nmcli: add support for printing color strings
Diffstat (limited to 'clients/cli/nmcli.h')
-rw-r--r--clients/cli/nmcli.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/clients/cli/nmcli.h b/clients/cli/nmcli.h
index 32e7e5dd99..0fb9de3cb5 100644
--- a/clients/cli/nmcli.h
+++ b/clients/cli/nmcli.h
@@ -69,6 +69,18 @@ typedef enum {
} NMCResultCode;
typedef enum {
+ NMC_TERM_COLOR_NORMAL = 0,
+ NMC_TERM_COLOR_BLACK = 1,
+ NMC_TERM_COLOR_RED = 2,
+ NMC_TERM_COLOR_GREEN = 3,
+ NMC_TERM_COLOR_YELLOW = 4,
+ NMC_TERM_COLOR_BLUE = 5,
+ NMC_TERM_COLOR_MAGENTA = 6,
+ NMC_TERM_COLOR_CYAN = 7,
+ NMC_TERM_COLOR_WHITE = 8
+} NmcTermColor;
+
+typedef enum {
NMC_PRINT_TERSE = 0,
NMC_PRINT_NORMAL = 1,
NMC_PRINT_PRETTY = 2
@@ -90,6 +102,7 @@ typedef struct _NmcOutputField {
gboolean value_is_array; /* Whether value is char** instead of char* */
gboolean free_value; /* Whether to free the value */
guint32 flags; /* Flags - whether and how to print values/field names/headers */
+ NmcTermColor color; /* Use this color to print value */
} NmcOutputField;
typedef struct {
@@ -98,18 +111,6 @@ typedef struct {
int indent; /* Indent by this number of spaces */
} NmcPrintFields;
-typedef enum {
- NMC_TERM_COLOR_NORMAL = 0,
- NMC_TERM_COLOR_BLACK = 1,
- NMC_TERM_COLOR_RED = 2,
- NMC_TERM_COLOR_GREEN = 3,
- NMC_TERM_COLOR_YELLOW = 4,
- NMC_TERM_COLOR_BLUE = 5,
- NMC_TERM_COLOR_MAGENTA = 6,
- NMC_TERM_COLOR_CYAN = 7,
- NMC_TERM_COLOR_WHITE = 8
-} NmcTermColor;
-
/* NmCli - main structure */
typedef struct _NmCli {
NMClient *client; /* Pointer to NMClient of libnm */