Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ComponentName2.h 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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
  6. All rights reserved. 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 Unicode 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 3066 language code
  34. format.
  35. @param DriverName A pointer to the Unicode string to return.
  36. This Unicode string is the name of the
  37. driver specified by This in the language
  38. specified by Language.
  39. @retval EFI_SUCCESS The Unicode 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 Unicode 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 a 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 3066 language code
  85. format.
  86. @param ControllerName A pointer to the Unicode string to
  87. return. This Unicode string is the
  88. name of the controller specified by
  89. ControllerHandle and ChildHandle in
  90. the language specified by Language
  91. from the point of view of the driver
  92. specified by This.
  93. @retval EFI_SUCCESS The Unicode string for the user
  94. readable name in the language
  95. specified by Language for the
  96. driver specified by This was
  97. returned in DriverName.
  98. @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid
  99. EFI_HANDLE.
  100. @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it
  101. is not a valid EFI_HANDLE.
  102. @retval EFI_INVALID_PARAMETER Language is NULL.
  103. @retval EFI_INVALID_PARAMETER ControllerName is NULL.
  104. @retval EFI_UNSUPPORTED The driver specified by This is
  105. not currently managing the
  106. controller specified by
  107. ControllerHandle and
  108. ChildHandle.
  109. @retval EFI_UNSUPPORTED The driver specified by This
  110. does not support the language
  111. specified by Language.
  112. **/
  113. typedef
  114. EFI_STATUS
  115. (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(
  116. IN EFI_COMPONENT_NAME2_PROTOCOL *This,
  117. IN EFI_HANDLE ControllerHandle,
  118. IN EFI_HANDLE ChildHandle OPTIONAL,
  119. IN CHAR8 *Language,
  120. OUT CHAR16 **ControllerName
  121. );
  122. ///
  123. /// This protocol is used to retrieve user readable names of drivers
  124. /// and controllers managed by UEFI Drivers.
  125. ///
  126. struct _EFI_COMPONENT_NAME2_PROTOCOL {
  127. EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;
  128. EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;
  129. ///
  130. /// A Null-terminated ASCII string array that contains one or more
  131. /// supported language codes. This is the list of language codes that
  132. /// this protocol supports. The number of languages supported by a
  133. /// driver is up to the driver writer. SupportedLanguages is
  134. /// specified in RFC 3066 format.
  135. ///
  136. CHAR8 *SupportedLanguages;
  137. };
  138. extern EFI_GUID gEfiComponentName2ProtocolGuid;
  139. #endif