]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Application/Shell/ConsoleWrappers.h
ShellPkg: Clean up source files
[mirror_edk2.git] / ShellPkg / Application / Shell / ConsoleWrappers.h
CommitLineData
8be0ba36 1/** @file\r
2 Function definitions for shell simple text in and out on top of file handles.\r
3\r
c011b6c9 4 (C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>\r
ba0014b9 5 Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>\r
8be0ba36 6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef _SHELL_CONSOLE_WRAPPERS_HEADER_\r
17#define _SHELL_CONSOLE_WRAPPERS_HEADER_\r
18\r
19/**\r
ba0014b9 20 Function to create a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a\r
8be0ba36 21 SHELL_FILE_HANDLE to support redirecting input from a file.\r
22\r
23 @param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.\r
24 @param[in] HandleLocation The pointer of a location to copy handle with protocol to.\r
25\r
26 @retval NULL There was insufficient memory available.\r
27 @return A pointer to the allocated protocol structure;\r
28**/\r
29EFI_SIMPLE_TEXT_INPUT_PROTOCOL*\r
8be0ba36 30CreateSimpleTextInOnFile(\r
31 IN SHELL_FILE_HANDLE FileHandleToUse,\r
32 IN EFI_HANDLE *HandleLocation\r
33 );\r
34\r
35/**\r
ba0014b9 36 Function to close a EFI_SIMPLE_TEXT_INPUT_PROTOCOL on top of a\r
8be0ba36 37 SHELL_FILE_HANDLE to support redirecting input from a file.\r
38\r
39 @param[in] SimpleTextIn The pointer to the SimpleTextIn to close.\r
40\r
41 @retval EFI_SUCCESS The object was closed.\r
42**/\r
43EFI_STATUS\r
8be0ba36 44CloseSimpleTextInOnFile(\r
45 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *SimpleTextIn\r
46 );\r
47\r
48/**\r
ba0014b9 49 Function to create a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a\r
8be0ba36 50 SHELL_FILE_HANDLE to support redirecting output from a file.\r
51\r
dcf9b428
CP
52 @param[in] FileHandleToUse The pointer to the SHELL_FILE_HANDLE to use.\r
53 @param[in] HandleLocation The pointer of a location to copy handle with protocol to.\r
54 @param[in] OriginalProtocol The pointer to the original output protocol for pass thru of functions.\r
8be0ba36 55\r
56 @retval NULL There was insufficient memory available.\r
57 @return A pointer to the allocated protocol structure;\r
58**/\r
59EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*\r
8be0ba36 60CreateSimpleTextOutOnFile(\r
dcf9b428
CP
61 IN SHELL_FILE_HANDLE FileHandleToUse,\r
62 IN EFI_HANDLE *HandleLocation,\r
63 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *OriginalProtocol\r
8be0ba36 64 );\r
65\r
66/**\r
ba0014b9 67 Function to close a EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on top of a\r
8be0ba36 68 SHELL_FILE_HANDLE to support redirecting output from a file.\r
69\r
733f138d 70 @param[in] SimpleTextOut The pointer to the SimpleTextOUT to close.\r
8be0ba36 71\r
72 @retval EFI_SUCCESS The object was closed.\r
73**/\r
74EFI_STATUS\r
8be0ba36 75CloseSimpleTextOutOnFile(\r
733f138d 76 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *SimpleTextOut\r
8be0ba36 77 );\r
78\r
79#endif //_SHELL_CONSOLE_WRAPPERS_HEADER_\r
80\r