• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 - 2011, Intel Corporation. All rights reserved.<BR>
6   This program and the accompanying materials
7   are licensed and made available under the terms and conditions of the BSD License
8   which accompanies this distribution.  The full text of the license may be found at
9   http://opensource.org/licenses/bsd-license.php
10 
11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 
14 **/
15 
16 #ifndef _SHELL_CONSOLE_WRAPPERS_HEADER_
17 #define _SHELL_CONSOLE_WRAPPERS_HEADER_
18 
19 /**
20   Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
21   SHELL_FILE_HANDLE to support redirecting input from a file.
22 
23   @param[in]  FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.
24   @param[in]  HandleLocation  The pointer of a location to copy handle with protocol to.
25 
26   @retval NULL                There was insufficient memory available.
27   @return                     A pointer to the allocated protocol structure;
28 **/
29 EFI_SIMPLE_TEXT_INPUT_PROTOCOL*
30 CreateSimpleTextInOnFile(
31   IN SHELL_FILE_HANDLE  FileHandleToUse,
32   IN EFI_HANDLE         *HandleLocation
33   );
34 
35 /**
36   Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a
37   SHELL_FILE_HANDLE to support redirecting input from a file.
38 
39   @param[in]  SimpleTextIn    The pointer to the SimpleTextIn to close.
40 
41   @retval EFI_SUCCESS         The object was closed.
42 **/
43 EFI_STATUS
44 CloseSimpleTextInOnFile(
45   IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL  *SimpleTextIn
46   );
47 
48 /**
49   Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
50   SHELL_FILE_HANDLE to support redirecting output from a file.
51 
52   @param[in]  FileHandleToUse  The pointer to the SHELL_FILE_HANDLE to use.
53   @param[in]  HandleLocation   The pointer of a location to copy handle with protocol to.
54   @param[in]  OriginalProtocol The pointer to the original output protocol for pass thru of functions.
55 
56   @retval NULL                There was insufficient memory available.
57   @return                     A pointer to the allocated protocol structure;
58 **/
59 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*
60 CreateSimpleTextOutOnFile(
61   IN SHELL_FILE_HANDLE               FileHandleToUse,
62   IN EFI_HANDLE                      *HandleLocation,
63   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *OriginalProtocol
64   );
65 
66 /**
67   Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a
68   SHELL_FILE_HANDLE to support redirecting output from a file.
69 
70   @param[in] SimpleTextOut    The pointer to the SimpleTextOUT to close.
71 
72   @retval EFI_SUCCESS         The object was closed.
73 **/
74 EFI_STATUS
75 CloseSimpleTextOutOnFile(
76   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *SimpleTextOut
77   );
78 
79 #endif //_SHELL_CONSOLE_WRAPPERS_HEADER_
80 
81