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