]>
Commit | Line | Data |
---|---|---|
7936fb6a | 1 | /** @file\r |
d66e6c16 | 2 | Private MACRO, structure and function definitions for Setup Browser module.\r |
7936fb6a | 3 | \r |
a35ecb75 | 4 | Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r |
e5eed7d3 | 5 | This program and the accompanying materials\r |
7936fb6a | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef _SETUP_H_\r | |
17 | #define _SETUP_H_\r | |
18 | \r | |
19 | \r | |
39099938 | 20 | #include <PiDxe.h>\r |
7936fb6a | 21 | \r |
7936fb6a | 22 | #include <Protocol/SimpleTextOut.h>\r |
23 | #include <Protocol/SimpleTextIn.h>\r | |
24 | #include <Protocol/FormBrowser2.h>\r | |
7c6c064c ED |
25 | #include <Protocol/FormBrowserEx2.h>\r |
26 | #include <Protocol/DisplayProtocol.h>\r | |
7936fb6a | 27 | #include <Protocol/DevicePath.h>\r |
28 | #include <Protocol/UnicodeCollation.h>\r | |
29 | #include <Protocol/HiiConfigAccess.h>\r | |
30 | #include <Protocol/HiiConfigRouting.h>\r | |
31 | #include <Protocol/HiiDatabase.h>\r | |
32 | #include <Protocol/HiiString.h>\r | |
cbf73e50 | 33 | #include <Protocol/UserManager.h>\r |
80a047f0 | 34 | #include <Protocol/DevicePathFromText.h>\r |
9bd22b08 | 35 | #include <Protocol/RegularExpressionProtocol.h>\r |
7936fb6a | 36 | \r |
5c526736 | 37 | #include <Guid/MdeModuleHii.h>\r |
0a1147ed | 38 | #include <Guid/HiiPlatformSetupFormset.h>\r |
2573712e | 39 | #include <Guid/HiiFormMapMethodGuid.h>\r |
7936fb6a | 40 | \r |
7936fb6a | 41 | #include <Library/PrintLib.h>\r |
42 | #include <Library/DebugLib.h>\r | |
43 | #include <Library/BaseMemoryLib.h>\r | |
44 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
45 | #include <Library/UefiDriverEntryPoint.h>\r | |
46 | #include <Library/UefiBootServicesTableLib.h>\r | |
47 | #include <Library/BaseLib.h>\r | |
48 | #include <Library/MemoryAllocationLib.h>\r | |
7936fb6a | 49 | #include <Library/HiiLib.h>\r |
f511d656 | 50 | #include <Library/PcdLib.h>\r |
cb7d01c0 | 51 | #include <Library/DevicePathLib.h>\r |
7c6c064c | 52 | #include <Library/UefiLib.h>\r |
7936fb6a | 53 | \r |
7936fb6a | 54 | \r |
55 | //\r | |
56 | // This is the generated header file which includes whatever needs to be exported (strings + IFR)\r | |
57 | //\r | |
58 | \r | |
7c6c064c ED |
59 | #define UI_ACTION_NONE 0\r |
60 | #define UI_ACTION_REFRESH_FORM 1\r | |
61 | #define UI_ACTION_REFRESH_FORMSET 2\r | |
62 | #define UI_ACTION_EXIT 3\r | |
7936fb6a | 63 | \r |
64 | //\r | |
7936fb6a | 65 | //\r |
66 | // Time definitions\r | |
67 | //\r | |
68 | #define ONE_SECOND 10000000\r | |
69 | \r | |
7936fb6a | 70 | // Incremental string lenght of ConfigRequest\r |
71 | //\r | |
72 | #define CONFIG_REQUEST_STRING_INCREMENTAL 1024\r | |
73 | \r | |
7936fb6a | 74 | //\r |
75 | // Incremental size of stack for expression\r | |
76 | //\r | |
77 | #define EXPRESSION_STACK_SIZE_INCREMENT 0x100\r | |
78 | \r | |
0269d14b | 79 | #define EFI_IFR_SPECIFICATION_VERSION (UINT16) (((EFI_SYSTEM_TABLE_REVISION >> 16) << 8) | (((EFI_SYSTEM_TABLE_REVISION & 0xFFFF) / 10) << 4) | ((EFI_SYSTEM_TABLE_REVISION & 0xFFFF) % 10))\r |
7936fb6a | 80 | \r |
7936fb6a | 81 | \r |
f3f2e05d | 82 | #define SETUP_DRIVER_SIGNATURE SIGNATURE_32 ('F', 'B', 'D', 'V')\r |
7936fb6a | 83 | typedef struct {\r |
84 | UINT32 Signature;\r | |
85 | \r | |
86 | EFI_HANDLE Handle;\r | |
87 | \r | |
88 | //\r | |
89 | // Produced protocol\r | |
90 | //\r | |
7c6c064c ED |
91 | EFI_FORM_BROWSER2_PROTOCOL FormBrowser2;\r |
92 | EFI_FORM_BROWSER_EXTENSION_PROTOCOL FormBrowserEx;\r | |
7936fb6a | 93 | \r |
7c6c064c | 94 | EDKII_FORM_BROWSER_EXTENSION2_PROTOCOL FormBrowserEx2;\r |
7936fb6a | 95 | \r |
7c6c064c | 96 | } SETUP_DRIVER_PRIVATE_DATA;\r |
25361615 | 97 | \r |
7936fb6a | 98 | //\r |
99 | // IFR relative definition\r | |
100 | //\r | |
101 | #define EFI_HII_EXPRESSION_INCONSISTENT_IF 0\r | |
102 | #define EFI_HII_EXPRESSION_NO_SUBMIT_IF 1\r | |
103 | #define EFI_HII_EXPRESSION_GRAY_OUT_IF 2\r | |
104 | #define EFI_HII_EXPRESSION_SUPPRESS_IF 3\r | |
105 | #define EFI_HII_EXPRESSION_DISABLE_IF 4\r | |
106 | #define EFI_HII_EXPRESSION_VALUE 5\r | |
107 | #define EFI_HII_EXPRESSION_RULE 6\r | |
2573712e LG |
108 | #define EFI_HII_EXPRESSION_READ 7\r |
109 | #define EFI_HII_EXPRESSION_WRITE 8\r | |
1c0d306f | 110 | #define EFI_HII_EXPRESSION_WARNING_IF 9\r |
7936fb6a | 111 | \r |
112 | #define EFI_HII_VARSTORE_BUFFER 0\r | |
113 | #define EFI_HII_VARSTORE_NAME_VALUE 1\r | |
c0462ea7 ED |
114 | #define EFI_HII_VARSTORE_EFI_VARIABLE 2 // EFI Varstore type follow UEFI spec before 2.3.1.\r |
115 | #define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3 // EFI varstore type follow UEFI spec 2.3.1 and later.\r | |
7936fb6a | 116 | \r |
117 | #define FORM_INCONSISTENT_VALIDATION 0\r | |
118 | #define FORM_NO_SUBMIT_VALIDATION 1\r | |
119 | \r | |
f3f2e05d | 120 | #define NAME_VALUE_NODE_SIGNATURE SIGNATURE_32 ('N', 'V', 'S', 'T')\r |
7936fb6a | 121 | \r |
122 | typedef struct {\r | |
123 | UINTN Signature;\r | |
124 | LIST_ENTRY Link;\r | |
125 | CHAR16 *Name;\r | |
126 | CHAR16 *Value;\r | |
127 | CHAR16 *EditValue;\r | |
128 | } NAME_VALUE_NODE;\r | |
129 | \r | |
130 | #define NAME_VALUE_NODE_FROM_LINK(a) CR (a, NAME_VALUE_NODE, Link, NAME_VALUE_NODE_SIGNATURE)\r | |
131 | \r | |
94f3aae7 | 132 | #define BROWSER_STORAGE_SIGNATURE SIGNATURE_32 ('B', 'S', 'T', 'G')\r |
7936fb6a | 133 | \r |
134 | typedef struct {\r | |
135 | UINTN Signature;\r | |
136 | LIST_ENTRY Link;\r | |
137 | \r | |
138 | UINT8 Type; // Storage type\r | |
139 | \r | |
fae73624 ED |
140 | BOOLEAN Initialized; // Whether this varstore is initialized, efi varstore not used.\r |
141 | \r | |
142 | EFI_HII_HANDLE HiiHandle; // HiiHandle for this varstore, efi varstore not used.\r | |
7936fb6a | 143 | EFI_GUID Guid;\r |
144 | \r | |
145 | CHAR16 *Name; // For EFI_IFR_VARSTORE\r | |
146 | UINT16 Size;\r | |
147 | UINT8 *Buffer;\r | |
148 | UINT8 *EditBuffer; // Edit copy for Buffer Storage\r | |
149 | \r | |
150 | LIST_ENTRY NameValueListHead; // List of NAME_VALUE_NODE\r | |
151 | \r | |
152 | UINT32 Attributes; // For EFI_IFR_VARSTORE_EFI: EFI Variable attribute\r | |
153 | \r | |
efffd9c1 ED |
154 | CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r |
155 | // <RequestElement> includes all fields which is used by current form sets.\r | |
156 | UINTN SpareStrLen; // Spare length of ConfigRequest string buffer\r | |
94f3aae7 ED |
157 | } BROWSER_STORAGE;\r |
158 | \r | |
159 | #define BROWSER_STORAGE_FROM_LINK(a) CR (a, BROWSER_STORAGE, Link, BROWSER_STORAGE_SIGNATURE)\r | |
160 | \r | |
161 | #define FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'G')\r | |
162 | \r | |
163 | typedef struct {\r | |
164 | UINTN Signature;\r | |
165 | LIST_ENTRY Link;\r | |
166 | \r | |
4d4deaac ED |
167 | LIST_ENTRY SaveFailLink;\r |
168 | \r | |
94f3aae7 ED |
169 | UINT16 VarStoreId;\r |
170 | \r | |
171 | BROWSER_STORAGE *BrowserStorage;\r | |
172 | \r | |
a35ecb75 ED |
173 | CHAR16 *ConfigHdr; // <ConfigHdr>\r |
174 | \r | |
7936fb6a | 175 | CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r |
7a9612ce | 176 | CHAR16 *ConfigAltResp; // Alt config response string for this ConfigRequest.\r |
787fc2a6 | 177 | BOOLEAN HasCallAltCfg; // Flag to show whether browser has call ExtractConfig to get Altcfg string.\r |
7936fb6a | 178 | UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>\r |
179 | UINTN SpareStrLen; // Spare length of ConfigRequest string buffer\r | |
180 | } FORMSET_STORAGE;\r | |
181 | \r | |
182 | #define FORMSET_STORAGE_FROM_LINK(a) CR (a, FORMSET_STORAGE, Link, FORMSET_STORAGE_SIGNATURE)\r | |
4d4deaac | 183 | #define FORMSET_STORAGE_FROM_SAVE_FAIL_LINK(a) CR (a, FORMSET_STORAGE, SaveFailLink, FORMSET_STORAGE_SIGNATURE)\r |
7936fb6a | 184 | \r |
2573712e LG |
185 | typedef union {\r |
186 | EFI_STRING_ID VarName;\r | |
187 | UINT16 VarOffset;\r | |
188 | } VAR_STORE_INFO;\r | |
189 | \r | |
f3f2e05d | 190 | #define EXPRESSION_OPCODE_SIGNATURE SIGNATURE_32 ('E', 'X', 'O', 'P')\r |
7936fb6a | 191 | \r |
192 | typedef struct {\r | |
193 | UINTN Signature;\r | |
194 | LIST_ENTRY Link;\r | |
195 | \r | |
196 | UINT8 Operand;\r | |
197 | \r | |
198 | UINT8 Format; // For EFI_IFR_TO_STRING, EFI_IFR_FIND\r | |
199 | UINT8 Flags; // For EFI_IFR_SPAN\r | |
200 | UINT8 RuleId; // For EFI_IFR_RULE_REF\r | |
201 | \r | |
202 | EFI_HII_VALUE Value; // For EFI_IFR_EQ_ID_VAL, EFI_IFR_UINT64, EFI_IFR_UINT32, EFI_IFR_UINT16, EFI_IFR_UINT8, EFI_IFR_STRING_REF1\r | |
203 | \r | |
2654f642 | 204 | EFI_QUESTION_ID QuestionId; // For EFI_IFR_EQ_ID_ID, EFI_IFR_EQ_ID_VAL_LIST, EFI_IFR_QUESTION_REF1\r |
7936fb6a | 205 | EFI_QUESTION_ID QuestionId2;\r |
206 | \r | |
2654f642 | 207 | UINT16 ListLength; // For EFI_IFR_EQ_ID_VAL_LIST\r |
7936fb6a | 208 | UINT16 *ValueList;\r |
209 | \r | |
210 | EFI_STRING_ID DevicePath; // For EFI_IFR_QUESTION_REF3_2, EFI_IFR_QUESTION_REF3_3\r | |
211 | EFI_GUID Guid;\r | |
2573712e | 212 | \r |
94f3aae7 | 213 | BROWSER_STORAGE *VarStorage; // For EFI_IFR_SET, EFI_IFR_GET\r |
2573712e LG |
214 | VAR_STORE_INFO VarStoreInfo;// For EFI_IFR_SET, EFI_IFR_GET\r |
215 | UINT8 ValueType; // For EFI_IFR_SET, EFI_IFR_GET\r | |
216 | UINT8 ValueWidth; // For EFI_IFR_SET, EFI_IFR_GET\r | |
217 | CHAR16 *ValueName; // For EFI_IFR_SET, EFI_IFR_GET\r | |
218 | LIST_ENTRY MapExpressionList; // nested expressions inside of Map opcode.\r | |
7936fb6a | 219 | } EXPRESSION_OPCODE;\r |
220 | \r | |
221 | #define EXPRESSION_OPCODE_FROM_LINK(a) CR (a, EXPRESSION_OPCODE, Link, EXPRESSION_OPCODE_SIGNATURE)\r | |
222 | \r | |
f3f2e05d | 223 | #define FORM_EXPRESSION_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'P')\r |
7936fb6a | 224 | \r |
225 | typedef struct {\r | |
226 | UINTN Signature;\r | |
227 | LIST_ENTRY Link;\r | |
228 | \r | |
229 | UINT8 Type; // Type for this expression\r | |
230 | \r | |
231 | UINT8 RuleId; // For EFI_IFR_RULE only\r | |
232 | EFI_STRING_ID Error; // For EFI_IFR_NO_SUBMIT_IF, EFI_IFR_INCONSISTENT_IF only\r | |
233 | \r | |
234 | EFI_HII_VALUE Result; // Expression evaluation result\r | |
235 | \r | |
1c0d306f | 236 | UINT8 TimeOut; // For EFI_IFR_WARNING_IF\r |
bfae1330 | 237 | EFI_IFR_OP_HEADER *OpCode; // Save the opcode buffer.\r |
1c0d306f | 238 | \r |
7936fb6a | 239 | LIST_ENTRY OpCodeListHead; // OpCodes consist of this expression (EXPRESSION_OPCODE)\r |
240 | } FORM_EXPRESSION;\r | |
241 | \r | |
242 | #define FORM_EXPRESSION_FROM_LINK(a) CR (a, FORM_EXPRESSION, Link, FORM_EXPRESSION_SIGNATURE)\r | |
243 | \r | |
31585af4 ED |
244 | #define FORM_EXPRESSION_LIST_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'R')\r |
245 | \r | |
246 | typedef struct {\r | |
247 | UINTN Signature;\r | |
248 | UINTN Count;\r | |
249 | FORM_EXPRESSION *Expression[1]; // Array[Count] of expressions\r | |
250 | } FORM_EXPRESSION_LIST;\r | |
251 | \r | |
f3f2e05d | 252 | #define QUESTION_DEFAULT_SIGNATURE SIGNATURE_32 ('Q', 'D', 'F', 'T')\r |
7936fb6a | 253 | \r |
254 | typedef struct {\r | |
255 | UINTN Signature;\r | |
256 | LIST_ENTRY Link;\r | |
257 | \r | |
258 | UINT16 DefaultId;\r | |
259 | EFI_HII_VALUE Value; // Default value\r | |
260 | \r | |
261 | FORM_EXPRESSION *ValueExpression; // Not-NULL indicates default value is provided by EFI_IFR_VALUE\r | |
262 | } QUESTION_DEFAULT;\r | |
263 | \r | |
264 | #define QUESTION_DEFAULT_FROM_LINK(a) CR (a, QUESTION_DEFAULT, Link, QUESTION_DEFAULT_SIGNATURE)\r | |
265 | \r | |
f3f2e05d | 266 | #define QUESTION_OPTION_SIGNATURE SIGNATURE_32 ('Q', 'O', 'P', 'T')\r |
7936fb6a | 267 | \r |
268 | typedef struct {\r | |
31585af4 ED |
269 | UINTN Signature;\r |
270 | LIST_ENTRY Link;\r | |
7c6c064c ED |
271 | \r |
272 | EFI_IFR_ONE_OF_OPTION *OpCode; // OneOfOption Data\r | |
7936fb6a | 273 | \r |
31585af4 ED |
274 | EFI_STRING_ID Text;\r |
275 | UINT8 Flags;\r | |
276 | EFI_HII_VALUE Value;\r | |
277 | EFI_IMAGE_ID ImageId;\r | |
7936fb6a | 278 | \r |
31585af4 | 279 | FORM_EXPRESSION_LIST *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf\r |
7936fb6a | 280 | } QUESTION_OPTION;\r |
281 | \r | |
282 | #define QUESTION_OPTION_FROM_LINK(a) CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)\r | |
283 | \r | |
31585af4 ED |
284 | typedef enum {\r |
285 | ExpressFalse = 0,\r | |
286 | ExpressGrayOut, \r | |
287 | ExpressSuppress,\r | |
288 | ExpressDisable\r | |
289 | } EXPRESS_RESULT;\r | |
290 | \r | |
291 | typedef enum {\r | |
292 | ExpressNone = 0,\r | |
293 | ExpressForm, \r | |
294 | ExpressStatement,\r | |
295 | ExpressOption\r | |
296 | } EXPRESS_LEVEL;\r | |
297 | \r | |
077c7aee ED |
298 | typedef struct _FORM_BROWSER_STATEMENT FORM_BROWSER_STATEMENT;\r |
299 | \r | |
f3f2e05d | 300 | #define FORM_BROWSER_STATEMENT_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'A')\r |
1ccdbf2a | 301 | \r |
077c7aee | 302 | struct _FORM_BROWSER_STATEMENT{\r |
7936fb6a | 303 | UINTN Signature;\r |
304 | LIST_ENTRY Link;\r | |
305 | \r | |
306 | UINT8 Operand; // The operand (first byte) of this Statement or Question\r | |
7c6c064c | 307 | EFI_IFR_OP_HEADER *OpCode;\r |
7936fb6a | 308 | \r |
309 | //\r | |
310 | // Statement Header\r | |
311 | //\r | |
312 | EFI_STRING_ID Prompt;\r | |
313 | EFI_STRING_ID Help;\r | |
314 | EFI_STRING_ID TextTwo; // For EFI_IFR_TEXT\r | |
315 | \r | |
7c6c064c ED |
316 | //\r |
317 | // Fake Question Id, used for statement not has true QuestionId.\r | |
318 | //\r | |
319 | EFI_QUESTION_ID FakeQuestionId;\r | |
320 | \r | |
7936fb6a | 321 | //\r |
322 | // Question Header\r | |
323 | //\r | |
324 | EFI_QUESTION_ID QuestionId; // The value of zero is reserved\r | |
325 | EFI_VARSTORE_ID VarStoreId; // A value of zero indicates no variable storage\r | |
94f3aae7 | 326 | BROWSER_STORAGE *Storage;\r |
1ccdbf2a | 327 | VAR_STORE_INFO VarStoreInfo;\r |
7936fb6a | 328 | UINT16 StorageWidth;\r |
329 | UINT8 QuestionFlags;\r | |
330 | CHAR16 *VariableName; // Name/Value or EFI Variable name\r | |
331 | CHAR16 *BlockName; // Buffer storage block name: "OFFSET=...WIDTH=..."\r | |
332 | \r | |
333 | EFI_HII_VALUE HiiValue; // Edit copy for checkbox, numberic, oneof\r | |
334 | UINT8 *BufferValue; // Edit copy for string, password, orderedlist\r | |
d02847d3 | 335 | UINT8 ValueType; // Data type for orderedlist value array\r |
7936fb6a | 336 | \r |
337 | //\r | |
338 | // OpCode specific members\r | |
339 | //\r | |
340 | UINT8 Flags; // for EFI_IFR_CHECKBOX, EFI_IFR_DATE, EFI_IFR_NUMERIC, EFI_IFR_ONE_OF,\r | |
341 | // EFI_IFR_ORDERED_LIST, EFI_IFR_STRING,EFI_IFR_SUBTITLE,EFI_IFR_TIME, EFI_IFR_BANNER\r | |
342 | UINT8 MaxContainers; // for EFI_IFR_ORDERED_LIST\r | |
343 | \r | |
344 | UINT16 BannerLineNumber; // for EFI_IFR_BANNER, 1-based line number\r | |
345 | EFI_STRING_ID QuestionConfig; // for EFI_IFR_ACTION, if 0 then no configuration string will be processed\r | |
346 | \r | |
347 | UINT64 Minimum; // for EFI_IFR_ONE_OF/EFI_IFR_NUMERIC, it's Min/Max value\r | |
348 | UINT64 Maximum; // for EFI_IFR_STRING/EFI_IFR_PASSWORD, it's Min/Max length\r | |
349 | UINT64 Step;\r | |
350 | \r | |
351 | EFI_DEFAULT_ID DefaultId; // for EFI_IFR_RESET_BUTTON\r | |
211cc6e5 | 352 | EFI_GUID RefreshGuid; // for EFI_IFR_REFRESH_ID\r |
f67c4382 | 353 | BOOLEAN Locked; // Whether this statement is locked.\r |
7c6c064c | 354 | BOOLEAN ValueChanged; // Whether this statement's value is changed.\r |
7936fb6a | 355 | //\r |
356 | // Get from IFR parsing\r | |
357 | //\r | |
358 | FORM_EXPRESSION *ValueExpression; // nested EFI_IFR_VALUE, provide Question value and indicate Question is ReadOnly\r | |
359 | LIST_ENTRY DefaultListHead; // nested EFI_IFR_DEFAULT list (QUESTION_DEFAULT), provide default values\r | |
360 | LIST_ENTRY OptionListHead; // nested EFI_IFR_ONE_OF_OPTION list (QUESTION_OPTION)\r | |
361 | \r | |
362 | EFI_IMAGE_ID ImageId; // nested EFI_IFR_IMAGE\r | |
363 | UINT8 RefreshInterval; // nested EFI_IFR_REFRESH, refresh interval(in seconds) for Question value, 0 means no refresh\r | |
077c7aee ED |
364 | \r |
365 | FORM_BROWSER_STATEMENT *ParentStatement;\r | |
7936fb6a | 366 | \r |
367 | LIST_ENTRY InconsistentListHead;// nested inconsistent expression list (FORM_EXPRESSION)\r | |
368 | LIST_ENTRY NoSubmitListHead; // nested nosubmit expression list (FORM_EXPRESSION)\r | |
1c0d306f | 369 | LIST_ENTRY WarningListHead; // nested warning expression list (FORM_EXPRESSION)\r |
31585af4 | 370 | FORM_EXPRESSION_LIST *Expression; // nesting inside of GrayOutIf/DisableIf/SuppressIf\r |
7936fb6a | 371 | \r |
2573712e LG |
372 | FORM_EXPRESSION *ReadExpression; // nested EFI_IFR_READ, provide this question value by read expression.\r |
373 | FORM_EXPRESSION *WriteExpression; // nested EFI_IFR_WRITE, evaluate write expression after this question value is set.\r | |
077c7aee | 374 | };\r |
7936fb6a | 375 | \r |
376 | #define FORM_BROWSER_STATEMENT_FROM_LINK(a) CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)\r | |
377 | \r | |
b18e7050 ED |
378 | #define FORM_BROWSER_CONFIG_REQUEST_SIGNATURE SIGNATURE_32 ('F', 'C', 'R', 'S')\r |
379 | typedef struct {\r | |
380 | UINTN Signature;\r | |
381 | LIST_ENTRY Link;\r | |
382 | \r | |
4d4deaac ED |
383 | LIST_ENTRY SaveFailLink;\r |
384 | \r | |
b18e7050 | 385 | CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r |
7a9612ce | 386 | CHAR16 *ConfigAltResp; // Alt config response string for this ConfigRequest.\r |
b18e7050 ED |
387 | UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest> \r |
388 | UINTN SpareStrLen;\r | |
389 | \r | |
94f3aae7 | 390 | BROWSER_STORAGE *Storage;\r |
b18e7050 ED |
391 | } FORM_BROWSER_CONFIG_REQUEST;\r |
392 | #define FORM_BROWSER_CONFIG_REQUEST_FROM_LINK(a) CR (a, FORM_BROWSER_CONFIG_REQUEST, Link, FORM_BROWSER_CONFIG_REQUEST_SIGNATURE)\r | |
4d4deaac | 393 | #define FORM_BROWSER_CONFIG_REQUEST_FROM_SAVE_FAIL_LINK(a) CR (a, FORM_BROWSER_CONFIG_REQUEST, SaveFailLink, FORM_BROWSER_CONFIG_REQUEST_SIGNATURE)\r |
b18e7050 | 394 | \r |
f3f2e05d | 395 | #define FORM_BROWSER_FORM_SIGNATURE SIGNATURE_32 ('F', 'F', 'R', 'M')\r |
2573712e | 396 | #define STANDARD_MAP_FORM_TYPE 0x01\r |
7936fb6a | 397 | \r |
398 | typedef struct {\r | |
31585af4 ED |
399 | UINTN Signature;\r |
400 | LIST_ENTRY Link;\r | |
7936fb6a | 401 | \r |
31585af4 ED |
402 | UINT16 FormId; // FormId of normal form or formmap form.\r |
403 | EFI_STRING_ID FormTitle; // FormTile of normal form, or FormMapMethod title of formmap form.\r | |
404 | UINT16 FormType; // Specific form type for the different form.\r | |
7936fb6a | 405 | \r |
31585af4 | 406 | EFI_IMAGE_ID ImageId;\r |
7936fb6a | 407 | \r |
31585af4 ED |
408 | BOOLEAN ModalForm; // Whether this is a modal form.\r |
409 | BOOLEAN Locked; // Whether this form is locked.\r | |
790447b2 | 410 | EFI_GUID RefreshGuid; // Form refresh event guid.\r |
b00964a9 | 411 | \r |
4d4deaac | 412 | LIST_ENTRY FormViewListHead; // List of type FORMID_INFO is Browser View Form History List.\r |
31585af4 ED |
413 | LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r |
414 | LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)\r | |
415 | LIST_ENTRY ConfigRequestHead; // List of configreques for all storage.\r | |
416 | FORM_EXPRESSION_LIST *SuppressExpression; // nesting inside of SuppressIf\r | |
7936fb6a | 417 | } FORM_BROWSER_FORM;\r |
418 | \r | |
419 | #define FORM_BROWSER_FORM_FROM_LINK(a) CR (a, FORM_BROWSER_FORM, Link, FORM_BROWSER_FORM_SIGNATURE)\r | |
420 | \r | |
f3f2e05d | 421 | #define FORMSET_DEFAULTSTORE_SIGNATURE SIGNATURE_32 ('F', 'D', 'F', 'S')\r |
7936fb6a | 422 | \r |
423 | typedef struct {\r | |
424 | UINTN Signature;\r | |
425 | LIST_ENTRY Link;\r | |
426 | \r | |
427 | UINT16 DefaultId;\r | |
428 | EFI_STRING_ID DefaultName;\r | |
429 | } FORMSET_DEFAULTSTORE;\r | |
430 | \r | |
431 | #define FORMSET_DEFAULTSTORE_FROM_LINK(a) CR (a, FORMSET_DEFAULTSTORE, Link, FORMSET_DEFAULTSTORE_SIGNATURE)\r | |
432 | \r | |
48a9d5f7 LG |
433 | #define FORM_BROWSER_FORMSET_SIGNATURE SIGNATURE_32 ('F', 'B', 'F', 'S')\r |
434 | \r | |
7936fb6a | 435 | typedef struct {\r |
48a9d5f7 LG |
436 | UINTN Signature;\r |
437 | LIST_ENTRY Link;\r | |
4d4deaac ED |
438 | LIST_ENTRY SaveFailLink;\r |
439 | \r | |
48a9d5f7 | 440 | EFI_HII_HANDLE HiiHandle; // unique id for formset.\r |
7936fb6a | 441 | EFI_HANDLE DriverHandle;\r |
442 | EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;\r | |
443 | EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r | |
444 | \r | |
445 | UINTN IfrBinaryLength;\r | |
446 | UINT8 *IfrBinaryData;\r | |
447 | \r | |
7c6c064c | 448 | BOOLEAN QuestionInited; // Have finished question initilization?\r |
7936fb6a | 449 | EFI_GUID Guid;\r |
450 | EFI_STRING_ID FormSetTitle;\r | |
451 | EFI_STRING_ID Help;\r | |
0a1147ed LG |
452 | UINT8 NumberOfClassGuid;\r |
453 | EFI_GUID ClassGuid[3]; // Up to three ClassGuid\r | |
454 | UINT16 Class; // Tiano extended Class code\r | |
455 | UINT16 SubClass; // Tiano extended Subclass code\r | |
7936fb6a | 456 | EFI_IMAGE_ID ImageId;\r |
457 | \r | |
458 | FORM_BROWSER_STATEMENT *StatementBuffer; // Buffer for all Statements and Questions\r | |
459 | EXPRESSION_OPCODE *ExpressionBuffer; // Buffer for all Expression OpCode\r | |
4d4deaac ED |
460 | FORM_BROWSER_FORM *SaveFailForm; // The form which failed to save.\r |
461 | FORM_BROWSER_STATEMENT *SaveFailStatement; // The Statement which failed to save.\r | |
7936fb6a | 462 | \r |
7c6c064c | 463 | LIST_ENTRY StatementListOSF; // Statement list out side of the form.\r |
7936fb6a | 464 | LIST_ENTRY StorageListHead; // Storage list (FORMSET_STORAGE)\r |
4d4deaac | 465 | LIST_ENTRY SaveFailStorageListHead; // Storage list for the save fail storage.\r |
7936fb6a | 466 | LIST_ENTRY DefaultStoreListHead; // DefaultStore list (FORMSET_DEFAULTSTORE)\r |
467 | LIST_ENTRY FormListHead; // Form list (FORM_BROWSER_FORM)\r | |
0c66bc76 | 468 | LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r |
7936fb6a | 469 | } FORM_BROWSER_FORMSET;\r |
25361615 | 470 | #define FORM_BROWSER_FORMSET_FROM_LINK(a) CR (a, FORM_BROWSER_FORMSET, Link, FORM_BROWSER_FORMSET_SIGNATURE)\r |
b9feb4bd | 471 | \r |
4d4deaac ED |
472 | #define FORM_BROWSER_FORMSET_FROM_SAVE_FAIL_LINK(a) CR (a, FORM_BROWSER_FORMSET, SaveFailLink, FORM_BROWSER_FORMSET_SIGNATURE)\r |
473 | \r | |
7c6c064c ED |
474 | typedef struct {\r |
475 | LIST_ENTRY Link;\r | |
476 | EFI_EVENT RefreshEvent;\r | |
477 | } FORM_BROWSER_REFRESH_EVENT_NODE;\r | |
478 | \r | |
479 | #define FORM_BROWSER_REFRESH_EVENT_FROM_LINK(a) BASE_CR (a, FORM_BROWSER_REFRESH_EVENT_NODE, Link)\r | |
480 | \r | |
b9feb4bd | 481 | \r |
48a9d5f7 | 482 | typedef struct {\r |
7c6c064c | 483 | EFI_HII_HANDLE Handle;\r |
48a9d5f7 | 484 | \r |
7c6c064c ED |
485 | //\r |
486 | // Target formset/form/Question information\r | |
487 | //\r | |
488 | EFI_GUID FormSetGuid;\r | |
489 | UINT16 FormId;\r | |
490 | UINT16 QuestionId;\r | |
491 | UINTN Sequence; // used for time/date only.\r | |
492 | \r | |
493 | UINTN TopRow;\r | |
494 | UINTN BottomRow;\r | |
495 | UINTN PromptCol;\r | |
496 | UINTN OptionCol;\r | |
497 | UINTN CurrentRow;\r | |
498 | \r | |
499 | //\r | |
500 | // Ation for Browser to taken:\r | |
501 | // UI_ACTION_NONE - navigation inside a form\r | |
502 | // UI_ACTION_REFRESH_FORM - re-evaluate expressions and repaint form\r | |
503 | // UI_ACTION_REFRESH_FORMSET - re-parse formset IFR binary\r | |
504 | //\r | |
505 | UINTN Action;\r | |
506 | \r | |
507 | //\r | |
508 | // Current selected fomset/form/Question\r | |
509 | //\r | |
510 | FORM_BROWSER_FORMSET *FormSet;\r | |
511 | FORM_BROWSER_FORM *Form;\r | |
512 | FORM_BROWSER_STATEMENT *Statement;\r | |
513 | \r | |
514 | //\r | |
515 | // Whether the Form is editable\r | |
516 | //\r | |
517 | BOOLEAN FormEditable;\r | |
518 | \r | |
519 | FORM_ENTRY_INFO *CurrentMenu;\r | |
520 | } UI_MENU_SELECTION;\r | |
48a9d5f7 | 521 | \r |
5a9f73bf ED |
522 | #define BROWSER_CONTEXT_SIGNATURE SIGNATURE_32 ('B', 'C', 'T', 'X')\r |
523 | \r | |
524 | typedef struct {\r | |
525 | UINTN Signature;\r | |
526 | LIST_ENTRY Link;\r | |
527 | \r | |
528 | //\r | |
529 | // Globals defined in Setup.c\r | |
530 | //\r | |
531 | BOOLEAN ResetRequired;\r | |
532 | BOOLEAN ExitRequired;\r | |
533 | EFI_HII_HANDLE HiiHandle;\r | |
534 | EFI_GUID FormSetGuid;\r | |
535 | EFI_FORM_ID FormId;\r | |
536 | UI_MENU_SELECTION *Selection;\r | |
537 | \r | |
538 | LIST_ENTRY FormHistoryList;\r | |
539 | } BROWSER_CONTEXT;\r | |
540 | \r | |
541 | #define BROWSER_CONTEXT_FROM_LINK(a) CR (a, BROWSER_CONTEXT, Link, BROWSER_CONTEXT_SIGNATURE)\r | |
542 | \r | |
09cdd7d2 ED |
543 | //\r |
544 | // Scope for get defaut value. It may be GetDefaultForNoStorage, GetDefaultForStorage or GetDefaultForAll.\r | |
545 | //\r | |
546 | typedef enum {\r | |
547 | GetDefaultForNoStorage, // Get default value for question which not has storage.\r | |
548 | GetDefaultForStorage, // Get default value for question which has storage.\r | |
549 | GetDefaultForAll, // Get default value for all questions.\r | |
550 | GetDefaultForMax // Invalid value.\r | |
551 | } BROWSER_GET_DEFAULT_VALUE;\r | |
552 | \r | |
816a7110 ED |
553 | //\r |
554 | // Get/set question value from/to.\r | |
555 | //\r | |
556 | typedef enum {\r | |
4d4deaac | 557 | GetSetValueWithEditBuffer = 0, // Get/Set question value from/to editbuffer in the storage.\r |
816a7110 ED |
558 | GetSetValueWithBuffer, // Get/Set question value from/to buffer in the storage.\r |
559 | GetSetValueWithHiiDriver, // Get/Set question value from/to hii driver.\r | |
4d4deaac | 560 | GetSetValueWithBothBuffer, // Compare the editbuffer with buffer for this question, not use the question value.\r |
816a7110 ED |
561 | GetSetValueWithMax // Invalid value.\r |
562 | } GET_SET_QUESTION_VALUE_WITH;\r | |
563 | \r | |
7936fb6a | 564 | extern EFI_HII_DATABASE_PROTOCOL *mHiiDatabase;\r |
7936fb6a | 565 | extern EFI_HII_CONFIG_ROUTING_PROTOCOL *mHiiConfigRouting;\r |
80a047f0 | 566 | extern EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mPathFromText;\r |
7c6c064c | 567 | extern EDKII_FORM_DISPLAY_ENGINE_PROTOCOL *mFormDisplay;\r |
7936fb6a | 568 | \r |
7936fb6a | 569 | extern BOOLEAN gResetRequired;\r |
7c6c064c | 570 | extern BOOLEAN gExitRequired;\r |
48a9d5f7 LG |
571 | extern LIST_ENTRY gBrowserFormSetList;\r |
572 | extern LIST_ENTRY gBrowserHotKeyList;\r | |
573 | extern BROWSER_SETTING_SCOPE gBrowserSettingScope;\r | |
574 | extern EXIT_HANDLER ExitHandlerFunction;\r | |
7c6c064c | 575 | extern EFI_HII_HANDLE mCurrentHiiHandle;\r |
184f3a02 | 576 | extern SETUP_DRIVER_PRIVATE_DATA mPrivateData;\r |
7936fb6a | 577 | //\r |
578 | // Browser Global Strings\r | |
579 | //\r | |
7936fb6a | 580 | extern CHAR16 *gEmptyString;\r |
7936fb6a | 581 | \r |
582 | extern EFI_GUID gZeroGuid;\r | |
7936fb6a | 583 | \r |
7c6c064c ED |
584 | extern UI_MENU_SELECTION *gCurrentSelection;\r |
585 | \r | |
7936fb6a | 586 | //\r |
587 | // Global Procedure Defines\r | |
588 | //\r | |
7c6c064c | 589 | #include "Expression.h"\r |
7936fb6a | 590 | \r |
591 | /**\r | |
592 | Initialize the HII String Token to the correct values.\r | |
593 | \r | |
594 | **/\r | |
595 | VOID\r | |
596 | InitializeBrowserStrings (\r | |
597 | VOID\r | |
ed66e1bc | 598 | );\r |
7936fb6a | 599 | \r |
7936fb6a | 600 | /**\r |
601 | Parse opcodes in the formset IFR binary.\r | |
602 | \r | |
603 | @param FormSet Pointer of the FormSet data structure.\r | |
604 | \r | |
605 | @retval EFI_SUCCESS Opcode parse success.\r | |
606 | @retval Other Opcode parse fail.\r | |
607 | \r | |
608 | **/\r | |
609 | EFI_STATUS\r | |
610 | ParseOpCodes (\r | |
611 | IN FORM_BROWSER_FORMSET *FormSet\r | |
ed66e1bc | 612 | );\r |
7936fb6a | 613 | \r |
614 | /**\r | |
615 | Free resources allocated for a FormSet.\r | |
616 | \r | |
617 | @param FormSet Pointer of the FormSet\r | |
618 | \r | |
619 | **/\r | |
620 | VOID\r | |
621 | DestroyFormSet (\r | |
622 | IN OUT FORM_BROWSER_FORMSET *FormSet\r | |
ed66e1bc | 623 | );\r |
7936fb6a | 624 | \r |
7936fb6a | 625 | \r |
626 | /**\r | |
627 | Create a new string in HII Package List.\r | |
628 | \r | |
629 | @param String The String to be added\r | |
630 | @param HiiHandle The package list in the HII database to insert the\r | |
631 | specified string.\r | |
632 | \r | |
633 | @return The output string.\r | |
634 | \r | |
635 | **/\r | |
636 | EFI_STRING_ID\r | |
637 | NewString (\r | |
638 | IN CHAR16 *String,\r | |
639 | IN EFI_HII_HANDLE HiiHandle\r | |
ed66e1bc | 640 | );\r |
7936fb6a | 641 | \r |
642 | /**\r | |
643 | Delete a string from HII Package List.\r | |
644 | \r | |
645 | @param StringId Id of the string in HII database.\r | |
646 | @param HiiHandle The HII package list handle.\r | |
647 | \r | |
648 | @retval EFI_SUCCESS The string was deleted successfully.\r | |
649 | \r | |
650 | **/\r | |
651 | EFI_STATUS\r | |
652 | DeleteString (\r | |
653 | IN EFI_STRING_ID StringId,\r | |
654 | IN EFI_HII_HANDLE HiiHandle\r | |
ed66e1bc | 655 | );\r |
7936fb6a | 656 | \r |
657 | /**\r | |
658 | Get the string based on the StringId and HII Package List Handle.\r | |
659 | \r | |
660 | @param Token The String's ID.\r | |
661 | @param HiiHandle The package list in the HII database to search for\r | |
662 | the specified string.\r | |
663 | \r | |
664 | @return The output string.\r | |
665 | \r | |
666 | **/\r | |
667 | CHAR16 *\r | |
668 | GetToken (\r | |
669 | IN EFI_STRING_ID Token,\r | |
670 | IN EFI_HII_HANDLE HiiHandle\r | |
ed66e1bc | 671 | );\r |
7936fb6a | 672 | \r |
2573712e LG |
673 | /**\r |
674 | Get Value for given Name from a NameValue Storage.\r | |
675 | \r | |
676 | @param Storage The NameValue Storage.\r | |
677 | @param Name The Name.\r | |
678 | @param Value The retured Value.\r | |
816a7110 | 679 | @param GetValueFrom Where to get source value, from EditValue or Value.\r |
2573712e LG |
680 | \r |
681 | @retval EFI_SUCCESS Value found for given Name.\r | |
682 | @retval EFI_NOT_FOUND No such Name found in NameValue storage.\r | |
683 | \r | |
684 | **/\r | |
685 | EFI_STATUS\r | |
686 | GetValueByName (\r | |
94f3aae7 | 687 | IN BROWSER_STORAGE *Storage,\r |
816a7110 ED |
688 | IN CHAR16 *Name,\r |
689 | IN OUT CHAR16 **Value,\r | |
690 | IN GET_SET_QUESTION_VALUE_WITH GetValueFrom\r | |
2573712e LG |
691 | );\r |
692 | \r | |
693 | /**\r | |
694 | Set Value of given Name in a NameValue Storage.\r | |
695 | \r | |
696 | @param Storage The NameValue Storage.\r | |
697 | @param Name The Name.\r | |
698 | @param Value The Value to set.\r | |
816a7110 | 699 | @param SetValueTo Whether update editValue or Value.\r |
7c6c064c | 700 | @param ReturnNode The node use the input name.\r |
2573712e LG |
701 | \r |
702 | @retval EFI_SUCCESS Value found for given Name.\r | |
703 | @retval EFI_NOT_FOUND No such Name found in NameValue storage.\r | |
704 | \r | |
705 | **/\r | |
706 | EFI_STATUS\r | |
707 | SetValueByName (\r | |
7c6c064c ED |
708 | IN BROWSER_STORAGE *Storage,\r |
709 | IN CHAR16 *Name,\r | |
710 | IN CHAR16 *Value,\r | |
711 | IN GET_SET_QUESTION_VALUE_WITH SetValueTo,\r | |
712 | OUT NAME_VALUE_NODE **ReturnNode\r | |
713 | );\r | |
714 | \r | |
715 | /**\r | |
716 | Validate whether this question's value has changed.\r | |
717 | \r | |
718 | @param FormSet FormSet data structure.\r | |
719 | @param Form Form data structure.\r | |
720 | @param Question Question to be initialized.\r | |
721 | @param GetValueFrom Where to get value, may from editbuffer, buffer or hii driver.\r | |
722 | \r | |
723 | @retval TRUE Question's value has changed.\r | |
724 | @retval FALSE Question's value has not changed\r | |
725 | \r | |
726 | **/\r | |
727 | BOOLEAN\r | |
728 | IsQuestionValueChanged (\r | |
729 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
730 | IN FORM_BROWSER_FORM *Form,\r | |
731 | IN OUT FORM_BROWSER_STATEMENT *Question,\r | |
732 | IN GET_SET_QUESTION_VALUE_WITH GetValueFrom\r | |
2573712e LG |
733 | );\r |
734 | \r | |
892eccc8 ED |
735 | /**\r |
736 | Validate the FormSet. If the formset is not validate, remove it from the list.\r | |
737 | \r | |
738 | @param FormSet The input FormSet which need to validate.\r | |
739 | \r | |
740 | @retval TRUE The handle is validate.\r | |
741 | @retval FALSE The handle is invalidate.\r | |
742 | \r | |
743 | **/\r | |
744 | BOOLEAN\r | |
745 | ValidateFormSet (\r | |
746 | FORM_BROWSER_FORMSET *FormSet\r | |
747 | );\r | |
748 | \r | |
749 | /**\r | |
750 | Update the ValueChanged status for questions.\r | |
751 | \r | |
752 | @param FormSet FormSet data structure.\r | |
753 | @param Form Form data structure.\r | |
754 | @param SettingScope Setting Scope for Default action.\r | |
755 | \r | |
756 | **/\r | |
757 | VOID \r | |
758 | UpdateStatementStatus (\r | |
759 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
760 | IN FORM_BROWSER_FORM *Form, \r | |
761 | IN BROWSER_SETTING_SCOPE SettingScope\r | |
762 | );\r | |
763 | \r | |
7936fb6a | 764 | /**\r |
765 | Get Question's current Value.\r | |
766 | \r | |
767 | @param FormSet FormSet data structure.\r | |
768 | @param Form Form data structure.\r | |
769 | @param Question Question to be initialized.\r | |
816a7110 | 770 | @param GetValueFrom Where to get value, may from editbuffer, buffer or hii driver.\r |
7936fb6a | 771 | \r |
772 | @retval EFI_SUCCESS The function completed successfully.\r | |
773 | \r | |
774 | **/\r | |
775 | EFI_STATUS\r | |
776 | GetQuestionValue (\r | |
777 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
778 | IN FORM_BROWSER_FORM *Form,\r | |
779 | IN OUT FORM_BROWSER_STATEMENT *Question,\r | |
816a7110 | 780 | IN GET_SET_QUESTION_VALUE_WITH GetValueFrom\r |
ed66e1bc | 781 | );\r |
7936fb6a | 782 | \r |
783 | /**\r | |
784 | Save Question Value to edit copy(cached) or Storage(uncached).\r | |
785 | \r | |
786 | @param FormSet FormSet data structure.\r | |
787 | @param Form Form data structure.\r | |
788 | @param Question Pointer to the Question.\r | |
816a7110 | 789 | @param SetValueTo Update the question value to editbuffer , buffer or hii driver.\r |
7936fb6a | 790 | \r |
791 | @retval EFI_SUCCESS The function completed successfully.\r | |
792 | \r | |
793 | **/\r | |
794 | EFI_STATUS\r | |
795 | SetQuestionValue (\r | |
796 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
797 | IN FORM_BROWSER_FORM *Form,\r | |
798 | IN OUT FORM_BROWSER_STATEMENT *Question,\r | |
816a7110 | 799 | IN GET_SET_QUESTION_VALUE_WITH SetValueTo\r |
ed66e1bc | 800 | );\r |
7936fb6a | 801 | \r |
802 | /**\r | |
803 | Perform inconsistent check for a Form.\r | |
804 | \r | |
805 | @param FormSet FormSet data structure.\r | |
806 | @param Form Form data structure.\r | |
807 | @param Question The Question to be validated.\r | |
808 | @param Type Validation type: InConsistent or NoSubmit\r | |
809 | \r | |
810 | @retval EFI_SUCCESS Form validation pass.\r | |
811 | @retval other Form validation failed.\r | |
812 | \r | |
813 | **/\r | |
814 | EFI_STATUS\r | |
815 | ValidateQuestion (\r | |
816 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
817 | IN FORM_BROWSER_FORM *Form,\r | |
818 | IN FORM_BROWSER_STATEMENT *Question,\r | |
819 | IN UINTN Type\r | |
ed66e1bc | 820 | );\r |
7936fb6a | 821 | \r |
48a9d5f7 | 822 | \r |
7936fb6a | 823 | /**\r |
48a9d5f7 | 824 | Discard data based on the input setting scope (Form, FormSet or System).\r |
7936fb6a | 825 | \r |
826 | @param FormSet FormSet data structure.\r | |
827 | @param Form Form data structure.\r | |
48a9d5f7 | 828 | @param SettingScope Setting Scope for Discard action.\r |
b18e7050 ED |
829 | \r |
830 | @retval EFI_SUCCESS The function completed successfully.\r | |
48a9d5f7 | 831 | @retval EFI_UNSUPPORTED Unsupport SettingScope.\r |
b18e7050 ED |
832 | \r |
833 | **/\r | |
834 | EFI_STATUS\r | |
835 | DiscardForm (\r | |
836 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
837 | IN FORM_BROWSER_FORM *Form,\r | |
48a9d5f7 | 838 | IN BROWSER_SETTING_SCOPE SettingScope\r |
b18e7050 ED |
839 | );\r |
840 | \r | |
841 | /**\r | |
48a9d5f7 | 842 | Submit data based on the input Setting level (Form, FormSet or System).\r |
b18e7050 ED |
843 | \r |
844 | @param FormSet FormSet data structure.\r | |
845 | @param Form Form data structure.\r | |
48a9d5f7 | 846 | @param SettingScope Setting Scope for Submit action.\r |
7936fb6a | 847 | \r |
848 | @retval EFI_SUCCESS The function completed successfully.\r | |
48a9d5f7 | 849 | @retval EFI_UNSUPPORTED Unsupport SettingScope.\r |
7936fb6a | 850 | \r |
851 | **/\r | |
852 | EFI_STATUS\r | |
853 | SubmitForm (\r | |
854 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
b18e7050 | 855 | IN FORM_BROWSER_FORM *Form,\r |
48a9d5f7 | 856 | IN BROWSER_SETTING_SCOPE SettingScope\r |
ed66e1bc | 857 | );\r |
7936fb6a | 858 | \r |
859 | /**\r | |
860 | Reset Question to its default value.\r | |
861 | \r | |
862 | @param FormSet The form set.\r | |
863 | @param Form The form.\r | |
864 | @param Question The question.\r | |
865 | @param DefaultId The Class of the default.\r | |
866 | \r | |
867 | @retval EFI_SUCCESS Question is reset to default value.\r | |
868 | \r | |
869 | **/\r | |
870 | EFI_STATUS\r | |
871 | GetQuestionDefault (\r | |
872 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
873 | IN FORM_BROWSER_FORM *Form,\r | |
874 | IN FORM_BROWSER_STATEMENT *Question,\r | |
875 | IN UINT16 DefaultId\r | |
ed66e1bc | 876 | );\r |
7936fb6a | 877 | \r |
878 | /**\r | |
879 | Get current setting of Questions.\r | |
880 | \r | |
881 | @param FormSet FormSet data structure.\r | |
882 | \r | |
7936fb6a | 883 | **/\r |
7c6c064c | 884 | VOID\r |
7936fb6a | 885 | InitializeCurrentSetting (\r |
886 | IN OUT FORM_BROWSER_FORMSET *FormSet\r | |
ed66e1bc | 887 | );\r |
7936fb6a | 888 | \r |
889 | /**\r | |
890 | Initialize the internal data structure of a FormSet.\r | |
891 | \r | |
892 | @param Handle PackageList Handle\r | |
893 | @param FormSetGuid GUID of a formset. If not specified (NULL or zero\r | |
894 | GUID), take the first FormSet found in package\r | |
895 | list.\r | |
896 | @param FormSet FormSet data structure.\r | |
897 | \r | |
898 | @retval EFI_SUCCESS The function completed successfully.\r | |
899 | @retval EFI_NOT_FOUND The specified FormSet could not be found.\r | |
900 | \r | |
901 | **/\r | |
902 | EFI_STATUS\r | |
903 | InitializeFormSet (\r | |
904 | IN EFI_HII_HANDLE Handle,\r | |
905 | IN OUT EFI_GUID *FormSetGuid,\r | |
7c6c064c | 906 | OUT FORM_BROWSER_FORMSET *FormSet \r |
ed66e1bc | 907 | );\r |
7936fb6a | 908 | \r |
909 | /**\r | |
9776099f | 910 | Reset Questions to their initial value or default value in a Form, Formset or System.\r |
7936fb6a | 911 | \r |
09cdd7d2 ED |
912 | GetDefaultValueScope parameter decides which questions will reset \r |
913 | to its default value.\r | |
914 | \r | |
7936fb6a | 915 | @param FormSet FormSet data structure.\r |
48a9d5f7 | 916 | @param Form Form data structure.\r |
7936fb6a | 917 | @param DefaultId The Class of the default.\r |
48a9d5f7 | 918 | @param SettingScope Setting Scope for Default action.\r |
09cdd7d2 | 919 | @param GetDefaultValueScope Get default value scope.\r |
3347d410 | 920 | @param Storage Get default value only for this storage.\r |
9776099f ED |
921 | @param RetrieveValueFirst Whether call the retrieve call back to\r |
922 | get the initial value before get default\r | |
923 | value.\r | |
787fc2a6 | 924 | @param SkipGetAltCfg Whether skip the get altcfg string process.\r |
7936fb6a | 925 | \r |
926 | @retval EFI_SUCCESS The function completed successfully.\r | |
48a9d5f7 | 927 | @retval EFI_UNSUPPORTED Unsupport SettingScope.\r |
7936fb6a | 928 | \r |
929 | **/\r | |
930 | EFI_STATUS\r | |
48a9d5f7 | 931 | ExtractDefault (\r |
7936fb6a | 932 | IN FORM_BROWSER_FORMSET *FormSet,\r |
48a9d5f7 LG |
933 | IN FORM_BROWSER_FORM *Form,\r |
934 | IN UINT16 DefaultId,\r | |
3347d410 | 935 | IN BROWSER_SETTING_SCOPE SettingScope,\r |
09cdd7d2 | 936 | IN BROWSER_GET_DEFAULT_VALUE GetDefaultValueScope,\r |
94f3aae7 | 937 | IN BROWSER_STORAGE *Storage,\r |
787fc2a6 ED |
938 | IN BOOLEAN RetrieveValueFirst,\r |
939 | IN BOOLEAN SkipGetAltCfg\r | |
ed66e1bc | 940 | );\r |
7936fb6a | 941 | \r |
942 | /**\r | |
943 | Initialize Question's Edit copy from Storage.\r | |
944 | \r | |
eccfeab1 LG |
945 | @param Selection Selection contains the information about \r |
946 | the Selection, form and formset to be displayed.\r | |
947 | Selection action may be updated in retrieve callback.\r | |
7d1b202d | 948 | If Selection is NULL, only initialize Question value.\r |
7936fb6a | 949 | @param FormSet FormSet data structure.\r |
950 | @param Form Form data structure.\r | |
951 | \r | |
952 | @retval EFI_SUCCESS The function completed successfully.\r | |
953 | \r | |
954 | **/\r | |
955 | EFI_STATUS\r | |
956 | LoadFormConfig (\r | |
eccfeab1 LG |
957 | IN OUT UI_MENU_SELECTION *Selection,\r |
958 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
959 | IN FORM_BROWSER_FORM *Form\r | |
ed66e1bc | 960 | );\r |
7936fb6a | 961 | \r |
d66e6c16 | 962 | /**\r |
963 | Initialize Question's Edit copy from Storage for the whole Formset.\r | |
964 | \r | |
eccfeab1 LG |
965 | @param Selection Selection contains the information about \r |
966 | the Selection, form and formset to be displayed.\r | |
967 | Selection action may be updated in retrieve callback.\r | |
7d1b202d | 968 | If Selection is NULL, only initialize Question value.\r |
d66e6c16 | 969 | @param FormSet FormSet data structure.\r |
970 | \r | |
971 | @retval EFI_SUCCESS The function completed successfully.\r | |
972 | \r | |
973 | **/\r | |
974 | EFI_STATUS\r | |
975 | LoadFormSetConfig (\r | |
eccfeab1 LG |
976 | IN OUT UI_MENU_SELECTION *Selection,\r |
977 | IN FORM_BROWSER_FORMSET *FormSet\r | |
d66e6c16 | 978 | );\r |
979 | \r | |
7936fb6a | 980 | /**\r |
981 | Convert setting of Buffer Storage or NameValue Storage to <ConfigResp>.\r | |
982 | \r | |
94f3aae7 | 983 | @param Storage The Storage to be conveted.\r |
7936fb6a | 984 | @param ConfigResp The returned <ConfigResp>.\r |
94f3aae7 | 985 | @param ConfigRequest The ConfigRequest string.\r |
7c6c064c | 986 | @param GetEditBuf Get the data from editbuffer or buffer.\r |
7936fb6a | 987 | \r |
988 | @retval EFI_SUCCESS Convert success.\r | |
989 | @retval EFI_INVALID_PARAMETER Incorrect storage type.\r | |
990 | \r | |
991 | **/\r | |
992 | EFI_STATUS\r | |
993 | StorageToConfigResp (\r | |
94f3aae7 | 994 | IN BROWSER_STORAGE *Storage,\r |
b18e7050 | 995 | IN CHAR16 **ConfigResp,\r |
7c6c064c ED |
996 | IN CHAR16 *ConfigRequest,\r |
997 | IN BOOLEAN GetEditBuf\r | |
ed66e1bc | 998 | );\r |
7936fb6a | 999 | \r |
1000 | /**\r | |
1001 | Convert <ConfigResp> to settings in Buffer Storage or NameValue Storage.\r | |
1002 | \r | |
1003 | @param Storage The Storage to receive the settings.\r | |
1004 | @param ConfigResp The <ConfigResp> to be converted.\r | |
1005 | \r | |
1006 | @retval EFI_SUCCESS Convert success.\r | |
1007 | @retval EFI_INVALID_PARAMETER Incorrect storage type.\r | |
1008 | \r | |
1009 | **/\r | |
1010 | EFI_STATUS\r | |
1011 | ConfigRespToStorage (\r | |
94f3aae7 | 1012 | IN BROWSER_STORAGE *Storage,\r |
7936fb6a | 1013 | IN CHAR16 *ConfigResp\r |
ed66e1bc | 1014 | );\r |
7936fb6a | 1015 | \r |
1016 | /**\r | |
1017 | Fill storage's edit copy with settings requested from Configuration Driver.\r | |
1018 | \r | |
1019 | @param FormSet FormSet data structure.\r | |
1020 | @param Storage Buffer Storage.\r | |
1021 | \r | |
7936fb6a | 1022 | **/\r |
7c6c064c | 1023 | VOID\r |
7936fb6a | 1024 | LoadStorage (\r |
1025 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
1026 | IN FORMSET_STORAGE *Storage\r | |
ed66e1bc | 1027 | );\r |
7936fb6a | 1028 | \r |
1029 | /**\r | |
1030 | Fetch the Ifr binary data of a FormSet.\r | |
1031 | \r | |
1032 | @param Handle PackageList Handle\r | |
1033 | @param FormSetGuid GUID of a formset. If not specified (NULL or zero\r | |
1034 | GUID), take the first FormSet found in package\r | |
1035 | list.\r | |
1036 | @param BinaryLength The length of the FormSet IFR binary.\r | |
1037 | @param BinaryData The buffer designed to receive the FormSet.\r | |
1038 | \r | |
1039 | @retval EFI_SUCCESS Buffer filled with the requested FormSet.\r | |
1040 | BufferLength was updated.\r | |
1041 | @retval EFI_INVALID_PARAMETER The handle is unknown.\r | |
1042 | @retval EFI_NOT_FOUND A form or FormSet on the requested handle cannot\r | |
1043 | be found with the requested FormId.\r | |
1044 | \r | |
1045 | **/\r | |
1046 | EFI_STATUS\r | |
1047 | GetIfrBinaryData (\r | |
1048 | IN EFI_HII_HANDLE Handle,\r | |
1049 | IN OUT EFI_GUID *FormSetGuid,\r | |
1050 | OUT UINTN *BinaryLength,\r | |
1051 | OUT UINT8 **BinaryData\r | |
ed66e1bc | 1052 | );\r |
7936fb6a | 1053 | \r |
ce6d12cc | 1054 | /**\r |
1055 | Save globals used by previous call to SendForm(). SendForm() may be called from \r | |
1056 | HiiConfigAccess.Callback(), this will cause SendForm() be reentried.\r | |
1057 | So, save globals of previous call to SendForm() and restore them upon exit.\r | |
1058 | \r | |
1059 | **/\r | |
1060 | VOID\r | |
1061 | SaveBrowserContext (\r | |
1062 | VOID\r | |
1063 | );\r | |
1064 | \r | |
1065 | /**\r | |
1066 | Restore globals used by previous call to SendForm().\r | |
1067 | \r | |
1068 | **/\r | |
1069 | VOID\r | |
1070 | RestoreBrowserContext (\r | |
1071 | VOID\r | |
1072 | );\r | |
1073 | \r | |
7936fb6a | 1074 | /**\r |
1075 | This is the routine which an external caller uses to direct the browser\r | |
1076 | where to obtain it's information.\r | |
1077 | \r | |
1078 | \r | |
1079 | @param This The Form Browser protocol instanse.\r | |
1080 | @param Handles A pointer to an array of Handles. If HandleCount > 1 we\r | |
1081 | display a list of the formsets for the handles specified.\r | |
1082 | @param HandleCount The number of Handles specified in Handle.\r | |
1083 | @param FormSetGuid This field points to the EFI_GUID which must match the Guid\r | |
1084 | field in the EFI_IFR_FORM_SET op-code for the specified\r | |
1085 | forms-based package. If FormSetGuid is NULL, then this\r | |
1086 | function will display the first found forms package.\r | |
1087 | @param FormId This field specifies which EFI_IFR_FORM to render as the first\r | |
1088 | displayable page. If this field has a value of 0x0000, then\r | |
1089 | the forms browser will render the specified forms in their encoded order.\r | |
1090 | ScreenDimenions - This allows the browser to be called so that it occupies a\r | |
1091 | portion of the physical screen instead of dynamically determining the screen dimensions.\r | |
1092 | ActionRequest - Points to the action recommended by the form.\r | |
d66e6c16 | 1093 | @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in\r |
7936fb6a | 1094 | characters.\r |
1095 | @param ActionRequest Points to the action recommended by the form.\r | |
1096 | \r | |
1097 | @retval EFI_SUCCESS The function completed successfully.\r | |
1098 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r | |
1099 | @retval EFI_NOT_FOUND No valid forms could be found to display.\r | |
1100 | \r | |
1101 | **/\r | |
1102 | EFI_STATUS\r | |
1103 | EFIAPI\r | |
1104 | SendForm (\r | |
1105 | IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,\r | |
1106 | IN EFI_HII_HANDLE *Handles,\r | |
1107 | IN UINTN HandleCount,\r | |
1108 | IN EFI_GUID *FormSetGuid, OPTIONAL\r | |
1109 | IN UINT16 FormId, OPTIONAL\r | |
1110 | IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r | |
1111 | OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL\r | |
ed66e1bc | 1112 | );\r |
7936fb6a | 1113 | \r |
1114 | /**\r | |
1115 | This function is called by a callback handler to retrieve uncommitted state\r | |
1116 | data from the browser.\r | |
1117 | \r | |
1118 | @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL\r | |
1119 | instance.\r | |
1120 | @param ResultsDataSize A pointer to the size of the buffer associated\r | |
1121 | with ResultsData.\r | |
1122 | @param ResultsData A string returned from an IFR browser or\r | |
1123 | equivalent. The results string will have no\r | |
1124 | routing information in them.\r | |
1125 | @param RetrieveData A BOOLEAN field which allows an agent to retrieve\r | |
1126 | (if RetrieveData = TRUE) data from the uncommitted\r | |
1127 | browser state information or set (if RetrieveData\r | |
1128 | = FALSE) data in the uncommitted browser state\r | |
1129 | information.\r | |
1130 | @param VariableGuid An optional field to indicate the target variable\r | |
1131 | GUID name to use.\r | |
1132 | @param VariableName An optional field to indicate the target\r | |
1133 | human-readable variable name.\r | |
1134 | \r | |
1135 | @retval EFI_SUCCESS The results have been distributed or are awaiting\r | |
1136 | distribution.\r | |
1137 | @retval EFI_BUFFER_TOO_SMALL The ResultsDataSize specified was too small to\r | |
1138 | contain the results data.\r | |
1139 | \r | |
1140 | **/\r | |
1141 | EFI_STATUS\r | |
1142 | EFIAPI\r | |
1143 | BrowserCallback (\r | |
1144 | IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,\r | |
1145 | IN OUT UINTN *ResultsDataSize,\r | |
1146 | IN OUT EFI_STRING ResultsData,\r | |
1147 | IN BOOLEAN RetrieveData,\r | |
1148 | IN CONST EFI_GUID *VariableGuid, OPTIONAL\r | |
1149 | IN CONST CHAR16 *VariableName OPTIONAL\r | |
ed66e1bc | 1150 | );\r |
7936fb6a | 1151 | \r |
b18e7050 ED |
1152 | /**\r |
1153 | Find menu which will show next time.\r | |
1154 | \r | |
1155 | @param Selection On input, Selection tell setup browser the information\r | |
1156 | about the Selection, form and formset to be displayed.\r | |
1157 | On output, Selection return the screen item that is selected\r | |
1158 | by user.\r | |
7c6c064c ED |
1159 | @param SettingLevel Input Settting level, if it is FormLevel, just exit current form. \r |
1160 | else, we need to exit current formset.\r | |
b18e7050 | 1161 | \r |
7c6c064c ED |
1162 | @retval TRUE Exit current form.\r |
1163 | @retval FALSE User press ESC and keep in current form.\r | |
b18e7050 ED |
1164 | **/\r |
1165 | BOOLEAN\r | |
1166 | FindNextMenu (\r | |
7c6c064c ED |
1167 | IN OUT UI_MENU_SELECTION *Selection,\r |
1168 | IN BROWSER_SETTING_SCOPE SettingLevel\r | |
b18e7050 ED |
1169 | );\r |
1170 | \r | |
1171 | /**\r | |
7c6c064c | 1172 | check whether the form need to update the NV.\r |
b18e7050 | 1173 | \r |
7c6c064c | 1174 | @param Form Form data structure.\r |
b18e7050 | 1175 | \r |
7c6c064c ED |
1176 | @retval TRUE Need to update the NV.\r |
1177 | @retval FALSE No need to update the NV.\r | |
b18e7050 | 1178 | **/\r |
7c6c064c ED |
1179 | BOOLEAN\r |
1180 | IsNvUpdateRequiredForForm (\r | |
1181 | IN FORM_BROWSER_FORM *Form\r | |
b18e7050 ED |
1182 | );\r |
1183 | \r | |
1184 | /**\r | |
1185 | check whether the formset need to update the NV.\r | |
1186 | \r | |
1187 | @param FormSet FormSet data structure.\r | |
1188 | \r | |
1189 | @retval TRUE Need to update the NV.\r | |
1190 | @retval FALSE No need to update the NV.\r | |
1191 | **/\r | |
7c6c064c ED |
1192 | BOOLEAN\r |
1193 | IsNvUpdateRequiredForFormSet (\r | |
25361615 | 1194 | IN FORM_BROWSER_FORMSET *FormSet\r |
b9feb4bd ED |
1195 | );\r |
1196 | \r | |
b18e7050 ED |
1197 | /**\r |
1198 | Call the call back function for the question and process the return action.\r | |
1199 | \r | |
1200 | @param Selection On input, Selection tell setup browser the information\r | |
1201 | about the Selection, form and formset to be displayed.\r | |
1202 | On output, Selection return the screen item that is selected\r | |
1203 | by user.\r | |
798e4d22 ED |
1204 | @param FormSet The formset this question belong to.\r |
1205 | @param Form The form this question belong to.\r | |
1206 | @param Question The Question which need to call.\r | |
b18e7050 ED |
1207 | @param Action The action request.\r |
1208 | @param SkipSaveOrDiscard Whether skip save or discard action.\r | |
1209 | \r | |
1210 | @retval EFI_SUCCESS The call back function excutes successfully.\r | |
1211 | @return Other value if the call back function failed to excute. \r | |
1212 | **/\r | |
1213 | EFI_STATUS \r | |
1214 | ProcessCallBackFunction (\r | |
1215 | IN OUT UI_MENU_SELECTION *Selection,\r | |
798e4d22 ED |
1216 | IN FORM_BROWSER_FORMSET *FormSet,\r |
1217 | IN FORM_BROWSER_FORM *Form,\r | |
b18e7050 ED |
1218 | IN FORM_BROWSER_STATEMENT *Question,\r |
1219 | IN EFI_BROWSER_ACTION Action,\r | |
1220 | IN BOOLEAN SkipSaveOrDiscard\r | |
1221 | );\r | |
9776099f ED |
1222 | \r |
1223 | /**\r | |
1224 | Call the retrieve type call back function for one question to get the initialize data.\r | |
1225 | \r | |
1226 | This function only used when in the initialize stage, because in this stage, the \r | |
1227 | Selection->Form is not ready. For other case, use the ProcessCallBackFunction instead.\r | |
1228 | \r | |
1229 | @param ConfigAccess The config access protocol produced by the hii driver.\r | |
1230 | @param Statement The Question which need to call.\r | |
061d5462 | 1231 | @param FormSet The formset this question belong to.\r |
9776099f ED |
1232 | \r |
1233 | @retval EFI_SUCCESS The call back function excutes successfully.\r | |
1234 | @return Other value if the call back function failed to excute. \r | |
1235 | **/\r | |
1236 | EFI_STATUS \r | |
1237 | ProcessRetrieveForQuestion (\r | |
1238 | IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess,\r | |
061d5462 ED |
1239 | IN FORM_BROWSER_STATEMENT *Statement,\r |
1240 | IN FORM_BROWSER_FORMSET *FormSet\r | |
9776099f | 1241 | );\r |
48a9d5f7 LG |
1242 | \r |
1243 | /**\r | |
1244 | Find the matched FormSet context in the backup maintain list based on HiiHandle.\r | |
1245 | \r | |
1246 | @param Handle The Hii Handle.\r | |
1247 | \r | |
1248 | @return the found FormSet context. If no found, NULL will return.\r | |
1249 | \r | |
1250 | **/\r | |
1251 | FORM_BROWSER_FORMSET * \r | |
1252 | GetFormSetFromHiiHandle (\r | |
1253 | EFI_HII_HANDLE Handle\r | |
1254 | );\r | |
1255 | \r | |
1256 | /**\r | |
1257 | Check whether the input HII handle is the FormSet that is being used.\r | |
1258 | \r | |
1259 | @param Handle The Hii Handle.\r | |
1260 | \r | |
1261 | @retval TRUE HII handle is being used.\r | |
1262 | @retval FALSE HII handle is not being used.\r | |
1263 | \r | |
1264 | **/\r | |
1265 | BOOLEAN\r | |
1266 | IsHiiHandleInBrowserContext (\r | |
1267 | EFI_HII_HANDLE Handle\r | |
1268 | );\r | |
1269 | \r | |
1270 | /**\r | |
1271 | Configure what scope the hot key will impact.\r | |
1272 | All hot keys have the same scope. The mixed hot keys with the different level are not supported.\r | |
1273 | If no scope is set, the default scope will be FormSet level.\r | |
1274 | After all registered hot keys are removed, previous Scope can reset to another level.\r | |
1275 | \r | |
1276 | @param[in] Scope Scope level to be set. \r | |
1277 | \r | |
1278 | @retval EFI_SUCCESS Scope is set correctly.\r | |
1279 | @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE. \r | |
1280 | @retval EFI_UNSPPORTED Scope level is different from current one that the registered hot keys have.\r | |
1281 | \r | |
1282 | **/\r | |
1283 | EFI_STATUS\r | |
1284 | EFIAPI\r | |
1285 | SetScope (\r | |
1286 | IN BROWSER_SETTING_SCOPE Scope\r | |
1287 | );\r | |
1288 | \r | |
1289 | /**\r | |
1290 | Register the hot key with its browser action, or unregistered the hot key.\r | |
1291 | Only support hot key that is not printable character (control key, function key, etc.).\r | |
1292 | If the action value is zero, the hot key will be unregistered if it has been registered.\r | |
1293 | If the same hot key has been registered, the new action and help string will override the previous ones.\r | |
1294 | \r | |
1295 | @param[in] KeyData A pointer to a buffer that describes the keystroke\r | |
1296 | information for the hot key. Its type is EFI_INPUT_KEY to \r | |
1297 | be supported by all ConsoleIn devices.\r | |
1298 | @param[in] Action Action value that describes what action will be trigged when the hot key is pressed. \r | |
1299 | @param[in] DefaultId Specifies the type of defaults to retrieve, which is only for DEFAULT action.\r | |
1300 | @param[in] HelpString Help string that describes the hot key information.\r | |
1301 | Its value may be NULL for the unregistered hot key.\r | |
1302 | \r | |
1303 | @retval EFI_SUCCESS Hot key is registered or unregistered.\r | |
1304 | @retval EFI_INVALID_PARAMETER KeyData is NULL.\r | |
1305 | @retval EFI_NOT_FOUND KeyData is not found to be unregistered.\r | |
1306 | @retval EFI_UNSUPPORTED Key represents a printable character. It is conflicted with Browser.\r | |
1307 | **/\r | |
1308 | EFI_STATUS\r | |
1309 | EFIAPI\r | |
1310 | RegisterHotKey (\r | |
1311 | IN EFI_INPUT_KEY *KeyData,\r | |
1312 | IN UINT32 Action,\r | |
1313 | IN UINT16 DefaultId,\r | |
1314 | IN EFI_STRING HelpString OPTIONAL\r | |
1315 | );\r | |
1316 | \r | |
1317 | /**\r | |
1318 | Register Exit handler function. \r | |
1319 | When more than one handler function is registered, the latter one will override the previous one. \r | |
1320 | When NULL handler is specified, the previous Exit handler will be unregistered. \r | |
1321 | \r | |
1322 | @param[in] Handler Pointer to handler function. \r | |
1323 | \r | |
1324 | **/\r | |
1325 | VOID\r | |
1326 | EFIAPI\r | |
1327 | RegiserExitHandler (\r | |
1328 | IN EXIT_HANDLER Handler\r | |
1329 | );\r | |
1330 | \r | |
7c6c064c ED |
1331 | /**\r |
1332 | \r | |
1333 | Check whether the browser data has been modified. \r | |
1334 | \r | |
1335 | @retval TRUE Browser data is changed.\r | |
1336 | @retval FALSE No browser data is changed.\r | |
1337 | \r | |
1338 | **/\r | |
1339 | BOOLEAN \r | |
1340 | EFIAPI\r | |
1341 | IsBrowserDataModified (\r | |
1342 | VOID\r | |
1343 | );\r | |
1344 | \r | |
1345 | /**\r | |
1346 | \r | |
1347 | Execute the action requested by the Action parameter. \r | |
1348 | \r | |
1349 | @param[in] Action Execute the request action.\r | |
1350 | @param[in] DefaultId The default Id info when need to load default value.\r | |
1351 | \r | |
1352 | @retval EFI_SUCCESS Execute the request action succss.\r | |
1353 | @retval EFI_INVALID_PARAMETER The input action value is invalid.\r | |
1354 | \r | |
1355 | **/\r | |
1356 | EFI_STATUS \r | |
1357 | EFIAPI\r | |
1358 | ExecuteAction (\r | |
1359 | IN UINT32 Action,\r | |
1360 | IN UINT16 DefaultId\r | |
1361 | );\r | |
1362 | \r | |
48a9d5f7 LG |
1363 | /**\r |
1364 | Create reminder to let user to choose save or discard the changed browser data.\r | |
1365 | Caller can use it to actively check the changed browser data.\r | |
1366 | \r | |
1367 | @retval BROWSER_NO_CHANGES No browser data is changed.\r | |
1368 | @retval BROWSER_SAVE_CHANGES The changed browser data is saved.\r | |
1369 | @retval BROWSER_DISCARD_CHANGES The changed browser data is discard.\r | |
27bace9b | 1370 | @retval BROWSER_KEEP_CURRENT Browser keep current changes.\r |
48a9d5f7 LG |
1371 | \r |
1372 | **/\r | |
1373 | UINT32\r | |
1374 | EFIAPI\r | |
1375 | SaveReminder (\r | |
1376 | VOID\r | |
1377 | );\r | |
7da62bc0 ED |
1378 | \r |
1379 | /**\r | |
1380 | Check whether the Reset Required for the browser\r | |
1381 | \r | |
1382 | @retval TRUE Browser required to reset after exit.\r | |
1383 | @retval FALSE Browser not need to reset after exit.\r | |
1384 | \r | |
1385 | **/\r | |
1386 | BOOLEAN\r | |
1387 | EFIAPI\r | |
1388 | IsResetRequired (\r | |
1389 | VOID\r | |
1390 | );\r | |
48a9d5f7 LG |
1391 | \r |
1392 | /**\r | |
1393 | Find the registered HotKey based on KeyData.\r | |
1394 | \r | |
1395 | @param[in] KeyData A pointer to a buffer that describes the keystroke\r | |
1396 | information for the hot key.\r | |
1397 | \r | |
1398 | @return The registered HotKey context. If no found, NULL will return.\r | |
1399 | **/\r | |
1400 | BROWSER_HOT_KEY *\r | |
1401 | GetHotKeyFromRegisterList (\r | |
1402 | IN EFI_INPUT_KEY *KeyData\r | |
1403 | );\r | |
1404 | \r | |
7c6c064c ED |
1405 | /**\r |
1406 | \r | |
1407 | Get FORM_BROWSER_STATEMENT from FORM_DISPLAY_ENGINE_STATEMENT based on the OpCode info.\r | |
1408 | \r | |
1409 | @param DisplayStatement The input FORM_DISPLAY_ENGINE_STATEMENT.\r | |
1410 | \r | |
1411 | @retval FORM_BROWSER_STATEMENT The return FORM_BROWSER_STATEMENT info.\r | |
1412 | \r | |
1413 | **/\r | |
1414 | FORM_BROWSER_STATEMENT *\r | |
1415 | GetBrowserStatement (\r | |
1416 | IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement\r | |
1417 | );\r | |
1418 | \r | |
1419 | /**\r | |
1420 | Password may be stored as encrypted by Configuration Driver. When change a\r | |
1421 | password, user will be challenged with old password. To validate user input old\r | |
1422 | password, we will send the clear text to Configuration Driver via Callback().\r | |
1423 | Configuration driver is responsible to check the passed in password and return\r | |
1424 | the validation result. If validation pass, state machine in password Callback()\r | |
1425 | will transit from BROWSER_STATE_VALIDATE_PASSWORD to BROWSER_STATE_SET_PASSWORD.\r | |
1426 | After user type in new password twice, Callback() will be invoked to send the\r | |
1427 | new password to Configuration Driver.\r | |
1428 | \r | |
1429 | @param Selection Pointer to UI_MENU_SELECTION.\r | |
1430 | @param MenuOption The MenuOption for this password Question.\r | |
1431 | @param String The clear text of password.\r | |
1432 | \r | |
1433 | @retval EFI_NOT_AVAILABLE_YET Callback() request to terminate password input.\r | |
1434 | @return In state of BROWSER_STATE_VALIDATE_PASSWORD:\r | |
1435 | @retval EFI_SUCCESS Password correct, Browser will prompt for new\r | |
1436 | password.\r | |
1437 | @retval EFI_NOT_READY Password incorrect, Browser will show error\r | |
1438 | message.\r | |
1439 | @retval Other Browser will do nothing.\r | |
1440 | @return In state of BROWSER_STATE_SET_PASSWORD:\r | |
1441 | @retval EFI_SUCCESS Set password success.\r | |
1442 | @retval Other Set password failed.\r | |
1443 | \r | |
1444 | **/\r | |
1445 | EFI_STATUS\r | |
1446 | PasswordCallback (\r | |
1447 | IN UI_MENU_SELECTION *Selection,\r | |
1448 | IN FORM_BROWSER_STATEMENT *Question,\r | |
1449 | IN CHAR16 *String\r | |
1450 | );\r | |
1451 | \r | |
1452 | /**\r | |
1453 | Display error message for invalid password.\r | |
1454 | \r | |
1455 | **/\r | |
1456 | VOID\r | |
1457 | PasswordInvalid (\r | |
1458 | VOID\r | |
1459 | );\r | |
1460 | \r | |
1461 | /**\r | |
1462 | The worker function that send the displays to the screen. On output,\r | |
1463 | the selection made by user is returned.\r | |
1464 | \r | |
1465 | @param Selection On input, Selection tell setup browser the information\r | |
1466 | about the Selection, form and formset to be displayed.\r | |
1467 | On output, Selection return the screen item that is selected\r | |
1468 | by user.\r | |
1469 | \r | |
1470 | @retval EFI_SUCCESS The page is displayed successfully.\r | |
1471 | @return Other value if the page failed to be diplayed.\r | |
1472 | \r | |
1473 | **/\r | |
1474 | EFI_STATUS\r | |
1475 | SetupBrowser (\r | |
1476 | IN OUT UI_MENU_SELECTION *Selection\r | |
1477 | );\r | |
1478 | \r | |
1479 | /**\r | |
1480 | Free up the resource allocated for all strings required\r | |
1481 | by Setup Browser.\r | |
1482 | \r | |
1483 | **/\r | |
1484 | VOID\r | |
1485 | FreeBrowserStrings (\r | |
1486 | VOID\r | |
1487 | );\r | |
1488 | \r | |
1489 | /**\r | |
1490 | Create a menu with specified formset GUID and form ID, and add it as a child\r | |
1491 | of the given parent menu.\r | |
1492 | \r | |
1493 | @param HiiHandle Hii handle related to this formset.\r | |
1494 | @param FormSetGuid The Formset Guid of menu to be added.\r | |
1495 | @param FormId The Form ID of menu to be added.\r | |
1496 | @param QuestionId The question id of this menu to be added.\r | |
1497 | \r | |
1498 | @return A pointer to the newly added menu or NULL if memory is insufficient.\r | |
1499 | \r | |
1500 | **/\r | |
1501 | FORM_ENTRY_INFO *\r | |
1502 | UiAddMenuList (\r | |
1503 | IN EFI_HII_HANDLE HiiHandle,\r | |
1504 | IN EFI_GUID *FormSetGuid,\r | |
1505 | IN UINT16 FormId,\r | |
1506 | IN UINT16 QuestionId\r | |
1507 | );\r | |
1508 | \r | |
1509 | /**\r | |
1510 | Search Menu with given FormSetGuid and FormId in all cached menu list.\r | |
1511 | \r | |
1512 | @param HiiHandle HiiHandle for FormSet.\r | |
1513 | @param FormSetGuid The Formset GUID of the menu to search.\r | |
1514 | @param FormId The Form ID of menu to search.\r | |
1515 | \r | |
1516 | @return A pointer to menu found or NULL if not found.\r | |
1517 | \r | |
1518 | **/\r | |
1519 | FORM_ENTRY_INFO *\r | |
1520 | UiFindMenuList (\r | |
1521 | IN EFI_HII_HANDLE HiiHandle, \r | |
1522 | IN EFI_GUID *FormSetGuid,\r | |
1523 | IN UINT16 FormId\r | |
1524 | );\r | |
1525 | \r | |
1526 | /**\r | |
1527 | Free Menu list linked list.\r | |
1528 | \r | |
1529 | @param MenuListHead One Menu list point in the menu list.\r | |
1530 | \r | |
1531 | **/\r | |
1532 | VOID\r | |
1533 | UiFreeMenuList (\r | |
1534 | LIST_ENTRY *MenuListHead\r | |
1535 | );\r | |
1536 | \r | |
1537 | /**\r | |
1538 | Find parent menu for current menu.\r | |
1539 | \r | |
1540 | @param CurrentMenu Current Menu\r | |
93551a01 ED |
1541 | @param SettingLevel Whether find parent menu in Form Level or Formset level.\r |
1542 | In form level, just find the parent menu; \r | |
1543 | In formset level, find the parent menu which has different\r | |
1544 | formset guid value.\r | |
7c6c064c ED |
1545 | \r |
1546 | @retval The parent menu for current menu.\r | |
1547 | **/\r | |
1548 | FORM_ENTRY_INFO *\r | |
1549 | UiFindParentMenu (\r | |
93551a01 ED |
1550 | IN FORM_ENTRY_INFO *CurrentMenu,\r |
1551 | IN BROWSER_SETTING_SCOPE SettingLevel\r | |
1552 | );\r | |
1553 | \r | |
1554 | /**\r | |
dcca25d1 | 1555 | Validate the HiiHandle.\r |
93551a01 | 1556 | \r |
dcca25d1 | 1557 | @param HiiHandle The input HiiHandle which need to validate.\r |
93551a01 ED |
1558 | \r |
1559 | @retval TRUE The handle is validate.\r | |
1560 | @retval FALSE The handle is invalidate.\r | |
1561 | \r | |
1562 | **/\r | |
1563 | BOOLEAN\r | |
1564 | ValidateHiiHandle (\r | |
1565 | EFI_HII_HANDLE HiiHandle\r | |
7c6c064c ED |
1566 | );\r |
1567 | \r | |
4d4deaac ED |
1568 | /**\r |
1569 | Copy current Menu list to the new menu list.\r | |
1570 | \r | |
1571 | @param NewMenuListHead New create Menu list.\r | |
1572 | @param CurrentMenuListHead Current Menu list.\r | |
1573 | \r | |
1574 | **/\r | |
1575 | VOID\r | |
1576 | UiCopyMenuList (\r | |
1577 | OUT LIST_ENTRY *NewMenuListHead,\r | |
1578 | IN LIST_ENTRY *CurrentMenuListHead\r | |
1579 | );\r | |
1580 | \r | |
7c6c064c ED |
1581 | /**\r |
1582 | Search an Option of a Question by its value.\r | |
1583 | \r | |
1584 | @param Question The Question\r | |
1585 | @param OptionValue Value for Option to be searched.\r | |
1586 | \r | |
1587 | @retval Pointer Pointer to the found Option.\r | |
1588 | @retval NULL Option not found.\r | |
1589 | \r | |
1590 | **/\r | |
1591 | QUESTION_OPTION *\r | |
1592 | ValueToOption (\r | |
1593 | IN FORM_BROWSER_STATEMENT *Question,\r | |
1594 | IN EFI_HII_VALUE *OptionValue\r | |
1595 | );\r | |
1596 | /**\r | |
1597 | Return data element in an Array by its Index.\r | |
1598 | \r | |
1599 | @param Array The data array.\r | |
1600 | @param Type Type of the data in this array.\r | |
1601 | @param Index Zero based index for data in this array.\r | |
1602 | \r | |
1603 | @retval Value The data to be returned\r | |
1604 | \r | |
1605 | **/\r | |
1606 | UINT64\r | |
1607 | GetArrayData (\r | |
1608 | IN VOID *Array,\r | |
1609 | IN UINT8 Type,\r | |
1610 | IN UINTN Index\r | |
1611 | );\r | |
1612 | \r | |
1613 | /**\r | |
1614 | Set value of a data element in an Array by its Index.\r | |
1615 | \r | |
1616 | @param Array The data array.\r | |
1617 | @param Type Type of the data in this array.\r | |
1618 | @param Index Zero based index for data in this array.\r | |
1619 | @param Value The value to be set.\r | |
1620 | \r | |
1621 | **/\r | |
1622 | VOID\r | |
1623 | SetArrayData (\r | |
1624 | IN VOID *Array,\r | |
1625 | IN UINT8 Type,\r | |
1626 | IN UINTN Index,\r | |
1627 | IN UINT64 Value\r | |
1628 | );\r | |
1629 | \r | |
1630 | /**\r | |
1631 | Compare two Hii value.\r | |
1632 | \r | |
1633 | @param Value1 Expression value to compare on left-hand.\r | |
1634 | @param Value2 Expression value to compare on right-hand.\r | |
1635 | @param Result Return value after compare.\r | |
1636 | retval 0 Two operators equal.\r | |
1637 | return Positive value if Value1 is greater than Value2.\r | |
1638 | retval Negative value if Value1 is less than Value2.\r | |
1639 | @param HiiHandle Only required for string compare.\r | |
1640 | \r | |
1641 | @retval other Could not perform compare on two values.\r | |
1642 | @retval EFI_SUCCESS Compare the value success.\r | |
1643 | \r | |
1644 | **/\r | |
1645 | EFI_STATUS\r | |
1646 | CompareHiiValue (\r | |
1647 | IN EFI_HII_VALUE *Value1,\r | |
1648 | IN EFI_HII_VALUE *Value2,\r | |
1649 | OUT INTN *Result,\r | |
1650 | IN EFI_HII_HANDLE HiiHandle OPTIONAL\r | |
1651 | );\r | |
1652 | \r | |
1653 | /**\r | |
1654 | Perform Password check. \r | |
1655 | Passwork may be encrypted by driver that requires the specific check.\r | |
1656 | \r | |
1657 | @param Form Form where Password Statement is in.\r | |
1658 | @param Statement Password statement\r | |
1659 | @param PasswordString Password string to be checked. It may be NULL.\r | |
1660 | NULL means to restore password.\r | |
1661 | "" string can be used to checked whether old password does exist.\r | |
1662 | \r | |
1663 | @return Status Status of Password check.\r | |
1664 | **/\r | |
1665 | EFI_STATUS\r | |
1666 | EFIAPI\r | |
1667 | PasswordCheck (\r | |
1668 | IN FORM_DISPLAY_ENGINE_FORM *Form,\r | |
1669 | IN FORM_DISPLAY_ENGINE_STATEMENT *Statement,\r | |
1670 | IN EFI_STRING PasswordString OPTIONAL\r | |
1671 | );\r | |
1672 | \r | |
1673 | /**\r | |
1674 | \r | |
1675 | Get FORM_BROWSER_STATEMENT from FORM_DISPLAY_ENGINE_STATEMENT based on the OpCode info.\r | |
1676 | \r | |
1677 | @param DisplayStatement The input FORM_DISPLAY_ENGINE_STATEMENT.\r | |
1678 | \r | |
1679 | @retval FORM_BROWSER_STATEMENT The return FORM_BROWSER_STATEMENT info.\r | |
1680 | \r | |
1681 | **/\r | |
1682 | FORM_BROWSER_STATEMENT *\r | |
1683 | GetBrowserStatement (\r | |
1684 | IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement\r | |
1685 | );\r | |
1686 | \r | |
1687 | /**\r | |
1688 | \r | |
1689 | Initialize the Display form structure data.\r | |
1690 | \r | |
1691 | **/\r | |
1692 | VOID\r | |
1693 | InitializeDisplayFormData (\r | |
1694 | VOID\r | |
1695 | );\r | |
1696 | \r | |
1697 | \r | |
0a6f8af5 ED |
1698 | /**\r |
1699 | Base on the current formset info, clean the ConfigRequest string in browser storage.\r | |
1700 | \r | |
1701 | @param FormSet Pointer of the FormSet\r | |
1702 | \r | |
1703 | **/\r | |
1704 | VOID\r | |
1705 | CleanBrowserStorage (\r | |
1706 | IN OUT FORM_BROWSER_FORMSET *FormSet\r | |
1707 | );\r | |
07d7dbae ED |
1708 | \r |
1709 | /**\r | |
1710 | Find HII Handle in the HII database associated with given Device Path.\r | |
1711 | \r | |
1712 | If DevicePath is NULL, then ASSERT.\r | |
1713 | \r | |
1714 | @param DevicePath Device Path associated with the HII package list\r | |
1715 | handle.\r | |
1716 | @param FormsetGuid The formset guid for this formset.\r | |
1717 | \r | |
1718 | @retval Handle HII package list Handle associated with the Device\r | |
1719 | Path.\r | |
1720 | @retval NULL Hii Package list handle is not found.\r | |
1721 | \r | |
1722 | **/\r | |
1723 | EFI_HII_HANDLE\r | |
1724 | DevicePathToHiiHandle (\r | |
1725 | IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r | |
1726 | IN EFI_GUID *FormsetGuid\r | |
1727 | );\r | |
1728 | \r | |
9d34cac8 ED |
1729 | /**\r |
1730 | Adjust the config request info, remove the request elements which already in AllConfigRequest string.\r | |
1731 | \r | |
1732 | @param Storage Form set Storage.\r | |
1733 | @param Request The input request string.\r | |
1734 | @param RespString Whether the input is ConfigRequest or ConfigResp format.\r | |
1735 | \r | |
1736 | @retval TRUE Has element not covered by current used elements, need to continue to call ExtractConfig\r | |
1737 | @retval FALSE All elements covered by current used elements.\r | |
1738 | \r | |
1739 | **/\r | |
1740 | BOOLEAN \r | |
1741 | ConfigRequestAdjust (\r | |
1742 | IN BROWSER_STORAGE *Storage,\r | |
1743 | IN CHAR16 *Request,\r | |
1744 | IN BOOLEAN RespString\r | |
1745 | );\r | |
1746 | \r | |
bfae1330 ED |
1747 | /**\r |
1748 | Perform question check. \r | |
1749 | \r | |
1750 | If one question has more than one check, process form high priority to low.\r | |
1751 | \r | |
1752 | @param FormSet FormSet data structure.\r | |
1753 | @param Form Form data structure.\r | |
1754 | @param Question The Question to be validated.\r | |
1755 | \r | |
1756 | @retval EFI_SUCCESS Form validation pass.\r | |
1757 | @retval other Form validation failed.\r | |
1758 | \r | |
1759 | **/\r | |
1760 | EFI_STATUS\r | |
1761 | ValueChangedValidation (\r | |
1762 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
1763 | IN FORM_BROWSER_FORM *Form,\r | |
1764 | IN FORM_BROWSER_STATEMENT *Question\r | |
1765 | );\r | |
1766 | \r | |
1767 | /**\r | |
1768 | Pop up the error info.\r | |
1769 | \r | |
1770 | @param BrowserStatus The input browser status.\r | |
4d4deaac | 1771 | @param HiiHandle The HiiHandle for this error opcode.\r |
bfae1330 ED |
1772 | @param OpCode The opcode use to get the erro info and timeout value.\r |
1773 | @param ErrorString Error string used by BROWSER_NO_SUBMIT_IF.\r | |
1774 | \r | |
1775 | **/\r | |
4d4deaac | 1776 | UINT32\r |
bfae1330 ED |
1777 | PopupErrorMessage (\r |
1778 | IN UINT32 BrowserStatus,\r | |
4d4deaac | 1779 | IN EFI_HII_HANDLE HiiHandle,\r |
bfae1330 ED |
1780 | IN EFI_IFR_OP_HEADER *OpCode, OPTIONAL\r |
1781 | IN CHAR16 *ErrorString\r | |
1782 | );\r | |
1783 | \r | |
e6106e89 ED |
1784 | /**\r |
1785 | Check whether the result is TRUE or FALSE.\r | |
1786 | \r | |
1787 | For the EFI_HII_VALUE value type is numeric, return TRUE if the\r | |
1788 | value is not 0.\r | |
1789 | \r | |
1790 | @param Result Input the result data.\r | |
1791 | \r | |
1792 | @retval TRUE The result is TRUE.\r | |
1793 | @retval FALSE The result is FALSE.\r | |
1794 | \r | |
1795 | **/\r | |
1796 | BOOLEAN\r | |
1797 | IsTrue (\r | |
1798 | IN EFI_HII_VALUE *Result\r | |
1799 | );\r | |
1800 | \r | |
a35ecb75 ED |
1801 | /**\r |
1802 | Get Formset_storage base on the input varstoreid info.\r | |
1803 | \r | |
1804 | @param FormSet Pointer of the current FormSet.\r | |
1805 | @param VarStoreId Varstore ID info.\r | |
1806 | \r | |
1807 | @return Pointer to a FORMSET_STORAGE data structure.\r | |
1808 | \r | |
1809 | **/\r | |
1810 | FORMSET_STORAGE *\r | |
1811 | GetFstStgFromVarId (\r | |
1812 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
1813 | IN EFI_VARSTORE_ID VarStoreId\r | |
1814 | );\r | |
1815 | \r | |
1816 | /**\r | |
1817 | Get Formset_storage base on the input browser storage.\r | |
1818 | \r | |
1819 | More than one formsets may share the same browser storage,\r | |
1820 | this function just get the first formset storage which\r | |
1821 | share the browser storage.\r | |
1822 | \r | |
1823 | @param Storage browser storage info.\r | |
1824 | \r | |
1825 | @return Pointer to a FORMSET_STORAGE data structure.\r | |
1826 | \r | |
1827 | \r | |
1828 | **/\r | |
1829 | FORMSET_STORAGE *\r | |
1830 | GetFstStgFromBrsStg (\r | |
1831 | IN BROWSER_STORAGE *Storage\r | |
1832 | );\r | |
1833 | \r | |
7936fb6a | 1834 | #endif\r |