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