]>
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 | |
56ba3746 | 14 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
94b17fa1 | 15 | \r |
16 | **/\r | |
17 | \r | |
a405b86d | 18 | #ifndef _SHELLINTERFACE_H_\r |
94b17fa1 | 19 | #define _SHELLINTERFACE_H_\r |
20 | \r | |
a405b86d | 21 | #include <Protocol/SimpleFileSystem.h>\r |
22 | \r | |
94b17fa1 | 23 | #define SHELL_INTERFACE_PROTOCOL_GUID \\r |
24 | { \\r | |
55034088 | 25 | 0x47c7b223, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} \\r |
94b17fa1 | 26 | }\r |
27 | \r | |
28 | ///\r | |
a405b86d | 29 | /// Bit definitions for EFI_SHELL_ARG_INFO\r |
94b17fa1 | 30 | ///\r |
31 | typedef enum {\r | |
32 | ARG_NO_ATTRIB = 0x0,\r | |
08d7f8e8 | 33 | ARG_IS_QUOTED = BIT0,\r |
34 | ARG_PARTIALLY_QUOTED = BIT1,\r | |
35 | ARG_FIRST_HALF_QUOTED = BIT2,\r | |
36 | ARG_FIRST_CHAR_IS_ESC = BIT3\r | |
37 | } EFI_SHELL_ARG_INFO_TYPES;\r | |
94b17fa1 | 38 | \r |
39 | ///\r | |
a405b86d | 40 | /// Attributes for an argument.\r |
94b17fa1 | 41 | ///\r |
42 | typedef struct _EFI_SHELL_ARG_INFO {\r | |
47d20b54 | 43 | UINT32 Attributes;\r |
94b17fa1 | 44 | } EFI_SHELL_ARG_INFO;\r |
45 | \r | |
46 | ///\r | |
a405b86d | 47 | /// This protocol provides access to additional information about a shell application.\r |
94b17fa1 | 48 | ///\r |
49 | typedef struct {\r | |
50 | ///\r | |
a405b86d | 51 | /// Handle back to original image handle & image information.\r |
94b17fa1 | 52 | ///\r |
47d20b54 MK |
53 | EFI_HANDLE ImageHandle;\r |
54 | EFI_LOADED_IMAGE_PROTOCOL *Info;\r | |
94b17fa1 | 55 | \r |
56 | ///\r | |
a405b86d | 57 | /// Parsed arg list converted more C-like format.\r |
94b17fa1 | 58 | ///\r |
47d20b54 MK |
59 | CHAR16 **Argv;\r |
60 | UINTN Argc;\r | |
94b17fa1 | 61 | \r |
62 | ///\r | |
a405b86d | 63 | /// Storage for file redirection args after parsing.\r |
94b17fa1 | 64 | ///\r |
47d20b54 MK |
65 | CHAR16 **RedirArgv;\r |
66 | UINTN RedirArgc;\r | |
94b17fa1 | 67 | \r |
68 | ///\r | |
a405b86d | 69 | /// A file style handle for console io.\r |
94b17fa1 | 70 | ///\r |
47d20b54 MK |
71 | EFI_FILE_PROTOCOL *StdIn;\r |
72 | EFI_FILE_PROTOCOL *StdOut;\r | |
73 | EFI_FILE_PROTOCOL *StdErr;\r | |
94b17fa1 | 74 | \r |
75 | ///\r | |
a405b86d | 76 | /// List of attributes for each argument.\r |
94b17fa1 | 77 | ///\r |
47d20b54 | 78 | EFI_SHELL_ARG_INFO *ArgInfo;\r |
94b17fa1 | 79 | \r |
80 | ///\r | |
a405b86d | 81 | /// Whether we are echoing.\r |
94b17fa1 | 82 | ///\r |
47d20b54 | 83 | BOOLEAN EchoOn;\r |
94b17fa1 | 84 | } EFI_SHELL_INTERFACE;\r |
85 | \r | |
47d20b54 | 86 | extern EFI_GUID gEfiShellInterfaceGuid;\r |
94b17fa1 | 87 | \r |
88 | #endif\r |