TianoCore EDK2 master
Loading...
Searching...
No Matches
HttpApp.c
Go to the documentation of this file.
1
11#include "Http.h"
12
13/*
14 * String token ID of help message text.
15 * Shell supports to find help message in the resource section of an
16 * application image if * .MAN file is not found.
17 * This global variable is added to make build tool recognizes
18 * that the help string is consumed by user and then build tool will
19 * add the string into the resource section.
20 * Thus the application can use '-?' option to show help message in Shell.
21 */
23EFI_STRING_ID mStringHelpTokenId = STRING_TOKEN (STR_GET_HELP_HTTP);
24
36EFIAPI
38 IN EFI_HANDLE ImageHandle,
39 IN EFI_SYSTEM_TABLE *SystemTable
40 )
41{
42 EFI_STATUS Status;
43 SHELL_STATUS ShellStatus;
44
45 mHttpHiiHandle = InitializeHiiPackage (ImageHandle);
46 if (mHttpHiiHandle == NULL) {
47 return EFI_ABORTED;
48 }
49
50 Status = EFI_SUCCESS;
51
52 ShellStatus = RunHttp (ImageHandle, SystemTable);
53
54 HiiRemovePackages (mHttpHiiHandle);
55
56 if (Status != SHELL_SUCCESS) {
57 Status = ENCODE_ERROR (ShellStatus);
58 }
59
60 return Status;
61}
VOID EFIAPI HiiRemovePackages(IN EFI_HII_HANDLE HiiHandle)
Definition: HiiLib.c:253
SHELL_STATUS RunHttp(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: Http.c:469
EFI_STATUS EFIAPI HttpAppInitialize(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: HttpApp.c:37
STATIC EFI_HII_HANDLE InitializeHiiPackage(EFI_HANDLE ImageHandle)
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define ENCODE_ERROR(StatusCode)
Definition: Base.h:1037
#define GLOBAL_REMOVE_IF_UNREFERENCED
Definition: Base.h:48
SHELL_STATUS
Definition: Shell.h:21
@ SHELL_SUCCESS
Definition: Shell.h:25
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
#define STRING_TOKEN(t)