Home | History | Annotate | Line # | Download | only in inc
efishellintf.h revision 1.1.1.1.6.2
      1  1.1.1.1.6.2  christos /*	$NetBSD: efishellintf.h,v 1.1.1.1.6.2 2019/06/10 22:08:35 christos Exp $	*/
      2  1.1.1.1.6.2  christos 
      3  1.1.1.1.6.2  christos /** @file
      4  1.1.1.1.6.2  christos   SHELL_INTERFACE_PROTOCOL from EDK shell (no spec).
      5  1.1.1.1.6.2  christos 
      6  1.1.1.1.6.2  christos   Shell Interface - additional information (over image_info) provided
      7  1.1.1.1.6.2  christos   to an application started by the shell.
      8  1.1.1.1.6.2  christos 
      9  1.1.1.1.6.2  christos   ConIo provides a file-style interface to the console.
     10  1.1.1.1.6.2  christos 
     11  1.1.1.1.6.2  christos   The shell interface's and data (including ConIo) are only valid during
     12  1.1.1.1.6.2  christos   the applications Entry Point.  Once the application returns from it's
     13  1.1.1.1.6.2  christos   entry point the data is freed by the invoking shell.
     14  1.1.1.1.6.2  christos 
     15  1.1.1.1.6.2  christos   Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
     16  1.1.1.1.6.2  christos   This program and the accompanying materials
     17  1.1.1.1.6.2  christos   are licensed and made available under the terms and conditions of the BSD License
     18  1.1.1.1.6.2  christos   which accompanies this distribution.  The full text of the license may be found at
     19  1.1.1.1.6.2  christos   http://opensource.org/licenses/bsd-license.php
     20  1.1.1.1.6.2  christos 
     21  1.1.1.1.6.2  christos   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     22  1.1.1.1.6.2  christos   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     23  1.1.1.1.6.2  christos 
     24  1.1.1.1.6.2  christos **/
     25  1.1.1.1.6.2  christos /*
     26  1.1.1.1.6.2  christos  * This is based on ShellPkg/Include/Protocol/EfiShellInterface.h from EDK II.
     27  1.1.1.1.6.2  christos  */
     28  1.1.1.1.6.2  christos 
     29  1.1.1.1.6.2  christos #ifndef _SHELLINTERFACE_H_
     30  1.1.1.1.6.2  christos #define _SHELLINTERFACE_H_
     31  1.1.1.1.6.2  christos 
     32  1.1.1.1.6.2  christos 
     33  1.1.1.1.6.2  christos #define SHELL_INTERFACE_PROTOCOL_GUID \
     34  1.1.1.1.6.2  christos   { \
     35  1.1.1.1.6.2  christos     0x47c7b223, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} \
     36  1.1.1.1.6.2  christos   }
     37  1.1.1.1.6.2  christos 
     38  1.1.1.1.6.2  christos ///
     39  1.1.1.1.6.2  christos /// Bit definitions for EFI_SHELL_ARG_INFO
     40  1.1.1.1.6.2  christos ///
     41  1.1.1.1.6.2  christos typedef enum {
     42  1.1.1.1.6.2  christos   ARG_NO_ATTRIB         = 0x0,
     43  1.1.1.1.6.2  christos   ARG_IS_QUOTED         = 1<<0,
     44  1.1.1.1.6.2  christos   ARG_PARTIALLY_QUOTED  = 1<<1,
     45  1.1.1.1.6.2  christos   ARG_FIRST_HALF_QUOTED = 1<<2,
     46  1.1.1.1.6.2  christos   ARG_FIRST_CHAR_IS_ESC = 1<<3
     47  1.1.1.1.6.2  christos } EFI_SHELL_ARG_INFO_TYPES;
     48  1.1.1.1.6.2  christos 
     49  1.1.1.1.6.2  christos ///
     50  1.1.1.1.6.2  christos /// Attributes for an argument.
     51  1.1.1.1.6.2  christos ///
     52  1.1.1.1.6.2  christos typedef struct _EFI_SHELL_ARG_INFO {
     53  1.1.1.1.6.2  christos   UINT32  Attributes;
     54  1.1.1.1.6.2  christos } EFI_SHELL_ARG_INFO;
     55  1.1.1.1.6.2  christos 
     56  1.1.1.1.6.2  christos ///
     57  1.1.1.1.6.2  christos /// This protocol provides access to additional information about a shell application.
     58  1.1.1.1.6.2  christos ///
     59  1.1.1.1.6.2  christos typedef struct {
     60  1.1.1.1.6.2  christos   ///
     61  1.1.1.1.6.2  christos   /// Handle back to original image handle & image information.
     62  1.1.1.1.6.2  christos   ///
     63  1.1.1.1.6.2  christos   EFI_HANDLE                ImageHandle;
     64  1.1.1.1.6.2  christos   EFI_LOADED_IMAGE *Info;
     65  1.1.1.1.6.2  christos 
     66  1.1.1.1.6.2  christos   ///
     67  1.1.1.1.6.2  christos   /// Parsed arg list converted more C-like format.
     68  1.1.1.1.6.2  christos   ///
     69  1.1.1.1.6.2  christos   CHAR16                    **Argv;
     70  1.1.1.1.6.2  christos   UINTN                     Argc;
     71  1.1.1.1.6.2  christos 
     72  1.1.1.1.6.2  christos   ///
     73  1.1.1.1.6.2  christos   /// Storage for file redirection args after parsing.
     74  1.1.1.1.6.2  christos   ///
     75  1.1.1.1.6.2  christos   CHAR16                    **RedirArgv;
     76  1.1.1.1.6.2  christos   UINTN                     RedirArgc;
     77  1.1.1.1.6.2  christos 
     78  1.1.1.1.6.2  christos   ///
     79  1.1.1.1.6.2  christos   /// A file style handle for console io.
     80  1.1.1.1.6.2  christos   ///
     81  1.1.1.1.6.2  christos   EFI_FILE         *StdIn;
     82  1.1.1.1.6.2  christos   EFI_FILE         *StdOut;
     83  1.1.1.1.6.2  christos   EFI_FILE         *StdErr;
     84  1.1.1.1.6.2  christos 
     85  1.1.1.1.6.2  christos   ///
     86  1.1.1.1.6.2  christos   /// List of attributes for each argument.
     87  1.1.1.1.6.2  christos   ///
     88  1.1.1.1.6.2  christos   EFI_SHELL_ARG_INFO        *ArgInfo;
     89  1.1.1.1.6.2  christos 
     90  1.1.1.1.6.2  christos   ///
     91  1.1.1.1.6.2  christos   /// Whether we are echoing.
     92  1.1.1.1.6.2  christos   ///
     93  1.1.1.1.6.2  christos   BOOLEAN                   EchoOn;
     94  1.1.1.1.6.2  christos } EFI_SHELL_INTERFACE;
     95  1.1.1.1.6.2  christos 
     96  1.1.1.1.6.2  christos #endif
     97