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