]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | EFI_FILE_PROTOCOL wrappers for other items (Like Environment Variables, StdIn, StdOut, StdErr, etc...)\r | |
3 | \r | |
4 | Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r | |
5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
6 | \r | |
7 | **/\r | |
8 | \r | |
9 | #ifndef _SHELL_FILE_HANDLE_WRAPPERS_HEADER_\r | |
10 | #define _SHELL_FILE_HANDLE_WRAPPERS_HEADER_\r | |
11 | \r | |
12 | typedef struct {\r | |
13 | LIST_ENTRY Link;\r | |
14 | CHAR16* Buffer;\r | |
15 | } SHELL_LINE_LIST;\r | |
16 | \r | |
17 | typedef struct {\r | |
18 | UINTN LogCount;\r | |
19 | SHELL_LINE_LIST *Log;\r | |
20 | } SHELL_LINE_LOG;\r | |
21 | \r | |
22 | ///\r | |
23 | /// FILE sytle interfaces for StdIn.\r | |
24 | ///\r | |
25 | extern EFI_FILE_PROTOCOL FileInterfaceStdIn;\r | |
26 | \r | |
27 | ///\r | |
28 | /// FILE sytle interfaces for StdOut.\r | |
29 | ///\r | |
30 | extern EFI_FILE_PROTOCOL FileInterfaceStdOut;\r | |
31 | \r | |
32 | ///\r | |
33 | /// FILE sytle interfaces for StdErr.\r | |
34 | ///\r | |
35 | extern EFI_FILE_PROTOCOL FileInterfaceStdErr;\r | |
36 | \r | |
37 | ///\r | |
38 | /// FILE style interface for NUL file.\r | |
39 | ///\r | |
40 | extern EFI_FILE_PROTOCOL FileInterfaceNulFile;\r | |
41 | \r | |
42 | /**\r | |
43 | Creates a EFI_FILE_PROTOCOL (almost) object for using to access\r | |
44 | environment variables through file operations.\r | |
45 | \r | |
46 | @param EnvName The name of the Environment Variable to be operated on.\r | |
47 | \r | |
48 | @retval NULL Memory could not be allocated.\r | |
49 | @return other a pointer to an EFI_FILE_PROTOCOL structure\r | |
50 | **/\r | |
51 | EFI_FILE_PROTOCOL*\r | |
52 | CreateFileInterfaceEnv(\r | |
53 | CONST CHAR16 *EnvName\r | |
54 | );\r | |
55 | \r | |
56 | /**\r | |
57 | Creates a EFI_FILE_PROTOCOL (almost) object for using to access\r | |
58 | a file entirely in memory through file operations.\r | |
59 | \r | |
60 | @param[in] Unicode TRUE if the data is UNICODE, FALSE otherwise.\r | |
61 | \r | |
62 | @retval NULL Memory could not be allocated.\r | |
63 | @return other a pointer to an EFI_FILE_PROTOCOL structure\r | |
64 | **/\r | |
65 | EFI_FILE_PROTOCOL*\r | |
66 | CreateFileInterfaceMem(\r | |
67 | IN CONST BOOLEAN Unicode\r | |
68 | );\r | |
69 | \r | |
70 | /**\r | |
71 | Creates a EFI_FILE_PROTOCOL (almost) object for using to access\r | |
72 | a file entirely with unicode awareness through file operations.\r | |
73 | \r | |
74 | @param[in] Template The pointer to the handle to start with.\r | |
75 | @param[in] Unicode TRUE if the data is UNICODE, FALSE otherwise.\r | |
76 | \r | |
77 | @retval NULL Memory could not be allocated.\r | |
78 | @return other a pointer to an EFI_FILE_PROTOCOL structure\r | |
79 | **/\r | |
80 | EFI_FILE_PROTOCOL*\r | |
81 | CreateFileInterfaceFile(\r | |
82 | IN CONST EFI_FILE_PROTOCOL *Template,\r | |
83 | IN CONST BOOLEAN Unicode\r | |
84 | );\r | |
85 | \r | |
86 | #endif //_SHELL_FILE_HANDLE_WRAPPERS_HEADER_\r | |
87 | \r |