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.

DevicePathToText.h 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /** @file
  2. EFI_DEVICE_PATH_TO_TEXT_PROTOCOL as defined in UEFI 2.0.
  3. This protocol provides service to convert device nodes and paths to text.
  4. Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
  5. This program and the accompanying materials
  6. are licensed and made available under the terms and conditions of the BSD License
  7. which accompanies this distribution. The full text of the license may be found at
  8. http://opensource.org/licenses/bsd-license.php
  9. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  11. **/
  12. #ifndef __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
  13. #define __DEVICE_PATH_TO_TEXT_PROTOCOL_H__
  14. FILE_LICENCE ( BSD3 );
  15. ///
  16. /// Device Path To Text protocol
  17. ///
  18. #define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
  19. { \
  20. 0x8b843e20, 0x8132, 0x4852, {0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \
  21. }
  22. /**
  23. Convert a device node to its text representation.
  24. @param DeviceNode Points to the device node to be converted.
  25. @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
  26. of the display node is used, where applicable. If DisplayOnly
  27. is FALSE, then the longer text representation of the display node
  28. is used.
  29. @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text
  30. representation for a device node can be used, where applicable.
  31. @retval a_pointer a pointer to the allocated text representation of the device node data
  32. @retval NULL if DeviceNode is NULL or there was insufficient memory.
  33. **/
  34. typedef
  35. CHAR16*
  36. (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)(
  37. IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
  38. IN BOOLEAN DisplayOnly,
  39. IN BOOLEAN AllowShortcuts
  40. );
  41. /**
  42. Convert a device path to its text representation.
  43. @param DevicePath Points to the device path to be converted.
  44. @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation
  45. of the display node is used, where applicable. If DisplayOnly
  46. is FALSE, then the longer text representation of the display node
  47. is used.
  48. @param AllowShortcuts The AllowShortcuts is FALSE, then the shortcut forms of
  49. text representation for a device node cannot be used.
  50. @retval a_pointer a pointer to the allocated text representation of the device node.
  51. @retval NULL if DevicePath is NULL or there was insufficient memory.
  52. **/
  53. typedef
  54. CHAR16*
  55. (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)(
  56. IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
  57. IN BOOLEAN DisplayOnly,
  58. IN BOOLEAN AllowShortcuts
  59. );
  60. ///
  61. /// This protocol converts device paths and device nodes to text.
  62. ///
  63. typedef struct {
  64. EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
  65. EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
  66. } EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
  67. extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
  68. #endif