]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/ComponentName2.h
Updated *.dec files and .h files to support correct include path scheme
[mirror_edk2.git] / MdePkg / Include / Protocol / ComponentName2.h
CommitLineData
d1f95000 1/** @file\r
2 EFI Component Name 2 Protocol\r
3\r
4 Copyright (c) 2006 - 2007, Intel Corporation\r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
d1f95000 13**/\r
14\r
15#ifndef __EFI_COMPONENT_NAME2_H__\r
16#define __EFI_COMPONENT_NAME2_H__\r
17\r
18//\r
19// Global ID for the Component Name Protocol\r
20//\r
21#define EFI_COMPONENT_NAME2_PROTOCOL_GUID \\r
22 {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } }\r
23\r
24typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL;\r
25\r
26\r
27/**\r
28 Retrieves a Unicode string that is the user readable name of\r
29 the EFI Driver.\r
30\r
31 @param This A pointer to the\r
32 EFI_COMPONENT_NAME_PROTOCOL instance.\r
33 \r
34 @param Language A pointer to a Null-terminated ASCII string\r
35 array indicating the language. This is the\r
36 language of the driver name that the caller\r
37 is requesting, and it must match one of the\r
38 languages specified in SupportedLanguages.\r
39 The number of languages supported by a\r
40 driver is up to the driver writer. Language\r
41 is specified in RFC 3066 language code\r
42 format.\r
43 \r
44 @param DriverName A pointer to the Unicode string to return.\r
45 This Unicode string is the name of the\r
46 driver specified by This in the language\r
47 specified by Language.\r
48\r
49 @retval EFI_SUCCESS The Unicode string for the\r
50 Driver specified by This and the\r
51 language specified by Language\r
52 was returned in DriverName.\r
53 \r
54 @retval EFI_INVALID_PARAMETER Language is NULL.\r
55 \r
56 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
57 \r
58 @retval EFI_UNSUPPORTED The driver specified by This\r
59 does not support the language\r
60 specified by Language.\r
61\r
62**/\r
63typedef\r
64EFI_STATUS\r
65(EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME) (\r
66 IN EFI_COMPONENT_NAME2_PROTOCOL *This,\r
67 IN CHAR8 *Language,\r
68 OUT CHAR16 **DriverName\r
69 );\r
70\r
71\r
72/**\r
73 Retrieves a Unicode string that is the user readable name of\r
74 the controller that is being managed by an EFI Driver.\r
75\r
76 @param This A pointer to the\r
77 EFI_COMPONENT_NAME_PROTOCOL instance.\r
78\r
79 @param ControllerHandle The handle of a controller that the\r
80 driver specified by This is managing.\r
81 This handle specifies the controller\r
82 whose name is to be returned.\r
83\r
84 @param ChildHandle The handle of the child controller to\r
85 retrieve the name of. This is an\r
86 optional parameter that may be NULL.\r
87 It will be NULL for device drivers.\r
88 It will also be NULL for a bus\r
89 drivers that wish to retrieve the\r
90 name of the bus controller. It will\r
91 not be NULL for a bus driver that\r
92 wishes to retrieve the name of a\r
93 child controller.\r
94\r
95 @param Language A pointer to a Null-terminated ASCII\r
96 string array indicating the language.\r
97 This is the language of the driver\r
98 name that the caller is requesting,\r
99 and it must match one of the\r
100 languages specified in\r
101 SupportedLanguages. The number of\r
102 languages supported by a driver is up\r
103 to the driver writer. Language is\r
104 specified in RFC 3066 language code\r
105 format.\r
106\r
107 @param ControllerName A pointer to the Unicode string to\r
108 return. This Unicode string is the\r
109 name of the controller specified by\r
110 ControllerHandle and ChildHandle in\r
111 the language specified by Language\r
112 from the point of view of the driver\r
113 specified by This.\r
114\r
115 @retval EFI_SUCCESS The Unicode string for the user\r
116 readable name in the language\r
117 specified by Language for the\r
118 driver specified by This was\r
119 returned in DriverName.\r
120\r
121 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid\r
122 EFI_HANDLE.\r
123\r
124 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it\r
125 is not a valid EFI_HANDLE.\r
126\r
127 @retval EFI_INVALID_PARAMETER Language is NULL.\r
128\r
129 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
130\r
131 @retval EFI_UNSUPPORTED The driver specified by This is\r
132 not currently managing the\r
133 controller specified by\r
134 ControllerHandle and\r
135 ChildHandle.\r
136\r
137 @retval EFI_UNSUPPORTED The driver specified by This\r
138 does not support the language\r
139 specified by Language.\r
140\r
141**/\r
142typedef\r
143EFI_STATUS\r
144(EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) (\r
145 IN EFI_COMPONENT_NAME2_PROTOCOL *This,\r
146 IN EFI_HANDLE ControllerHandle,\r
147 IN EFI_HANDLE ChildHandle OPTIONAL,\r
148 IN CHAR8 *Language,\r
149 OUT CHAR16 **ControllerName\r
150 );\r
151\r
152//\r
153// Interface structure for the Component Name Protocol\r
154//\r
155struct _EFI_COMPONENT_NAME2_PROTOCOL {\r
156 EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;\r
157 EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;\r
158 CHAR8 *SupportedLanguages;\r
159};\r
160\r
161extern EFI_GUID gEfiComponentName2ProtocolGuid;\r
162\r
163#endif\r