|
UDIF: Universal Digital Identification Framework 1.0.0.0a (A1)
A quantum-secure cryptographic identification
|
The UDIF console menu functions. More...
Go to the source code of this file.
Functions | |
| UDIF_EXPORT_API const char * | udif_menu_get_prompt (udif_console_modes mode) |
| Returns the console prompt string. | |
| UDIF_EXPORT_API void | udif_menu_print_error (udif_protocol_errors error, udif_console_modes mode, const char *host) |
| Print an error message to the console. | |
| UDIF_EXPORT_API void | udif_menu_print_message (const char *message, udif_console_modes mode, const char *host) |
| Print a message to the console. | |
| UDIF_EXPORT_API bool | udif_menu_print_message_confirm (const char *message, udif_console_modes mode, const char *host) |
| Print a message to the console and wait for confirmation. | |
| UDIF_EXPORT_API void | udif_menu_print_predefined_message (udif_application_messages msgnum, udif_console_modes mode, const char *host) |
| Print a predefined message to the console. | |
| UDIF_EXPORT_API bool | udif_menu_print_predefined_message_confirm (udif_application_messages msgnum, udif_console_modes mode, const char *host) |
| Print a predefined message to the console and wait for confirmation. | |
| UDIF_EXPORT_API void | udif_menu_print_prompt (udif_console_modes mode, const char *host) |
| Print the application prompt. | |
| UDIF_EXPORT_API void | udif_menu_print_prompt_text (const char *message, udif_console_modes mode, const char *host) |
| Print a prompt and text with no line terminator. | |
| UDIF_EXPORT_API void | udif_menu_print_predefined_text (udif_application_messages msgnum, udif_console_modes mode, const char *host) |
| Print a predefined message with no line terminator. | |
| UDIF_EXPORT_API void | udif_menu_print_text (const char *message) |
| Print a text string to the console without a newline. | |
| UDIF_EXPORT_API void | udif_menu_print_text_line (const char *message) |
| Print a text string to the console with a newline. | |
| UDIF_EXPORT_API void | udif_menu_print_prompt_empty (void) |
| Print the application prompt on an empty line. | |
The UDIF console menu functions.
This module provides functions for printing prompts, messages, and errors to the UDIF 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:
| UDIF_EXPORT_API const char * udif_menu_get_prompt | ( | udif_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. |
| UDIF_EXPORT_API void udif_menu_print_error | ( | udif_protocol_errors | error, |
| udif_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. |
| UDIF_EXPORT_API void udif_menu_print_message | ( | const char * | message, |
| udif_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. |
| UDIF_EXPORT_API bool udif_menu_print_message_confirm | ( | const char * | message, |
| udif_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. |
| UDIF_EXPORT_API void udif_menu_print_predefined_message | ( | udif_application_messages | msgnum, |
| udif_console_modes | mode, | ||
| const char * | host ) |
Print a predefined message to the console.
This function prints a message that is predefined in the UDIF application. The message is chosen based on the msgnum parameter.
| msgnum | The predefined message enumerator. |
| mode | The current console mode. |
| host | The host name. |
| UDIF_EXPORT_API bool udif_menu_print_predefined_message_confirm | ( | udif_application_messages | msgnum, |
| udif_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. |
| UDIF_EXPORT_API void udif_menu_print_predefined_text | ( | udif_application_messages | msgnum, |
| udif_console_modes | mode, | ||
| const char * | host ) |
Print a predefined message with no line terminator.
This function prints a predefined message (as defined in the UDIF application messages) without a newline at the end.
| msgnum | The predefined message enumerator. |
| mode | The current console mode. |
| host | The host name. |
| UDIF_EXPORT_API void udif_menu_print_prompt | ( | udif_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. |
| UDIF_EXPORT_API void udif_menu_print_prompt_empty | ( | void | ) |
Print the application prompt on an empty line.
This function prints the default application prompt on a new line.
| UDIF_EXPORT_API void udif_menu_print_prompt_text | ( | const char * | message, |
| udif_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. |
| UDIF_EXPORT_API void udif_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. |
| UDIF_EXPORT_API void udif_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. |