]>
Commit | Line | Data |
---|---|---|
a405b86d | 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 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _SHELL_FILE_HANDLE_WRAPPERS_HEADER_\r | |
16 | #define _SHELL_FILE_HANDLE_WRAPPERS_HEADER_\r | |
17 | \r | |
18 | typedef struct {\r | |
19 | LIST_ENTRY Link;\r | |
20 | CHAR16* Buffer;\r | |
21 | } SHELL_LINE_LIST;\r | |
22 | \r | |
23 | typedef struct {\r | |
24 | UINTN LogCount;\r | |
25 | SHELL_LINE_LIST *Log;\r | |
26 | } SHELL_LINE_LOG;\r | |
27 | \r | |
28 | ///\r | |
29 | /// FILE sytle interfaces for StdIn.\r | |
30 | ///\r | |
31 | extern EFI_FILE_PROTOCOL FileInterfaceStdIn;\r | |
32 | \r | |
33 | ///\r | |
34 | /// FILE sytle interfaces for StdOut.\r | |
35 | ///\r | |
36 | extern EFI_FILE_PROTOCOL FileInterfaceStdOut;\r | |
37 | \r | |
38 | ///\r | |
39 | /// FILE sytle interfaces for StdErr.\r | |
40 | ///\r | |
41 | extern EFI_FILE_PROTOCOL FileInterfaceStdErr;\r | |
42 | \r | |
43 | ///\r | |
44 | /// FILE style interface for NUL file.\r | |
45 | ///\r | |
46 | extern EFI_FILE_PROTOCOL FileInterfaceNulFile;\r | |
47 | \r | |
48 | /**\r | |
49 | Creates a EFI_FILE_PROTOCOL (almost) object for using to access\r | |
50 | environment variables through file operations.\r | |
51 | \r | |
52 | @param EnvName The name of the Environment Variable to be operated on.\r | |
53 | \r | |
54 | @retval NULL Memory could not be allocated.\r | |
55 | @return other a pointer to an EFI_FILE_PROTOCOL structure\r | |
56 | **/\r | |
57 | EFI_FILE_PROTOCOL*\r | |
58 | EFIAPI\r | |
59 | CreateFileInterfaceEnv(\r | |
60 | CONST CHAR16 *EnvName\r | |
61 | );\r | |
62 | \r | |
63 | /**\r | |
64 | Creates a EFI_FILE_PROTOCOL (almost) object for using to access\r | |
65 | a file entirely in memory through file operations.\r | |
66 | \r | |
67 | @param[in] Unicode TRUE if the data is UNICODE, FALSE otherwise.\r | |
68 | \r | |
69 | @retval NULL Memory could not be allocated.\r | |
70 | @return other a pointer to an EFI_FILE_PROTOCOL structure\r | |
71 | **/\r | |
72 | EFI_FILE_PROTOCOL*\r | |
73 | EFIAPI\r | |
74 | CreateFileInterfaceMem(\r | |
75 | IN CONST BOOLEAN Unicode\r | |
76 | );\r | |
77 | \r | |
78 | /**\r | |
79 | Creates a EFI_FILE_PROTOCOL (almost) object for using to access\r | |
80 | a file entirely with unicode awareness through file operations.\r | |
81 | \r | |
82 | @param[in] Template The pointer to the handle to start with.\r | |
83 | @param[in] Unicode TRUE if the data is UNICODE, FALSE otherwise.\r | |
84 | \r | |
85 | @retval NULL Memory could not be allocated.\r | |
86 | @return other a pointer to an EFI_FILE_PROTOCOL structure\r | |
87 | **/\r | |
88 | EFI_FILE_PROTOCOL*\r | |
89 | CreateFileInterfaceFile(\r | |
90 | IN CONST EFI_FILE_PROTOCOL *Template,\r | |
91 | IN CONST BOOLEAN Unicode\r | |
92 | );\r | |
93 | \r | |
94 | #endif //_SHELL_FILE_HANDLE_WRAPPERS_HEADER_\r | |
95 | \r |