2017-03-24 00:32:10 +01:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Wireless daemon for Linux
|
|
|
|
*
|
2019-10-25 00:43:08 +02:00
|
|
|
* Copyright (C) 2017-2019 Intel Corporation. All rights reserved.
|
2017-03-24 00:32:10 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2017-04-12 22:04:49 +02:00
|
|
|
struct command;
|
|
|
|
struct command_family;
|
2022-07-07 19:55:05 +02:00
|
|
|
#define COLOR_OFF "\x1B[0m"
|
|
|
|
#define COLOR_BOLDGRAY(s) "\x1B[1;90m" s COLOR_OFF
|
|
|
|
#define COLOR_GRAY(s) "\x1b[90m" s COLOR_OFF
|
|
|
|
#define COLOR_GREEN(s) "\x1b[32m" s COLOR_OFF
|
|
|
|
#define COLOR_RED(s) "\x1B[0;91m" s COLOR_OFF
|
|
|
|
#define COLOR_BLUE(s) "\x1B[94m" s COLOR_OFF
|
|
|
|
#define COLOR_YELLOW(s) "\x1b[33m" s COLOR_OFF
|
|
|
|
#define CLEAR_SCREEN "\x1b[2J"
|
|
|
|
#define MARGIN " "
|
2017-03-24 00:32:10 +01:00
|
|
|
|
2020-04-08 05:32:43 +02:00
|
|
|
void display(const char *format, ...)
|
|
|
|
__attribute__((format(printf, 1, 2)));
|
|
|
|
void display_table_header(const char *caption, const char *fmt, ...)
|
|
|
|
__attribute__((format(printf, 2, 3)));
|
2022-07-07 19:54:58 +02:00
|
|
|
void display_table_row(const char *margin, unsigned int ncolumns, ...);
|
2017-03-23 19:05:33 +01:00
|
|
|
void display_table_footer(void);
|
|
|
|
void display_error(const char *error);
|
2017-04-12 22:04:49 +02:00
|
|
|
void display_command_line(const char *command_family,
|
|
|
|
const struct command *cmd);
|
2017-03-23 19:05:33 +01:00
|
|
|
|
2017-04-12 22:04:50 +02:00
|
|
|
void display_refresh_timeout_set(void);
|
|
|
|
void display_refresh_reset(void);
|
|
|
|
void display_refresh_set_cmd(const char *family, const char *entity,
|
2018-07-27 21:41:30 +02:00
|
|
|
const struct command *cmd,
|
|
|
|
char **argv, int argc);
|
2017-04-12 22:04:50 +02:00
|
|
|
|
2017-03-24 00:32:10 +01:00
|
|
|
void display_enable_cmd_prompt(void);
|
|
|
|
void display_disable_cmd_prompt(void);
|
|
|
|
|
2018-05-05 00:49:06 +02:00
|
|
|
void display_agent_prompt(const char *label, bool mask_input);
|
|
|
|
void display_agent_prompt_release(const char *label);
|
2018-05-03 22:57:52 +02:00
|
|
|
bool display_agent_is_active(void);
|
|
|
|
|
2017-04-10 22:16:50 +02:00
|
|
|
void display_quit(void);
|
|
|
|
|
2017-03-24 00:32:10 +01:00
|
|
|
void display_init(void);
|
|
|
|
void display_exit(void);
|