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