]>
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 | |
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 | |
f754f721 | 30 | Retrieves a Unicode 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 | |
46 | @param DriverName A pointer to the Unicode string to return.\r | |
47 | This Unicode 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 Unicode 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 | |
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 | |
75 | Retrieves a Unicode 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 | |
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 | |
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 | |
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 | |
109 | @param ControllerName A pointer to the Unicode string to\r | |
110 | return. This Unicode string is the\r | |
111 | name of the controller specified by\r | |
112 | ControllerHandle and ChildHandle in\r | |
113 | the language specified by Language\r | |
114 | from the point of view of the driver\r | |
115 | specified by This.\r | |
116 | \r | |
117 | @retval EFI_SUCCESS The Unicode string for the user\r | |
118 | readable name in the language\r | |
119 | specified by Language for the\r | |
120 | driver specified by This was\r | |
121 | returned in DriverName.\r | |
122 | \r | |
123 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid\r | |
124 | EFI_HANDLE.\r | |
125 | \r | |
126 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it\r | |
127 | is not a valid EFI_HANDLE.\r | |
128 | \r | |
129 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
130 | \r | |
131 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
132 | \r | |
133 | @retval EFI_UNSUPPORTED The driver specified by This is\r | |
134 | not currently managing the\r | |
135 | controller specified by\r | |
136 | ControllerHandle and\r | |
137 | ChildHandle.\r | |
138 | \r | |
139 | @retval EFI_UNSUPPORTED The driver specified by This\r | |
140 | does not support the language\r | |
141 | specified by Language.\r | |
142 | \r | |
143 | **/\r | |
144 | typedef\r | |
145 | EFI_STATUS\r | |
8b13229b | 146 | (EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(\r |
d1f95000 | 147 | IN EFI_COMPONENT_NAME2_PROTOCOL *This,\r |
148 | IN EFI_HANDLE ControllerHandle,\r | |
149 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
150 | IN CHAR8 *Language,\r | |
151 | OUT CHAR16 **ControllerName\r | |
152 | );\r | |
153 | \r | |
44717a39 | 154 | ///\r |
155 | /// This protocol is used to retrieve user readable names of drivers \r | |
156 | /// and controllers managed by UEFI Drivers.\r | |
157 | ///\r | |
d1f95000 | 158 | struct _EFI_COMPONENT_NAME2_PROTOCOL {\r |
159 | EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;\r | |
160 | EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;\r | |
8b6c989b | 161 | \r |
162 | ///\r | |
163 | /// A Null-terminated ASCII string array that contains one or more\r | |
164 | /// supported language codes. This is the list of language codes that\r | |
165 | /// this protocol supports. The number of languages supported by a\r | |
166 | /// driver is up to the driver writer. SupportedLanguages is\r | |
7eb05636 | 167 | /// specified in RFC 4646 format. \r |
8b6c989b | 168 | ///\r |
d1f95000 | 169 | CHAR8 *SupportedLanguages;\r |
170 | };\r | |
171 | \r | |
172 | extern EFI_GUID gEfiComponentName2ProtocolGuid;\r | |
173 | \r | |
174 | #endif\r |