2 Function definitions for shell simple text in and out on top of file handles.
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
10 #ifndef _SHELL_CONSOLE_WRAPPERS_HEADER_
11 #define _SHELL_CONSOLE_WRAPPERS_HEADER_
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.
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.
20 @retval NULL There was insufficient memory available.
21 @return A pointer to the allocated protocol structure;
23 EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*
24 CreateSimpleTextInOnFile(
25 IN SHELL_FILE_HANDLE FileHandleToUse
,
26 IN EFI_HANDLE
*HandleLocation
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.
33 @param[in] SimpleTextIn The pointer to the SimpleTextIn to close.
35 @retval EFI_SUCCESS The object was closed.
38 CloseSimpleTextInOnFile(
39 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*SimpleTextIn
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.
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.
50 @retval NULL There was insufficient memory available.
51 @return A pointer to the allocated protocol structure;
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
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.
64 @param[in] SimpleTextOut The pointer to the SimpleTextOUT to close.
66 @retval EFI_SUCCESS The object was closed.
69 CloseSimpleTextOutOnFile(
70 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*SimpleTextOut
73 #endif //_SHELL_CONSOLE_WRAPPERS_HEADER_