3 Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
4 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.
20 #include "BiosVideo.h"
24 BiosVideoComponentNameGetDriverName (
25 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
27 OUT CHAR16
**DriverName
32 BiosVideoComponentNameGetControllerName (
33 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
34 IN EFI_HANDLE ControllerHandle
,
35 IN EFI_HANDLE ChildHandle OPTIONAL
,
37 OUT CHAR16
**ControllerName
41 // EFI Component Name Protocol
44 GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gBiosVideoComponentName
= {
45 BiosVideoComponentNameGetDriverName
,
46 BiosVideoComponentNameGetControllerName
,
50 GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gBiosVideoComponentName2
= {
51 (EFI_COMPONENT_NAME2_GET_DRIVER_NAME
) BiosVideoComponentNameGetDriverName
,
52 (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME
) BiosVideoComponentNameGetControllerName
,
57 static EFI_UNICODE_STRING_TABLE mBiosVideoDriverNameTable
[] = {
60 L
"BIOS[INT10] Video Driver"
70 BiosVideoComponentNameGetDriverName (
71 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
73 OUT CHAR16
**DriverName
78 Retrieves a Unicode string that is the user readable name of the EFI Driver.
81 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
82 Language - A pointer to a three character ISO 639-2 language identifier.
83 This is the language of the driver name that that the caller
84 is requesting, and it must match one of the languages specified
85 in SupportedLanguages. The number of languages supported by a
86 driver is up to the driver writer.
87 DriverName - A pointer to the Unicode string to return. This Unicode string
88 is the name of the driver specified by This in the language
89 specified by Language.
92 EFI_SUCCESS - The Unicode string for the Driver specified by This
93 and the language specified by Language was returned
95 EFI_INVALID_PARAMETER - Language is NULL.
96 EFI_INVALID_PARAMETER - DriverName is NULL.
97 EFI_UNSUPPORTED - The driver specified by This does not support the
98 language specified by Language.
102 return LookupUnicodeString2 (
104 This
->SupportedLanguages
,
105 mBiosVideoDriverNameTable
,
107 (BOOLEAN
)(This
== &gBiosVideoComponentName
)
113 BiosVideoComponentNameGetControllerName (
114 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
115 IN EFI_HANDLE ControllerHandle
,
116 IN EFI_HANDLE ChildHandle OPTIONAL
,
118 OUT CHAR16
**ControllerName
123 Retrieves a Unicode string that is the user readable name of the controller
124 that is being managed by an EFI Driver.
127 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
128 ControllerHandle - The handle of a controller that the driver specified by
129 This is managing. This handle specifies the controller
130 whose name is to be returned.
131 ChildHandle - The handle of the child controller to retrieve the name
132 of. This is an optional parameter that may be NULL. It
133 will be NULL for device drivers. It will also be NULL
134 for a bus drivers that wish to retrieve the name of the
135 bus controller. It will not be NULL for a bus driver
136 that wishes to retrieve the name of a child controller.
137 Language - A pointer to a three character ISO 639-2 language
138 identifier. This is the language of the controller name
139 that that the caller is requesting, and it must match one
140 of the languages specified in SupportedLanguages. The
141 number of languages supported by a driver is up to the
143 ControllerName - A pointer to the Unicode string to return. This Unicode
144 string is the name of the controller specified by
145 ControllerHandle and ChildHandle in the language specified
146 by Language from the point of view of the driver specified
150 EFI_SUCCESS - The Unicode string for the user readable name in the
151 language specified by Language for the driver
152 specified by This was returned in DriverName.
153 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
154 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
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 managing
158 the controller specified by ControllerHandle and
160 EFI_UNSUPPORTED - The driver specified by This does not support the
161 language specified by Language.
165 return EFI_UNSUPPORTED
;