]>
Commit | Line | Data |
---|---|---|
1e57a462 | 1 | /** @file\r |
2 | Include file for basic command line parser for EBL (Embedded Boot Loader)\r | |
3 | \r | |
4 | Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r | |
5 | Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r | |
6 | \r | |
7 | This program and the accompanying materials\r | |
8 | are licensed and made available under the terms and conditions of the BSD License\r | |
9 | which accompanies this distribution. The full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __EBL_ADD_EXTERNAL_COMMAND_LIB_H__\r | |
18 | #define __EBL_ADD_EXTERNAL_COMMAND_LIB_H__\r | |
19 | \r | |
20 | #include <PiDxe.h>\r | |
21 | #include <Protocol/EblAddCommand.h>\r | |
22 | \r | |
23 | \r | |
24 | EFI_STATUS\r | |
25 | EFIAPI\r | |
26 | EblAddExternalCommands (\r | |
27 | IN const EBL_COMMAND_TABLE *EntryArray,\r | |
28 | IN UINTN ArrayCount\r | |
29 | );\r | |
30 | \r | |
31 | /**\r | |
32 | \r | |
33 | Return a keypress or optionally timeout if a timeout value was passed in.\r | |
34 | \r | |
35 | An optional callback function is called every second when waiting for a\r | |
36 | \r | |
37 | timeout.\r | |
38 | \r | |
39 | \r | |
40 | \r | |
41 | @param Key EFI Key information returned\r | |
42 | \r | |
43 | @param TimeoutInSec Number of seconds to wait to timeout\r | |
44 | \r | |
3402aac7 | 45 | @param CallBack Callback called every second during the timeout wait\r |
1e57a462 | 46 | \r |
47 | \r | |
48 | \r | |
49 | @return EFI_SUCCESS Key was returned\r | |
50 | \r | |
51 | @return EFI_TIMEOUT If the TimoutInSec expired\r | |
52 | \r | |
53 | \r | |
54 | \r | |
55 | **/\r | |
56 | \r | |
57 | EFI_STATUS\r | |
58 | \r | |
59 | EFIAPI\r | |
60 | \r | |
61 | EblGetCharKey (\r | |
62 | \r | |
63 | IN OUT EFI_INPUT_KEY *Key,\r | |
64 | \r | |
65 | IN UINTN TimeoutInSec,\r | |
66 | \r | |
67 | IN EBL_GET_CHAR_CALL_BACK CallBack OPTIONAL\r | |
68 | \r | |
69 | );\r | |
70 | \r | |
71 | \r | |
72 | \r | |
73 | \r | |
74 | \r | |
75 | /**\r | |
76 | \r | |
77 | This routine is used prevent command output data from scrolling off the end\r | |
78 | \r | |
79 | of the screen. The global gPageBreak is used to turn on or off this feature.\r | |
80 | \r | |
81 | If the CurrentRow is near the end of the screen pause and print out a prompt\r | |
82 | \r | |
83 | If the use hits Q to quit return TRUE else for any other key return FALSE.\r | |
84 | \r | |
85 | PrefixNewline is used to figure out if a newline is needed before the prompt\r | |
86 | \r | |
87 | string. This depends on the last print done before calling this function.\r | |
88 | \r | |
3402aac7 | 89 | CurrentRow is updated by one on a call or set back to zero if a prompt is\r |
1e57a462 | 90 | \r |
91 | needed.\r | |
92 | \r | |
93 | \r | |
94 | \r | |
95 | @param CurrentRow Used to figure out if its the end of the page and updated\r | |
96 | \r | |
97 | @param PrefixNewline Did previous print issue a newline\r | |
98 | \r | |
99 | \r | |
100 | \r | |
101 | @return TRUE if Q was hit to quit, FALSE in all other cases.\r | |
102 | \r | |
103 | \r | |
104 | \r | |
105 | **/\r | |
106 | \r | |
107 | BOOLEAN\r | |
108 | \r | |
109 | EFIAPI\r | |
110 | \r | |
111 | EblAnyKeyToContinueQtoQuit (\r | |
112 | \r | |
113 | IN UINTN *CurrentRow,\r | |
114 | \r | |
115 | IN BOOLEAN PrefixNewline\r | |
116 | \r | |
117 | );\r | |
118 | \r | |
119 | \r | |
120 | \r | |
121 | #endif\r | |
122 | \r |