VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/ShellPkg/Library/UefiShellLib/UefiShellLib.h@ 105681

Last change on this file since 105681 was 99404, checked in by vboxsync, 22 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1/** @file
2 Provides interface to shell functionality for shell commands and applications.
3
4 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9
10#ifndef _UEFI_SHELL_LIB_INTERNAL_H_
11#define _UEFI_SHELL_LIB_INTERNAL_H_
12
13#include <Uefi.h>
14
15#include <Guid/FileInfo.h>
16
17#include <Protocol/SimpleFileSystem.h>
18#include <Protocol/LoadedImage.h>
19#include <Protocol/EfiShellInterface.h>
20#include <Protocol/EfiShellEnvironment2.h>
21#include <Protocol/Shell.h>
22#include <Protocol/ShellParameters.h>
23#include <Protocol/UnicodeCollation.h>
24
25#include <Library/UefiBootServicesTableLib.h>
26#include <Library/BaseLib.h>
27#include <Library/BaseMemoryLib.h>
28#include <Library/DebugLib.h>
29#include <Library/MemoryAllocationLib.h>
30#include <Library/DevicePathLib.h>
31#include <Library/PcdLib.h>
32#include <Library/FileHandleLib.h>
33#include <Library/PrintLib.h>
34#include <Library/UefiLib.h>
35#include <Library/HiiLib.h>
36#include <Library/ShellLib.h>
37
38typedef struct {
39 EFI_SHELL_GET_FILE_INFO GetFileInfo;
40 EFI_SHELL_SET_FILE_INFO SetFileInfo;
41 EFI_SHELL_READ_FILE ReadFile;
42 EFI_SHELL_WRITE_FILE WriteFile;
43 EFI_SHELL_CLOSE_FILE CloseFile;
44 EFI_SHELL_DELETE_FILE DeleteFile;
45 EFI_SHELL_GET_FILE_POSITION GetFilePosition;
46 EFI_SHELL_SET_FILE_POSITION SetFilePosition;
47 EFI_SHELL_FLUSH_FILE FlushFile;
48 EFI_SHELL_GET_FILE_SIZE GetFileSize;
49} FILE_HANDLE_FUNCTION_MAP;
50
51/**
52 Function to determin if an entire string is a valid number.
53
54 If Hex it must be preceeded with a 0x or has ForceHex, set TRUE.
55
56 @param[in] String The string to evaluate.
57 @param[in] ForceHex TRUE - always assume hex.
58 @param[in] StopAtSpace TRUE to halt upon finding a space, FALSE to keep going.
59 @param[in] TimeNumbers TRUE to allow numbers with ":", FALSE otherwise.
60
61 @retval TRUE It is all numeric (dec/hex) characters.
62 @retval FALSE There is a non-numeric character.
63**/
64BOOLEAN
65InternalShellIsHexOrDecimalNumber (
66 IN CONST CHAR16 *String,
67 IN CONST BOOLEAN ForceHex,
68 IN CONST BOOLEAN StopAtSpace,
69 IN CONST BOOLEAN TimeNumbers
70 );
71
72/**
73 Cleans off all the quotes in the string.
74
75 @param[in] OriginalString pointer to the string to be cleaned.
76 @param[out] CleanString The new string with all quotes removed.
77 Memory allocated in the function and free
78 by caller.
79
80 @retval EFI_SUCCESS The operation was successful.
81**/
82EFI_STATUS
83InternalShellStripQuotes (
84 IN CONST CHAR16 *OriginalString,
85 OUT CHAR16 **CleanString
86 );
87
88#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette