1 | /* $Id: ComponentName.h 48947 2013-10-07 21:41:00Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * ComponentName.h
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2009-2010 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * The contents of this file may alternatively be used under the terms
|
---|
18 | * of the Common Development and Distribution License Version 1.0
|
---|
19 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | * CDDL are applicable instead of those of the GPL.
|
---|
22 | *
|
---|
23 | * You may elect to license modified versions of this file under the
|
---|
24 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | */
|
---|
26 |
|
---|
27 | /** @file
|
---|
28 |
|
---|
29 | UEFI Component Name(2) protocol implementation header file for IDE Bus driver.
|
---|
30 |
|
---|
31 | Copyright (c) 2006, Intel Corporation
|
---|
32 | All rights reserved. This program and the accompanying materials
|
---|
33 | are licensed and made available under the terms and conditions of the BSD License
|
---|
34 | which accompanies this distribution. The full text of the license may be found at
|
---|
35 | http://opensource.org/licenses/bsd-license.php
|
---|
36 |
|
---|
37 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
---|
38 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
---|
39 |
|
---|
40 | **/
|
---|
41 |
|
---|
42 | #ifndef _IDE_BUS_COMPONENT_NAME_H_
|
---|
43 | #define _IDE_BUS_COMPONENT_NAME_H_
|
---|
44 |
|
---|
45 | #define ADD_IDE_ATAPI_NAME(x) AddName ((x));
|
---|
46 |
|
---|
47 | extern EFI_COMPONENT_NAME_PROTOCOL gIDEBusComponentName;
|
---|
48 | extern EFI_COMPONENT_NAME2_PROTOCOL gIDEBusComponentName2;
|
---|
49 |
|
---|
50 |
|
---|
51 | //
|
---|
52 | // EFI Component Name Functions
|
---|
53 | //
|
---|
54 | /**
|
---|
55 | Retrieves a Unicode string that is the user readable name of the driver.
|
---|
56 |
|
---|
57 | This function retrieves the user readable name of a driver in the form of a
|
---|
58 | Unicode string. If the driver specified by This has a user readable name in
|
---|
59 | the language specified by Language, then a pointer to the driver name is
|
---|
60 | returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
---|
61 | by This does not support the language specified by Language,
|
---|
62 | then EFI_UNSUPPORTED is returned.
|
---|
63 |
|
---|
64 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
---|
65 | EFI_COMPONENT_NAME_PROTOCOL instance.
|
---|
66 |
|
---|
67 | @param Language[in] A pointer to a Null-terminated ASCII string
|
---|
68 | array indicating the language. This is the
|
---|
69 | language of the driver name that the caller is
|
---|
70 | requesting, and it must match one of the
|
---|
71 | languages specified in SupportedLanguages. The
|
---|
72 | number of languages supported by a driver is up
|
---|
73 | to the driver writer. Language is specified
|
---|
74 | in RFC 4646 or ISO 639-2 language code format.
|
---|
75 |
|
---|
76 | @param DriverName[out] A pointer to the Unicode string to return.
|
---|
77 | This Unicode string is the name of the
|
---|
78 | driver specified by This in the language
|
---|
79 | specified by Language.
|
---|
80 |
|
---|
81 | @retval EFI_SUCCESS The Unicode string for the Driver specified by
|
---|
82 | This and the language specified by Language was
|
---|
83 | returned in DriverName.
|
---|
84 |
|
---|
85 | @retval EFI_INVALID_PARAMETER Language is NULL.
|
---|
86 |
|
---|
87 | @retval EFI_INVALID_PARAMETER DriverName is NULL.
|
---|
88 |
|
---|
89 | @retval EFI_UNSUPPORTED The driver specified by This does not support
|
---|
90 | the language specified by Language.
|
---|
91 |
|
---|
92 | **/
|
---|
93 | EFI_STATUS
|
---|
94 | EFIAPI
|
---|
95 | IDEBusComponentNameGetDriverName (
|
---|
96 | IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
---|
97 | IN CHAR8 *Language,
|
---|
98 | OUT CHAR16 **DriverName
|
---|
99 | );
|
---|
100 |
|
---|
101 |
|
---|
102 | /**
|
---|
103 | Retrieves a Unicode string that is the user readable name of the controller
|
---|
104 | that is being managed by a driver.
|
---|
105 |
|
---|
106 | This function retrieves the user readable name of the controller specified by
|
---|
107 | ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
---|
108 | driver specified by This has a user readable name in the language specified by
|
---|
109 | Language, then a pointer to the controller name is returned in ControllerName,
|
---|
110 | and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
---|
111 | managing the controller specified by ControllerHandle and ChildHandle,
|
---|
112 | then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
---|
113 | support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
---|
114 |
|
---|
115 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
---|
116 | EFI_COMPONENT_NAME_PROTOCOL instance.
|
---|
117 |
|
---|
118 | @param ControllerHandle[in] The handle of a controller that the driver
|
---|
119 | specified by This is managing. This handle
|
---|
120 | specifies the controller whose name is to be
|
---|
121 | returned.
|
---|
122 |
|
---|
123 | @param ChildHandle[in] The handle of the child controller to retrieve
|
---|
124 | the name of. This is an optional parameter that
|
---|
125 | may be NULL. It will be NULL for device
|
---|
126 | drivers. It will also be NULL for a bus drivers
|
---|
127 | that wish to retrieve the name of the bus
|
---|
128 | controller. It will not be NULL for a bus
|
---|
129 | driver that wishes to retrieve the name of a
|
---|
130 | child controller.
|
---|
131 |
|
---|
132 | @param Language[in] A pointer to a Null-terminated ASCII string
|
---|
133 | array indicating the language. This is the
|
---|
134 | language of the driver name that the caller is
|
---|
135 | requesting, and it must match one of the
|
---|
136 | languages specified in SupportedLanguages. The
|
---|
137 | number of languages supported by a driver is up
|
---|
138 | to the driver writer. Language is specified in
|
---|
139 | RFC 4646 or ISO 639-2 language code format.
|
---|
140 |
|
---|
141 | @param ControllerName[out] A pointer to the Unicode string to return.
|
---|
142 | This Unicode string is the name of the
|
---|
143 | controller specified by ControllerHandle and
|
---|
144 | ChildHandle in the language specified by
|
---|
145 | Language from the point of view of the driver
|
---|
146 | specified by This.
|
---|
147 |
|
---|
148 | @retval EFI_SUCCESS The Unicode string for the user readable name in
|
---|
149 | the language specified by Language for the
|
---|
150 | driver specified by This was returned in
|
---|
151 | DriverName.
|
---|
152 |
|
---|
153 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
---|
154 |
|
---|
155 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
---|
156 | EFI_HANDLE.
|
---|
157 |
|
---|
158 | @retval EFI_INVALID_PARAMETER Language is NULL.
|
---|
159 |
|
---|
160 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
---|
161 |
|
---|
162 | @retval EFI_UNSUPPORTED The driver specified by This is not currently
|
---|
163 | managing the controller specified by
|
---|
164 | ControllerHandle and ChildHandle.
|
---|
165 |
|
---|
166 | @retval EFI_UNSUPPORTED The driver specified by This does not support
|
---|
167 | the language specified by Language.
|
---|
168 |
|
---|
169 | **/
|
---|
170 | EFI_STATUS
|
---|
171 | EFIAPI
|
---|
172 | IDEBusComponentNameGetControllerName (
|
---|
173 | IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
---|
174 | IN EFI_HANDLE ControllerHandle,
|
---|
175 | IN EFI_HANDLE ChildHandle OPTIONAL,
|
---|
176 | IN CHAR8 *Language,
|
---|
177 | OUT CHAR16 **ControllerName
|
---|
178 | );
|
---|
179 |
|
---|
180 |
|
---|
181 | /**
|
---|
182 | Add the component name for the IDE/ATAPI device
|
---|
183 |
|
---|
184 | @param IdeBlkIoDevicePtr A pointer to the IDE_BLK_IO_DEV instance.
|
---|
185 |
|
---|
186 | **/
|
---|
187 | VOID
|
---|
188 | AddName (
|
---|
189 | IN IDE_BLK_IO_DEV *IdeBlkIoDevicePtr
|
---|
190 | );
|
---|
191 |
|
---|
192 | #endif
|
---|