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