summaryrefslogtreecommitdiff
path: root/firmware/lib/include
diff options
context:
space:
mode:
authorShelley Chen <shchen@chromium.org>2017-12-14 15:50:26 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-12-18 20:33:09 -0800
commit2d92620f35a8b1ea50ef3142c4eb15f1f1d0ed97 (patch)
treecb8c9d4f2a4d38e42fb7bbd7a848bc08ce74f0b1 /firmware/lib/include
parentf59d2e41977032f8f3eac113358b93574fc27b4f (diff)
downloadvboot-2d92620f35a8b1ea50ef3142c4eb15f1f1d0ed97.tar.gz
detach_ui_test: Move variables needed for unit tests to private file
Creating a unit test for testing the detachable UI menus. It'll need access to some previously static variables that we will move into this new file. BUG=b:65025540 BRANCH=None TEST=emerge-fizz vboot_reference with no errors Change-Id: I249b152380dd55160e151506e00efd23bbbd1a5b Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/830679 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware/lib/include')
-rw-r--r--firmware/lib/include/vboot_ui_menu_private.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/firmware/lib/include/vboot_ui_menu_private.h b/firmware/lib/include/vboot_ui_menu_private.h
new file mode 100644
index 00000000..7c6be490
--- /dev/null
+++ b/firmware/lib/include/vboot_ui_menu_private.h
@@ -0,0 +1,81 @@
+/* Copyright 2017 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ *
+ * Private declarations for vboot_ui_menu.c. Defined here for easier testing.
+ */
+
+#ifndef VBOOT_REFERENCE_VBOOT_UI_MENU_PRIVATE_H_
+#define VBOOT_REFERENCE_VBOOT_UI_MENU_PRIVATE_H_
+
+typedef enum _VB_MENU {
+ VB_MENU_DEV_WARNING,
+ VB_MENU_DEV,
+ VB_MENU_TO_NORM,
+ VB_MENU_RECOVERY,
+ VB_MENU_TO_DEV,
+ VB_MENU_LANGUAGES,
+ VB_MENU_RECOVERY_INSERT,
+ VB_MENU_RECOVERY_NO_GOOD,
+ VB_MENU_RECOVERY_BROKEN,
+ VB_MENU_TO_NORM_CONFIRMED,
+ VB_MENU_COUNT,
+} VB_MENU;
+
+typedef enum _VB_DEV_WARNING_MENU {
+ VB_WARN_OPTIONS,
+ VB_WARN_DBG_INFO,
+ VB_WARN_ENABLE_VER,
+ VB_WARN_POWER_OFF,
+ VB_WARN_LANGUAGE,
+ VB_WARN_COUNT,
+} VB_DEV_WARNING_MENU;
+
+typedef enum _VB_DEV_MENU {
+ VB_DEV_NETWORK,
+ VB_DEV_LEGACY,
+ VB_DEV_USB,
+ VB_DEV_DISK,
+ VB_DEV_CANCEL,
+ VB_DEV_POWER_OFF,
+ VB_DEV_LANGUAGE,
+ VB_DEV_COUNT,
+} VB_DEV_MENU;
+
+typedef enum _VB_TO_NORM_MENU {
+ VB_TO_NORM_CONFIRM,
+ VB_TO_NORM_CANCEL,
+ VB_TO_NORM_POWER_OFF,
+ VB_TO_NORM_LANGUAGE,
+ VB_TO_NORM_COUNT,
+} VB_TO_NORM_MENU;
+
+typedef enum _VB_RECOVERY_MENU {
+ VB_RECOVERY_TO_DEV,
+ VB_RECOVERY_DBG_INFO,
+ VB_RECOVERY_POWER_OFF,
+ VB_RECOVERY_LANGUAGE,
+ VB_RECOVERY_COUNT,
+} VB_RECOVERY_MENU;
+
+typedef enum _VB_TO_DEV_MENU {
+ VB_TO_DEV_CONFIRM,
+ VB_TO_DEV_CANCEL,
+ VB_TO_DEV_POWER_OFF,
+ VB_TO_DEV_LANGUAGE,
+ VB_TO_DEV_COUNT,
+} VB_TO_DEV_MENU;
+
+// TODO: currently we're only supporting
+// english. Will need to somehow find mapping
+// from language to localization index.
+typedef enum _VB_LANGUAGES_MENU {
+ VB_LANGUAGES_EN_US,
+ VB_LANGUAGES_COUNT,
+} VB_LANGUAGES_MENU;
+
+extern VB_MENU current_menu;
+extern VB_MENU prev_menu;
+extern int current_menu_idx;
+
+#endif