]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Udp4Dxe/ComponentName.c
Import SnpDxe, Tcp4Dxe, Udp4Dxe and MnpDxe.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Udp4Dxe / ComponentName.c
CommitLineData
8a67d61d 1/** @file\r
2\r
3Copyright (c) 2006 - 2007, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 ComponentName.c\r
15\r
16Abstract:\r
17\r
18\r
19**/\r
20\r
21\r
22#include "Udp4Impl.h"\r
23\r
24//\r
25// EFI Component Name Functions\r
26//\r
27EFI_STATUS\r
28EFIAPI\r
29UdpComponentNameGetDriverName (\r
30 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
31 IN CHAR8 *Language,\r
32 OUT CHAR16 **DriverName\r
33 );\r
34\r
35EFI_STATUS\r
36EFIAPI\r
37UdpComponentNameGetControllerName (\r
38 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
39 IN EFI_HANDLE ControllerHandle,\r
40 IN EFI_HANDLE ChildHandle OPTIONAL,\r
41 IN CHAR8 *Language,\r
42 OUT CHAR16 **ControllerName\r
43 );\r
44\r
45//\r
46// EFI Component Name Protocol\r
47//\r
48EFI_COMPONENT_NAME_PROTOCOL gUdp4ComponentName = {\r
49 UdpComponentNameGetDriverName,\r
50 UdpComponentNameGetControllerName,\r
51 "eng"\r
52};\r
53\r
54static EFI_UNICODE_STRING_TABLE mUdpDriverNameTable[] = {\r
55 {\r
56 "eng",\r
57 L"UDP Network Service Driver"\r
58 },\r
59 {\r
60 NULL,\r
61 NULL\r
62 }\r
63};\r
64\r
65EFI_STATUS\r
66EFIAPI\r
67UdpComponentNameGetDriverName (\r
68 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
69 IN CHAR8 *Language,\r
70 OUT CHAR16 **DriverName\r
71 )\r
72/*++\r
73\r
74Routine Description:\r
75\r
76 Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
77\r
78Arguments:\r
79\r
80 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
81 Language - A pointer to a three character ISO 639-2 language identifier.\r
82 This is the language of the driver name that that the caller\r
83 is requesting, and it must match one of the languages specified\r
84 in SupportedLanguages. The number of languages supported by a\r
85 driver is up to the driver writer.\r
86 DriverName - A pointer to the Unicode string to return. This Unicode string\r
87 is the name of the driver specified by This in the language\r
88 specified by Language.\r
89\r
90Returns:\r
91\r
92 EFI_SUCCES - The Unicode string for the Driver specified by This\r
93 and the language specified by Language was returned\r
94 in DriverName.\r
95 EFI_INVALID_PARAMETER - Language is NULL.\r
96 EFI_INVALID_PARAMETER - DriverName is NULL.\r
97 EFI_UNSUPPORTED - The driver specified by This does not support the\r
98 language specified by Language.\r
99\r
100--*/\r
101{\r
102 return LookupUnicodeString (\r
103 Language,\r
104 gUdp4ComponentName.SupportedLanguages,\r
105 mUdpDriverNameTable,\r
106 DriverName\r
107 );\r
108}\r
109\r
110EFI_STATUS\r
111EFIAPI\r
112UdpComponentNameGetControllerName (\r
113 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
114 IN EFI_HANDLE ControllerHandle,\r
115 IN EFI_HANDLE ChildHandle OPTIONAL,\r
116 IN CHAR8 *Language,\r
117 OUT CHAR16 **ControllerName\r
118 )\r
119/*++\r
120\r
121Routine Description:\r
122\r
123 Retrieves a Unicode string that is the user readable name of the controller\r
124 that is being managed by an EFI Driver.\r
125\r
126Arguments:\r
127\r
128 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
129 ControllerHandle - The handle of a controller that the driver specified by\r
130 This is managing. This handle specifies the controller\r
131 whose name is to be returned.\r
132 ChildHandle - The handle of the child controller to retrieve the name\r
133 of. This is an optional parameter that may be NULL. It\r
134 will be NULL for device drivers. It will also be NULL\r
135 for a bus drivers that wish to retrieve the name of the\r
136 bus controller. It will not be NULL for a bus driver\r
137 that wishes to retrieve the name of a child controller.\r
138 Language - A pointer to a three character ISO 639-2 language\r
139 identifier. This is the language of the controller name\r
140 that that the caller is requesting, and it must match one\r
141 of the languages specified in SupportedLanguages. The\r
142 number of languages supported by a driver is up to the\r
143 driver writer.\r
144 ControllerName - A pointer to the Unicode string to return. This Unicode\r
145 string is the name of the controller specified by\r
146 ControllerHandle and ChildHandle in the language specified\r
147 by Language from the point of view of the driver specified\r
148 by This.\r
149\r
150Returns:\r
151\r
152 EFI_SUCCESS - The Unicode string for the user readable name in the\r
153 language specified by Language for the driver\r
154 specified by This was returned in DriverName.\r
155 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
156 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
157 EFI_INVALID_PARAMETER - Language is NULL.\r
158 EFI_INVALID_PARAMETER - ControllerName is NULL.\r
159 EFI_UNSUPPORTED - The driver specified by This is not currently managing\r
160 the controller specified by ControllerHandle and\r
161 ChildHandle.\r
162 EFI_UNSUPPORTED - The driver specified by This does not support the\r
163 language specified by Language.\r
164\r
165--*/\r
166{\r
167 return EFI_UNSUPPORTED;\r
168}\r
169\r