]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/ComponentName.h
7ac7ce0a31e088a18f3ae15694b36286666d7cd3
[mirror_edk2.git] / MdePkg / Include / Protocol / ComponentName.h
1 /** @file
2 EFI Component Name Protocol as defined in the EFI 1.1 specification.
3 This protocol is used to retrieve user readable names of EFI Drivers
4 and controllers managed by EFI Drivers.
5
6 Copyright (c) 2006 - 2008, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16
17 #ifndef __EFI_COMPONENT_NAME_H__
18 #define __EFI_COMPONENT_NAME_H__
19
20 #include <PiDxe.h>
21
22 //
23 // Global ID for the Component Name Protocol
24 //
25 #define EFI_COMPONENT_NAME_PROTOCOL_GUID \
26 { \
27 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
28 }
29
30 typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL;
31
32
33 /**
34 Retrieves a Unicode string that is the user readable name of the EFI Driver.
35
36 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
37 @param Language A pointer to a three character ISO 639-2 language identifier.
38 This is the language of the driver name that that the caller
39 is requesting, and it must match one of the languages specified
40 in SupportedLanguages. The number of languages supported by a
41 driver is up to the driver writer.
42 @param DriverName A pointer to the Unicode string to return. This Unicode string
43 is the name of the driver specified by This in the language
44 specified by Language.
45
46 @retval EFI_SUCCESS The Unicode string for the Driver specified by This
47 and the language specified by Language was returned
48 in DriverName.
49 @retval EFI_INVALID_PARAMETER Language is NULL.
50 @retval EFI_INVALID_PARAMETER DriverName is NULL.
51 @retval EFI_UNSUPPORTED The driver specified by This does not support the
52 language specified by Language.
53
54 **/
55 typedef
56 EFI_STATUS
57 (EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME)(
58 IN EFI_COMPONENT_NAME_PROTOCOL *This,
59 IN CHAR8 *Language,
60 OUT CHAR16 **DriverName
61 );
62
63
64 /**
65 Retrieves a Unicode string that is the user readable name of the controller
66 that is being managed by an EFI Driver.
67
68 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
69 @param ControllerHandle The handle of a controller that the driver specified by
70 This is managing. This handle specifies the controller
71 whose name is to be returned.
72 @param ChildHandle The handle of the child controller to retrieve the name
73 of. This is an optional parameter that may be NULL. It
74 will be NULL for device drivers. It will also be NULL
75 for a bus drivers that wish to retrieve the name of the
76 bus controller. It will not be NULL for a bus driver
77 that wishes to retrieve the name of a child controller.
78 @param Language A pointer to a three character ISO 639-2 language
79 identifier. This is the language of the controller name
80 that that the caller is requesting, and it must match one
81 of the languages specified in SupportedLanguages. The
82 number of languages supported by a driver is up to the
83 driver writer.
84 @param ControllerName A pointer to the Unicode string to return. This Unicode
85 string is the name of the controller specified by
86 ControllerHandle and ChildHandle in the language specified
87 by Language from the point of view of the driver specified
88 by This.
89
90 @retval EFI_SUCCESS The Unicode string for the user readable name in the
91 language specified by Language for the driver
92 specified by This was returned in DriverName.
93 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
94 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
95 @retval EFI_INVALID_PARAMETER Language is NULL.
96 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
97 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing
98 the controller specified by ControllerHandle and
99 ChildHandle.
100 @retval EFI_UNSUPPORTED The driver specified by This does not support the
101 language specified by Language.
102
103 **/
104 typedef
105 EFI_STATUS
106 (EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)(
107 IN EFI_COMPONENT_NAME_PROTOCOL *This,
108 IN EFI_HANDLE ControllerHandle,
109 IN EFI_HANDLE ChildHandle OPTIONAL,
110 IN CHAR8 *Language,
111 OUT CHAR16 **ControllerName
112 );
113
114 //
115 // Interface structure for the Component Name Protocol
116 //
117 /**
118 @par Protocol Description:
119 This protocol is used to retrieve user readable names of drivers
120 and controllers managed by UEFI Drivers.
121
122 @param GetDriverName
123 Retrieves a Unicode string that is the user readable name of the driver.
124
125 @param GetControllerName
126 Retrieves a Unicode string that is the user readable name of a
127 controller that is being managed by a driver.
128
129 @param SupportedLanguages
130 A Null-terminated ASCII string that contains one or more
131 ISO 639-2 language codes. This is the list of language codes
132 that this protocol supports.
133
134 **/
135 struct _EFI_COMPONENT_NAME_PROTOCOL {
136 EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;
137 EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;
138 CHAR8 *SupportedLanguages;
139 };
140
141 extern EFI_GUID gEfiComponentNameProtocolGuid;
142
143 #endif