iPXE
FormBrowser2.h
Go to the documentation of this file.
1 /** @file
2  This protocol is defined in UEFI spec.
3 
4  The EFI_FORM_BROWSER2_PROTOCOL is the interface to call for drivers to
5  leverage the EFI configuration driver interface.
6 
7 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9 
10 **/
11 
12 #ifndef __EFI_FORM_BROWSER2_H__
13 #define __EFI_FORM_BROWSER2_H__
14 
15 FILE_LICENCE ( BSD2_PATENT );
16 
18 
19 #define EFI_FORM_BROWSER2_PROTOCOL_GUID \
20  {0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }}
21 
23 
24 /**
25 
26  @param LeftColumn The value that designates the text column
27  where the browser window will begin from
28  the left-hand side of the screen
29 
30  @param RightColumn The value that designates the text
31  column where the browser window will end
32  on the right-hand side of the screen.
33 
34  @param TopRow The value that designates the text row from the
35  top of the screen where the browser window
36  will start.
37 
38  @param BottomRow The value that designates the text row from the
39  bottom of the screen where the browser
40  window will end.
41 **/
42 typedef struct {
48 
50 
51 #define EFI_BROWSER_ACTION_REQUEST_NONE 0
52 #define EFI_BROWSER_ACTION_REQUEST_RESET 1
53 #define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2
54 #define EFI_BROWSER_ACTION_REQUEST_EXIT 3
55 #define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT 4
56 #define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 5
57 #define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY 6
58 #define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD 7
59 #define EFI_BROWSER_ACTION_REQUEST_RECONNECT 8
60 #define EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY 9
61 
62 /**
63  Initialize the browser to display the specified configuration forms.
64 
65  This function is the primary interface to the internal forms-based browser.
66  The forms browser will display forms associated with the specified Handles.
67  The browser will select all forms in packages which have the specified Type
68  and (for EFI_HII_PACKAGE_TYPE_GUID) the specified PackageGuid.
69 
70  @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance
71 
72  @param Handles A pointer to an array of Handles. This value should correspond
73  to the value of the HII form package that is required to be displayed.
74 
75  @param HandleCount The number of Handles specified in Handle.
76 
77  @param FormSetGuid This field points to the EFI_GUID which must match the Guid field or one of the
78  elements of the ClassId field in the EFI_IFR_FORM_SET op-code. If
79  FormsetGuid is NULL, then this function will display the form set class
80  EFI_HII_PLATFORM_SETUP_FORMSET_GUID.
81 
82  @param FormId This field specifies the identifier of the form within the form set to render as the first
83  displayable page. If this field has a value of 0x0000, then the Forms Browser will
84  render the first enabled form in the form set.
85 
86  @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in
87  characters.
88 
89  @param ActionRequest Points to the action recommended by the form.
90 
91  @retval EFI_SUCCESS The function completed successfully
92 
93  @retval EFI_NOT_FOUND The variable was not found.
94 
95  @retval EFI_INVALID_PARAMETER One of the parameters has an
96  invalid value.
97 **/
98 typedef
102  IN EFI_HII_HANDLE *Handle,
103  IN UINTN HandleCount,
104  IN EFI_GUID *FormSetGuid OPTIONAL,
105  IN EFI_FORM_ID FormId OPTIONAL,
106  IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions OPTIONAL,
108  );
109 
110 /**
111  This function is called by a callback handler to retrieve uncommitted state data from the browser.
112 
113  This routine is called by a routine which was called by the
114  browser. This routine called this service in the browser to
115  retrieve or set certain uncommitted state information.
116 
117  @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance.
118 
119  @param ResultsDataSize A pointer to the size of the buffer
120  associated with ResultsData. On input, the size in
121  bytes of ResultsData. On output, the size of data
122  returned in ResultsData.
123 
124  @param ResultsData A string returned from an IFR browser or
125  equivalent. The results string will have
126  no routing information in them.
127 
128  @param RetrieveData A BOOLEAN field which allows an agent to
129  retrieve (if RetrieveData = TRUE) data
130  from the uncommitted browser state
131  information or set (if RetrieveData =
132  FALSE) data in the uncommitted browser
133  state information.
134 
135  @param VariableGuid An optional field to indicate the target
136  variable GUID name to use.
137 
138  @param VariableName An optional field to indicate the target
139  human-readable variable name.
140 
141  @retval EFI_SUCCESS The results have been distributed or are
142  awaiting distribution.
143 
144  @retval EFI_BUFFER_TOO_SMALL The ResultsDataSize specified
145  was too small to contain the
146  results data.
147 
148  @retval EFI_UNSUPPORTED Uncommitted browser state is not available
149  at the current stage of execution.
150 
151 **/
152 typedef
156  IN OUT UINTN *ResultsDataSize,
157  IN OUT EFI_STRING ResultsData,
158  IN CONST BOOLEAN RetrieveData,
159  IN CONST EFI_GUID *VariableGuid OPTIONAL,
160  IN CONST CHAR16 *VariableName OPTIONAL
161  );
162 
163 ///
164 /// This interface will allow the caller to direct the configuration
165 /// driver to use either the HII database or use the passed-in packet of data.
166 ///
170 };
171 
173 
174 #endif
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
Definition: Base.h:292
EFI_STATUS(EFIAPI * EFI_SEND_FORM2)(IN CONST EFI_FORM_BROWSER2_PROTOCOL *This, IN EFI_HII_HANDLE *Handle, IN UINTN HandleCount, IN EFI_GUID *FormSetGuid OPTIONAL, IN EFI_FORM_ID FormId OPTIONAL, IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions OPTIONAL, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL)
Initialize the browser to display the specified configuration forms.
Definition: FormBrowser2.h:100
This interface will allow the caller to direct the configuration driver to use either the HII databas...
Definition: FormBrowser2.h:167
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
FILE_LICENCE(BSD2_PATENT)
unsigned char BOOLEAN
EFI_GUID gEfiFormBrowser2ProtocolGuid
unsigned short CHAR16
CHAR16 * EFI_STRING
UINTN EFI_BROWSER_ACTION_REQUEST
Definition: FormBrowser2.h:49
#define OUT
Definition: mlx_utils.h:29
EFI_STATUS(EFIAPI * EFI_BROWSER_CALLBACK2)(IN CONST EFI_FORM_BROWSER2_PROTOCOL *This, IN OUT UINTN *ResultsDataSize, IN OUT EFI_STRING ResultsData, IN CONST BOOLEAN RetrieveData, IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL)
This function is called by a callback handler to retrieve uncommitted state data from the browser.
Definition: FormBrowser2.h:154
#define EFIAPI
UINT64 UINTN
Unsigned value of native width.
#define IN
Definition: mlx_utils.h:28
#define CONST
Datum is read-only.
Definition: Base.h:261
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
EFI_BROWSER_CALLBACK2 BrowserCallback
Definition: FormBrowser2.h:169
GUID indicates that the form set contains forms designed to be used for platform configuration and th...
VOID * EFI_HII_HANDLE
The following types are currently defined: