EfiShellInterface.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /** @file
  2. EFI Shell Interface protocol from EDK shell (no spec).
  3. Shell Interface - additional information (over image_info) provided
  4. to an application started by the shell.
  5. ConIo provides a file-style interface to the console.
  6. The shell interface's and data (including ConIo) are only valid during
  7. the applications Entry Point. Once the application returns from it's
  8. entry point the data is freed by the invoking shell.
  9. Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
  10. SPDX-License-Identifier: BSD-2-Clause-Patent
  11. **/
  12. #ifndef _SHELLINTERFACE_H_
  13. #define _SHELLINTERFACE_H_
  14. #include <Protocol/SimpleFileSystem.h>
  15. #define SHELL_INTERFACE_PROTOCOL_GUID \
  16. { \
  17. 0x47c7b223, 0xc42a, 0x11d2, {0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} \
  18. }
  19. ///
  20. /// Bit definitions for EFI_SHELL_ARG_INFO
  21. ///
  22. typedef enum {
  23. ARG_NO_ATTRIB = 0x0,
  24. ARG_IS_QUOTED = BIT0,
  25. ARG_PARTIALLY_QUOTED = BIT1,
  26. ARG_FIRST_HALF_QUOTED = BIT2,
  27. ARG_FIRST_CHAR_IS_ESC = BIT3
  28. } EFI_SHELL_ARG_INFO_TYPES;
  29. ///
  30. /// Attributes for an argument.
  31. ///
  32. typedef struct _EFI_SHELL_ARG_INFO {
  33. UINT32 Attributes;
  34. } EFI_SHELL_ARG_INFO;
  35. ///
  36. /// This protocol provides access to additional information about a shell application.
  37. ///
  38. typedef struct {
  39. ///
  40. /// Handle back to original image handle & image information.
  41. ///
  42. EFI_HANDLE ImageHandle;
  43. EFI_LOADED_IMAGE_PROTOCOL *Info;
  44. ///
  45. /// Parsed arg list converted more C-like format.
  46. ///
  47. CHAR16 **Argv;
  48. UINTN Argc;
  49. ///
  50. /// Storage for file redirection args after parsing.
  51. ///
  52. CHAR16 **RedirArgv;
  53. UINTN RedirArgc;
  54. ///
  55. /// A file style handle for console io.
  56. ///
  57. EFI_FILE_PROTOCOL *StdIn;
  58. EFI_FILE_PROTOCOL *StdOut;
  59. EFI_FILE_PROTOCOL *StdErr;
  60. ///
  61. /// List of attributes for each argument.
  62. ///
  63. EFI_SHELL_ARG_INFO *ArgInfo;
  64. ///
  65. /// Whether we are echoing.
  66. ///
  67. BOOLEAN EchoOn;
  68. } EFI_SHELL_INTERFACE;
  69. extern EFI_GUID gEfiShellInterfaceGuid;
  70. #endif