TianoCore EDK2 master
Loading...
Searching...
No Matches
HttpBootComponentName.c
Go to the documentation of this file.
1
9#include "HttpBootDxe.h"
10
18 "eng"
19};
20
28 "en"
29};
30
36 { "eng;en", (CHAR16 *)L"UEFI HTTP Boot Driver" },
37 { NULL, NULL }
38};
39
45 { "eng;en", (CHAR16 *)L"UEFI Http Boot Controller" },
46 { NULL, NULL }
47};
48
72EFIAPI
75 IN CHAR8 *Language,
76 OUT CHAR16 **DriverName
77 )
78{
80 Language,
81 This->SupportedLanguages,
83 DriverName,
84 (BOOLEAN)(This != &gHttpBootDxeComponentName2)
85 );
86}
87
129EFIAPI
132 IN EFI_HANDLE ControllerHandle,
133 IN EFI_HANDLE ChildHandle OPTIONAL,
134 IN CHAR8 *Language,
135 OUT CHAR16 **ControllerName
136 )
137{
138 EFI_STATUS Status;
139 EFI_HANDLE NicHandle;
140 UINT32 *Id;
141
142 if ((ControllerHandle == NULL) || (ChildHandle != NULL)) {
143 return EFI_UNSUPPORTED;
144 }
145
146 NicHandle = HttpBootGetNicByIp4Children (ControllerHandle);
147 if (NicHandle == NULL) {
148 NicHandle = HttpBootGetNicByIp6Children (ControllerHandle);
149 if (NicHandle == NULL) {
150 return EFI_UNSUPPORTED;
151 }
152 }
153
154 //
155 // Try to retrieve the private data by caller ID GUID.
156 //
157 Status = gBS->OpenProtocol (
158 NicHandle,
159 &gEfiCallerIdGuid,
160 (VOID **)&Id,
161 NULL,
162 NULL,
163 EFI_OPEN_PROTOCOL_GET_PROTOCOL
164 );
165 if (EFI_ERROR (Status)) {
166 return Status;
167 }
168
169 return LookupUnicodeString2 (
170 Language,
171 This->SupportedLanguages,
173 ControllerName,
174 (BOOLEAN)(This != &gHttpBootDxeComponentName2)
175 );
176}
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mHttpBootDxeDriverNameTable[]
EFI_STATUS EFIAPI HttpBootDxeComponentNameGetDriverName(IN EFI_COMPONENT_NAME2_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName)
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gHttpBootDxeComponentName
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mHttpBootDxeControllerNameTable[]
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gHttpBootDxeComponentName2
EFI_STATUS EFIAPI HttpBootDxeComponentNameGetControllerName(IN EFI_COMPONENT_NAME2_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName)
EFI_HANDLE HttpBootGetNicByIp4Children(IN EFI_HANDLE ControllerHandle)
EFI_HANDLE HttpBootGetNicByIp6Children(IN EFI_HANDLE ControllerHandle)
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define GLOBAL_REMOVE_IF_UNREFERENCED
Definition: Base.h:48
EFI_STATUS(EFIAPI * EFI_COMPONENT_NAME_GET_CONTROLLER_NAME)(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName)
Definition: ComponentName.h:96
EFI_STATUS(EFIAPI * EFI_COMPONENT_NAME_GET_DRIVER_NAME)(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName)
Definition: ComponentName.h:48
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_BOOT_SERVICES * gBS
EFI_STATUS EFIAPI LookupUnicodeString2(IN CONST CHAR8 *Language, IN CONST CHAR8 *SupportedLanguages, IN CONST EFI_UNICODE_STRING_TABLE *UnicodeStringTable, OUT CHAR16 **UnicodeString, IN BOOLEAN Iso639Language)
Definition: UefiLib.c:801