VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Application/Shell/FileHandleWrappers.h@ 48674

Last change on this file since 48674 was 48674, checked in by vboxsync, 11 years ago

EFI: Export newly imported tinaocore UEFI sources to OSE.

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
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
18typedef struct {
19 LIST_ENTRY Link;
20 CHAR16* Buffer;
21} SHELL_LINE_LIST;
22
23typedef struct {
24 UINTN LogCount;
25 SHELL_LINE_LIST *Log;
26} SHELL_LINE_LOG;
27
28///
29/// FILE sytle interfaces for StdIn.
30///
31extern EFI_FILE_PROTOCOL FileInterfaceStdIn;
32
33///
34/// FILE sytle interfaces for StdOut.
35///
36extern EFI_FILE_PROTOCOL FileInterfaceStdOut;
37
38///
39/// FILE sytle interfaces for StdErr.
40///
41extern EFI_FILE_PROTOCOL FileInterfaceStdErr;
42
43///
44/// FILE style interface for NUL file.
45///
46extern 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**/
57EFI_FILE_PROTOCOL*
58EFIAPI
59CreateFileInterfaceEnv(
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**/
72EFI_FILE_PROTOCOL*
73EFIAPI
74CreateFileInterfaceMem(
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**/
88EFI_FILE_PROTOCOL*
89CreateFileInterfaceFile(
90 IN CONST EFI_FILE_PROTOCOL *Template,
91 IN CONST BOOLEAN Unicode
92 );
93
94#endif //_SHELL_FILE_HANDLE_WRAPPERS_HEADER_
95
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette