2 This protocol is defined in UEFI spec.
4 The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to
5 leverage the EFI configuration driver interface.
7 Copyright (c) 2006 - 2008, Intel Corporation
8 All rights reserved. This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #ifndef __EFI_FORM_BROWSER2_H__
19 #define __EFI_FORM_BROWSER2_H__
21 #define EFI_FORM_BROWSER2_PROTOCOL_GUID \
22 {0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }}
25 typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL
;
31 @param LeftColumn Value that designates the text column
32 at which the browser window will begin (left-most column).
34 @param RightColumn Value that designates the text
35 column at which the browser window will end (right-most column).
37 @param TopRow Value that designates the text row from the
38 top of the screen where the browser window
41 @param BottomRow Value that designates the text row from the
42 bottom of the screen where the browser
50 } EFI_SCREEN_DESCRIPTOR
;
52 typedef UINTN EFI_BROWSER_ACTION_REQUEST
;
54 #define EFI_BROWSER_ACTION_REQUEST_NONE 0
55 #define EFI_BROWSER_ACTION_REQUEST_RESET 1
56 #define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2
57 #define EFI_BROWSER_ACTION_REQUEST_EXIT 3
61 Initialize the browser to display the specified configuration forms.
63 This function is the primary interface to the internal forms-based browser.
64 The forms browser will display forms associated with the specified Handles.
65 The browser will select all forms in packages which have the specified Type
66 and (for EFI_HII_PACKAGE_TYPE_GUID) the specified PackageGuid.
68 @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance
70 @param Handles A pointer to an array of Handles. This value should correspond
71 to the value of the HII form package that is required to be displayed.
73 @param HandleCount The number of Handles specified in Handle.
75 @param FormSetGuid This field points to the EFI_GUID which must match the Guid
76 field in the EFI_IFR_FORM_SET op-code for the specified
77 forms-based package. If FormSetGuid is NULL, then this
78 function will display the first found forms package.
80 @param FormId This field specifies which EFI_IFR_FORM to render as the first
81 displayable page. If this field has a value of 0x0000, then
82 the forms browser will render the specified forms in their encoded order.
84 @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in
87 @param ActionRequest Points to the action recommended by the form.
89 @retval EFI_SUCCESS The function completed successfully
91 @retval EFI_NOT_FOUND The variable was not found.
93 @retval EFI_INVALID_PARAMETER One of the parameters has an
98 (EFIAPI
*EFI_SEND_FORM2
)(
99 IN CONST EFI_FORM_BROWSER2_PROTOCOL
*This
,
100 IN EFI_HII_HANDLE
*Handle
,
101 IN UINTN HandleCount
,
102 IN EFI_GUID
*FormSetGuid
, OPTIONAL
103 IN EFI_FORM_ID FormId
, OPTIONAL
104 IN CONST EFI_SCREEN_DESCRIPTOR
*ScreenDimensions
, OPTIONAL
105 OUT EFI_BROWSER_ACTION_REQUEST
*ActionRequest OPTIONAL
110 This function is called by a callback handler to retrieve uncommitted state data from the browser.
112 This routine is called by a routine which was called by the
113 browser. This routine called this service in the browser to
114 retrieve or set certain uncommitted state information.
116 @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.
118 @param ResultsDataSize A pointer to the size of the buffer
119 associated with ResultsData. On input, the size in
120 bytes of ResultsData. On output, the size of data returned in ResultsData.
122 @param ResultsData A string returned from an IFR browser or
123 equivalent. The results string will have
124 no routing information in them.
126 @param RetrieveData A BOOLEAN field which allows an agent to
127 retrieve (if RetrieveData = TRUE) data
128 from the uncommitted browser state
129 information or set (if RetrieveData =
130 FALSE) data in the uncommitted browser
133 @param VariableGuid An optional field to indicate the target
134 variable GUID name to use.
136 @param VariableName An optional field to indicate the target
137 human-readable variable name.
139 @retval EFI_SUCCESS The results have been distributed or are
140 awaiting distribution.
142 @retval EFI_OUT_OF_RESOURCES The ResultsDataSize specified
143 was too small to contain the
149 (EFIAPI
*EFI_BROWSER_CALLBACK2
)(
150 IN CONST EFI_FORM_BROWSER2_PROTOCOL
*This
,
151 IN OUT UINTN
*ResultsDataSize
,
152 IN OUT EFI_STRING ResultsData
,
153 IN CONST BOOLEAN RetrieveData
,
154 IN CONST EFI_GUID
*VariableGuid
, OPTIONAL
155 IN CONST CHAR16
*VariableName OPTIONAL
159 /// This interface will allow the caller to direct the configuration
160 /// driver to use either the HII database or use the passed-in packet of data.
162 struct _EFI_FORM_BROWSER2_PROTOCOL
{
163 EFI_SEND_FORM2 SendForm
;
164 EFI_BROWSER_CALLBACK2 BrowserCallback
;
167 extern EFI_GUID gEfiFormBrowser2ProtocolGuid
;