]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Pci/EhciDxe/ComponentName.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / EhciDxe / ComponentName.h
1 /** @file
2
3 This file contains the delarations for componet name routines.
4
5 Copyright (c) 2008 - 2011, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef _COMPONENT_NAME_H_
11 #define _COMPONENT_NAME_H_
12
13
14 /**
15 Retrieves a Unicode string that is the user readable name of the driver.
16
17 This function retrieves the user readable name of a driver in the form of a
18 Unicode string. If the driver specified by This has a user readable name in
19 the language specified by Language, then a pointer to the driver name is
20 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
21 by This does not support the language specified by Language,
22 then EFI_UNSUPPORTED is returned.
23
24 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
25 EFI_COMPONENT_NAME_PROTOCOL instance.
26
27 @param Language[in] A pointer to a Null-terminated ASCII string
28 array indicating the language. This is the
29 language of the driver name that the caller is
30 requesting, and it must match one of the
31 languages specified in SupportedLanguages. The
32 number of languages supported by a driver is up
33 to the driver writer. Language is specified
34 in RFC 4646 or ISO 639-2 language code format.
35
36 @param DriverName[out] A pointer to the Unicode string to return.
37 This Unicode string is the name of the
38 driver specified by This in the language
39 specified by Language.
40
41 @retval EFI_SUCCESS The Unicode string for the Driver specified by
42 This and the language specified by Language was
43 returned in DriverName.
44
45 @retval EFI_INVALID_PARAMETER Language is NULL.
46
47 @retval EFI_INVALID_PARAMETER DriverName is NULL.
48
49 @retval EFI_UNSUPPORTED The driver specified by This does not support
50 the language specified by Language.
51
52 **/
53 EFI_STATUS
54 EFIAPI
55 EhciComponentNameGetDriverName (
56 IN EFI_COMPONENT_NAME_PROTOCOL *This,
57 IN CHAR8 *Language,
58 OUT CHAR16 **DriverName
59 );
60
61
62 /**
63 Retrieves a Unicode string that is the user readable name of the controller
64 that is being managed by a driver.
65
66 This function retrieves the user readable name of the controller specified by
67 ControllerHandle and ChildHandle in the form of a Unicode string. If the
68 driver specified by This has a user readable name in the language specified by
69 Language, then a pointer to the controller name is returned in ControllerName,
70 and EFI_SUCCESS is returned. If the driver specified by This is not currently
71 managing the controller specified by ControllerHandle and ChildHandle,
72 then EFI_UNSUPPORTED is returned. If the driver specified by This does not
73 support the language specified by Language, then EFI_UNSUPPORTED is returned.
74
75 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
76 EFI_COMPONENT_NAME_PROTOCOL instance.
77
78 @param ControllerHandle[in] The handle of a controller that the driver
79 specified by This is managing. This handle
80 specifies the controller whose name is to be
81 returned.
82
83 @param ChildHandle[in] The handle of the child controller to retrieve
84 the name of. This is an optional parameter that
85 may be NULL. It will be NULL for device
86 drivers. It will also be NULL for a bus drivers
87 that wish to retrieve the name of the bus
88 controller. It will not be NULL for a bus
89 driver that wishes to retrieve the name of a
90 child controller.
91
92 @param Language[in] A pointer to a Null-terminated ASCII string
93 array indicating the language. This is the
94 language of the driver name that the caller is
95 requesting, and it must match one of the
96 languages specified in SupportedLanguages. The
97 number of languages supported by a driver is up
98 to the driver writer. Language is specified in
99 RFC 4646 or ISO 639-2 language code format.
100
101 @param ControllerName[out] A pointer to the Unicode string to return.
102 This Unicode string is the name of the
103 controller specified by ControllerHandle and
104 ChildHandle in the language specified by
105 Language from the point of view of the driver
106 specified by This.
107
108 @retval EFI_SUCCESS The Unicode string for the user readable name in
109 the language specified by Language for the
110 driver specified by This was returned in
111 DriverName.
112
113 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
114
115 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
116 EFI_HANDLE.
117
118 @retval EFI_INVALID_PARAMETER Language is NULL.
119
120 @retval EFI_INVALID_PARAMETER ControllerName is NULL.
121
122 @retval EFI_UNSUPPORTED The driver specified by This is not currently
123 managing the controller specified by
124 ControllerHandle and ChildHandle.
125
126 @retval EFI_UNSUPPORTED The driver specified by This does not support
127 the language specified by Language.
128
129 **/
130 EFI_STATUS
131 EFIAPI
132 EhciComponentNameGetControllerName (
133 IN EFI_COMPONENT_NAME_PROTOCOL *This,
134 IN EFI_HANDLE ControllerHandle,
135 IN EFI_HANDLE ChildHandle OPTIONAL,
136 IN CHAR8 *Language,
137 OUT CHAR16 **ControllerName
138 );
139
140 #endif
141