1 | /** @file
|
---|
2 | Function definitions for shell simple text in and out on top of file handles.
|
---|
3 |
|
---|
4 | (C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
|
---|
5 | Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 |
|
---|
8 | **/
|
---|
9 |
|
---|
10 | #ifndef _SHELL_CONSOLE_WRAPPERS_HEADER_
|
---|
11 | #define _SHELL_CONSOLE_WRAPPERS_HEADER_
|
---|
12 |
|
---|
13 | /**
|
---|
14 | Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
|
---|
15 | SHELL_FILE_HANDLE to support redirecting input from a file.
|
---|
16 |
|
---|
17 | @param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
|
---|
18 | @param[in] HandleLocation The pointer of a location to copy handle with protocol to.
|
---|
19 |
|
---|
20 | @retval NULL There was insufficient memory available.
|
---|
21 | @return A pointer to the allocated protocol structure;
|
---|
22 | **/
|
---|
23 | EFI_SIMPLE_TEXT_INPUT_PROTOCOL *
|
---|
24 | CreateSimpleTextInOnFile (
|
---|
25 | IN SHELL_FILE_HANDLE FileHandleToUse,
|
---|
26 | IN EFI_HANDLE *HandleLocation
|
---|
27 | );
|
---|
28 |
|
---|
29 | /**
|
---|
30 | Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
|
---|
31 | SHELL_FILE_HANDLE to support redirecting input from a file.
|
---|
32 |
|
---|
33 | @param[in] SimpleTextIn The pointer to the SimpleTextIn to close.
|
---|
34 |
|
---|
35 | @retval EFI_SUCCESS The object was closed.
|
---|
36 | **/
|
---|
37 | EFI_STATUS
|
---|
38 | CloseSimpleTextInOnFile (
|
---|
39 | IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *SimpleTextIn
|
---|
40 | );
|
---|
41 |
|
---|
42 | /**
|
---|
43 | Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
|
---|
44 | SHELL_FILE_HANDLE to support redirecting output from a file.
|
---|
45 |
|
---|
46 | @param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
|
---|
47 | @param[in] HandleLocation The pointer of a location to copy handle with protocol to.
|
---|
48 | @param[in] OriginalProtocol The pointer to the original output protocol for pass thru of functions.
|
---|
49 |
|
---|
50 | @retval NULL There was insufficient memory available.
|
---|
51 | @return A pointer to the allocated protocol structure;
|
---|
52 | **/
|
---|
53 | EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *
|
---|
54 | CreateSimpleTextOutOnFile (
|
---|
55 | IN SHELL_FILE_HANDLE FileHandleToUse,
|
---|
56 | IN EFI_HANDLE *HandleLocation,
|
---|
57 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *OriginalProtocol
|
---|
58 | );
|
---|
59 |
|
---|
60 | /**
|
---|
61 | Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
|
---|
62 | SHELL_FILE_HANDLE to support redirecting output from a file.
|
---|
63 |
|
---|
64 | @param[in] SimpleTextOut The pointer to the SimpleTextOUT to close.
|
---|
65 |
|
---|
66 | @retval EFI_SUCCESS The object was closed.
|
---|
67 | **/
|
---|
68 | EFI_STATUS
|
---|
69 | CloseSimpleTextOutOnFile (
|
---|
70 | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOut
|
---|
71 | );
|
---|
72 |
|
---|
73 | #endif //_SHELL_CONSOLE_WRAPPERS_HEADER_
|
---|