]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c
Fixed EBC build issues.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / ComponentName.c
CommitLineData
8a67d61d 1/** @file\r
2\r
3Copyright (c) 2005 - 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#include "Tcp4Main.h"\r
22\r
23//\r
24// EFI Component Name Functions\r
25//\r
26EFI_STATUS\r
27EFIAPI\r
28TcpComponentNameGetDriverName (\r
29 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
30 IN CHAR8 *Language,\r
31 OUT CHAR16 **DriverName\r
32 );\r
33\r
34EFI_STATUS\r
35EFIAPI\r
36TcpComponentNameGetControllerName (\r
37 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
38 IN EFI_HANDLE ControllerHandle,\r
39 IN EFI_HANDLE ChildHandle OPTIONAL,\r
40 IN CHAR8 *Language,\r
41 OUT CHAR16 **ControllerName\r
42 );\r
43\r
44//\r
45// EFI Component Name Protocol\r
46//\r
47EFI_COMPONENT_NAME_PROTOCOL gTcp4ComponentName = {\r
48 TcpComponentNameGetDriverName,\r
49 TcpComponentNameGetControllerName,\r
50 "eng"\r
51};\r
52\r
53static EFI_UNICODE_STRING_TABLE mTcpDriverNameTable[] = {\r
54 {\r
55 "eng",\r
56 L"Tcp Network Service Driver"\r
57 },\r
58 {\r
59 NULL,\r
60 NULL\r
61 }\r
62};\r
63\r
64EFI_STATUS\r
65EFIAPI\r
66TcpComponentNameGetDriverName (\r
67 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
68 IN CHAR8 *Language,\r
69 OUT CHAR16 **DriverName\r
70 )\r
71/*++\r
72\r
73Routine Description:\r
74\r
75 Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
76\r
77Arguments:\r
78\r
79 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
80 Language - A pointer to a three character ISO 639-2 language identifier.\r
81 This is the language of the driver name that that the caller\r
82 is requesting, and it must match one of the languages\r
83 specified in SupportedLanguages. The number of languages\r
84 supported by a driver is up to the driver writer.\r
85 DriverName - A pointer to the Unicode string to return. This Unicode\r
86 string is the name of the driver specified by This in the\r
87 language specified by Language.\r
88\r
89Returns:\r
90\r
91 EFI_SUCCES - The Unicode string for the Driver specified by\r
92 This and the language specified by Language was\r
93 returned in DriverName.\r
94 EFI_INVALID_PARAMETER - Language is NULL.\r
95 EFI_INVALID_PARAMETER - DriverName is NULL.\r
96 EFI_UNSUPPORTED - The driver specified by This does not support the\r
97 language specified by Language.\r
98\r
99--*/\r
100{\r
101 return LookupUnicodeString (\r
102 Language,\r
103 gTcp4ComponentName.SupportedLanguages,\r
104 mTcpDriverNameTable,\r
105 DriverName\r
106 );\r
107}\r
108\r
109EFI_STATUS\r
110EFIAPI\r
111TcpComponentNameGetControllerName (\r
112 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
113 IN EFI_HANDLE ControllerHandle,\r
114 IN EFI_HANDLE ChildHandle OPTIONAL,\r
115 IN CHAR8 *Language,\r
116 OUT CHAR16 **ControllerName\r
117 )\r
118/*++\r
119\r
120Routine Description:\r
121\r
122 Retrieves a Unicode string that is the user readable name of the controller\r
123 that is being managed by an EFI Driver.\r
124\r
125Arguments:\r
126\r
127 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
128 ControllerHandle - The handle of a controller that the driver specified by\r
129 This is managing. This handle specifies the controller\r
130 whose name is to be returned.\r
131 ChildHandle - The handle of the child controller to retrieve the name\r
132 of. This is an optional parameter that may be NULL.\r
133 It will be NULL for device drivers. It will also be\r
134 NULL for a bus drivers that wish to retrieve the name of\r
135 the bus controller. It will not be NULL for a bus\r
136 driver that wishes to retrieve the name of a child\r
137 controller.\r
138 Language - A pointer to a three character ISO 639-2 language\r
139 identifier. This is the language of the controller\r
140 name that that the caller is requesting, and it must\r
141 match one of the languages specified in supported\r
142 languages. The number of languages supported by a driver\r
143 is up to the 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\r
147 specified by Language from the point of view of the\r
148 driver specified by This.\r
149\r
150Returns:\r
151\r
152 EFI_SUCCESS - The Unicode string for the user readable name in\r
153 the 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\r
157 EFI_HANDLE.\r
158 EFI_INVALID_PARAMETER - Language is NULL.\r
159 EFI_INVALID_PARAMETER - ControllerName is NULL.\r
160 EFI_UNSUPPORTED - The driver specified by This is not currently\r
161 managing the controller specified by\r
162 ControllerHandle and ChildHandle.\r
163 EFI_UNSUPPORTED - The driver specified by This does not support the\r
164 language specified by Language.\r
165\r
166--*/\r
167{\r
168 return EFI_UNSUPPORTED;\r
169}\r