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