3 Copyright (c) 2005 - 2007, Intel Corporation<BR>
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php<BR>
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 Retrieves a Unicode string that is the user readable name of the driver.
19 This function retrieves the user readable name of a driver in the form of a
20 Unicode string. If the driver specified by This has a user readable name in
21 the language specified by Language, then a pointer to the driver name is
22 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
23 by This does not support the language specified by Language,
24 then EFI_UNSUPPORTED is returned.
26 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
27 EFI_COMPONENT_NAME_PROTOCOL instance.
29 @param[in] Language A pointer to a Null-terminated ASCII string
30 array indicating the language. This is the
31 language of the driver name that the caller is
32 requesting, and it must match one of the
33 languages specified in SupportedLanguages. The
34 number of languages supported by a driver is up
35 to the driver writer. Language is specified
36 in RFC 3066 or ISO 639-2 language code format.
38 @param[out] DriverName A pointer to the Unicode string to return.
39 This Unicode string is the name of the
40 driver specified by This in the language
41 specified by Language.
43 @retval EFI_SUCCESS The Unicode string for the Driver specified by
44 This and the language specified by Language was
45 returned in DriverName.
47 @retval EFI_INVALID_PARAMETER Language is NULL.
49 @retval EFI_INVALID_PARAMETER DriverName is NULL.
51 @retval EFI_UNSUPPORTED The driver specified by This does not support
52 the language specified by Language.
57 TcpComponentNameGetDriverName (
58 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
60 OUT CHAR16
**DriverName
65 Retrieves a Unicode string that is the user readable name of the controller
66 that is being managed by a driver.
68 This function retrieves the user readable name of the controller specified by
69 ControllerHandle and ChildHandle in the form of a Unicode string. If the
70 driver specified by This has a user readable name in the language specified by
71 Language, then a pointer to the controller name is returned in ControllerName,
72 and EFI_SUCCESS is returned. If the driver specified by This is not currently
73 managing the controller specified by ControllerHandle and ChildHandle,
74 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
75 support the language specified by Language, then EFI_UNSUPPORTED is returned.
77 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
78 EFI_COMPONENT_NAME_PROTOCOL instance.
80 @param[in] ControllerHandle The handle of a controller that the driver
81 specified by This is managing. This handle
82 specifies the controller whose name is to be
85 @param[in] ChildHandle The handle of the child controller to retrieve
86 the name of. This is an optional parameter that
87 may be NULL. It will be NULL for device
88 drivers. It will also be NULL for a bus drivers
89 that wish to retrieve the name of the bus
90 controller. It will not be NULL for a bus
91 driver that wishes to retrieve the name of a
94 @param[in] Language A pointer to a Null-terminated ASCII string
95 array indicating the language. This is the
96 language of the driver name that the caller is
97 requesting, and it must match one of the
98 languages specified in SupportedLanguages. The
99 number of languages supported by a driver is up
100 to the driver writer. Language is specified in
101 RFC 3066 or ISO 639-2 language code format.
103 @param[out] ControllerName A pointer to the Unicode string to return.
104 This Unicode string is the name of the
105 controller specified by ControllerHandle and
106 ChildHandle in the language specified by
107 Language from the point of view of the driver
110 @retval EFI_SUCCESS The Unicode string for the user readable name in
111 the language specified by Language for the
112 driver specified by This was returned in
115 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
117 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
120 @retval EFI_INVALID_PARAMETER Language is NULL.
122 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
124 @retval EFI_UNSUPPORTED The driver specified by This is not currently
125 managing the controller specified by
126 ControllerHandle and ChildHandle.
128 @retval EFI_UNSUPPORTED The driver specified by This does not support
129 the language specified by Language.
134 TcpComponentNameGetControllerName (
135 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
136 IN EFI_HANDLE ControllerHandle
,
137 IN EFI_HANDLE ChildHandle OPTIONAL
,
139 OUT CHAR16
**ControllerName
144 /// EFI Component Name Protocol
146 GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gTcp4ComponentName
= {
147 TcpComponentNameGetDriverName
,
148 TcpComponentNameGetControllerName
,
153 /// EFI Component Name 2 Protocol
155 GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gTcp4ComponentName2
= {
156 (EFI_COMPONENT_NAME2_GET_DRIVER_NAME
) TcpComponentNameGetDriverName
,
157 (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME
) TcpComponentNameGetControllerName
,
162 GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mTcpDriverNameTable
[] = {
165 L
"Tcp Network Service Driver"
174 Retrieves a Unicode string that is the user readable name of the driver.
176 This function retrieves the user readable name of a driver in the form of a
177 Unicode string. If the driver specified by This has a user readable name in
178 the language specified by Language, then a pointer to the driver name is
179 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
180 by This does not support the language specified by Language,
181 then EFI_UNSUPPORTED is returned.
183 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
184 EFI_COMPONENT_NAME_PROTOCOL instance.
186 @param[in] Language A pointer to a Null-terminated ASCII string
187 array indicating the language. This is the
188 language of the driver name that the caller is
189 requesting, and it must match one of the
190 languages specified in SupportedLanguages. The
191 number of languages supported by a driver is up
192 to the driver writer. Language is specified
193 in RFC 3066 or ISO 639-2 language code format.
195 @param[out] DriverName A pointer to the Unicode string to return.
196 This Unicode string is the name of the
197 driver specified by This in the language
198 specified by Language.
200 @retval EFI_SUCCESS The Unicode string for the Driver specified by
201 This and the language specified by Language was
202 returned in DriverName.
204 @retval EFI_INVALID_PARAMETER Language is NULL.
206 @retval EFI_INVALID_PARAMETER DriverName is NULL.
208 @retval EFI_UNSUPPORTED The driver specified by This does not support
209 the language specified by Language.
214 TcpComponentNameGetDriverName (
215 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
217 OUT CHAR16
**DriverName
220 return LookupUnicodeString2 (
222 This
->SupportedLanguages
,
225 (BOOLEAN
)(This
== &gTcp4ComponentName
)
230 Retrieves a Unicode string that is the user readable name of the controller
231 that is being managed by a driver.
233 This function retrieves the user readable name of the controller specified by
234 ControllerHandle and ChildHandle in the form of a Unicode string. If the
235 driver specified by This has a user readable name in the language specified by
236 Language, then a pointer to the controller name is returned in ControllerName,
237 and EFI_SUCCESS is returned. If the driver specified by This is not currently
238 managing the controller specified by ControllerHandle and ChildHandle,
239 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
240 support the language specified by Language, then EFI_UNSUPPORTED is returned.
242 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
243 EFI_COMPONENT_NAME_PROTOCOL instance.
245 @param[in] ControllerHandle The handle of a controller that the driver
246 specified by This is managing. This handle
247 specifies the controller whose name is to be
250 @param[in] ChildHandle The handle of the child controller to retrieve
251 the name of. This is an optional parameter that
252 may be NULL. It will be NULL for device
253 drivers. It will also be NULL for a bus drivers
254 that wish to retrieve the name of the bus
255 controller. It will not be NULL for a bus
256 driver that wishes to retrieve the name of a
259 @param[in] Language A pointer to a Null-terminated ASCII string
260 array indicating the language. This is the
261 language of the driver name that the caller is
262 requesting, and it must match one of the
263 languages specified in SupportedLanguages. The
264 number of languages supported by a driver is up
265 to the driver writer. Language is specified in
266 RFC 3066 or ISO 639-2 language code format.
268 @param[out] ControllerName A pointer to the Unicode string to return.
269 This Unicode string is the name of the
270 controller specified by ControllerHandle and
271 ChildHandle in the language specified by
272 Language from the point of view of the driver
275 @retval EFI_SUCCESS The Unicode string for the user readable name in
276 the language specified by Language for the
277 driver specified by This was returned in
280 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
282 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
285 @retval EFI_INVALID_PARAMETER Language is NULL.
287 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
289 @retval EFI_UNSUPPORTED The driver specified by This is not currently
290 managing the controller specified by
291 ControllerHandle and ChildHandle.
293 @retval EFI_UNSUPPORTED The driver specified by This does not support
294 the language specified by Language.
299 TcpComponentNameGetControllerName (
300 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
301 IN EFI_HANDLE ControllerHandle
,
302 IN EFI_HANDLE ChildHandle OPTIONAL
,
304 OUT CHAR16
**ControllerName
307 return EFI_UNSUPPORTED
;