]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/Network/PxeDhcp4/Dxe/ComponentName.c
Initial import.
[mirror_edk2.git] / EdkModulePkg / Universal / Network / PxeDhcp4 / Dxe / ComponentName.c
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, 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 ComponentName.c\r
14\r
15Abstract:\r
16 PxeDhcp4 component name protocol declarations\r
17\r
18--*/\r
19\r
20\r
21#include "PxeDhcp4.h"\r
22\r
23/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
24\r
25//\r
26// EFI Component Name Functions\r
27//\r
28EFI_STATUS\r
29EFIAPI\r
30PxeDhcp4ComponentNameGetDriverName (\r
31 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
32 IN CHAR8 *Language,\r
33 OUT CHAR16 **DriverName\r
34 );\r
35\r
36EFI_STATUS\r
37EFIAPI\r
38PxeDhcp4ComponentNameGetControllerName (\r
39 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
40 IN EFI_HANDLE ControllerHandle,\r
41 IN EFI_HANDLE ChildHandle OPTIONAL,\r
42 IN CHAR8 *Language,\r
43 OUT CHAR16 **ControllerName\r
44 );\r
45\r
46/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
47\r
48//\r
49// EFI Component Name Protocol\r
50//\r
51EFI_COMPONENT_NAME_PROTOCOL gPxeDhcp4ComponentName = {\r
52 PxeDhcp4ComponentNameGetDriverName,\r
53 PxeDhcp4ComponentNameGetControllerName,\r
54 "eng"\r
55};\r
56\r
57static EFI_UNICODE_STRING_TABLE mPxeDhcp4DriverNameTable[] = {\r
58 {\r
59 "eng",\r
60 (CHAR16 *) L"PXE DHCPv4 Driver"\r
61 },\r
62 {\r
63 NULL,\r
64 NULL\r
65 }\r
66};\r
67\r
68/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
69EFI_STATUS\r
70EFIAPI\r
71PxeDhcp4ComponentNameGetDriverName (\r
72 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
73 IN CHAR8 *Language,\r
74 OUT CHAR16 **DriverName\r
75 )\r
76/*++\r
77\r
78 Routine Description:\r
79 Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
80\r
81 Arguments:\r
82 This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
83 Language - A pointer to a three character ISO 639-2 language identifier.\r
84 This is the language of the driver name that that the caller \r
85 is requesting, and it must match one of the languages specified\r
86 in SupportedLanguages. The number of languages supported by a \r
87 driver is up to the driver writer.\r
88 DriverName - A pointer to the Unicode string to return. This Unicode string\r
89 is the name of the driver specified by This in the language \r
90 specified by Language.\r
91\r
92 Returns:\r
93 EFI_SUCCESS - The Unicode string for the Driver specified by This\r
94 and the language specified by Language was returned \r
95 in DriverName.\r
96 EFI_INVALID_PARAMETER - Language is NULL.\r
97 EFI_INVALID_PARAMETER - DriverName is NULL.\r
98 EFI_UNSUPPORTED - The driver specified by This does not support the \r
99 language specified by Language.\r
100\r
101--*/\r
102{\r
103 return LookupUnicodeString (\r
104 Language,\r
105 gPxeDhcp4ComponentName.SupportedLanguages,\r
106 mPxeDhcp4DriverNameTable,\r
107 DriverName\r
108 );\r
109}\r
110\r
111/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
112EFI_STATUS\r
113EFIAPI\r
114PxeDhcp4ComponentNameGetControllerName (\r
115 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
116 IN EFI_HANDLE ControllerHandle,\r
117 IN EFI_HANDLE ChildHandle OPTIONAL,\r
118 IN CHAR8 *Language,\r
119 OUT CHAR16 **ControllerName\r
120 )\r
121/*++\r
122\r
123 Routine Description:\r
124 Retrieves a Unicode string that is the user readable name of the controller\r
125 that is being managed by an EFI Driver.\r
126\r
127 Arguments:\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
150 Returns:\r
151 EFI_SUCCESS - The Unicode string for the user readable name in the \r
152 language specified by Language for the driver \r
153 specified by This was returned in DriverName.\r
154 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
155 EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
156 EFI_INVALID_PARAMETER - Language is NULL.\r
157 EFI_INVALID_PARAMETER - ControllerName is NULL.\r
158 EFI_UNSUPPORTED - The driver specified by This is not currently managing \r
159 the controller specified by ControllerHandle and \r
160 ChildHandle.\r
161 EFI_UNSUPPORTED - The driver specified by This does not support the \r
162 language specified by Language.\r
163\r
164--*/\r
165{\r
166 return EFI_UNSUPPORTED;\r
167}\r
168\r
169/* EOF - ComponentName.c */\r