]>
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 |
18bd7e85 | 6 | Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r |
9df063a0 | 7 | This program and the accompanying materials \r |
d1f95000 | 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 | |
99e8ed21 | 20 | ///\r |
21 | /// Global ID for the Component Name Protocol\r | |
22 | ///\r | |
d1f95000 | 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 | |
fbf926ad | 30 | Retrieves a string that is the user readable name of\r |
d1f95000 | 31 | the EFI Driver.\r |
32 | \r | |
33 | @param This A pointer to the\r | |
4ca9b6c4 | 34 | EFI_COMPONENT_NAME2_PROTOCOL instance.\r |
d1f95000 | 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 | |
7eb05636 | 43 | is specified in RFC 4646 language code\r |
d1f95000 | 44 | format.\r |
45 | \r | |
fbf926ad | 46 | @param DriverName A pointer to the string to return.\r |
47 | This string is the name of the\r | |
d1f95000 | 48 | driver specified by This in the language\r |
49 | specified by Language.\r | |
50 | \r | |
fbf926ad | 51 | @retval EFI_SUCCESS The string for the\r |
d1f95000 | 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 | |
8b13229b | 67 | (EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME)(\r |
d1f95000 | 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 | |
fbf926ad | 75 | Retrieves a string that is the user readable name of\r |
d1f95000 | 76 | the controller that is being managed by an EFI Driver.\r |
77 | \r | |
78 | @param This A pointer to the\r | |
4ca9b6c4 | 79 | EFI_COMPONENT_NAME2_PROTOCOL instance.\r |
d1f95000 | 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 | |
fbf926ad | 86 | @param ChildHandle The handle of the child controller to\r |
d1f95000 | 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 | |
630b4187 | 90 | It will also be NULL for bus\r |
d1f95000 | 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 | |
7eb05636 | 106 | specified in RFC 4646 language code\r |
d1f95000 | 107 | format.\r |
108 | \r | |
fbf926ad | 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 | |
d1f95000 | 113 | from the point of view of the driver\r |
114 | specified by This.\r | |
115 | \r | |
fbf926ad | 116 | @retval EFI_SUCCESS The string for the user\r |
d1f95000 | 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 | |
18bd7e85 | 122 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r |
d1f95000 | 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 | |
8b13229b | 144 | (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(\r |
d1f95000 | 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 | |
44717a39 | 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 | |
d1f95000 | 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 | |
8b6c989b | 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 | |
7eb05636 | 165 | /// specified in RFC 4646 format. \r |
8b6c989b | 166 | ///\r |
d1f95000 | 167 | CHAR8 *SupportedLanguages;\r |
168 | };\r | |
169 | \r | |
170 | extern EFI_GUID gEfiComponentName2ProtocolGuid;\r | |
171 | \r | |
172 | #endif\r |