Path: blob/main/sys/contrib/edk2/Include/Protocol/FormBrowser2.h
96339 views
/** @file1This protocol is defined in UEFI spec.23The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to4leverage the EFI configuration driver interface.56Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>7SPDX-License-Identifier: BSD-2-Clause-Patent89**/1011#ifndef __EFI_FORM_BROWSER2_H__12#define __EFI_FORM_BROWSER2_H__1314#include <Guid/HiiPlatformSetupFormset.h>1516#define EFI_FORM_BROWSER2_PROTOCOL_GUID \17{0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }}1819typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL;2021/**2223@param LeftColumn The value that designates the text column24where the browser window will begin from25the left-hand side of the screen2627@param RightColumn The value that designates the text28column where the browser window will end29on the right-hand side of the screen.3031@param TopRow The value that designates the text row from the32top of the screen where the browser window33will start.3435@param BottomRow The value that designates the text row from the36bottom of the screen where the browser37window will end.38**/39typedef struct {40UINTN LeftColumn;41UINTN RightColumn;42UINTN TopRow;43UINTN BottomRow;44} EFI_SCREEN_DESCRIPTOR;4546typedef UINTN EFI_BROWSER_ACTION_REQUEST;4748#define EFI_BROWSER_ACTION_REQUEST_NONE 049#define EFI_BROWSER_ACTION_REQUEST_RESET 150#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 251#define EFI_BROWSER_ACTION_REQUEST_EXIT 352#define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT 453#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 554#define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY 655#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD 756#define EFI_BROWSER_ACTION_REQUEST_RECONNECT 857#define EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY 95859/**60Initialize the browser to display the specified configuration forms.6162This function is the primary interface to the internal forms-based browser.63The forms browser will display forms associated with the specified Handles.64The browser will select all forms in packages which have the specified Type65and (for EFI_HII_PACKAGE_TYPE_GUID) the specified PackageGuid.6667@param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance6869@param Handles A pointer to an array of Handles. This value should correspond70to the value of the HII form package that is required to be displayed.7172@param HandleCount The number of Handles specified in Handle.7374@param FormSetGuid This field points to the EFI_GUID which must match the Guid field or one of the75elements of the ClassId field in the EFI_IFR_FORM_SET op-code. If76FormsetGuid is NULL, then this function will display the form set class77EFI_HII_PLATFORM_SETUP_FORMSET_GUID.7879@param FormId This field specifies the identifier of the form within the form set to render as the first80displayable page. If this field has a value of 0x0000, then the Forms Browser will81render the first enabled form in the form set.8283@param ScreenDimensions Points to recommended form dimensions, including any non-content area, in84characters.8586@param ActionRequest Points to the action recommended by the form.8788@retval EFI_SUCCESS The function completed successfully8990@retval EFI_NOT_FOUND The variable was not found.9192@retval EFI_INVALID_PARAMETER One of the parameters has an93invalid value.94**/95typedef96EFI_STATUS97(EFIAPI *EFI_SEND_FORM2)(98IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,99IN EFI_HII_HANDLE *Handle,100IN UINTN HandleCount,101IN EFI_GUID *FormSetGuid OPTIONAL,102IN EFI_FORM_ID FormId OPTIONAL,103IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions OPTIONAL,104OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL105);106107/**108This function is called by a callback handler to retrieve uncommitted state data from the browser.109110This routine is called by a routine which was called by the111browser. This routine called this service in the browser to112retrieve or set certain uncommitted state information.113114@param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.115116@param ResultsDataSize A pointer to the size of the buffer117associated with ResultsData. On input, the size in118bytes of ResultsData. On output, the size of data119returned in ResultsData.120121@param ResultsData A string returned from an IFR browser or122equivalent. The results string will have123no routing information in them.124125@param RetrieveData A BOOLEAN field which allows an agent to126retrieve (if RetrieveData = TRUE) data127from the uncommitted browser state128information or set (if RetrieveData =129FALSE) data in the uncommitted browser130state information.131132@param VariableGuid An optional field to indicate the target133variable GUID name to use.134135@param VariableName An optional field to indicate the target136human-readable variable name.137138@retval EFI_SUCCESS The results have been distributed or are139awaiting distribution.140141@retval EFI_BUFFER_TOO_SMALL The ResultsDataSize specified142was too small to contain the143results data.144145@retval EFI_UNSUPPORTED Uncommitted browser state is not available146at the current stage of execution.147148**/149typedef150EFI_STATUS151(EFIAPI *EFI_BROWSER_CALLBACK2)(152IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,153IN OUT UINTN *ResultsDataSize,154IN OUT EFI_STRING ResultsData,155IN CONST BOOLEAN RetrieveData,156IN CONST EFI_GUID *VariableGuid OPTIONAL,157IN CONST CHAR16 *VariableName OPTIONAL158);159160///161/// This interface will allow the caller to direct the configuration162/// driver to use either the HII database or use the passed-in packet of data.163///164struct _EFI_FORM_BROWSER2_PROTOCOL {165EFI_SEND_FORM2 SendForm;166EFI_BROWSER_CALLBACK2 BrowserCallback;167};168169extern EFI_GUID gEfiFormBrowser2ProtocolGuid;170171#endif172173174