fixed to build under IPF.
[mirror_edk2.git] / ShellPkg / Include / Protocol / EfiShellInterface.h
CommitLineData
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
7 ConIo - provides a file style interface to the console. Note that the\r
8 ConOut & ConIn interfaces in the system table will work as well, and both\r
9 all will be redirected to a file if needed on a command line\r
10\r
11 The shell interface's and data (including ConIo) are only valid during\r
12 the applications Entry Point. Once the application returns from it's\r
13 entry point the data is freed by the invoking shell.\r
14 \r
15 Copyright (c) 2006 - 2009, Intel Corporation \r
16 All rights reserved. This program and the accompanying materials \r
17 are licensed and made available under the terms and conditions of the BSD License \r
18 which accompanies this distribution. The full text of the license may be found at \r
19 http://opensource.org/licenses/bsd-license.php \r
20\r
21 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
22 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
23\r
24**/\r
25\r
26#ifndef _SHELLINTERFACE_H_\r
27#define _SHELLINTERFACE_H_\r
28\r
29#include <Protocol\LoadedImage.h>\r
30\r
31#define SHELL_INTERFACE_PROTOCOL_GUID \\r
32 { \\r
33 0x47c7b223, 0xc42a, 0x11d2, 0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \\r
34 }\r
35\r
36///\r
37/// bit definitions for EFI_SHELL_ARG_INFO\r
38///\r
39typedef enum {\r
40 ARG_NO_ATTRIB = 0x0,\r
41 ARG_IS_QUOTED = 0x1,\r
42 ARG_PARTIALLY_QUOTED = 0x2,\r
43 ARG_FIRST_HALF_QUOTED = 0x4,\r
44 ARG_FIRST_CHAR_IS_ESC = 0x8\r
45};\r
46\r
47///\r
48/// attributes for an argument.\r
49///\r
50typedef struct _EFI_SHELL_ARG_INFO {\r
51 UINT32 Attributes;\r
52} EFI_SHELL_ARG_INFO;\r
53\r
54///\r
55/// This protocol provides access to additional information about a shell app.\r
56///\r
57typedef struct {\r
58 ///\r
59 /// Handle back to original image handle & image info\r
60 ///\r
61 EFI_HANDLE ImageHandle;\r
62 EFI_LOADED_IMAGE_PROTOCOL *Info;\r
63\r
64 ///\r
65 /// Parsed arg list converted more C like format\r
66 ///\r
67 CHAR16 **Argv;\r
68 UINTN Argc;\r
69\r
70 ///\r
71 /// Storage for file redirection args after parsing\r
72 ///\r
73 CHAR16 **RedirArgv;\r
74 UINTN RedirArgc;\r
75\r
76 ///\r
77 /// A file style handle for console io\r
78 ///\r
79 EFI_FILE_HANDLE StdIn;\r
80 EFI_FILE_HANDLE StdOut;\r
81 EFI_FILE_HANDLE StdErr;\r
82\r
83 ///\r
84 /// list of attributes for each argument\r
85 ///\r
86 EFI_SHELL_ARG_INFO *ArgInfo;\r
87\r
88 ///\r
89 /// whether we are echoing\r
90 ///\r
91 BOOLEAN EchoOn;\r
92} EFI_SHELL_INTERFACE;\r
93\r
94extern EFI_GUID gEfiShellInterfaceGuid;\r
95\r
96#endif\r