1d1f950002362305fcd4c30f108ef7b76679f5843yshang/** @file 24ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao This protocol is defined in UEFI spec. 34ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao 44ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to 54ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao leverage the EFI configuration driver interface. 6d1f950002362305fcd4c30f108ef7b76679f5843yshang 71c2a496292122bcaa519b1307512dc93f139b1e4Eric DongCopyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> 8af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterThis program and the accompanying materials are licensed and made available under 9af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterthe terms and conditions of the BSD License that accompanies this distribution. 10af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterThe full text of the license may be found at 11af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterhttp://opensource.org/licenses/bsd-license.php. 12af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter 13af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterTHE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterWITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15d1f950002362305fcd4c30f108ef7b76679f5843yshang 16d1f950002362305fcd4c30f108ef7b76679f5843yshang**/ 17d1f950002362305fcd4c30f108ef7b76679f5843yshang 184ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao#ifndef __EFI_FORM_BROWSER2_H__ 194ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao#define __EFI_FORM_BROWSER2_H__ 20d1f950002362305fcd4c30f108ef7b76679f5843yshang 210cd118f7799602a88a5feb8ff1ef3e011a04b8adlgao#include <Guid/HiiPlatformSetupFormset.h> 220cd118f7799602a88a5feb8ff1ef3e011a04b8adlgao 235a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwang#define EFI_FORM_BROWSER2_PROTOCOL_GUID \ 247d582d6b499ed30268da033cc17fbde6e7b02a9dqwang {0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }} 25d1f950002362305fcd4c30f108ef7b76679f5843yshang 26d1f950002362305fcd4c30f108ef7b76679f5843yshang 275a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwangtypedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL; 28d1f950002362305fcd4c30f108ef7b76679f5843yshang 29d1f950002362305fcd4c30f108ef7b76679f5843yshang 30d1f950002362305fcd4c30f108ef7b76679f5843yshang 31d1f950002362305fcd4c30f108ef7b76679f5843yshang/** 32d1f950002362305fcd4c30f108ef7b76679f5843yshang 33af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter @param LeftColumn The value that designates the text column 34f754f721bf10508ca15c5c9243caa39c765662cfvanjeff where the browser window will begin from 35f754f721bf10508ca15c5c9243caa39c765662cfvanjeff the left-hand side of the screen 364ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao 37af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter @param RightColumn The value that designates the text 38f754f721bf10508ca15c5c9243caa39c765662cfvanjeff column where the browser window will end 39f754f721bf10508ca15c5c9243caa39c765662cfvanjeff on the right-hand side of the screen. 40d1f950002362305fcd4c30f108ef7b76679f5843yshang 41af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter @param TopRow The value that designates the text row from the 424ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao top of the screen where the browser window 434ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao will start. 44d1f950002362305fcd4c30f108ef7b76679f5843yshang 45af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter @param BottomRow The value that designates the text row from the 464ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao bottom of the screen where the browser 474ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao window will end. 48d1f950002362305fcd4c30f108ef7b76679f5843yshang**/ 49d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef struct { 50d1f950002362305fcd4c30f108ef7b76679f5843yshang UINTN LeftColumn; 51d1f950002362305fcd4c30f108ef7b76679f5843yshang UINTN RightColumn; 52d1f950002362305fcd4c30f108ef7b76679f5843yshang UINTN TopRow; 53d1f950002362305fcd4c30f108ef7b76679f5843yshang UINTN BottomRow; 54d1f950002362305fcd4c30f108ef7b76679f5843yshang} EFI_SCREEN_DESCRIPTOR; 55d1f950002362305fcd4c30f108ef7b76679f5843yshang 565a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwangtypedef UINTN EFI_BROWSER_ACTION_REQUEST; 575a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwang 587d582d6b499ed30268da033cc17fbde6e7b02a9dqwang#define EFI_BROWSER_ACTION_REQUEST_NONE 0 597d582d6b499ed30268da033cc17fbde6e7b02a9dqwang#define EFI_BROWSER_ACTION_REQUEST_RESET 1 607d582d6b499ed30268da033cc17fbde6e7b02a9dqwang#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2 617d582d6b499ed30268da033cc17fbde6e7b02a9dqwang#define EFI_BROWSER_ACTION_REQUEST_EXIT 3 62d4cb06e12278b59dfee5a80409dbe1c94f65e7ddydong#define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT 4 63d4cb06e12278b59dfee5a80409dbe1c94f65e7ddydong#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 5 64d4cb06e12278b59dfee5a80409dbe1c94f65e7ddydong#define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY 6 65d4cb06e12278b59dfee5a80409dbe1c94f65e7ddydong#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD 7 661c2a496292122bcaa519b1307512dc93f139b1e4Eric Dong#define EFI_BROWSER_ACTION_REQUEST_RECONNECT 8 675a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwang 685a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwang 69d1f950002362305fcd4c30f108ef7b76679f5843yshang/** 70eecd469b1064cd253f0b1c666659505659f8d121lgao Initialize the browser to display the specified configuration forms. 71eecd469b1064cd253f0b1c666659505659f8d121lgao 724ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao This function is the primary interface to the internal forms-based browser. 734ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao The forms browser will display forms associated with the specified Handles. 744ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao The browser will select all forms in packages which have the specified Type 754ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao and (for EFI_HII_PACKAGE_TYPE_GUID) the specified PackageGuid. 764ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao 774ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance 784ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao 794ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @param Handles A pointer to an array of Handles. This value should correspond 80eecd469b1064cd253f0b1c666659505659f8d121lgao to the value of the HII form package that is required to be displayed. 814ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao 824ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @param HandleCount The number of Handles specified in Handle. 834ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao 8425a0aa5d9321d8ced089cae55b8f17929e276f0bqhuang @param FormSetGuid This field points to the EFI_GUID which must match the Guid field or one of the 8525a0aa5d9321d8ced089cae55b8f17929e276f0bqhuang elements of the ClassId field in the EFI_IFR_FORM_SET op-code. If 86ed95ad4e40a823e82e0ac09c1bbe2a8e1684f90eEric Dong FormsetGuid is NULL, then this function will display the form set class 8725a0aa5d9321d8ced089cae55b8f17929e276f0bqhuang EFI_HII_PLATFORM_SETUP_FORMSET_GUID. 884ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao 8925a0aa5d9321d8ced089cae55b8f17929e276f0bqhuang @param FormId This field specifies the identifier of the form within the form set to render as the first 9025a0aa5d9321d8ced089cae55b8f17929e276f0bqhuang displayable page. If this field has a value of 0x0000, then the Forms Browser will 9125a0aa5d9321d8ced089cae55b8f17929e276f0bqhuang render the first enabled form in the form set. 924ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao 934ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in 944ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao characters. 954ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao 964ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @param ActionRequest Points to the action recommended by the form. 974ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao 984ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @retval EFI_SUCCESS The function completed successfully 99d1f950002362305fcd4c30f108ef7b76679f5843yshang 1004ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @retval EFI_NOT_FOUND The variable was not found. 101d1f950002362305fcd4c30f108ef7b76679f5843yshang 1024ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @retval EFI_INVALID_PARAMETER One of the parameters has an 1034ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao invalid value. 104d1f950002362305fcd4c30f108ef7b76679f5843yshang**/ 105d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef 106d1f950002362305fcd4c30f108ef7b76679f5843yshangEFI_STATUS 1078b13229b469f05ec22d76098b052bd6e943feceeklu(EFIAPI *EFI_SEND_FORM2)( 1087d582d6b499ed30268da033cc17fbde6e7b02a9dqwang IN CONST EFI_FORM_BROWSER2_PROTOCOL *This, 1097d582d6b499ed30268da033cc17fbde6e7b02a9dqwang IN EFI_HII_HANDLE *Handle, 1107d582d6b499ed30268da033cc17fbde6e7b02a9dqwang IN UINTN HandleCount, 1117d582d6b499ed30268da033cc17fbde6e7b02a9dqwang IN EFI_GUID *FormSetGuid, OPTIONAL 1127d582d6b499ed30268da033cc17fbde6e7b02a9dqwang IN EFI_FORM_ID FormId, OPTIONAL 1135a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwang IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL 1145a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwang OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL 115d1f950002362305fcd4c30f108ef7b76679f5843yshang); 116d1f950002362305fcd4c30f108ef7b76679f5843yshang 117d1f950002362305fcd4c30f108ef7b76679f5843yshang 118d1f950002362305fcd4c30f108ef7b76679f5843yshang/** 119eecd469b1064cd253f0b1c666659505659f8d121lgao This function is called by a callback handler to retrieve uncommitted state data from the browser. 120eecd469b1064cd253f0b1c666659505659f8d121lgao 121d1f950002362305fcd4c30f108ef7b76679f5843yshang This routine is called by a routine which was called by the 122d1f950002362305fcd4c30f108ef7b76679f5843yshang browser. This routine called this service in the browser to 123d1f950002362305fcd4c30f108ef7b76679f5843yshang retrieve or set certain uncommitted state information. 124d1f950002362305fcd4c30f108ef7b76679f5843yshang 1254ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance. 126d1f950002362305fcd4c30f108ef7b76679f5843yshang 127d1f950002362305fcd4c30f108ef7b76679f5843yshang @param ResultsDataSize A pointer to the size of the buffer 1284ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao associated with ResultsData. On input, the size in 129af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter bytes of ResultsData. On output, the size of data 130af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter returned in ResultsData. 131d1f950002362305fcd4c30f108ef7b76679f5843yshang 1324ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @param ResultsData A string returned from an IFR browser or 1334ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao equivalent. The results string will have 1344ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao no routing information in them. 135d1f950002362305fcd4c30f108ef7b76679f5843yshang 136d1f950002362305fcd4c30f108ef7b76679f5843yshang @param RetrieveData A BOOLEAN field which allows an agent to 137d1f950002362305fcd4c30f108ef7b76679f5843yshang retrieve (if RetrieveData = TRUE) data 138d1f950002362305fcd4c30f108ef7b76679f5843yshang from the uncommitted browser state 139d1f950002362305fcd4c30f108ef7b76679f5843yshang information or set (if RetrieveData = 140d1f950002362305fcd4c30f108ef7b76679f5843yshang FALSE) data in the uncommitted browser 141d1f950002362305fcd4c30f108ef7b76679f5843yshang state information. 142d1f950002362305fcd4c30f108ef7b76679f5843yshang 143d1f950002362305fcd4c30f108ef7b76679f5843yshang @param VariableGuid An optional field to indicate the target 144d1f950002362305fcd4c30f108ef7b76679f5843yshang variable GUID name to use. 145d1f950002362305fcd4c30f108ef7b76679f5843yshang 146d1f950002362305fcd4c30f108ef7b76679f5843yshang @param VariableName An optional field to indicate the target 147d1f950002362305fcd4c30f108ef7b76679f5843yshang human-readable variable name. 148d1f950002362305fcd4c30f108ef7b76679f5843yshang 1494ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao @retval EFI_SUCCESS The results have been distributed or are 1504ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao awaiting distribution. 151d1f950002362305fcd4c30f108ef7b76679f5843yshang 152d1f950002362305fcd4c30f108ef7b76679f5843yshang @retval EFI_OUT_OF_RESOURCES The ResultsDataSize specified 153d1f950002362305fcd4c30f108ef7b76679f5843yshang was too small to contain the 154d1f950002362305fcd4c30f108ef7b76679f5843yshang results data. 155d1f950002362305fcd4c30f108ef7b76679f5843yshang 156d1f950002362305fcd4c30f108ef7b76679f5843yshang**/ 157d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef 158d1f950002362305fcd4c30f108ef7b76679f5843yshangEFI_STATUS 1598b13229b469f05ec22d76098b052bd6e943feceeklu(EFIAPI *EFI_BROWSER_CALLBACK2)( 1607d582d6b499ed30268da033cc17fbde6e7b02a9dqwang IN CONST EFI_FORM_BROWSER2_PROTOCOL *This, 161d1f950002362305fcd4c30f108ef7b76679f5843yshang IN OUT UINTN *ResultsDataSize, 162d1f950002362305fcd4c30f108ef7b76679f5843yshang IN OUT EFI_STRING ResultsData, 163d1f950002362305fcd4c30f108ef7b76679f5843yshang IN CONST BOOLEAN RetrieveData, 164d1f950002362305fcd4c30f108ef7b76679f5843yshang IN CONST EFI_GUID *VariableGuid, OPTIONAL 165d1f950002362305fcd4c30f108ef7b76679f5843yshang IN CONST CHAR16 *VariableName OPTIONAL 166d1f950002362305fcd4c30f108ef7b76679f5843yshang); 167d1f950002362305fcd4c30f108ef7b76679f5843yshang 16844717a398fddc4df1f4aeaa70bcd7a043187ed34xli/// 16944717a398fddc4df1f4aeaa70bcd7a043187ed34xli/// This interface will allow the caller to direct the configuration 17044717a398fddc4df1f4aeaa70bcd7a043187ed34xli/// driver to use either the HII database or use the passed-in packet of data. 17144717a398fddc4df1f4aeaa70bcd7a043187ed34xli/// 1725a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwangstruct _EFI_FORM_BROWSER2_PROTOCOL { 1735a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwang EFI_SEND_FORM2 SendForm; 1745a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwang EFI_BROWSER_CALLBACK2 BrowserCallback; 175d1f950002362305fcd4c30f108ef7b76679f5843yshang} ; 176d1f950002362305fcd4c30f108ef7b76679f5843yshang 1775a1fc2219b4ec0e13673cebe3689bc6b895d97aaqwangextern EFI_GUID gEfiFormBrowser2ProtocolGuid; 178d1f950002362305fcd4c30f108ef7b76679f5843yshang 179d1f950002362305fcd4c30f108ef7b76679f5843yshang#endif 180d1f950002362305fcd4c30f108ef7b76679f5843yshang 181