]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/ComponentName.h
Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is valid...
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Pci / IdeBusDxe / ComponentName.h
CommitLineData
ead42efc 1/** @file\r
630d580d 2 \r
3 UEFI Component Name(2) protocol implementation header file for IDE Bus driver.\r
4 \r
c2d9a4d2 5 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
180a5a35 6 This program and the accompanying materials\r
ead42efc 7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
eeefcb9d 16#ifndef _IDE_BUS_COMPONENT_NAME_H_\r
17#define _IDE_BUS_COMPONENT_NAME_H_\r
ead42efc 18\r
630d580d 19#define ADD_IDE_ATAPI_NAME(x) AddName ((x));\r
ead42efc 20\r
733f03aa 21extern EFI_COMPONENT_NAME_PROTOCOL gIDEBusComponentName;\r
22extern EFI_COMPONENT_NAME2_PROTOCOL gIDEBusComponentName2;\r
ead42efc 23\r
24\r
25//\r
26// EFI Component Name Functions\r
27//\r
28/**\r
733f03aa 29 Retrieves a Unicode string that is the user readable name of the driver.\r
ead42efc 30\r
733f03aa 31 This function retrieves the user readable name of a driver in the form of a\r
32 Unicode string. If the driver specified by This has a user readable name in\r
33 the language specified by Language, then a pointer to the driver name is\r
34 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
35 by This does not support the language specified by Language,\r
36 then EFI_UNSUPPORTED is returned.\r
ead42efc 37\r
733f03aa 38 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
39 EFI_COMPONENT_NAME_PROTOCOL instance.\r
40\r
41 @param Language[in] A pointer to a Null-terminated ASCII string\r
42 array indicating the language. This is the\r
43 language of the driver name that the caller is\r
44 requesting, and it must match one of the\r
45 languages specified in SupportedLanguages. The\r
46 number of languages supported by a driver is up\r
47 to the driver writer. Language is specified\r
4bca47e1 48 in RFC 4646 or ISO 639-2 language code format.\r
733f03aa 49\r
50 @param DriverName[out] A pointer to the Unicode string to return.\r
51 This Unicode string is the name of the\r
52 driver specified by This in the language\r
53 specified by Language.\r
54\r
55 @retval EFI_SUCCESS The Unicode string for the Driver specified by\r
56 This and the language specified by Language was\r
57 returned in DriverName.\r
58\r
59 @retval EFI_INVALID_PARAMETER Language is NULL.\r
60\r
61 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
62\r
63 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
64 the language specified by Language.\r
ead42efc 65\r
66**/\r
67EFI_STATUS\r
68EFIAPI\r
69IDEBusComponentNameGetDriverName (\r
70 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
71 IN CHAR8 *Language,\r
72 OUT CHAR16 **DriverName\r
733f03aa 73 );\r
ead42efc 74\r
ead42efc 75\r
733f03aa 76/**\r
77 Retrieves a Unicode string that is the user readable name of the controller\r
78 that is being managed by a driver.\r
79\r
80 This function retrieves the user readable name of the controller specified by\r
81 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
82 driver specified by This has a user readable name in the language specified by\r
83 Language, then a pointer to the controller name is returned in ControllerName,\r
84 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
85 managing the controller specified by ControllerHandle and ChildHandle,\r
86 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
87 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
88\r
89 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
90 EFI_COMPONENT_NAME_PROTOCOL instance.\r
91\r
92 @param ControllerHandle[in] The handle of a controller that the driver\r
93 specified by This is managing. This handle\r
94 specifies the controller whose name is to be\r
95 returned.\r
96\r
97 @param ChildHandle[in] The handle of the child controller to retrieve\r
98 the name of. This is an optional parameter that\r
99 may be NULL. It will be NULL for device\r
100 drivers. It will also be NULL for a bus drivers\r
101 that wish to retrieve the name of the bus\r
102 controller. It will not be NULL for a bus\r
103 driver that wishes to retrieve the name of a\r
104 child controller.\r
105\r
106 @param Language[in] A pointer to a Null-terminated ASCII string\r
107 array indicating the language. This is the\r
108 language of the driver name that the caller is\r
109 requesting, and it must match one of the\r
110 languages specified in SupportedLanguages. The\r
111 number of languages supported by a driver is up\r
112 to the driver writer. Language is specified in\r
4bca47e1 113 RFC 4646 or ISO 639-2 language code format.\r
733f03aa 114\r
115 @param ControllerName[out] A pointer to the Unicode string to return.\r
116 This Unicode string is the name of the\r
117 controller specified by ControllerHandle and\r
118 ChildHandle in the language specified by\r
119 Language from the point of view of the driver\r
120 specified by This.\r
121\r
122 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
123 the language specified by Language for the\r
124 driver specified by This was returned in\r
125 DriverName.\r
126\r
c2d9a4d2 127 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
733f03aa 128\r
129 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
130 EFI_HANDLE.\r
131\r
132 @retval EFI_INVALID_PARAMETER Language is NULL.\r
133\r
134 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
135\r
136 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
137 managing the controller specified by\r
138 ControllerHandle and ChildHandle.\r
139\r
140 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
141 the language specified by Language.\r
ead42efc 142\r
143**/\r
144EFI_STATUS\r
145EFIAPI\r
146IDEBusComponentNameGetControllerName (\r
147 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
148 IN EFI_HANDLE ControllerHandle,\r
149 IN EFI_HANDLE ChildHandle OPTIONAL,\r
150 IN CHAR8 *Language,\r
151 OUT CHAR16 **ControllerName\r
733f03aa 152 );\r
153\r
ead42efc 154\r
155/**\r
630d580d 156 Add the component name for the IDE/ATAPI device\r
ead42efc 157\r
630d580d 158 @param IdeBlkIoDevicePtr A pointer to the IDE_BLK_IO_DEV instance.\r
ead42efc 159\r
160**/\r
161VOID\r
162AddName (\r
163 IN IDE_BLK_IO_DEV *IdeBlkIoDevicePtr\r
ed66e1bc 164 );\r
ead42efc 165\r
166#endif\r