]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Provides interface to shell functionality for shell commands and applications.\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _UEFI_SHELL_LIB_INTERNAL_H_\r | |
16 | #define _UEFI_SHELL_LIB_INTERNAL_H_\r | |
17 | \r | |
18 | #include <Uefi.h>\r | |
19 | \r | |
20 | #include <Guid/FileInfo.h>\r | |
21 | \r | |
22 | #include <Protocol/SimpleFileSystem.h>\r | |
23 | #include <Protocol/LoadedImage.h>\r | |
24 | #include <Protocol/EfiShellInterface.h>\r | |
25 | #include <Protocol/EfiShellEnvironment2.h>\r | |
26 | #include <Protocol/EfiShell.h>\r | |
27 | #include <Protocol/EfiShellParameters.h>\r | |
28 | \r | |
29 | #include <Library/UefiBootServicesTableLib.h>\r | |
30 | #include <Library/BaseLib.h>\r | |
31 | #include <Library/BaseMemoryLib.h>\r | |
32 | #include <Library/DebugLib.h>\r | |
33 | #include <Library/MemoryAllocationLib.h>\r | |
34 | #include <Library/DevicePathLib.h>\r | |
35 | #include <Library/PcdLib.h>\r | |
36 | #include <Library/FileHandleLib.h>\r | |
37 | #include <Library/PrintLib.h>\r | |
38 | #include <Library/UefiLib.h>\r | |
39 | #include <Library/HiiLib.h>\r | |
40 | #include <Library/ShellLib.h>\r | |
41 | \r | |
42 | typedef struct {\r | |
43 | EFI_SHELL_GET_FILE_INFO GetFileInfo;\r | |
44 | EFI_SHELL_SET_FILE_INFO SetFileInfo;\r | |
45 | EFI_SHELL_READ_FILE ReadFile;\r | |
46 | EFI_SHELL_WRITE_FILE WriteFile;\r | |
47 | EFI_SHELL_CLOSE_FILE CloseFile;\r | |
48 | EFI_SHELL_DELETE_FILE DeleteFile;\r | |
49 | EFI_SHELL_GET_FILE_POSITION GetFilePosition;\r | |
50 | EFI_SHELL_SET_FILE_POSITION SetFilePosition;\r | |
51 | EFI_SHELL_FLUSH_FILE FlushFile;\r | |
52 | EFI_SHELL_GET_FILE_SIZE GetFileSize;\r | |
53 | } FILE_HANDLE_FUNCTION_MAP;\r | |
54 | \r | |
55 | /**\r | |
56 | Function to determin if an entire string is a valid number.\r | |
57 | \r | |
58 | If Hex it must be preceeded with a 0x or has ForceHex, set TRUE.\r | |
59 | \r | |
60 | @param[in] String The string to evaluate.\r | |
61 | @param[in] ForceHex TRUE - always assume hex.\r | |
62 | @param[in] StopAtSpace TRUE to halt upon finding a space, FALSE to keep going.\r | |
63 | @param[in] TimeNumbers TRUE to allow numbers with ":", FALSE otherwise.\r | |
64 | \r | |
65 | @retval TRUE It is all numeric (dec/hex) characters.\r | |
66 | @retval FALSE There is a non-numeric character.\r | |
67 | **/\r | |
68 | BOOLEAN\r | |
69 | EFIAPI\r | |
70 | InternalShellIsHexOrDecimalNumber (\r | |
71 | IN CONST CHAR16 *String,\r | |
72 | IN CONST BOOLEAN ForceHex,\r | |
73 | IN CONST BOOLEAN StopAtSpace,\r | |
74 | IN CONST BOOLEAN TimeNumbers\r | |
75 | );\r | |
76 | \r | |
77 | /**\r | |
78 | Cleans off all the quotes in the string.\r | |
79 | \r | |
80 | @param[in] OriginalString pointer to the string to be cleaned.\r | |
81 | @param[out] CleanString The new string with all quotes removed. \r | |
82 | Memory allocated in the function and free \r | |
83 | by caller.\r | |
84 | \r | |
85 | @retval EFI_SUCCESS The operation was successful.\r | |
86 | **/\r | |
87 | EFI_STATUS\r | |
88 | EFIAPI\r | |
89 | InternalShellStripQuotes (\r | |
90 | IN CONST CHAR16 *OriginalString,\r | |
91 | OUT CHAR16 **CleanString\r | |
92 | );\r | |
93 | \r | |
94 | \r | |
95 | #endif\r | |
96 | \r |