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