2 The header file of UEFI Component Name(2) protocol.
4 Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions
7 of the BSD License which accompanies this distribution. The full
8 text of the license may be found at<BR>
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _COMPONENT_NAME_H_
17 #define _COMPONENT_NAME_H_
19 #include <Protocol/ComponentName.h>
20 #include <Protocol/ComponentName2.h>
22 extern EFI_COMPONENT_NAME2_PROTOCOL gMnpComponentName2
;
23 extern EFI_COMPONENT_NAME_PROTOCOL gMnpComponentName
;
26 Retrieves a Unicode string that is the user readable name of the driver.
28 This function retrieves the user readable name of a driver in the form of a
29 Unicode string. If the driver specified by This has a user readable name in
30 the language specified by Language, then a pointer to the driver name is
31 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
32 by This does not support the language specified by Language,
33 then EFI_UNSUPPORTED is returned.
35 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
36 EFI_COMPONENT_NAME_PROTOCOL instance.
38 @param[in] Language A pointer to a Null-terminated ASCII string
39 array indicating the language. This is the
40 language of the driver name that the caller is
41 requesting, and it must match one of the
42 languages specified in SupportedLanguages. The
43 number of languages supported by a driver is up
44 to the driver writer. Language is specified
45 in RFC 4646 or ISO 639-2 language code format.
47 @param[out] DriverName A pointer to the Unicode string to return.
48 This Unicode string is the name of the
49 driver specified by This in the language
50 specified by Language.
52 @retval EFI_SUCCESS The Unicode string for the Driver specified by
53 This and the language specified by Language was
54 returned in DriverName.
56 @retval EFI_INVALID_PARAMETER Language is NULL.
58 @retval EFI_INVALID_PARAMETER DriverName is NULL.
60 @retval EFI_UNSUPPORTED The driver specified by This does not support
61 the language specified by Language.
66 MnpComponentNameGetDriverName (
67 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
69 OUT CHAR16
**DriverName
73 Retrieves a Unicode string that is the user readable name of the controller
74 that is being managed by a driver.
76 This function retrieves the user readable name of the controller specified by
77 ControllerHandle and ChildHandle in the form of a Unicode string. If the
78 driver specified by This has a user readable name in the language specified by
79 Language, then a pointer to the controller name is returned in ControllerName,
80 and EFI_SUCCESS is returned. If the driver specified by This is not currently
81 managing the controller specified by ControllerHandle and ChildHandle,
82 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
83 support the language specified by Language, then EFI_UNSUPPORTED is returned.
84 Currently not implemented.
86 @param[in] This A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
87 EFI_COMPONENT_NAME_PROTOCOL instance.
89 @param[in] ControllerHandle The handle of a controller that the driver
90 specified by This is managing. This handle
91 specifies the controller whose name is to be
94 @param[in] ChildHandle The handle of the child controller to retrieve
95 the name of. This is an optional parameter that
96 may be NULL. It will be NULL for device
97 drivers. It will also be NULL for a bus drivers
98 that wish to retrieve the name of the bus
99 controller. It will not be NULL for a bus
100 driver that wishes to retrieve the name of a
103 @param[in] Language A pointer to a Null-terminated ASCII string
104 array indicating the language. This is the
105 language of the driver name that the caller is
106 requesting, and it must match one of the
107 languages specified in SupportedLanguages. The
108 number of languages supported by a driver is up
109 to the driver writer. Language is specified in
110 RFC 4646 or ISO 639-2 language code format.
112 @param[out] ControllerName A pointer to the Unicode string to return.
113 This Unicode string is the name of the
114 controller specified by ControllerHandle and
115 ChildHandle in the language specified by
116 Language from the point of view of the driver
119 @retval EFI_SUCCESS The Unicode string for the user readable name
120 specified by This, ControllerHandle, ChildHandle,
121 and Language was returned in ControllerName.
123 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
125 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
128 @retval EFI_INVALID_PARAMETER Language is NULL.
130 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
132 @retval EFI_UNSUPPORTED The driver specified by This is not currently
133 managing the controller specified by
134 ControllerHandle and ChildHandle.
136 @retval EFI_UNSUPPORTED The driver specified by This does not support
137 the language specified by Language.
142 MnpComponentNameGetControllerName (
143 IN EFI_COMPONENT_NAME_PROTOCOL
*This
,
144 IN EFI_HANDLE ControllerHandle
,
145 IN EFI_HANDLE ChildHandle OPTIONAL
,
147 OUT CHAR16
**ControllerName