UefiShellCommandLib.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /** @file
  2. Provides interface to shell internal functions for shell commands.
  3. Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. <BR>
  4. (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #ifndef _UEFI_COMMAND_LIB_INTERNAL_HEADER_
  8. #define _UEFI_COMMAND_LIB_INTERNAL_HEADER_
  9. #include <Uefi.h>
  10. #include <Guid/FileInfo.h>
  11. #include <Guid/GlobalVariable.h>
  12. #include <Protocol/SimpleFileSystem.h>
  13. #include <Protocol/LoadedImage.h>
  14. #include <Protocol/EfiShellInterface.h>
  15. #include <Protocol/EfiShellEnvironment2.h>
  16. #include <Protocol/Shell.h>
  17. #include <Protocol/ShellParameters.h>
  18. #include <Protocol/UnicodeCollation.h>
  19. #include <Protocol/BlockIo.h>
  20. #include <Protocol/ShellDynamicCommand.h>
  21. #include <Library/DevicePathLib.h>
  22. #include <Library/SortLib.h>
  23. #include <Library/HandleParsingLib.h>
  24. #include <Library/BaseLib.h>
  25. #include <Library/BaseMemoryLib.h>
  26. #include <Library/DebugLib.h>
  27. #include <Library/MemoryAllocationLib.h>
  28. #include <Library/PcdLib.h>
  29. #include <Library/ShellCommandLib.h>
  30. #include <Library/PrintLib.h>
  31. #include <Library/ShellLib.h>
  32. #include <Library/HiiLib.h>
  33. #include <Library/UefiBootServicesTableLib.h>
  34. #include <Library/UefiLib.h>
  35. #include <Library/OrderedCollectionLib.h>
  36. typedef struct {
  37. LIST_ENTRY Link;
  38. CHAR16 *CommandString;
  39. SHELL_GET_MAN_FILENAME GetManFileName;
  40. SHELL_RUN_COMMAND CommandHandler;
  41. BOOLEAN LastError;
  42. EFI_HII_HANDLE HiiHandle;
  43. EFI_STRING_ID ManFormatHelp;
  44. } SHELL_COMMAND_INTERNAL_LIST_ENTRY;
  45. typedef struct {
  46. LIST_ENTRY Link;
  47. SCRIPT_FILE *Data;
  48. } SCRIPT_FILE_LIST;
  49. typedef struct {
  50. EFI_FILE_PROTOCOL *FileHandle;
  51. CHAR16 *Path;
  52. } SHELL_COMMAND_FILE_HANDLE;
  53. //
  54. // Collects multiple EFI_SHELL_FILE_INFO objects that share the same name.
  55. //
  56. typedef struct {
  57. //
  58. // A string that compares equal to either the FileName or the FullName fields
  59. // of all EFI_SHELL_FILE_INFO objects on SameNameList, according to
  60. // gUnicodeCollation->StriColl(). The string is not dynamically allocated;
  61. // instead, it *aliases* the FileName or FullName field of the
  62. // EFI_SHELL_FILE_INFO object that was first encountered with this name.
  63. //
  64. CONST CHAR16 *Alias;
  65. //
  66. // A list of EFI_SHELL_FILE_INFO objects whose FileName or FullName fields
  67. // compare equal to Alias, according to gUnicodeCollation->StriColl().
  68. //
  69. LIST_ENTRY SameNameList;
  70. } SHELL_SORT_UNIQUE_NAME;
  71. #endif //_UEFI_COMMAND_LIB_INTERNAL_HEADER_