]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Efi/Protocol/ComponentName/ComponentName.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Efi / Protocol / ComponentName / ComponentName.h
1 /*++
2
3 Copyright (c) 2004, 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_NAME_H_
25 #define _EFI_COMPONENT_NAME_H_
26
27 //
28 // Global ID for the Component Name Protocol
29 //
30 #define EFI_COMPONENT_NAME_PROTOCOL_GUID \
31 { \
32 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} \
33 }
34
35 EFI_FORWARD_DECLARATION (EFI_COMPONENT_NAME_PROTOCOL);
36
37 typedef
38 EFI_STATUS
39 (EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
40 IN EFI_COMPONENT_NAME_PROTOCOL * This,
41 IN CHAR8 *Language,
42 OUT CHAR16 **DriverName
43 );
44
45 /*++
46
47 Routine Description:
48 Retrieves a Unicode string that is the user readable name of the EFI Driver.
49
50 Arguments:
51 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
52 Language - A pointer to a three character ISO 639-2 language identifier.
53 This is the language of the driver name that that the caller
54 is requesting, and it must match one of the languages specified
55 in SupportedLanguages. The number of languages supported by a
56 driver is up to the driver writer.
57 DriverName - A pointer to the Unicode string to return. This Unicode string
58 is the name of the driver specified by This in the language
59 specified by Language.
60
61 Returns:
62 EFI_SUCCESS - The Unicode string for the Driver specified by This
63 and the language specified by Language was returned
64 in DriverName.
65 EFI_INVALID_PARAMETER - Language is NULL.
66 EFI_INVALID_PARAMETER - DriverName is NULL.
67 EFI_UNSUPPORTED - The driver specified by This does not support the
68 language specified by Language.
69
70 --*/
71 typedef
72 EFI_STATUS
73 (EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
74 IN EFI_COMPONENT_NAME_PROTOCOL * This,
75 IN EFI_HANDLE ControllerHandle,
76 IN EFI_HANDLE ChildHandle OPTIONAL,
77 IN CHAR8 *Language,
78 OUT CHAR16 **ControllerName
79 );
80
81 /*++
82
83 Routine Description:
84 Retrieves a Unicode string that is the user readable name of the controller
85 that is being managed by an EFI Driver.
86
87 Arguments:
88 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
89 ControllerHandle - The handle of a controller that the driver specified by
90 This is managing. This handle specifies the controller
91 whose name is to be returned.
92 ChildHandle - The handle of the child controller to retrieve the name
93 of. This is an optional parameter that may be NULL. It
94 will be NULL for device drivers. It will also be NULL
95 for a bus drivers that wish to retrieve the name of the
96 bus controller. It will not be NULL for a bus driver
97 that wishes to retrieve the name of a child controller.
98 Language - A pointer to a three character ISO 639-2 language
99 identifier. This is the language of the controller name
100 that that the caller is requesting, and it must match one
101 of the languages specified in SupportedLanguages. The
102 number of languages supported by a driver is up to the
103 driver writer.
104 ControllerName - A pointer to the Unicode string to return. This Unicode
105 string is the name of the controller specified by
106 ControllerHandle and ChildHandle in the language specified
107 by Language from the point of view of the driver specified
108 by This.
109
110 Returns:
111 EFI_SUCCESS - The Unicode string for the user readable name in the
112 language specified by Language for the driver
113 specified by This was returned in DriverName.
114 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
115 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
116 EFI_INVALID_PARAMETER - Language is NULL.
117 EFI_INVALID_PARAMETER - ControllerName is NULL.
118 EFI_UNSUPPORTED - The driver specified by This is not currently managing
119 the controller specified by ControllerHandle and
120 ChildHandle.
121 EFI_UNSUPPORTED - 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_NAME_PROTOCOL {
130 EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;
131 EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;
132 CHAR8 *SupportedLanguages;
133 };
134
135 extern EFI_GUID gEfiComponentNameProtocolGuid;
136
137 #endif