]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/ComponentName2.h
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Include / Protocol / ComponentName2.h
CommitLineData
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
9df063a0
HT
6 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
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
26typedef 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
65typedef\r
66EFI_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
122 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid\r
123 EFI_HANDLE.\r
124\r
125 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it\r
126 is not a valid EFI_HANDLE.\r
127\r
128 @retval EFI_INVALID_PARAMETER Language is NULL.\r
129\r
130 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
131\r
132 @retval EFI_UNSUPPORTED The driver specified by This is\r
133 not currently managing the\r
134 controller specified by\r
135 ControllerHandle and\r
136 ChildHandle.\r
137\r
138 @retval EFI_UNSUPPORTED The driver specified by This\r
139 does not support the language\r
140 specified by Language.\r
141\r
142**/\r
143typedef\r
144EFI_STATUS\r
8b13229b 145(EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(\r
d1f95000 146 IN EFI_COMPONENT_NAME2_PROTOCOL *This,\r
147 IN EFI_HANDLE ControllerHandle,\r
148 IN EFI_HANDLE ChildHandle OPTIONAL,\r
149 IN CHAR8 *Language,\r
150 OUT CHAR16 **ControllerName\r
151 );\r
152\r
44717a39 153///\r
154/// This protocol is used to retrieve user readable names of drivers \r
155/// and controllers managed by UEFI Drivers.\r
156///\r
d1f95000 157struct _EFI_COMPONENT_NAME2_PROTOCOL {\r
158 EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;\r
159 EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;\r
8b6c989b 160\r
161 ///\r
162 /// A Null-terminated ASCII string array that contains one or more\r
163 /// supported language codes. This is the list of language codes that\r
164 /// this protocol supports. The number of languages supported by a\r
165 /// driver is up to the driver writer. SupportedLanguages is\r
7eb05636 166 /// specified in RFC 4646 format. \r
8b6c989b 167 ///\r
d1f95000 168 CHAR8 *SupportedLanguages;\r
169};\r
170\r
171extern EFI_GUID gEfiComponentName2ProtocolGuid;\r
172\r
173#endif\r