]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Bus/Pci/PciBusDxe/ComponentName.h
Update For R9 Review.
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / PciBusDxe / ComponentName.h
1 /** @file
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. 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 **/
13
14
15 #ifndef _EFI_PCI_BUS_COMPONENT_NAME_H_
16 #define _EFI_PCI_BUS_COMPONENT_NAME_H_
17
18 extern EFI_COMPONENT_NAME_PROTOCOL gPciBusComponentName;
19 extern EFI_COMPONENT_NAME2_PROTOCOL gPciBusComponentName2;
20
21 //
22 // EFI Component Name Functions
23 //
24 /**
25 Retrieves a Unicode string that is the user readable name of the driver.
26
27 This function retrieves the user readable name of a driver in the form of a
28 Unicode string. If the driver specified by This has a user readable name in
29 the language specified by Language, then a pointer to the driver name is
30 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
31 by This does not support the language specified by Language,
32 then EFI_UNSUPPORTED is returned.
33
34 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
35 EFI_COMPONENT_NAME_PROTOCOL instance.
36
37 @param Language[in] A pointer to a Null-terminated ASCII string
38 array indicating the language. This is the
39 language of the driver name that the caller is
40 requesting, and it must match one of the
41 languages specified in SupportedLanguages. The
42 number of languages supported by a driver is up
43 to the driver writer. Language is specified
44 in RFC 3066 or ISO 639-2 language code format.
45
46 @param DriverName[out] A pointer to the Unicode string to return.
47 This Unicode string is the name of the
48 driver specified by This in the language
49 specified by Language.
50
51 @retval EFI_SUCCESS The Unicode string for the Driver specified by
52 This and the language specified by Language was
53 returned in DriverName.
54
55 @retval EFI_INVALID_PARAMETER Language is NULL.
56
57 @retval EFI_INVALID_PARAMETER DriverName is NULL.
58
59 @retval EFI_UNSUPPORTED The driver specified by This does not support
60 the language specified by Language.
61
62 **/
63 EFI_STATUS
64 EFIAPI
65 PciBusComponentNameGetDriverName (
66 IN EFI_COMPONENT_NAME_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 the controller
74 that is being managed by a driver.
75
76 This function retrieves the user readable name of the controller specified by
77 ControllerHandle and ChildHandle in the form of a Unicode string. If the
78 driver specified by This has a user readable name in the language specified by
79 Language, then a pointer to the controller name is returned in ControllerName,
80 and EFI_SUCCESS is returned. If the driver specified by This is not currently
81 managing the controller specified by ControllerHandle and ChildHandle,
82 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
83 support the language specified by Language, then EFI_UNSUPPORTED is returned.
84
85 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
86 EFI_COMPONENT_NAME_PROTOCOL instance.
87
88 @param ControllerHandle[in] The handle of a controller that the driver
89 specified by This is managing. This handle
90 specifies the controller whose name is to be
91 returned.
92
93 @param ChildHandle[in] The handle of the child controller to retrieve
94 the name of. This is an optional parameter that
95 may be NULL. It will be NULL for device
96 drivers. It will also be NULL for a bus drivers
97 that wish to retrieve the name of the bus
98 controller. It will not be NULL for a bus
99 driver that wishes to retrieve the name of a
100 child controller.
101
102 @param Language[in] A pointer to a Null-terminated ASCII string
103 array indicating the language. This is the
104 language of the driver name that the caller is
105 requesting, and it must match one of the
106 languages specified in SupportedLanguages. The
107 number of languages supported by a driver is up
108 to the driver writer. Language is specified in
109 RFC 3066 or ISO 639-2 language code format.
110
111 @param ControllerName[out] A pointer to the Unicode string to return.
112 This Unicode string is the name of the
113 controller specified by ControllerHandle and
114 ChildHandle in the language specified by
115 Language from the point of view of the driver
116 specified by This.
117
118 @retval EFI_SUCCESS The Unicode string for the user readable name in
119 the language specified by Language for the
120 driver specified by This was returned in
121 DriverName.
122
123 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
124
125 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
126 EFI_HANDLE.
127
128 @retval EFI_INVALID_PARAMETER Language is NULL.
129
130 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
131
132 @retval EFI_UNSUPPORTED The driver specified by This is not currently
133 managing the controller specified by
134 ControllerHandle and ChildHandle.
135
136 @retval EFI_UNSUPPORTED The driver specified by This does not support
137 the language specified by Language.
138
139 **/
140 EFI_STATUS
141 EFIAPI
142 PciBusComponentNameGetControllerName (
143 IN EFI_COMPONENT_NAME_PROTOCOL *This,
144 IN EFI_HANDLE ControllerHandle,
145 IN EFI_HANDLE ChildHandle OPTIONAL,
146 IN CHAR8 *Language,
147 OUT CHAR16 **ControllerName
148 );
149
150
151 #endif