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