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