3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __EBL_ADD_COMMAND_H__
17 #define __EBL_ADD_COMMAND_H__
24 // AEDA2428-9A22-4637-9B21-545E28FBB829
26 #define EBL_ADD_COMMAND_PROTOCOL_GUID \
27 { 0xaeda2428, 0x9a22, 0x4637, { 0x9b, 0x21, 0x54, 0x5e, 0x28, 0xfb, 0xb8, 0x29 } }
30 typedef struct _EBL_ADD_COMMAND_PROTOCOL EBL_ADD_COMMAND_PROTOCOL
;
34 (EFIAPI
*EBL_COMMMAND
) (
48 Add a single command table entry.
50 @param EntryArray Pointer EBL_COMMAND_TABLE of the command that is being added
55 (EFIAPI
*EBL_ADD_COMMAND
) (
56 IN
const EBL_COMMAND_TABLE
*Entry
61 Add a multiple command table entry.
63 @param EntryArray Pointer EBL_COMMAND_TABLE of the commands that are being added
65 @param ArrayCount Nuber of commands in the EntryArray.
70 (EFIAPI
*EBL_ADD_COMMANDS
) (
71 IN
const EBL_COMMAND_TABLE
*EntryArray
,
78 (EFIAPI
*EBL_GET_CHAR_CALL_BACK
) (
83 Return a keypress or optionally timeout if a timeout value was passed in.
84 An optional callback funciton is called evey second when waiting for a
87 @param Key EFI Key information returned
88 @param TimeoutInSec Number of seconds to wait to timeout
89 @param CallBack Callback called every second during the timeout wait
91 @return EFI_SUCCESS Key was returned
92 @return EFI_TIMEOUT If the TimoutInSec expired
97 (EFIAPI
*EBL_GET_CHAR_KEY
) (
98 IN OUT EFI_INPUT_KEY
*Key
,
99 IN UINTN TimeoutInSec
,
100 IN EBL_GET_CHAR_CALL_BACK CallBack OPTIONAL
105 This routine is used prevent command output data from scrolling off the end
106 of the screen. The global gPageBreak is used to turn on or off this feature.
107 If the CurrentRow is near the end of the screen pause and print out a prompt
108 If the use hits Q to quit return TRUE else for any other key return FALSE.
109 PrefixNewline is used to figure out if a newline is needed before the prompt
110 string. This depends on the last print done before calling this function.
111 CurrentRow is updated by one on a call or set back to zero if a prompt is
114 @param CurrentRow Used to figure out if its the end of the page and updated
115 @param PrefixNewline Did previous print issue a newline
117 @return TRUE if Q was hit to quit, FALSE in all other cases.
122 (EFIAPI
*EBL_ANY_KEY_CONTINUE_Q_QUIT
) (
123 IN UINTN
*CurrentRow
,
124 IN BOOLEAN PrefixNewline
129 struct _EBL_ADD_COMMAND_PROTOCOL
{
130 EBL_ADD_COMMAND AddCommand
;
131 EBL_ADD_COMMANDS AddCommands
;
133 // Commands to reuse EBL infrastructure
134 EBL_GET_CHAR_KEY EblGetCharKey
;
135 EBL_ANY_KEY_CONTINUE_Q_QUIT EblAnyKeyToContinueQtoQuit
;
138 extern EFI_GUID gEfiEblAddCommandProtocolGuid
;