|
AERN: Authenticated Encrypted Relay Network 1.0.0.0a (A1)
A post quantum authenticated and encrypted proxy chain network
|
The AERN console menu functions. More...
Go to the source code of this file.
Functions | |
| AERN_EXPORT_API const char * | aern_menu_get_prompt (aern_console_modes mode) |
| Returns the console prompt string. | |
| AERN_EXPORT_API void | aern_menu_print_error (aern_protocol_errors error, aern_console_modes mode, const char *host) |
| Print an error message to the console. | |
| AERN_EXPORT_API void | aern_menu_print_message (const char *message, aern_console_modes mode, const char *host) |
| Print a message to the console. | |
| AERN_EXPORT_API bool | aern_menu_print_message_confirm (const char *message, aern_console_modes mode, const char *host) |
| Print a message to the console and wait for confirmation. | |
| AERN_EXPORT_API void | aern_menu_print_predefined_message (aern_application_messages msgnum, aern_console_modes mode, const char *host) |
| Print a predefined message to the console. | |
| AERN_EXPORT_API bool | aern_menu_print_predefined_message_confirm (aern_application_messages msgnum, aern_console_modes mode, const char *host) |
| Print a predefined message to the console and wait for confirmation. | |
| AERN_EXPORT_API void | aern_menu_print_prompt (aern_console_modes mode, const char *host) |
| Print the application prompt. | |
| AERN_EXPORT_API void | aern_menu_print_prompt_text (const char *message, aern_console_modes mode, const char *host) |
| Print a prompt and text with no line terminator. | |
| AERN_EXPORT_API void | aern_menu_print_predefined_text (aern_application_messages msgnum, aern_console_modes mode, const char *host) |
| Print a predefined message with no line terminator. | |
| AERN_EXPORT_API void | aern_menu_print_text (const char *message) |
| Print a text string to the console without a newline. | |
| AERN_EXPORT_API void | aern_menu_print_text_line (const char *message) |
| Print a text string to the console with a newline. | |
| AERN_EXPORT_API void | aern_menu_print_prompt_empty (void) |
| Print the application prompt on an empty line. | |
The AERN console menu functions.
This module provides functions for printing prompts, messages, and errors to the AERN console. These functions are used to interact with the user by displaying status messages, predefined texts, and user confirmations.
The functions include:
All messages are printed in plain ASCII. No Unicode characters are used.
Example usage:
| AERN_EXPORT_API const char * aern_menu_get_prompt | ( | aern_console_modes | mode | ) |
Returns the console prompt string.
This function returns the appropriate prompt string based on the specified console mode. The prompt is selected from an internal array of mode strings.
| mode | The current console mode. |
| AERN_EXPORT_API void aern_menu_print_error | ( | aern_protocol_errors | error, |
| aern_console_modes | mode, | ||
| const char * | host ) |
Print an error message to the console.
This function converts a protocol error code into a descriptive string and prints it to the console. It prints the prompt first (based on the mode and host) and then the error message.
| error | The protocol error enumerator. |
| mode | The current console mode. |
| host | The host name. |
| AERN_EXPORT_API void aern_menu_print_message | ( | const char * | message, |
| aern_console_modes | mode, | ||
| const char * | host ) |
Print a message to the console.
This function prints the given message string to the console. It first prints the prompt (using the current mode and host) and then the message on a new line.
| message | The message string to print. |
| mode | The current console mode. |
| host | The host name. |
| AERN_EXPORT_API bool aern_menu_print_message_confirm | ( | const char * | message, |
| aern_console_modes | mode, | ||
| const char * | host ) |
Print a message to the console and wait for confirmation.
This function prints a message and then waits for the user to input a single character. If the user enters 'y' or 'Y', the function returns true.
| message | The message string. |
| mode | The current console mode. |
| host | The host name. |
| AERN_EXPORT_API void aern_menu_print_predefined_message | ( | aern_application_messages | msgnum, |
| aern_console_modes | mode, | ||
| const char * | host ) |
Print a predefined message to the console.
This function prints a message that is predefined in the AERN application. The message is chosen based on the msgnum parameter.
| msgnum | The predefined message enumerator. |
| mode | The current console mode. |
| host | The host name. |
| AERN_EXPORT_API bool aern_menu_print_predefined_message_confirm | ( | aern_application_messages | msgnum, |
| aern_console_modes | mode, | ||
| const char * | host ) |
Print a predefined message to the console and wait for confirmation.
This function prints a predefined message and then waits for the user to provide confirmation. A response of 'y' or 'Y' returns true.
| msgnum | The predefined message enumerator. |
| mode | The current console mode. |
| host | The host name. |
| AERN_EXPORT_API void aern_menu_print_predefined_text | ( | aern_application_messages | msgnum, |
| aern_console_modes | mode, | ||
| const char * | host ) |
Print a predefined message with no line terminator.
This function prints a predefined message (as defined in the AERN application messages) without a newline at the end.
| msgnum | The predefined message enumerator. |
| mode | The current console mode. |
| host | The host name. |
| AERN_EXPORT_API void aern_menu_print_prompt | ( | aern_console_modes | mode, |
| const char * | host ) |
Print the application prompt.
This function prints the application prompt string to the console using the current console mode and host name.
| mode | The current console mode. |
| host | The host name. |
| AERN_EXPORT_API void aern_menu_print_prompt_empty | ( | void | ) |
Print the application prompt on an empty line.
This function prints the default application prompt on a new line.
| AERN_EXPORT_API void aern_menu_print_prompt_text | ( | const char * | message, |
| aern_console_modes | mode, | ||
| const char * | host ) |
Print a prompt and text with no line terminator.
This function prints a prompt followed by a message string. The message is printed without appending a newline character.
| message | The message string to print. |
| mode | The current console mode. |
| host | The host name. |
| AERN_EXPORT_API void aern_menu_print_text | ( | const char * | message | ) |
Print a text string to the console without a newline.
This function prints the specified text string using a safe console print, without appending a newline.
| message | The message string to print. |
| AERN_EXPORT_API void aern_menu_print_text_line | ( | const char * | message | ) |
Print a text string to the console with a newline.
This function prints the specified text string and then appends a newline.
| message | The message string to print. |