update the comments on Event
[edk2.git] / IntelFrameworkModulePkg / Bus / Isa / IsaSerialDxe / ComponentName.h
blob6f404b1825d14fafa60ff8d8a6293d309a481a6b
1 /**@file
4 Copyright (c) 2006 - 2007, Intel Corporation.<BR>
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
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.
13 **/
15 #ifndef _SERIAL_COMPONENT_NAME_H
16 #define _SERIAL_COMPONENT_NAME_H
18 #define SERIAL_PORT_NAME "ISA Serial Port # "
19 #define ADD_SERIAL_NAME(x, y) AddName ((x), (y))
21 extern EFI_COMPONENT_NAME_PROTOCOL gIsaSerialComponentName;
22 extern EFI_COMPONENT_NAME2_PROTOCOL gIsaSerialComponentName2;
25 // EFI Component Name Functions
27 /**
28 Retrieves a Unicode string that is the user readable name of the driver.
30 This function retrieves the user readable name of a driver in the form of a
31 Unicode string. If the driver specified by This has a user readable name in
32 the language specified by Language, then a pointer to the driver name is
33 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
34 by This does not support the language specified by Language,
35 then EFI_UNSUPPORTED is returned.
37 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
38 EFI_COMPONENT_NAME_PROTOCOL instance.
40 @param Language[in] A pointer to a Null-terminated ASCII string
41 array indicating the language. This is the
42 language of the driver name that the caller is
43 requesting, and it must match one of the
44 languages specified in SupportedLanguages. The
45 number of languages supported by a driver is up
46 to the driver writer. Language is specified
47 in RFC 4646 or ISO 639-2 language code format.
49 @param DriverName[out] A pointer to the Unicode string to return.
50 This Unicode string is the name of the
51 driver specified by This in the language
52 specified by Language.
54 @retval EFI_SUCCESS The Unicode string for the Driver specified by
55 This and the language specified by Language was
56 returned in DriverName.
58 @retval EFI_INVALID_PARAMETER Language is NULL.
60 @retval EFI_INVALID_PARAMETER DriverName is NULL.
62 @retval EFI_UNSUPPORTED The driver specified by This does not support
63 the language specified by Language.
65 **/
66 EFI_STATUS
67 EFIAPI
68 IsaSerialComponentNameGetDriverName (
69 IN EFI_COMPONENT_NAME_PROTOCOL *This,
70 IN CHAR8 *Language,
71 OUT CHAR16 **DriverName
75 /**
76 Retrieves a Unicode string that is the user readable name of the controller
77 that is being managed by a driver.
79 This function retrieves the user readable name of the controller specified by
80 ControllerHandle and ChildHandle in the form of a Unicode string. If the
81 driver specified by This has a user readable name in the language specified by
82 Language, then a pointer to the controller name is returned in ControllerName,
83 and EFI_SUCCESS is returned. If the driver specified by This is not currently
84 managing the controller specified by ControllerHandle and ChildHandle,
85 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
86 support the language specified by Language, then EFI_UNSUPPORTED is returned.
88 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
89 EFI_COMPONENT_NAME_PROTOCOL instance.
91 @param ControllerHandle[in] The handle of a controller that the driver
92 specified by This is managing. This handle
93 specifies the controller whose name is to be
94 returned.
96 @param ChildHandle[in] The handle of the child controller to retrieve
97 the name of. This is an optional parameter that
98 may be NULL. It will be NULL for device
99 drivers. It will also be NULL for a bus drivers
100 that wish to retrieve the name of the bus
101 controller. It will not be NULL for a bus
102 driver that wishes to retrieve the name of a
103 child controller.
105 @param Language[in] A pointer to a Null-terminated ASCII string
106 array indicating the language. This is the
107 language of the driver name that the caller is
108 requesting, and it must match one of the
109 languages specified in SupportedLanguages. The
110 number of languages supported by a driver is up
111 to the driver writer. Language is specified in
112 RFC 4646 or ISO 639-2 language code format.
114 @param ControllerName[out] A pointer to the Unicode string to return.
115 This Unicode string is the name of the
116 controller specified by ControllerHandle and
117 ChildHandle in the language specified by
118 Language from the point of view of the driver
119 specified by This.
121 @retval EFI_SUCCESS The Unicode string for the user readable name in
122 the language specified by Language for the
123 driver specified by This was returned in
124 DriverName.
126 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
128 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
129 EFI_HANDLE.
131 @retval EFI_INVALID_PARAMETER Language is NULL.
133 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
135 @retval EFI_UNSUPPORTED The driver specified by This is not currently
136 managing the controller specified by
137 ControllerHandle and ChildHandle.
139 @retval EFI_UNSUPPORTED The driver specified by This does not support
140 the language specified by Language.
143 EFI_STATUS
144 EFIAPI
145 IsaSerialComponentNameGetControllerName (
146 IN EFI_COMPONENT_NAME_PROTOCOL *This,
147 IN EFI_HANDLE ControllerHandle,
148 IN EFI_HANDLE ChildHandle OPTIONAL,
149 IN CHAR8 *Language,
150 OUT CHAR16 **ControllerName
154 VOID
155 AddName (
156 IN SERIAL_DEV *SerialDevice,
157 IN EFI_ISA_IO_PROTOCOL *IsaIo
161 Routine Description:
163 Add the component name for the serial io device
165 Arguments:
167 SerialDevice - A pointer to the SERIAL_DEV instance.
168 IsaIo - A pointer to the EFI_ISA_IO_PROTOCOL instance.
170 Returns:
172 None
177 #endif