]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Library/UefiShellLib/UefiShellLib.h
ShellPkg: Clean up source files
[mirror_edk2.git] / ShellPkg / Library / UefiShellLib / UefiShellLib.h
CommitLineData
d2b4564b 1/** @file\r
2 Provides interface to shell functionality for shell commands and applications.\r
3\r
583448b4 4 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
ba0014b9 5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
1e6e84c7 6 This program and the accompanying materials\r
b3011f40 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
d2b4564b 10\r
b3011f40 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
d2b4564b 13\r
14**/\r
15\r
a1d4bfcc 16#ifndef _UEFI_SHELL_LIB_INTERNAL_H_\r
252d9457 17#define _UEFI_SHELL_LIB_INTERNAL_H_\r
18\r
b3011f40 19#include <Uefi.h>\r
20\r
21#include <Guid/FileInfo.h>\r
22\r
23#include <Protocol/SimpleFileSystem.h>\r
24#include <Protocol/LoadedImage.h>\r
25#include <Protocol/EfiShellInterface.h>\r
26#include <Protocol/EfiShellEnvironment2.h>\r
28165f24
RN
27#include <Protocol/Shell.h>\r
28#include <Protocol/ShellParameters.h>\r
583448b4 29#include <Protocol/UnicodeCollation.h>\r
b3011f40 30\r
31#include <Library/UefiBootServicesTableLib.h>\r
32#include <Library/BaseLib.h>\r
33#include <Library/BaseMemoryLib.h>\r
34#include <Library/DebugLib.h>\r
35#include <Library/MemoryAllocationLib.h>\r
36#include <Library/DevicePathLib.h>\r
37#include <Library/PcdLib.h>\r
38#include <Library/FileHandleLib.h>\r
39#include <Library/PrintLib.h>\r
40#include <Library/UefiLib.h>\r
41#include <Library/HiiLib.h>\r
42#include <Library/ShellLib.h>\r
43\r
d2b4564b 44typedef struct {\r
45 EFI_SHELL_GET_FILE_INFO GetFileInfo;\r
46 EFI_SHELL_SET_FILE_INFO SetFileInfo;\r
47 EFI_SHELL_READ_FILE ReadFile;\r
48 EFI_SHELL_WRITE_FILE WriteFile;\r
49 EFI_SHELL_CLOSE_FILE CloseFile;\r
50 EFI_SHELL_DELETE_FILE DeleteFile;\r
51 EFI_SHELL_GET_FILE_POSITION GetFilePosition;\r
52 EFI_SHELL_SET_FILE_POSITION SetFilePosition;\r
53 EFI_SHELL_FLUSH_FILE FlushFile;\r
54 EFI_SHELL_GET_FILE_SIZE GetFileSize;\r
55} FILE_HANDLE_FUNCTION_MAP;\r
252d9457 56\r
57/**\r
58 Function to determin if an entire string is a valid number.\r
59\r
60 If Hex it must be preceeded with a 0x or has ForceHex, set TRUE.\r
61\r
62 @param[in] String The string to evaluate.\r
63 @param[in] ForceHex TRUE - always assume hex.\r
64 @param[in] StopAtSpace TRUE to halt upon finding a space, FALSE to keep going.\r
658bf43e 65 @param[in] TimeNumbers TRUE to allow numbers with ":", FALSE otherwise.\r
252d9457 66\r
67 @retval TRUE It is all numeric (dec/hex) characters.\r
68 @retval FALSE There is a non-numeric character.\r
69**/\r
70BOOLEAN\r
252d9457 71InternalShellIsHexOrDecimalNumber (\r
72 IN CONST CHAR16 *String,\r
73 IN CONST BOOLEAN ForceHex,\r
658bf43e 74 IN CONST BOOLEAN StopAtSpace,\r
75 IN CONST BOOLEAN TimeNumbers\r
252d9457 76 );\r
77\r
0960ba17
QS
78/**\r
79 Cleans off all the quotes in the string.\r
80\r
81 @param[in] OriginalString pointer to the string to be cleaned.\r
ba0014b9
LG
82 @param[out] CleanString The new string with all quotes removed.\r
83 Memory allocated in the function and free\r
0960ba17
QS
84 by caller.\r
85\r
86 @retval EFI_SUCCESS The operation was successful.\r
87**/\r
88EFI_STATUS\r
0960ba17
QS
89InternalShellStripQuotes (\r
90 IN CONST CHAR16 *OriginalString,\r
91 OUT CHAR16 **CleanString\r
92 );\r
93\r
94\r
252d9457 95#endif\r
96\r