]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/ComponentName2.h
MdePkg: Add definition for new warning code EFI_WARN_FILE_SYSTEM.
[mirror_edk2.git] / MdePkg / Include / Protocol / ComponentName2.h
1 /** @file
2 UEFI Component Name 2 Protocol as defined in the UEFI 2.1 specification.
3 This protocol is used to retrieve user readable names of drivers
4 and controllers managed by UEFI Drivers.
5
6 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16
17 #ifndef __EFI_COMPONENT_NAME2_H__
18 #define __EFI_COMPONENT_NAME2_H__
19
20 ///
21 /// Global ID for the Component Name Protocol
22 ///
23 #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
24 {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } }
25
26 typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL;
27
28
29 /**
30 Retrieves a string that is the user readable name of
31 the EFI Driver.
32
33 @param This A pointer to the
34 EFI_COMPONENT_NAME2_PROTOCOL instance.
35
36 @param Language A pointer to a Null-terminated ASCII string
37 array indicating the language. This is the
38 language of the driver name that the caller
39 is requesting, and it must match one of the
40 languages specified in SupportedLanguages.
41 The number of languages supported by a
42 driver is up to the driver writer. Language
43 is specified in RFC 4646 language code
44 format.
45
46 @param DriverName A pointer to the string to return.
47 This string is the name of the
48 driver specified by This in the language
49 specified by Language.
50
51 @retval EFI_SUCCESS The string for the
52 Driver specified by This and the
53 language specified by Language
54 was returned in DriverName.
55
56 @retval EFI_INVALID_PARAMETER Language is NULL.
57
58 @retval EFI_INVALID_PARAMETER DriverName is NULL.
59
60 @retval EFI_UNSUPPORTED The driver specified by This
61 does not support the language
62 specified by Language.
63
64 **/
65 typedef
66 EFI_STATUS
67 (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME)(
68 IN EFI_COMPONENT_NAME2_PROTOCOL *This,
69 IN CHAR8 *Language,
70 OUT CHAR16 **DriverName
71 );
72
73
74 /**
75 Retrieves a string that is the user readable name of
76 the controller that is being managed by an EFI Driver.
77
78 @param This A pointer to the
79 EFI_COMPONENT_NAME2_PROTOCOL instance.
80
81 @param ControllerHandle The handle of a controller that the
82 driver specified by This is managing.
83 This handle specifies the controller
84 whose name is to be returned.
85
86 @param ChildHandle The handle of the child controller to
87 retrieve the name of. This is an
88 optional parameter that may be NULL.
89 It will be NULL for device drivers.
90 It will also be NULL for bus
91 drivers that wish to retrieve the
92 name of the bus controller. It will
93 not be NULL for a bus driver that
94 wishes to retrieve the name of a
95 child controller.
96
97 @param Language A pointer to a Null-terminated ASCII
98 string array indicating the language.
99 This is the language of the driver
100 name that the caller is requesting,
101 and it must match one of the
102 languages specified in
103 SupportedLanguages. The number of
104 languages supported by a driver is up
105 to the driver writer. Language is
106 specified in RFC 4646 language code
107 format.
108
109 @param ControllerName A pointer to the string to return.
110 This string is the name of the controller
111 specified by ControllerHandle and ChildHandle
112 in the language specified by Language
113 from the point of view of the driver
114 specified by This.
115
116 @retval EFI_SUCCESS The string for the user
117 readable name in the language
118 specified by Language for the
119 driver specified by This was
120 returned in DriverName.
121
122 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
123
124 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it
125 is not a valid EFI_HANDLE.
126
127 @retval EFI_INVALID_PARAMETER Language is NULL.
128
129 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
130
131 @retval EFI_UNSUPPORTED The driver specified by This is
132 not currently managing the
133 controller specified by
134 ControllerHandle and
135 ChildHandle.
136
137 @retval EFI_UNSUPPORTED The driver specified by This
138 does not support the language
139 specified by Language.
140
141 **/
142 typedef
143 EFI_STATUS
144 (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(
145 IN EFI_COMPONENT_NAME2_PROTOCOL *This,
146 IN EFI_HANDLE ControllerHandle,
147 IN EFI_HANDLE ChildHandle OPTIONAL,
148 IN CHAR8 *Language,
149 OUT CHAR16 **ControllerName
150 );
151
152 ///
153 /// This protocol is used to retrieve user readable names of drivers
154 /// and controllers managed by UEFI Drivers.
155 ///
156 struct _EFI_COMPONENT_NAME2_PROTOCOL {
157 EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;
158 EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;
159
160 ///
161 /// A Null-terminated ASCII string array that contains one or more
162 /// supported language codes. This is the list of language codes that
163 /// this protocol supports. The number of languages supported by a
164 /// driver is up to the driver writer. SupportedLanguages is
165 /// specified in RFC 4646 format.
166 ///
167 CHAR8 *SupportedLanguages;
168 };
169
170 extern EFI_GUID gEfiComponentName2ProtocolGuid;
171
172 #endif