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.
16 // Include common header file for this module.
18 #include "CommonHeader.h"
23 // EFI Component Name Protocol
25 EFI_COMPONENT_NAME_PROTOCOL gDiskIoComponentName
= {
26 DiskIoComponentNameGetDriverName
,
27 DiskIoComponentNameGetControllerName
,
31 static EFI_UNICODE_STRING_TABLE mDiskIoDriverNameTable
[] = {
34 (CHAR16
*)L
"Generic Disk I/O Driver"
45 Retrieves a Unicode string that is the user readable name of
48 @param This A pointer to the
49 EFI_COMPONENT_NAME_PROTOCOL instance.
51 @param Language A pointer to a Null-terminated ASCII string
52 array indicating the language. This is the
53 language of the driver name that the caller
54 is requesting, and it must match one of the
55 languages specified in SupportedLanguages.
56 The number of languages supported by a
57 driver is up to the driver writer. Language
58 is specified in RFC 3066 language code
61 @param DriverName A pointer to the Unicode string to return.
62 This Unicode string is the name of the
63 driver specified by This in the language
64 specified by Language.
66 @retval EFI_SUCCESS The Unicode string for the
67 Driver specified by This and the
68 language specified by Language
69 was returned in DriverName.
71 @retval EFI_INVALID_PARAMETER Language is NULL.
73 @retval EFI_INVALID_PARAMETER DriverName is NULL.
75 @retval EFI_UNSUPPORTED The driver specified by This
76 does not support the language
77 specified by Language.
82 DiskIoComponentNameGetDriverName (
83 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
85 OUT CHAR16
**DriverName
88 return LookupUnicodeString (
90 gDiskIoComponentName
.SupportedLanguages
,
91 mDiskIoDriverNameTable
,
99 Retrieves a Unicode string that is the user readable name of
100 the controller that is being managed by an EFI Driver.
102 @param This A pointer to the
103 EFI_COMPONENT_NAME_PROTOCOL instance.
105 @param ControllerHandle The handle of a controller that the
106 driver specified by This is managing.
107 This handle specifies the controller
108 whose name is to be returned.
110 @param ChildHandle The handle of the child controller to
111 retrieve the name of. This is an
112 optional parameter that may be NULL.
113 It will be NULL for device drivers.
114 It will also be NULL for a bus
115 drivers that wish to retrieve the
116 name of the bus controller. It will
117 not be NULL for a bus driver that
118 wishes to retrieve the name of a
121 @param Language A pointer to a Null-terminated ASCII
122 string array indicating the language.
123 This is the language of the driver
124 name that the caller is requesting,
125 and it must match one of the
126 languages specified in
127 SupportedLanguages. The number of
128 languages supported by a driver is up
129 to the driver writer. Language is
130 specified in RFC 3066 language code
133 @param ControllerName A pointer to the Unicode string to
134 return. This Unicode string is the
135 name of the controller specified by
136 ControllerHandle and ChildHandle in
137 the language specified by Language
138 from the point of view of the driver
141 @retval EFI_SUCCESS The Unicode string for the user
142 readable name in the language
143 specified by Language for the
144 driver specified by This was
145 returned in DriverName.
147 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid
150 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it
151 is not a valid EFI_HANDLE.
153 @retval EFI_INVALID_PARAMETER Language is NULL.
155 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
157 @retval EFI_UNSUPPORTED The driver specified by This is
158 not currently managing the
159 controller specified by
163 @retval EFI_UNSUPPORTED The driver specified by This
164 does not support the language
165 specified by Language.
170 DiskIoComponentNameGetControllerName (
171 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
172 IN EFI_HANDLE ControllerHandle
,
173 IN EFI_HANDLE ChildHandle OPTIONAL
,
175 OUT CHAR16
**ControllerName
178 return EFI_UNSUPPORTED
;