2 Implementation of EFI_COMPONENT_NAME_PROTOCOL and
3 EFI_COMPONENT_NAME2_PROTOCOL protocol.
5 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php.
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 // EFI Component Name Functions
24 Retrieves a Unicode string that is the user-readable name of the driver.
26 This function retrieves the user-readable name of a driver in the form of a
27 Unicode string. If the driver specified by This has a user-readable name in
28 the language specified by Language, then a pointer to the driver name is
29 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
30 by This does not support the language specified by Language,
31 then EFI_UNSUPPORTED is returned.
33 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
34 EFI_COMPONENT_NAME_PROTOCOL instance.
36 @param[in] Language A pointer to a Null-terminated ASCII string
37 array indicating the language. This is the
38 language of the driver name that the caller is
39 requesting, and it must match one of the
40 languages specified in SupportedLanguages. The
41 number of languages supported by a driver is up
42 to the driver writer. Language is specified
43 in RFC 4646 or ISO 639-2 language code format.
45 @param[out] DriverName A pointer to the Unicode string to return.
46 This Unicode string is the name of the
47 driver specified by This in the language
48 specified by Language.
50 @retval EFI_SUCCESS The Unicode string for the Driver specified by
51 This and the language specified by Language was
52 returned in DriverName.
54 @retval EFI_INVALID_PARAMETER Language is NULL.
56 @retval EFI_INVALID_PARAMETER DriverName is NULL.
58 @retval EFI_UNSUPPORTED The driver specified by This does not support
59 the language specified by Language.
64 Ip6ComponentNameGetDriverName (
65 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
67 OUT CHAR16
**DriverName
71 Retrieves a Unicode string that is the user-readable name of the controller
72 that is managed by a driver.
74 This function retrieves the user-readable name of the controller specified by
75 ControllerHandle and ChildHandle in the form of a Unicode string. If the
76 driver specified by This has a user-readable name in the language specified by
77 Language, then a pointer to the controller name is returned in ControllerName,
78 and EFI_SUCCESS is returned. If the driver specified by This is not currently
79 managing the controller specified by ControllerHandle and ChildHandle,
80 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
81 support the language specified by Language, then EFI_UNSUPPORTED is returned.
83 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
84 EFI_COMPONENT_NAME_PROTOCOL instance.
86 @param[in] ControllerHandle The handle of a controller that the driver
87 specified by This is managing. This handle
88 specifies the controller whose name is to be
91 @param[in] ChildHandle The handle of the child controller to retrieve
92 the name of. This is an optional parameter that
93 may be NULL. It will be NULL for device
94 drivers. It will also be NULL for a bus drivers
95 that wish to retrieve the name of the bus
96 controller. It will not be NULL for a bus
97 driver that wishes to retrieve the name of a
100 @param[in] Language A pointer to a Null-terminated ASCII string
101 array indicating the language. This is the
102 language of the driver name that the caller is
103 requesting, and it must match one of the
104 languages specified in SupportedLanguages. The
105 number of languages supported by a driver is up
106 to the driver writer. Language is specified in
107 RFC 4646 or ISO 639-2 language code format.
109 @param[out] ControllerName A pointer to the Unicode string to return.
110 This Unicode string is the name of the
111 controller specified by ControllerHandle and
112 ChildHandle in the language specified by
113 Language from the point of view of the driver
116 @retval EFI_SUCCESS The Unicode string for the user-readable name in
117 the language specified by Language for the
118 driver specified by This was returned in
121 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
123 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL, and it is not a valid
126 @retval EFI_INVALID_PARAMETER Language is NULL.
128 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
130 @retval EFI_UNSUPPORTED The driver specified by This is not currently
131 managing the controller specified by
132 ControllerHandle and ChildHandle.
134 @retval EFI_UNSUPPORTED The driver specified by This does not support
135 the language specified by Language.
140 Ip6ComponentNameGetControllerName (
141 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
142 IN EFI_HANDLE ControllerHandle
,
143 IN EFI_HANDLE ChildHandle OPTIONAL
,
145 OUT CHAR16
**ControllerName
149 // EFI Component Name Protocol.
151 GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gIp6ComponentName
= {
152 Ip6ComponentNameGetDriverName
,
153 Ip6ComponentNameGetControllerName
,
158 // EFI Component Name 2 Protocol.
160 GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gIp6ComponentName2
= {
161 (EFI_COMPONENT_NAME2_GET_DRIVER_NAME
) Ip6ComponentNameGetDriverName
,
162 (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME
) Ip6ComponentNameGetControllerName
,
166 GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIp6DriverNameTable
[] = {
169 L
"IP6 Network Service Driver"
178 Retrieves a Unicode string that is the user-readable name of the driver.
180 This function retrieves the user-readable name of a driver in the form of a
181 Unicode string. If the driver specified by This has a user-readable name in
182 the language specified by Language, then a pointer to the driver name is
183 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
184 by This does not support the language specified by Language,
185 then EFI_UNSUPPORTED is returned.
187 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
188 EFI_COMPONENT_NAME_PROTOCOL instance.
190 @param[in] Language A pointer to a Null-terminated ASCII string
191 array indicating the language. This is the
192 language of the driver name that the caller is
193 requesting, and it must match one of the
194 languages specified in SupportedLanguages. The
195 number of languages supported by a driver is up
196 to the driver writer. Language is specified
197 in RFC 4646 or ISO 639-2 language code format.
199 @param[out] DriverName A pointer to the Unicode string to return.
200 This Unicode string is the name of the
201 driver specified by This in the language
202 specified by Language.
204 @retval EFI_SUCCESS The Unicode string for the Driver specified by
205 This and the language specified by Language was
206 returned in DriverName.
208 @retval EFI_INVALID_PARAMETER Language is NULL.
210 @retval EFI_INVALID_PARAMETER DriverName is NULL.
212 @retval EFI_UNSUPPORTED The driver specified by This does not support
213 the language specified by Language.
218 Ip6ComponentNameGetDriverName (
219 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
221 OUT CHAR16
**DriverName
224 return LookupUnicodeString2 (
226 This
->SupportedLanguages
,
229 (BOOLEAN
) (This
== &gIp6ComponentName
)
235 Retrieves a Unicode string that is the user-readable name of the controller
236 that is being managed by a driver.
238 This function retrieves the user-readable name of the controller specified by
239 ControllerHandle and ChildHandle in the form of a Unicode string. If the
240 driver specified by This has a user-readable name in the language specified by
241 Language, then a pointer to the controller name is returned in ControllerName,
242 and EFI_SUCCESS is returned. If the driver specified by This is not currently
243 managing the controller specified by ControllerHandle and ChildHandle,
244 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
245 support the language specified by Language, then EFI_UNSUPPORTED is returned.
247 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
248 EFI_COMPONENT_NAME_PROTOCOL instance.
250 @param[in] ControllerHandle The handle of a controller that the driver
251 specified by This is managing. This handle
252 specifies the controller whose name is to be
255 @param[in] ChildHandle The handle of the child controller to retrieve
256 the name of. This is an optional parameter that
257 may be NULL. It will be NULL for device
258 drivers. It will also be NULL for a bus drivers
259 that wish to retrieve the name of the bus
260 controller. It will not be NULL for a bus
261 driver that wishes to retrieve the name of a
264 @param[in] Language A pointer to a Null-terminated ASCII string
265 array indicating the language. This is the
266 language of the driver name that the caller is
267 requesting, and it must match one of the
268 languages specified in SupportedLanguages. The
269 number of languages supported by a driver is up
270 to the driver writer. Language is specified in
271 RFC 4646 or ISO 639-2 language code format.
273 @param[out] ControllerName A pointer to the Unicode string to return.
274 This Unicode string is the name of the
275 controller specified by ControllerHandle and
276 ChildHandle in the language specified by
277 Language from the point of view of the driver
280 @retval EFI_SUCCESS The Unicode string for the user-readable name in
281 the language specified by Language for the
282 driver specified by This was returned in
285 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
287 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL, and it is not a valid
290 @retval EFI_INVALID_PARAMETER Language is NULL.
292 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
294 @retval EFI_UNSUPPORTED The driver specified by This is not currently
295 managing the controller specified by
296 ControllerHandle and ChildHandle.
298 @retval EFI_UNSUPPORTED The driver specified by This does not support
299 the language specified by Language.
304 Ip6ComponentNameGetControllerName (
305 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
306 IN EFI_HANDLE ControllerHandle
,
307 IN EFI_HANDLE ChildHandle OPTIONAL
,
309 OUT CHAR16
**ControllerName
312 return EFI_UNSUPPORTED
;