3 Copyright (c) 2005 - 2007, Intel Corporation
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
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.
25 // EFI Component Name Functions
29 Ip4ComponentNameGetDriverName (
30 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
32 OUT CHAR16
**DriverName
37 Ip4ComponentNameGetControllerName (
38 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
39 IN EFI_HANDLE ControllerHandle
,
40 IN EFI_HANDLE ChildHandle OPTIONAL
,
42 OUT CHAR16
**ControllerName
46 // EFI Component Name Protocol
48 EFI_COMPONENT_NAME_PROTOCOL gIp4ComponentName
= {
49 Ip4ComponentNameGetDriverName
,
50 Ip4ComponentNameGetControllerName
,
54 static EFI_UNICODE_STRING_TABLE mIp4DriverNameTable
[] = {
57 L
"IP4 Network Service Driver"
67 Ip4ComponentNameGetDriverName (
68 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
70 OUT CHAR16
**DriverName
75 Retrieves a Unicode string that is the user readable
76 name of the EFI Driver.
79 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
80 Language - A pointer to a three character ISO 639-2 language
81 identifier. This is the language of the driver name
82 that that the caller is requesting, and it must match
83 one of the languages specified in SupportedLanguages.
84 The number of languages supported by a driver is up to
86 DriverName - A pointer to the Unicode string to return. This Unicode
87 string is the name of the driver specified by This in the
88 language specified by Language.
91 EFI_SUCCES - The Unicode string for the Driver specified by This
92 and the language specified by Language was returned
94 EFI_INVALID_PARAMETER - Language is NULL.
95 EFI_INVALID_PARAMETER - DriverName is NULL.
96 EFI_UNSUPPORTED - The driver specified by This does not support the
97 language specified by Language.
101 return LookupUnicodeString (
103 gIp4ComponentName
.SupportedLanguages
,
112 Ip4ComponentNameGetControllerName (
113 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
114 IN EFI_HANDLE ControllerHandle
,
115 IN EFI_HANDLE ChildHandle OPTIONAL
,
117 OUT CHAR16
**ControllerName
122 Retrieves a Unicode string that is the user readable name of
123 the controller that is being managed by an EFI Driver.
126 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
127 ControllerHandle - The handle of a controller that the driver specified by
128 This is managing. This handle specifies the controller
129 whose name is to be returned.
130 ChildHandle - The handle of the child controller to retrieve the name
131 of. This is an optional parameter that may be NULL. It
132 will be NULL for device drivers. It will also be NULL
133 for a bus drivers that wish to retrieve the name of the
134 bus controller. It will not be NULL for a bus driver
135 that wishes to retrieve the name of a child controller.
136 Language - A pointer to a three character ISO 639-2 language
137 identifier. This is the language of the controller name
138 that that the caller is requesting, and it must match one
139 of the languages specified in SupportedLanguages. The
140 number of languages supported by a driver is up to the
142 ControllerName - A pointer to the Unicode string to return. This Unicode
143 string is the name of the controller specified by
144 ControllerHandle and ChildHandle in the language
145 specified by Language from the point of view of the
146 driver specified by This.
149 EFI_SUCCESS - The Unicode string for the user readable name in the
150 language specified by Language for the driver
151 specified by This was returned in DriverName.
152 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
153 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not
155 EFI_INVALID_PARAMETER - Language is NULL.
156 EFI_INVALID_PARAMETER - ControllerName is NULL.
157 EFI_UNSUPPORTED - The driver specified by This is not currently
158 managing the controller specified by
159 ControllerHandle and ChildHandle.
160 EFI_UNSUPPORTED - The driver specified by This does not support the
161 language specified by Language.
165 return EFI_UNSUPPORTED
;