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