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