]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/ComponentName.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / ComponentName.h
CommitLineData
d1f95000 1/** @file\r
4ca9b6c4 2 EFI Component Name Protocol as defined in the EFI 1.1 specification.\r
9095d37b 3 This protocol is used to retrieve user readable names of EFI Drivers\r
4ca9b6c4 4 and controllers managed by EFI Drivers.\r
d1f95000 5\r
9095d37b 6Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 7SPDX-License-Identifier: BSD-2-Clause-Patent\r
d1f95000 8\r
d1f95000 9**/\r
10\r
11#ifndef __EFI_COMPONENT_NAME_H__\r
12#define __EFI_COMPONENT_NAME_H__\r
13\r
99e8ed21 14///\r
af2dc6a7 15/// The global ID for the Component Name Protocol.\r
99e8ed21 16///\r
d1f95000 17#define EFI_COMPONENT_NAME_PROTOCOL_GUID \\r
18 { \\r
19 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \\r
20 }\r
21\r
22typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL;\r
23\r
24\r
25/**\r
af2dc6a7 26 Retrieves a Unicode string that is the user-readable name of the EFI Driver.\r
d1f95000 27\r
28 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
af2dc6a7 29 @param Language A pointer to a three-character ISO 639-2 language identifier.\r
d1f95000 30 This is the language of the driver name that that the caller\r
31 is requesting, and it must match one of the languages specified\r
32 in SupportedLanguages. The number of languages supported by a\r
33 driver is up to the driver writer.\r
34 @param DriverName A pointer to the Unicode string to return. This Unicode string\r
35 is the name of the driver specified by This in the language\r
36 specified by Language.\r
37\r
38 @retval EFI_SUCCESS The Unicode string for the Driver specified by This\r
39 and the language specified by Language was returned\r
40 in DriverName.\r
41 @retval EFI_INVALID_PARAMETER Language is NULL.\r
42 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
43 @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
44 language specified by Language.\r
45\r
46**/\r
47typedef\r
48EFI_STATUS\r
8b13229b 49(EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME)(\r
d1f95000 50 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
51 IN CHAR8 *Language,\r
52 OUT CHAR16 **DriverName\r
53 );\r
54\r
55\r
56/**\r
57 Retrieves a Unicode string that is the user readable name of the controller\r
58 that is being managed by an EFI Driver.\r
59\r
60 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
61 @param ControllerHandle The handle of a controller that the driver specified by\r
62 This is managing. This handle specifies the controller\r
63 whose name is to be returned.\r
64 @param ChildHandle The handle of the child controller to retrieve the name\r
65 of. This is an optional parameter that may be NULL. It\r
66 will be NULL for device drivers. It will also be NULL\r
67 for a bus drivers that wish to retrieve the name of the\r
68 bus controller. It will not be NULL for a bus driver\r
69 that wishes to retrieve the name of a child controller.\r
70 @param Language A pointer to a three character ISO 639-2 language\r
71 identifier. This is the language of the controller name\r
af2dc6a7 72 that the caller is requesting, and it must match one\r
d1f95000 73 of the languages specified in SupportedLanguages. The\r
74 number of languages supported by a driver is up to the\r
75 driver writer.\r
76 @param ControllerName A pointer to the Unicode string to return. This Unicode\r
77 string is the name of the controller specified by\r
78 ControllerHandle and ChildHandle in the language specified\r
af2dc6a7 79 by Language, from the point of view of the driver specified\r
d1f95000 80 by This.\r
81\r
af2dc6a7 82 @retval EFI_SUCCESS The Unicode string for the user-readable name in the\r
d1f95000 83 language specified by Language for the driver\r
84 specified by This was returned in DriverName.\r
18bd7e85 85 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
d1f95000 86 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
87 @retval EFI_INVALID_PARAMETER Language is NULL.\r
88 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
89 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing\r
90 the controller specified by ControllerHandle and\r
91 ChildHandle.\r
92 @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
93 language specified by Language.\r
94\r
95**/\r
96typedef\r
97EFI_STATUS\r
8b13229b 98(EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)(\r
d1f95000 99 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
100 IN EFI_HANDLE ControllerHandle,\r
101 IN EFI_HANDLE ChildHandle OPTIONAL,\r
102 IN CHAR8 *Language,\r
103 OUT CHAR16 **ControllerName\r
104 );\r
105\r
44717a39 106///\r
9095d37b 107/// This protocol is used to retrieve user readable names of drivers\r
44717a39 108/// and controllers managed by UEFI Drivers.\r
109///\r
d1f95000 110struct _EFI_COMPONENT_NAME_PROTOCOL {\r
111 EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;\r
112 EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;\r
8b6c989b 113 ///\r
114 /// A Null-terminated ASCII string that contains one or more\r
115 /// ISO 639-2 language codes. This is the list of language codes\r
9095d37b 116 /// that this protocol supports.\r
8b6c989b 117 ///\r
d1f95000 118 CHAR8 *SupportedLanguages;\r
119};\r
120\r
121extern EFI_GUID gEfiComponentNameProtocolGuid;\r
122\r
123#endif\r