ComponentName.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. /** @file
  2. Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
  3. Copyright (c) 2018, Linaro Ltd. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef _VIRTUAL_KEYBOARD_COMPONENT_NAME_H_
  7. #define _VIRTUAL_KEYBOARD_COMPONENT_NAME_H_
  8. extern EFI_COMPONENT_NAME_PROTOCOL gVirtualKeyboardComponentName;
  9. extern EFI_COMPONENT_NAME2_PROTOCOL gVirtualKeyboardComponentName2;
  10. //
  11. // EFI Component Name Functions
  12. //
  13. /**
  14. Retrieves a Unicode string that is the user readable name of the driver.
  15. This function retrieves the user readable name of a driver in the form of a
  16. Unicode string. If the driver specified by This has a user readable name in
  17. the language specified by Language, then a pointer to the driver name is
  18. returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
  19. by This does not support the language specified by Language,
  20. then EFI_UNSUPPORTED is returned.
  21. @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
  22. EFI_COMPONENT_NAME_PROTOCOL instance.
  23. @param Language[in] A pointer to a Null-terminated ASCII string
  24. array indicating the language. This is the
  25. language of the driver name that the caller is
  26. requesting, and it must match one of the
  27. languages specified in SupportedLanguages. The
  28. number of languages supported by a driver is up
  29. to the driver writer. Language is specified
  30. in RFC 4646 or ISO 639-2 language code format.
  31. @param DriverName[out] A pointer to the Unicode string to return.
  32. This Unicode string is the name of the
  33. driver specified by This in the language
  34. specified by Language.
  35. @retval EFI_SUCCESS The Unicode string for the Driver specified by
  36. This and the language specified by Language was
  37. returned in DriverName.
  38. @retval EFI_INVALID_PARAMETER Language is NULL.
  39. @retval EFI_INVALID_PARAMETER DriverName is NULL.
  40. @retval EFI_UNSUPPORTED The driver specified by This does not support
  41. the language specified by Language.
  42. **/
  43. EFI_STATUS
  44. EFIAPI
  45. VirtualKeyboardComponentNameGetDriverName (
  46. IN EFI_COMPONENT_NAME_PROTOCOL *This,
  47. IN CHAR8 *Language,
  48. OUT CHAR16 **DriverName
  49. );
  50. /**
  51. Retrieves a Unicode string that is the user readable name of the controller
  52. that is being managed by a driver.
  53. This function retrieves the user readable name of the controller specified by
  54. ControllerHandle and ChildHandle in the form of a Unicode string. If the
  55. driver specified by This has a user readable name in the language specified by
  56. Language, then a pointer to the controller name is returned in ControllerName,
  57. and EFI_SUCCESS is returned. If the driver specified by This is not currently
  58. managing the controller specified by ControllerHandle and ChildHandle,
  59. then EFI_UNSUPPORTED is returned. If the driver specified by This does not
  60. support the language specified by Language, then EFI_UNSUPPORTED is returned.
  61. @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
  62. EFI_COMPONENT_NAME_PROTOCOL instance.
  63. @param ControllerHandle[in] The handle of a controller that the driver
  64. specified by This is managing. This handle
  65. specifies the controller whose name is to be
  66. returned.
  67. @param ChildHandle[in] The handle of the child controller to retrieve
  68. the name of. This is an optional parameter that
  69. may be NULL. It will be NULL for device
  70. drivers. It will also be NULL for a bus drivers
  71. that wish to retrieve the name of the bus
  72. controller. It will not be NULL for a bus
  73. driver that wishes to retrieve the name of a
  74. child controller.
  75. @param Language[in] A pointer to a Null-terminated ASCII string
  76. array indicating the language. This is the
  77. language of the driver name that the caller is
  78. requesting, and it must match one of the
  79. languages specified in SupportedLanguages. The
  80. number of languages supported by a driver is up
  81. to the driver writer. Language is specified in
  82. RFC 4646 or ISO 639-2 language code format.
  83. @param ControllerName[out] A pointer to the Unicode string to return.
  84. This Unicode string is the name of the
  85. controller specified by ControllerHandle and
  86. ChildHandle in the language specified by
  87. Language from the point of view of the driver
  88. specified by This.
  89. @retval EFI_SUCCESS The Unicode string for the user readable name in
  90. the language specified by Language for the
  91. driver specified by This was returned in
  92. DriverName.
  93. @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
  94. @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
  95. EFI_HANDLE.
  96. @retval EFI_INVALID_PARAMETER Language is NULL.
  97. @retval EFI_INVALID_PARAMETER ControllerName is NULL.
  98. @retval EFI_UNSUPPORTED The driver specified by This is not currently
  99. managing the controller specified by
  100. ControllerHandle and ChildHandle.
  101. @retval EFI_UNSUPPORTED The driver specified by This does not support
  102. the language specified by Language.
  103. **/
  104. EFI_STATUS
  105. EFIAPI
  106. VirtualKeyboardComponentNameGetControllerName (
  107. IN EFI_COMPONENT_NAME_PROTOCOL *This,
  108. IN EFI_HANDLE ControllerHandle,
  109. IN EFI_HANDLE ChildHandle OPTIONAL,
  110. IN CHAR8 *Language,
  111. OUT CHAR16 **ControllerName
  112. );
  113. #endif