TianoCore EDK2 master
|
Go to the source code of this file.
Functions | |
EFI_STATUS | HttpBootAddBootOption (IN HTTP_BOOT_PRIVATE_DATA *Private, IN BOOLEAN UsingIpv6, IN CHAR16 *Description, IN CHAR16 *Uri) |
EFI_STATUS EFIAPI | HttpBootFormExtractConfig (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results) |
EFI_STATUS EFIAPI | HttpBootFormRouteConfig (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress) |
EFI_STATUS EFIAPI | HttpBootFormCallback (IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN OUT EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest) |
EFI_STATUS | HttpBootConfigFormInit (IN HTTP_BOOT_PRIVATE_DATA *Private) |
EFI_STATUS | HttpBootConfigFormUnload (IN HTTP_BOOT_PRIVATE_DATA *Private) |
Variables | |
CHAR16 | mHttpBootConfigStorageName [] = L"HTTP_BOOT_CONFIG_IFR_NVDATA" |
Helper functions for configuring or getting the parameters relating to HTTP Boot.
Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HttpBootConfig.c.
EFI_STATUS HttpBootAddBootOption | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private, |
IN BOOLEAN | UsingIpv6, | ||
IN CHAR16 * | Description, | ||
IN CHAR16 * | Uri | ||
) |
Add new boot option for HTTP boot.
[in] | Private | Pointer to the driver private data. |
[in] | UsingIpv6 | Set to TRUE if creating boot option for IPv6. |
[in] | Description | The description text of the boot option. |
[in] | Uri | The URI string of the boot file. |
EFI_SUCCESS | The boot option is created successfully. |
Others | Failed to create new boot option. |
Definition at line 27 of file HttpBootConfig.c.
EFI_STATUS HttpBootConfigFormInit | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private | ) |
Initialize the configuration form.
[in] | Private | Pointer to the driver private data. |
EFI_SUCCESS | The configuration form is initialized. |
EFI_OUT_OF_RESOURCES | Failed to allocate memory. |
Definition at line 549 of file HttpBootConfig.c.
EFI_STATUS HttpBootConfigFormUnload | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private | ) |
Unload the configuration form, this includes: delete all the configuration entries, uninstall the form callback protocol, and free the resources used. The form will only be unload completely when both IP4 and IP6 stack are stopped.
[in] | Private | Pointer to the driver private data. |
EFI_SUCCESS | The configuration form is unloaded. |
Others | Failed to unload the form. |
Definition at line 664 of file HttpBootConfig.c.
EFI_STATUS EFIAPI HttpBootFormCallback | ( | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL * | This, |
IN EFI_BROWSER_ACTION | Action, | ||
IN EFI_QUESTION_ID | QuestionId, | ||
IN UINT8 | Type, | ||
IN OUT EFI_IFR_TYPE_VALUE * | Value, | ||
OUT EFI_BROWSER_ACTION_REQUEST * | ActionRequest | ||
) |
This function is called to provide results data to the driver. This data consists of a unique key that is used to identify which data is either being passed back or being asked for.
[in] | This | Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. |
[in] | Action | Specifies the type of action taken by the browser. |
[in] | QuestionId | A unique value which is sent to the original exporting driver so that it can identify the type of data to expect. The format of the data tends to vary based on the opcode that generated the callback. |
[in] | Type | The type of value for the question. |
[in,out] | Value | A pointer to the data being sent to the original exporting driver. |
[out] | ActionRequest | On return, points to the action requested by the callback function. |
EFI_SUCCESS | The callback successfully handled the action. |
EFI_OUT_OF_RESOURCES | Not enough storage is available to hold the variable and its data. |
EFI_DEVICE_ERROR | The variable could not be saved. |
EFI_UNSUPPORTED | The specified Action is not supported by the callback. |
Definition at line 442 of file HttpBootConfig.c.
EFI_STATUS EFIAPI HttpBootFormExtractConfig | ( | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL * | This, |
IN CONST EFI_STRING | Request, | ||
OUT EFI_STRING * | Progress, | ||
OUT EFI_STRING * | Results | ||
) |
This function allows the caller to request the current configuration for one or more named elements. The resulting string is in <ConfigAltResp> format. Also, any and all alternative configuration strings shall be appended to the end of the current configuration string. If they are, they must appear after the current configuration. They must contain the same routing (GUID, NAME, PATH) as the current configuration string. They must have an additional description indicating the type of alternative configuration the string represents, "ALTCFG=<StringToken>". That <StringToken> (when converted from Hex UNICODE to binary) is a reference to a string in the associated string pack.
[in] | This | Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. |
[in] | Request | A null-terminated Unicode string in <ConfigRequest> format. Note that this includes the routing information as well as the configurable name / value pairs. It is invalid for this string to be in <MultiConfigRequest> format. |
[out] | Progress | On return, points to a character in the Request string. Points to the string's null terminator if request was successful. Points to the most recent "&" before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) if the request was not successful. |
[out] | Results | A null-terminated Unicode string in <ConfigAltResp> format which has all values filled in for the names in the Request string. String to be allocated by the called function. |
EFI_SUCCESS | The Results string is filled with the values corresponding to all requested names. |
EFI_OUT_OF_RESOURCES | Not enough memory to store the parts of the results that must be stored awaiting possible future protocols. |
EFI_INVALID_PARAMETER | For example, passing in a NULL for the Request parameter would result in this type of error. In this case, the Progress parameter would be set to NULL. |
EFI_NOT_FOUND | Routing data doesn't match any known driver. Progress set to the first character in the routing header. Note: There is no requirement that the driver validate the routing data. It must skip the <ConfigHdr> in order to process the names. |
EFI_INVALID_PARAMETER | Illegal syntax. Progress set to most recent "&" before the error or the beginning of the string. |
EFI_INVALID_PARAMETER | Unknown name. Progress points to the & before the name in question. |
Definition at line 229 of file HttpBootConfig.c.
EFI_STATUS EFIAPI HttpBootFormRouteConfig | ( | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL * | This, |
IN CONST EFI_STRING | Configuration, | ||
OUT EFI_STRING * | Progress | ||
) |
This function applies changes in a driver's configuration. Input is a Configuration, which has the routing data for this driver followed by name / value configuration pairs. The driver must apply those pairs to its configurable storage. If the driver's configuration is stored in a linear block of data and the driver's name / value pairs are in <BlockConfig> format, it may use the ConfigToBlock helper function (above) to simplify the job.
[in] | This | Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. |
[in] | Configuration | A null-terminated Unicode string in <ConfigString> format. |
[out] | Progress | A pointer to a string filled in with the offset of the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) or the terminating NULL if all was successful. |
EFI_SUCCESS | The results have been distributed or are awaiting distribution. |
EFI_OUT_OF_RESOURCES | Not enough memory to store the parts of the results that must be stored awaiting possible future protocols. |
EFI_INVALID_PARAMETERS | Passing in a NULL for the Results parameter would result in this type of error. |
EFI_NOT_FOUND | Target for the specified routing data was not found. |
Definition at line 356 of file HttpBootConfig.c.
CHAR16 mHttpBootConfigStorageName[] = L"HTTP_BOOT_CONFIG_IFR_NVDATA" |
Definition at line 12 of file HttpBootConfig.c.