]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/ComponentName2.h
OvmfPkg: Skip initrd command on Xcode toolchain
[mirror_edk2.git] / MdePkg / Include / Protocol / ComponentName2.h
CommitLineData
d1f95000 1/** @file\r
4ca9b6c4 2 UEFI Component Name 2 Protocol as defined in the UEFI 2.1 specification.\r
9095d37b 3 This protocol is used to retrieve user readable names of drivers\r
4ca9b6c4 4 and controllers managed by UEFI Drivers.\r
d1f95000 5\r
9095d37b 6 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
d1f95000 8\r
d1f95000 9**/\r
10\r
11#ifndef __EFI_COMPONENT_NAME2_H__\r
12#define __EFI_COMPONENT_NAME2_H__\r
13\r
99e8ed21 14///\r
15/// Global ID for the Component Name Protocol\r
16///\r
d1f95000 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
fbf926ad 24 Retrieves a string that is the user readable name of\r
d1f95000 25 the EFI Driver.\r
26\r
27 @param This A pointer to the\r
4ca9b6c4 28 EFI_COMPONENT_NAME2_PROTOCOL instance.\r
9095d37b 29\r
d1f95000 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
7eb05636 37 is specified in RFC 4646 language code\r
d1f95000 38 format.\r
9095d37b 39\r
fbf926ad 40 @param DriverName A pointer to the string to return.\r
41 This string is the name of the\r
d1f95000 42 driver specified by This in the language\r
43 specified by Language.\r
44\r
fbf926ad 45 @retval EFI_SUCCESS The string for the\r
d1f95000 46 Driver specified by This and the\r
47 language specified by Language\r
48 was returned in DriverName.\r
9095d37b 49\r
d1f95000 50 @retval EFI_INVALID_PARAMETER Language is NULL.\r
9095d37b 51\r
d1f95000 52 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
9095d37b 53\r
d1f95000 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
8b13229b 61(EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME)(\r
d1f95000 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
fbf926ad 69 Retrieves a string that is the user readable name of\r
d1f95000 70 the controller that is being managed by an EFI Driver.\r
71\r
72 @param This A pointer to the\r
4ca9b6c4 73 EFI_COMPONENT_NAME2_PROTOCOL instance.\r
d1f95000 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
fbf926ad 80 @param ChildHandle The handle of the child controller to\r
d1f95000 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
630b4187 84 It will also be NULL for bus\r
d1f95000 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
7eb05636 100 specified in RFC 4646 language code\r
d1f95000 101 format.\r
102\r
fbf926ad 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
d1f95000 107 from the point of view of the driver\r
108 specified by This.\r
109\r
fbf926ad 110 @retval EFI_SUCCESS The string for the user\r
d1f95000 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
18bd7e85 116 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
d1f95000 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
8b13229b 138(EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)(\r
d1f95000 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
44717a39 146///\r
9095d37b 147/// This protocol is used to retrieve user readable names of drivers\r
44717a39 148/// and controllers managed by UEFI Drivers.\r
149///\r
d1f95000 150struct _EFI_COMPONENT_NAME2_PROTOCOL {\r
151 EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;\r
152 EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;\r
8b6c989b 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
9095d37b 159 /// specified in RFC 4646 format.\r
8b6c989b 160 ///\r
d1f95000 161 CHAR8 *SupportedLanguages;\r
162};\r
163\r
164extern EFI_GUID gEfiComponentName2ProtocolGuid;\r
165\r
166#endif\r