]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
4ca9b6c4 | 2 | UEFI Component Name 2 Protocol as defined in the UEFI 2.1 specification.\r |
9095d37b | 3 | This protocol is used to retrieve user readable names of drivers\r |
4ca9b6c4 | 4 | and controllers managed by UEFI Drivers.\r |
d1f95000 | 5 | \r |
9095d37b | 6 | Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 7 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
d1f95000 | 8 | \r |
d1f95000 | 9 | **/\r |
10 | \r | |
11 | #ifndef __EFI_COMPONENT_NAME2_H__\r | |
12 | #define __EFI_COMPONENT_NAME2_H__\r | |
13 | \r | |
99e8ed21 | 14 | ///\r |
15 | /// Global ID for the Component Name Protocol\r | |
16 | ///\r | |
d1f95000 | 17 | #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \\r |
18 | {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } }\r | |
19 | \r | |
2f88bd3a | 20 | typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL;\r |
d1f95000 | 21 | \r |
22 | /**\r | |
fbf926ad | 23 | Retrieves a string that is the user readable name of\r |
d1f95000 | 24 | the EFI Driver.\r |
25 | \r | |
26 | @param This A pointer to the\r | |
4ca9b6c4 | 27 | EFI_COMPONENT_NAME2_PROTOCOL instance.\r |
9095d37b | 28 | \r |
d1f95000 | 29 | @param Language A pointer to a Null-terminated ASCII string\r |
30 | array indicating the language. This is the\r | |
31 | language of the driver name that the caller\r | |
32 | is requesting, and it must match one of the\r | |
33 | languages specified in SupportedLanguages.\r | |
34 | The number of languages supported by a\r | |
35 | driver is up to the driver writer. Language\r | |
7eb05636 | 36 | is specified in RFC 4646 language code\r |
d1f95000 | 37 | format.\r |
9095d37b | 38 | \r |
fbf926ad | 39 | @param DriverName A pointer to the string to return.\r |
40 | This string is the name of the\r | |
d1f95000 | 41 | driver specified by This in the language\r |
42 | specified by Language.\r | |
43 | \r | |
fbf926ad | 44 | @retval EFI_SUCCESS The string for the\r |
d1f95000 | 45 | Driver specified by This and the\r |
46 | language specified by Language\r | |
47 | was returned in DriverName.\r | |
9095d37b | 48 | \r |
d1f95000 | 49 | @retval EFI_INVALID_PARAMETER Language is NULL.\r |
9095d37b | 50 | \r |
d1f95000 | 51 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r |
9095d37b | 52 | \r |
d1f95000 | 53 | @retval EFI_UNSUPPORTED The driver specified by This\r |
54 | does not support the language\r | |
55 | specified by Language.\r | |
56 | \r | |
57 | **/\r | |
58 | typedef\r | |
59 | EFI_STATUS\r | |
8b13229b | 60 | (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME)(\r |
d1f95000 | 61 | IN EFI_COMPONENT_NAME2_PROTOCOL *This,\r |
62 | IN CHAR8 *Language,\r | |
63 | OUT CHAR16 **DriverName\r | |
64 | );\r | |
65 | \r | |
d1f95000 | 66 | /**\r |
fbf926ad | 67 | Retrieves a string that is the user readable name of\r |
d1f95000 | 68 | the controller that is being managed by an EFI Driver.\r |
69 | \r | |
70 | @param This A pointer to the\r | |
4ca9b6c4 | 71 | EFI_COMPONENT_NAME2_PROTOCOL instance.\r |
d1f95000 | 72 | \r |
73 | @param ControllerHandle The handle of a controller that the\r | |
74 | driver specified by This is managing.\r | |
75 | This handle specifies the controller\r | |
76 | whose name is to be returned.\r | |
77 | \r | |
fbf926ad | 78 | @param ChildHandle The handle of the child controller to\r |
d1f95000 | 79 | retrieve the name of. This is an\r |
80 | optional parameter that may be NULL.\r | |
81 | It will be NULL for device drivers.\r | |
630b4187 | 82 | It will also be NULL for bus\r |
d1f95000 | 83 | drivers that wish to retrieve the\r |
84 | name of the bus controller. It will\r | |
85 | not be NULL for a bus driver that\r | |
86 | wishes to retrieve the name of a\r | |
87 | child controller.\r | |
88 | \r | |
89 | @param Language A pointer to a Null-terminated ASCII\r | |
90 | string array indicating the language.\r | |
91 | This is the language of the driver\r | |
92 | name that the caller is requesting,\r | |
93 | and it must match one of the\r | |
94 | languages specified in\r | |
95 | SupportedLanguages. The number of\r | |
96 | languages supported by a driver is up\r | |
97 | to the driver writer. Language is\r | |
7eb05636 | 98 | specified in RFC 4646 language code\r |
d1f95000 | 99 | format.\r |
100 | \r | |
fbf926ad | 101 | @param ControllerName A pointer to the string to return.\r |
102 | This string is the name of the controller\r | |
103 | specified by ControllerHandle and ChildHandle\r | |
104 | in the language specified by Language\r | |
d1f95000 | 105 | from the point of view of the driver\r |
106 | specified by This.\r | |
107 | \r | |
fbf926ad | 108 | @retval EFI_SUCCESS The string for the user\r |
d1f95000 | 109 | readable name in the language\r |
110 | specified by Language for the\r | |
111 | driver specified by This was\r | |
112 | returned in DriverName.\r | |
113 | \r | |
18bd7e85 | 114 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r |
d1f95000 | 115 | \r |
116 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it\r | |
117 | is not a valid EFI_HANDLE.\r | |
118 | \r | |
119 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
120 | \r | |
121 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
122 | \r | |
123 | @retval EFI_UNSUPPORTED The driver specified by This is\r | |
124 | not currently managing the\r | |
125 | controller specified by\r | |
126 | ControllerHandle and\r | |
127 | ChildHandle.\r | |
128 | \r | |
129 | @retval EFI_UNSUPPORTED The driver specified by This\r | |
130 | does not support the language\r | |
131 | specified by Language.\r | |
132 | \r | |
133 | **/\r | |
134 | typedef\r | |
135 | EFI_STATUS\r | |
8b13229b | 136 | (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(\r |
d1f95000 | 137 | IN EFI_COMPONENT_NAME2_PROTOCOL *This,\r |
138 | IN EFI_HANDLE ControllerHandle,\r | |
139 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
140 | IN CHAR8 *Language,\r | |
141 | OUT CHAR16 **ControllerName\r | |
142 | );\r | |
143 | \r | |
44717a39 | 144 | ///\r |
9095d37b | 145 | /// This protocol is used to retrieve user readable names of drivers\r |
44717a39 | 146 | /// and controllers managed by UEFI Drivers.\r |
147 | ///\r | |
d1f95000 | 148 | struct _EFI_COMPONENT_NAME2_PROTOCOL {\r |
2f88bd3a MK |
149 | EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;\r |
150 | EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;\r | |
8b6c989b | 151 | \r |
152 | ///\r | |
153 | /// A Null-terminated ASCII string array that contains one or more\r | |
154 | /// supported language codes. This is the list of language codes that\r | |
155 | /// this protocol supports. The number of languages supported by a\r | |
156 | /// driver is up to the driver writer. SupportedLanguages is\r | |
9095d37b | 157 | /// specified in RFC 4646 format.\r |
8b6c989b | 158 | ///\r |
2f88bd3a | 159 | CHAR8 *SupportedLanguages;\r |
d1f95000 | 160 | };\r |
161 | \r | |
2f88bd3a | 162 | extern EFI_GUID gEfiComponentName2ProtocolGuid;\r |
d1f95000 | 163 | \r |
164 | #endif\r |