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