Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1998 Intel Corporation
  3. Module Name:
  4. shellenv.h
  5. Abstract:
  6. Defines for shell environment
  7. Revision History
  8. --*/
  9. /*
  10. * The shell environment is provided by a driver. The shell links to the
  11. * shell environment for services. In addition, other drivers may connect
  12. * to the shell environment and add new internal command handlers, or
  13. * internal protocol handlers.
  14. *
  15. * A typical shell application would not include this header file
  16. */
  17. #define SHELL_ENVIRONMENT_INTERFACE_PROTOCOL \
  18. { 0x47c7b221, 0xc42a, 0x11d2, 0x8e, 0x57, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
  19. /*
  20. *
  21. */
  22. typedef
  23. EFI_STATUS
  24. (EFIAPI *SHELLENV_EXECUTE) (
  25. IN EFI_HANDLE *ParentImageHandle,
  26. IN CHAR16 *CommandLine,
  27. IN BOOLEAN DebugOutput
  28. );
  29. typedef
  30. CHAR16 *
  31. (EFIAPI *SHELLENV_GET_ENV) (
  32. IN CHAR16 *Name
  33. );
  34. typedef
  35. CHAR16 *
  36. (EFIAPI *SHELLENV_GET_MAP) (
  37. IN CHAR16 *Name
  38. );
  39. /*
  40. * Add to shell's internal command list
  41. */
  42. typedef
  43. EFI_STATUS
  44. (EFIAPI *SHELLENV_ADD_CMD) (
  45. IN SHELLENV_INTERNAL_COMMAND Handler,
  46. IN CHAR16 *Cmd,
  47. IN CHAR16 *CmdFormat,
  48. IN CHAR16 *CmdHelpLine,
  49. IN CHAR16 *CmdVerboseHelp /* tbd */
  50. );
  51. /*
  52. * Add to shell environment protocol information & protocol information dump handlers
  53. */
  54. typedef
  55. VOID
  56. (EFIAPI *SHELLENV_DUMP_PROTOCOL_INFO) (
  57. IN EFI_HANDLE Handle,
  58. IN VOID *Interface
  59. );
  60. typedef
  61. VOID
  62. (EFIAPI *SHELLENV_ADD_PROT) (
  63. IN EFI_GUID *Protocol,
  64. IN SHELLENV_DUMP_PROTOCOL_INFO DumpToken OPTIONAL,
  65. IN SHELLENV_DUMP_PROTOCOL_INFO DumpInfo OPTIONAL,
  66. IN CHAR16 *IdString
  67. );
  68. typedef
  69. CHAR16 *
  70. (EFIAPI *SHELLENV_GET_PROT) (
  71. IN EFI_GUID *Protocol,
  72. IN BOOLEAN GenId
  73. );
  74. typedef
  75. EFI_SHELL_INTERFACE *
  76. (EFIAPI *SHELLENV_NEW_SHELL) (
  77. IN EFI_HANDLE ImageHandle
  78. );
  79. typedef
  80. CHAR16 *
  81. (EFIAPI *SHELLENV_CUR_DIR) (
  82. IN CHAR16 *DeviceName OPTIONAL
  83. );
  84. typedef
  85. EFI_STATUS
  86. (EFIAPI *SHELLENV_FILE_META_ARG) (
  87. IN CHAR16 *Arg,
  88. IN OUT LIST_ENTRY *ListHead
  89. );
  90. typedef
  91. EFI_STATUS
  92. (EFIAPI *SHELLENV_FREE_FILE_LIST) (
  93. IN OUT LIST_ENTRY *ListHead
  94. );
  95. /*
  96. *
  97. */
  98. typedef struct {
  99. SHELLENV_EXECUTE Execute; /* Execute a command line */
  100. SHELLENV_GET_ENV GetEnv; /* Get an environment variable */
  101. SHELLENV_GET_MAP GetMap; /* Get an environment variable */
  102. SHELLENV_ADD_CMD AddCmd; /* Add an internal command handler */
  103. SHELLENV_ADD_PROT AddProt; /* Add protocol info handler */
  104. SHELLENV_GET_PROT GetProt; /* Get's the protocol ID */
  105. SHELLENV_CUR_DIR CurDir;
  106. SHELLENV_FILE_META_ARG FileMetaArg;
  107. SHELLENV_FREE_FILE_LIST FreeFileList;
  108. /* Only used by the shell itself */
  109. SHELLENV_NEW_SHELL NewShell;
  110. } EFI_SHELL_ENVIRONMENT;