3 Copyright (c) 2004 - 2010, 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.
18 EFI Component Name Protocol
24 #ifndef _EFI_COMPONENT_NAME2_H_
25 #define _EFI_COMPONENT_NAME2_H_
28 // Global ID for the Component Name Protocol
31 #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
33 0x6a7a5cff, 0xe8d9, 0x4f70, {0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14} \
36 EFI_FORWARD_DECLARATION (EFI_COMPONENT_NAME2_PROTOCOL
);
41 (EFIAPI
*EFI_COMPONENT_NAME2_GET_DRIVER_NAME
) (
42 IN EFI_COMPONENT_NAME2_PROTOCOL
* This
,
44 OUT CHAR16
**DriverName
50 Retrieves a Unicode string that is the user readable name of the EFI Driver.
53 This - A pointer to the EFI_COMPONENT_NAME2_PROTOCOL instance.
54 Language - A pointer to a Null-terminated ASCII string array indicating the
55 language. This is the language of the driver name that the caller
56 is requesting, and it must match one of the languages specified in
57 SupportedLanguages. The number of languages supported by a
58 driver is up to the driver writer. Language is specified in RFC
59 4646 language code format.
60 DriverName - A pointer to the Unicode string to return. This Unicode string
61 is the name of the driver specified by This in the language
62 specified by Language.
65 EFI_SUCCESS - The Unicode string for the Driver specified by This
66 and the language specified by Language was returned
68 EFI_INVALID_PARAMETER - Language is NULL or DriverName is NULL.
69 EFI_UNSUPPORTED - The driver specified by This does not support the
70 language specified by Language.
75 (EFIAPI
*EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME
) (
76 IN EFI_COMPONENT_NAME2_PROTOCOL
* This
,
77 IN EFI_HANDLE ControllerHandle
,
78 IN EFI_HANDLE ChildHandle OPTIONAL
,
80 OUT CHAR16
**ControllerName
86 Retrieves a Unicode string that is the user readable name of the controller
87 that is being managed by an EFI Driver.
90 This - A pointer to the EFI_COMPONENT_NAME2_PROTOCOL instance.
91 ControllerHandle - The handle of a controller that the driver specified by
92 This is managing. This handle specifies the controller
93 whose name is to be returned.
94 ChildHandle - The handle of the child controller to retrieve the name
95 of. This is an optional parameter that may be NULL. It
96 will be NULL for device drivers. It will also be NULL
97 for a bus drivers that wish to retrieve the name of the
98 bus controller. It will not be NULL for a bus driver
99 that wishes to retrieve the name of a child controller.
100 Language - A pointer to a Null-terminated ASCII string array indicating the
101 language. This is the language of the driver name that the caller
102 is requesting, and it must match one of the languages specified in
103 SupportedLanguages. The number of languages supported by a
104 driver is up to the driver writer. Language is specified in RFC
105 4646 language code format.
106 ControllerName - A pointer to the Unicode string to return. This Unicode
107 string is the name of the controller specified by
108 ControllerHandle and ChildHandle in the language specified
109 by Language from the point of view of the driver specified
113 EFI_SUCCESS - The Unicode string for the user readable name in the
114 language specified by Language for the driver
115 specified by This was returned in DriverName.
116 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE; ChildHandle
117 is not NULL and it is not a valid EFI_HANDLE;Language
118 is NULL;ControllerName is NULL.
119 EFI_UNSUPPORTED - The driver specified by This is not currently managing
120 the controller specified by ControllerHandle and
121 ChildHandle;The driver specified by This does not support the
122 language specified by Language.
127 // Interface structure for the Component Name Protocol
129 struct _EFI_COMPONENT_NAME2_PROTOCOL
{
130 EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName
;
131 EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName
;
132 CHAR8
*SupportedLanguages
;
135 extern EFI_GUID gEfiComponentName2ProtocolGuid
;