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