]> git.proxmox.com Git - mirror_edk2.git/blame - EmbeddedPkg/Include/Protocol/EblAddCommand.h
EmbeddedPkg: Fix mispellings
[mirror_edk2.git] / EmbeddedPkg / Include / Protocol / EblAddCommand.h
CommitLineData
2ef2b01e
A
1/** @file\r
2\r
60274cca 3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
2ef2b01e 4\r
60274cca 5 This program and the accompanying materials\r
2ef2b01e
A
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15\r
16#ifndef __EBL_ADD_COMMAND_H__\r
17#define __EBL_ADD_COMMAND_H__\r
18\r
19\r
20\r
21//\r
22// Protocol GUID\r
23//\r
24// AEDA2428-9A22-4637-9B21-545E28FBB829\r
25\r
26#define EBL_ADD_COMMAND_PROTOCOL_GUID \\r
27 { 0xaeda2428, 0x9a22, 0x4637, { 0x9b, 0x21, 0x54, 0x5e, 0x28, 0xfb, 0xb8, 0x29 } }\r
28\r
29\r
30typedef struct _EBL_ADD_COMMAND_PROTOCOL EBL_ADD_COMMAND_PROTOCOL;\r
31\r
32typedef\r
33EFI_STATUS\r
34(EFIAPI *EBL_COMMMAND) (\r
35 IN UINTN Argc,\r
36 IN CHAR8 **Argv\r
37 );\r
38\r
39typedef struct {\r
40 CHAR8 *Name;\r
41 CHAR8 *HelpSummary;\r
42 CHAR8 *Help;\r
43 EBL_COMMMAND Command;\r
44} EBL_COMMAND_TABLE;\r
45\r
46\r
47/**\r
48 Add a single command table entry.\r
49 \r
50 @param EntryArray Pointer EBL_COMMAND_TABLE of the command that is being added\r
51\r
52**/\r
53typedef\r
54VOID\r
55(EFIAPI *EBL_ADD_COMMAND) (\r
56 IN const EBL_COMMAND_TABLE *Entry\r
57 );\r
58\r
59\r
60/**\r
61 Add a multiple command table entry.\r
62\r
63 @param EntryArray Pointer EBL_COMMAND_TABLE of the commands that are being added\r
64\r
7ca9e5a4 65 @param ArrayCount Number of commands in the EntryArray.\r
2ef2b01e
A
66\r
67**/\r
68typedef\r
69VOID\r
70(EFIAPI *EBL_ADD_COMMANDS) (\r
71 IN const EBL_COMMAND_TABLE *EntryArray,\r
72 IN UINTN ArrayCount\r
73 );\r
74\r
75\r
76typedef
77VOID
78(EFIAPI *EBL_GET_CHAR_CALL_BACK) (
79 IN UINTN ElapsedTime
80 );
81\r
82/**\r
83 Return a keypress or optionally timeout if a timeout value was passed in.\r
7ca9e5a4 84 An optional callback function is called every second when waiting for a\r
2ef2b01e
A
85 timeout.\r
86\r
87 @param Key EFI Key information returned\r
88 @param TimeoutInSec Number of seconds to wait to timeout\r
89 @param CallBack Callback called every second during the timeout wait \r
90\r
91 @return EFI_SUCCESS Key was returned\r
92 @return EFI_TIMEOUT If the TimoutInSec expired\r
93\r
94**/\r
95typedef \r
96EFI_STATUS\r
97(EFIAPI *EBL_GET_CHAR_KEY) (\r
98 IN OUT EFI_INPUT_KEY *Key,\r
99 IN UINTN TimeoutInSec,\r
100 IN EBL_GET_CHAR_CALL_BACK CallBack OPTIONAL\r
101 );\r
102\r
103\r
104/**\r
105 This routine is used prevent command output data from scrolling off the end\r
106 of the screen. The global gPageBreak is used to turn on or off this feature.\r
107 If the CurrentRow is near the end of the screen pause and print out a prompt\r
108 If the use hits Q to quit return TRUE else for any other key return FALSE.\r
109 PrefixNewline is used to figure out if a newline is needed before the prompt\r
110 string. This depends on the last print done before calling this function.\r
111 CurrentRow is updated by one on a call or set back to zero if a prompt is \r
112 needed.\r
113\r
114 @param CurrentRow Used to figure out if its the end of the page and updated\r
115 @param PrefixNewline Did previous print issue a newline\r
116\r
117 @return TRUE if Q was hit to quit, FALSE in all other cases.\r
118\r
119**/\r
120typedef\r
121BOOLEAN\r
122(EFIAPI *EBL_ANY_KEY_CONTINUE_Q_QUIT) (\r
123 IN UINTN *CurrentRow,\r
124 IN BOOLEAN PrefixNewline\r
125 );\r
126\r
127\r
128\r
129struct _EBL_ADD_COMMAND_PROTOCOL {\r
130 EBL_ADD_COMMAND AddCommand;\r
131 EBL_ADD_COMMANDS AddCommands;\r
132\r
133 // Commands to reuse EBL infrastructure\r
134 EBL_GET_CHAR_KEY EblGetCharKey;\r
135 EBL_ANY_KEY_CONTINUE_Q_QUIT EblAnyKeyToContinueQtoQuit;\r
136};\r
137\r
138extern EFI_GUID gEfiEblAddCommandProtocolGuid;\r
139\r
140#endif\r
141\r
142\r