2 UEFI Component Name protocol for DiskIo driver.
4 Copyright (c) 2006 - 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 // EFI Component Name Protocol
20 EFI_COMPONENT_NAME_PROTOCOL gDiskIoComponentName
= {
21 DiskIoComponentNameGetDriverName
,
22 DiskIoComponentNameGetControllerName
,
26 static EFI_UNICODE_STRING_TABLE mDiskIoDriverNameTable
[] = {
29 (CHAR16
*)L
"Generic Disk I/O Driver"
40 Retrieves a Unicode string that is the user readable name of
43 @param This A pointer to the
44 EFI_COMPONENT_NAME_PROTOCOL instance.
46 @param Language A pointer to a Null-terminated ASCII string
47 array indicating the language. This is the
48 language of the driver name that the caller
49 is requesting, and it must match one of the
50 languages specified in SupportedLanguages.
51 The number of languages supported by a
52 driver is up to the driver writer. Language
53 is specified in RFC 3066 language code
56 @param DriverName A pointer to the Unicode string to return.
57 This Unicode string is the name of the
58 driver specified by This in the language
59 specified by Language.
61 @retval EFI_SUCCESS The Unicode string for the
62 Driver specified by This and the
63 language specified by Language
64 was returned in DriverName.
66 @retval EFI_INVALID_PARAMETER Language is NULL.
68 @retval EFI_INVALID_PARAMETER DriverName is NULL.
70 @retval EFI_UNSUPPORTED The driver specified by This
71 does not support the language
72 specified by Language.
77 DiskIoComponentNameGetDriverName (
78 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
80 OUT CHAR16
**DriverName
83 return LookupUnicodeString (
85 gDiskIoComponentName
.SupportedLanguages
,
86 mDiskIoDriverNameTable
,
94 Retrieves a Unicode string that is the user readable name of
95 the controller that is being managed by an EFI Driver.
97 @param This A pointer to the
98 EFI_COMPONENT_NAME_PROTOCOL instance.
100 @param ControllerHandle The handle of a controller that the
101 driver specified by This is managing.
102 This handle specifies the controller
103 whose name is to be returned.
105 @param ChildHandle The handle of the child controller to
106 retrieve the name of. This is an
107 optional parameter that may be NULL.
108 It will be NULL for device drivers.
109 It will also be NULL for a bus
110 drivers that wish to retrieve the
111 name of the bus controller. It will
112 not be NULL for a bus driver that
113 wishes to retrieve the name of a
116 @param Language A pointer to a Null-terminated ASCII
117 string array indicating the language.
118 This is the language of the driver
119 name that the caller is requesting,
120 and it must match one of the
121 languages specified in
122 SupportedLanguages. The number of
123 languages supported by a driver is up
124 to the driver writer. Language is
125 specified in RFC 3066 language code
128 @param ControllerName A pointer to the Unicode string to
129 return. This Unicode string is the
130 name of the controller specified by
131 ControllerHandle and ChildHandle in
132 the language specified by Language
133 from the point of view of the driver
136 @retval EFI_SUCCESS The Unicode string for the user
137 readable name in the language
138 specified by Language for the
139 driver specified by This was
140 returned in DriverName.
142 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid
145 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it
146 is not a valid EFI_HANDLE.
148 @retval EFI_INVALID_PARAMETER Language is NULL.
150 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
152 @retval EFI_UNSUPPORTED The driver specified by This is
153 not currently managing the
154 controller specified by
158 @retval EFI_UNSUPPORTED The driver specified by This
159 does not support the language
160 specified by Language.
165 DiskIoComponentNameGetControllerName (
166 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
167 IN EFI_HANDLE ControllerHandle
,
168 IN EFI_HANDLE ChildHandle OPTIONAL
,
170 OUT CHAR16
**ControllerName
173 return EFI_UNSUPPORTED
;