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