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