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.

ComponentName2.h 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /** @file
  2. UEFI Component Name 2 Protocol as defined in the UEFI 2.1 specification.
  3. This protocol is used to retrieve user readable names of drivers
  4. and controllers managed by UEFI Drivers.
  5. Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
  6. This program and the accompanying materials
  7. are licensed and made available under the terms and conditions of the BSD License
  8. which accompanies this distribution. The full text of the license may be found at
  9. http://opensource.org/licenses/bsd-license.php
  10. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  12. **/
  13. #ifndef __EFI_COMPONENT_NAME2_H__
  14. #define __EFI_COMPONENT_NAME2_H__
  15. ///
  16. /// Global ID for the Component Name Protocol
  17. ///
  18. #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
  19. {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } }
  20. typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL;
  21. /**
  22. Retrieves a string that is the user readable name of
  23. the EFI Driver.
  24. @param This A pointer to the
  25. EFI_COMPONENT_NAME2_PROTOCOL instance.
  26. @param Language A pointer to a Null-terminated ASCII string
  27. array indicating the language. This is the
  28. language of the driver name that the caller
  29. is requesting, and it must match one of the
  30. languages specified in SupportedLanguages.
  31. The number of languages supported by a
  32. driver is up to the driver writer. Language
  33. is specified in RFC 4646 language code
  34. format.
  35. @param DriverName A pointer to the string to return.
  36. This string is the name of the
  37. driver specified by This in the language
  38. specified by Language.
  39. @retval EFI_SUCCESS The string for the
  40. Driver specified by This and the
  41. language specified by Language
  42. was returned in DriverName.
  43. @retval EFI_INVALID_PARAMETER Language is NULL.
  44. @retval EFI_INVALID_PARAMETER DriverName is NULL.
  45. @retval EFI_UNSUPPORTED The driver specified by This
  46. does not support the language
  47. specified by Language.
  48. **/
  49. typedef
  50. EFI_STATUS
  51. (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME)(
  52. IN EFI_COMPONENT_NAME2_PROTOCOL *This,
  53. IN CHAR8 *Language,
  54. OUT CHAR16 **DriverName
  55. );
  56. /**
  57. Retrieves a string that is the user readable name of
  58. the controller that is being managed by an EFI Driver.
  59. @param This A pointer to the
  60. EFI_COMPONENT_NAME2_PROTOCOL instance.
  61. @param ControllerHandle The handle of a controller that the
  62. driver specified by This is managing.
  63. This handle specifies the controller
  64. whose name is to be returned.
  65. @param ChildHandle The handle of the child controller to
  66. retrieve the name of. This is an
  67. optional parameter that may be NULL.
  68. It will be NULL for device drivers.
  69. It will also be NULL for bus
  70. drivers that wish to retrieve the
  71. name of the bus controller. It will
  72. not be NULL for a bus driver that
  73. wishes to retrieve the name of a
  74. child controller.
  75. @param Language A pointer to a Null-terminated ASCII
  76. string array indicating the language.
  77. This is the language of the driver
  78. name that the caller is requesting,
  79. and it must match one of the
  80. languages specified in
  81. SupportedLanguages. The number of
  82. languages supported by a driver is up
  83. to the driver writer. Language is
  84. specified in RFC 4646 language code
  85. format.
  86. @param ControllerName A pointer to the string to return.
  87. This string is the name of the controller
  88. specified by ControllerHandle and ChildHandle
  89. in the language specified by Language
  90. from the point of view of the driver
  91. specified by This.
  92. @retval EFI_SUCCESS The string for the user
  93. readable name in the language
  94. specified by Language for the
  95. driver specified by This was
  96. returned in DriverName.
  97. @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid
  98. EFI_HANDLE.
  99. @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it
  100. is not a valid EFI_HANDLE.
  101. @retval EFI_INVALID_PARAMETER Language is NULL.
  102. @retval EFI_INVALID_PARAMETER ControllerName is NULL.
  103. @retval EFI_UNSUPPORTED The driver specified by This is
  104. not currently managing the
  105. controller specified by
  106. ControllerHandle and
  107. ChildHandle.
  108. @retval EFI_UNSUPPORTED The driver specified by This
  109. does not support the language
  110. specified by Language.
  111. **/
  112. typedef
  113. EFI_STATUS
  114. (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(
  115. IN EFI_COMPONENT_NAME2_PROTOCOL *This,
  116. IN EFI_HANDLE ControllerHandle,
  117. IN EFI_HANDLE ChildHandle OPTIONAL,
  118. IN CHAR8 *Language,
  119. OUT CHAR16 **ControllerName
  120. );
  121. ///
  122. /// This protocol is used to retrieve user readable names of drivers
  123. /// and controllers managed by UEFI Drivers.
  124. ///
  125. struct _EFI_COMPONENT_NAME2_PROTOCOL {
  126. EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;
  127. EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;
  128. ///
  129. /// A Null-terminated ASCII string array that contains one or more
  130. /// supported language codes. This is the list of language codes that
  131. /// this protocol supports. The number of languages supported by a
  132. /// driver is up to the driver writer. SupportedLanguages is
  133. /// specified in RFC 4646 format.
  134. ///
  135. CHAR8 *SupportedLanguages;
  136. };
  137. extern EFI_GUID gEfiComponentName2ProtocolGuid;
  138. #endif