]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
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 | |
5 | \r | |
6 | Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r | |
7 | 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 | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __EFI_COMPONENT_NAME2_H__\r | |
18 | #define __EFI_COMPONENT_NAME2_H__\r | |
19 | \r | |
20 | ///\r | |
21 | /// Global ID for the Component Name Protocol\r | |
22 | ///\r | |
23 | #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \\r | |
24 | {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } }\r | |
25 | \r | |
26 | typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL;\r | |
27 | \r | |
28 | \r | |
29 | /**\r | |
30 | Retrieves a string that is the user readable name of\r | |
31 | the EFI Driver.\r | |
32 | \r | |
33 | @param This A pointer to the\r | |
34 | EFI_COMPONENT_NAME2_PROTOCOL instance.\r | |
35 | \r | |
36 | @param Language A pointer to a Null-terminated ASCII string\r | |
37 | array indicating the language. This is the\r | |
38 | language of the driver name that the caller\r | |
39 | is requesting, and it must match one of the\r | |
40 | languages specified in SupportedLanguages.\r | |
41 | The number of languages supported by a\r | |
42 | driver is up to the driver writer. Language\r | |
43 | is specified in RFC 4646 language code\r | |
44 | format.\r | |
45 | \r | |
46 | @param DriverName A pointer to the string to return.\r | |
47 | This string is the name of the\r | |
48 | driver specified by This in the language\r | |
49 | specified by Language.\r | |
50 | \r | |
51 | @retval EFI_SUCCESS The string for the\r | |
52 | Driver specified by This and the\r | |
53 | language specified by Language\r | |
54 | was returned in DriverName.\r | |
55 | \r | |
56 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
57 | \r | |
58 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
59 | \r | |
60 | @retval EFI_UNSUPPORTED The driver specified by This\r | |
61 | does not support the language\r | |
62 | specified by Language.\r | |
63 | \r | |
64 | **/\r | |
65 | typedef\r | |
66 | EFI_STATUS\r | |
67 | (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME)(\r | |
68 | IN EFI_COMPONENT_NAME2_PROTOCOL *This,\r | |
69 | IN CHAR8 *Language,\r | |
70 | OUT CHAR16 **DriverName\r | |
71 | );\r | |
72 | \r | |
73 | \r | |
74 | /**\r | |
75 | Retrieves a string that is the user readable name of\r | |
76 | the controller that is being managed by an EFI Driver.\r | |
77 | \r | |
78 | @param This A pointer to the\r | |
79 | EFI_COMPONENT_NAME2_PROTOCOL instance.\r | |
80 | \r | |
81 | @param ControllerHandle The handle of a controller that the\r | |
82 | driver specified by This is managing.\r | |
83 | This handle specifies the controller\r | |
84 | whose name is to be returned.\r | |
85 | \r | |
86 | @param ChildHandle The handle of the child controller to\r | |
87 | retrieve the name of. This is an\r | |
88 | optional parameter that may be NULL.\r | |
89 | It will be NULL for device drivers.\r | |
90 | It will also be NULL for bus\r | |
91 | drivers that wish to retrieve the\r | |
92 | name of the bus controller. It will\r | |
93 | not be NULL for a bus driver that\r | |
94 | wishes to retrieve the name of a\r | |
95 | child controller.\r | |
96 | \r | |
97 | @param Language A pointer to a Null-terminated ASCII\r | |
98 | string array indicating the language.\r | |
99 | This is the language of the driver\r | |
100 | name that the caller is requesting,\r | |
101 | and it must match one of the\r | |
102 | languages specified in\r | |
103 | SupportedLanguages. The number of\r | |
104 | languages supported by a driver is up\r | |
105 | to the driver writer. Language is\r | |
106 | specified in RFC 4646 language code\r | |
107 | format.\r | |
108 | \r | |
109 | @param ControllerName A pointer to the string to return.\r | |
110 | This string is the name of the controller\r | |
111 | specified by ControllerHandle and ChildHandle\r | |
112 | in the language specified by Language\r | |
113 | from the point of view of the driver\r | |
114 | specified by This.\r | |
115 | \r | |
116 | @retval EFI_SUCCESS The string for the user\r | |
117 | readable name in the language\r | |
118 | specified by Language for the\r | |
119 | driver specified by This was\r | |
120 | returned in DriverName.\r | |
121 | \r | |
122 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r | |
123 | \r | |
124 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it\r | |
125 | is not a valid EFI_HANDLE.\r | |
126 | \r | |
127 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
128 | \r | |
129 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
130 | \r | |
131 | @retval EFI_UNSUPPORTED The driver specified by This is\r | |
132 | not currently managing the\r | |
133 | controller specified by\r | |
134 | ControllerHandle and\r | |
135 | ChildHandle.\r | |
136 | \r | |
137 | @retval EFI_UNSUPPORTED The driver specified by This\r | |
138 | does not support the language\r | |
139 | specified by Language.\r | |
140 | \r | |
141 | **/\r | |
142 | typedef\r | |
143 | EFI_STATUS\r | |
144 | (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(\r | |
145 | IN EFI_COMPONENT_NAME2_PROTOCOL *This,\r | |
146 | IN EFI_HANDLE ControllerHandle,\r | |
147 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
148 | IN CHAR8 *Language,\r | |
149 | OUT CHAR16 **ControllerName\r | |
150 | );\r | |
151 | \r | |
152 | ///\r | |
153 | /// This protocol is used to retrieve user readable names of drivers \r | |
154 | /// and controllers managed by UEFI Drivers.\r | |
155 | ///\r | |
156 | struct _EFI_COMPONENT_NAME2_PROTOCOL {\r | |
157 | EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;\r | |
158 | EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;\r | |
159 | \r | |
160 | ///\r | |
161 | /// A Null-terminated ASCII string array that contains one or more\r | |
162 | /// supported language codes. This is the list of language codes that\r | |
163 | /// this protocol supports. The number of languages supported by a\r | |
164 | /// driver is up to the driver writer. SupportedLanguages is\r | |
165 | /// specified in RFC 4646 format. \r | |
166 | ///\r | |
167 | CHAR8 *SupportedLanguages;\r | |
168 | };\r | |
169 | \r | |
170 | extern EFI_GUID gEfiComponentName2ProtocolGuid;\r | |
171 | \r | |
172 | #endif\r |