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