]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
Add new "Refresh guid" opcode, also add sample code to use it.
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.h
1 /** @file
2 Private MACRO, structure and function definitions for Setup Browser module.
3
4 Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13
14 **/
15
16 #ifndef _SETUP_H_
17 #define _SETUP_H_
18
19
20 #include <PiDxe.h>
21
22 #include <Protocol/SimpleTextOut.h>
23 #include <Protocol/SimpleTextIn.h>
24 #include <Protocol/FormBrowser2.h>
25 #include <Protocol/DevicePath.h>
26 #include <Protocol/UnicodeCollation.h>
27 #include <Protocol/HiiConfigAccess.h>
28 #include <Protocol/HiiConfigRouting.h>
29 #include <Protocol/HiiDatabase.h>
30 #include <Protocol/HiiString.h>
31 #include <Protocol/UserManager.h>
32
33 #include <Guid/MdeModuleHii.h>
34 #include <Guid/HiiPlatformSetupFormset.h>
35 #include <Guid/HiiFormMapMethodGuid.h>
36
37 #include <Library/PrintLib.h>
38 #include <Library/DebugLib.h>
39 #include <Library/BaseMemoryLib.h>
40 #include <Library/UefiRuntimeServicesTableLib.h>
41 #include <Library/UefiDriverEntryPoint.h>
42 #include <Library/UefiBootServicesTableLib.h>
43 #include <Library/BaseLib.h>
44 #include <Library/MemoryAllocationLib.h>
45 #include <Library/HiiLib.h>
46 #include <Library/PcdLib.h>
47 #include <Library/DevicePathLib.h>
48
49 #include "Colors.h"
50
51 //
52 // This is the generated header file which includes whatever needs to be exported (strings + IFR)
53 //
54
55 extern UINT8 SetupBrowserStrings[];
56
57 //
58 // Screen definitions
59 //
60 #define BANNER_HEIGHT 6
61 #define BANNER_COLUMNS 3
62 #define BANNER_LEFT_COLUMN_INDENT 1
63
64 #define FRONT_PAGE_HEADER_HEIGHT 6
65 #define NONE_FRONT_PAGE_HEADER_HEIGHT 3
66 #define LEFT_SKIPPED_COLUMNS 3
67 #define FOOTER_HEIGHT 4
68 #define STATUS_BAR_HEIGHT 1
69 #define SCROLL_ARROW_HEIGHT 1
70 #define POPUP_PAD_SPACE_COUNT 5
71 #define POPUP_FRAME_WIDTH 2
72
73 //
74 // Definition for function key setting
75 //
76 #define NONE_FUNCTION_KEY_SETTING 0
77 #define DEFAULT_FUNCTION_KEY_SETTING (FUNCTION_NINE | FUNCTION_TEN)
78
79 #define FUNCTION_NINE (1 << 2)
80 #define FUNCTION_TEN (1 << 3)
81
82 typedef struct {
83 EFI_GUID FormSetGuid;
84 UINTN KeySetting;
85 } FUNCTIION_KEY_SETTING;
86
87 //
88 // Character definitions
89 //
90 #define CHAR_SPACE 0x0020
91 #define UPPER_LOWER_CASE_OFFSET 0x20
92
93 //
94 // Time definitions
95 //
96 #define ONE_SECOND 10000000
97
98 //
99 // Display definitions
100 //
101 #define LEFT_HYPER_DELIMITER L'<'
102 #define RIGHT_HYPER_DELIMITER L'>'
103
104 #define LEFT_ONEOF_DELIMITER L'<'
105 #define RIGHT_ONEOF_DELIMITER L'>'
106
107 #define LEFT_NUMERIC_DELIMITER L'['
108 #define RIGHT_NUMERIC_DELIMITER L']'
109
110 #define LEFT_CHECKBOX_DELIMITER L'['
111 #define RIGHT_CHECKBOX_DELIMITER L']'
112
113 #define CHECK_ON L'X'
114 #define CHECK_OFF L' '
115
116 #define TIME_SEPARATOR L':'
117 #define DATE_SEPARATOR L'/'
118
119 #define YES_ANSWER L'Y'
120 #define NO_ANSWER L'N'
121
122 //
123 // This is the Input Error Message
124 //
125 #define INPUT_ERROR 1
126
127 //
128 // This is the NV RAM update required Message
129 //
130 #define NV_UPDATE_REQUIRED 2
131
132 //
133 // Refresh the Status Bar with flags
134 //
135 #define REFRESH_STATUS_BAR 0xff
136
137 //
138 // Incremental string lenght of ConfigRequest
139 //
140 #define CONFIG_REQUEST_STRING_INCREMENTAL 1024
141
142 //
143 // HII value compare result
144 //
145 #define HII_VALUE_UNDEFINED 0
146 #define HII_VALUE_EQUAL 1
147 #define HII_VALUE_LESS_THAN 2
148 #define HII_VALUE_GREATER_THAN 3
149
150 //
151 // Incremental size of stack for expression
152 //
153 #define EXPRESSION_STACK_SIZE_INCREMENT 0x100
154
155 #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))
156
157
158 #define SETUP_DRIVER_SIGNATURE SIGNATURE_32 ('F', 'B', 'D', 'V')
159 typedef struct {
160 UINT32 Signature;
161
162 EFI_HANDLE Handle;
163
164 //
165 // Produced protocol
166 //
167 EFI_FORM_BROWSER2_PROTOCOL FormBrowser2;
168
169 } SETUP_DRIVER_PRIVATE_DATA;
170
171 typedef struct {
172 EFI_STRING_ID Banner[BANNER_HEIGHT][BANNER_COLUMNS];
173 } BANNER_DATA;
174
175 //
176 // IFR relative definition
177 //
178 #define EFI_HII_EXPRESSION_INCONSISTENT_IF 0
179 #define EFI_HII_EXPRESSION_NO_SUBMIT_IF 1
180 #define EFI_HII_EXPRESSION_GRAY_OUT_IF 2
181 #define EFI_HII_EXPRESSION_SUPPRESS_IF 3
182 #define EFI_HII_EXPRESSION_DISABLE_IF 4
183 #define EFI_HII_EXPRESSION_VALUE 5
184 #define EFI_HII_EXPRESSION_RULE 6
185 #define EFI_HII_EXPRESSION_READ 7
186 #define EFI_HII_EXPRESSION_WRITE 8
187
188 #define EFI_HII_VARSTORE_BUFFER 0
189 #define EFI_HII_VARSTORE_NAME_VALUE 1
190 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
191
192 #define FORM_INCONSISTENT_VALIDATION 0
193 #define FORM_NO_SUBMIT_VALIDATION 1
194
195 #define FORMSET_CLASS_PLATFORM_SETUP 0x0001
196 #define FORMSET_CLASS_FRONT_PAGE 0x0002
197
198 typedef struct {
199 UINT8 Type;
200 EFI_IFR_TYPE_VALUE Value;
201 } EFI_HII_VALUE;
202
203 #define NAME_VALUE_NODE_SIGNATURE SIGNATURE_32 ('N', 'V', 'S', 'T')
204
205 typedef struct {
206 UINTN Signature;
207 LIST_ENTRY Link;
208 CHAR16 *Name;
209 CHAR16 *Value;
210 CHAR16 *EditValue;
211 } NAME_VALUE_NODE;
212
213 #define NAME_VALUE_NODE_FROM_LINK(a) CR (a, NAME_VALUE_NODE, Link, NAME_VALUE_NODE_SIGNATURE)
214
215 #define FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'G')
216
217 typedef struct {
218 UINTN Signature;
219 LIST_ENTRY Link;
220
221 UINT8 Type; // Storage type
222
223 UINT16 VarStoreId;
224 EFI_GUID Guid;
225
226 CHAR16 *Name; // For EFI_IFR_VARSTORE
227 UINT16 Size;
228 UINT8 *Buffer;
229 UINT8 *EditBuffer; // Edit copy for Buffer Storage
230
231 LIST_ENTRY NameValueListHead; // List of NAME_VALUE_NODE
232
233 UINT32 Attributes; // For EFI_IFR_VARSTORE_EFI: EFI Variable attribute
234
235 CHAR16 *ConfigHdr; // <ConfigHdr>
236 CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>
237 UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>
238 UINTN SpareStrLen; // Spare length of ConfigRequest string buffer
239 } FORMSET_STORAGE;
240
241 #define FORMSET_STORAGE_FROM_LINK(a) CR (a, FORMSET_STORAGE, Link, FORMSET_STORAGE_SIGNATURE)
242
243 typedef union {
244 EFI_STRING_ID VarName;
245 UINT16 VarOffset;
246 } VAR_STORE_INFO;
247
248 #define EXPRESSION_OPCODE_SIGNATURE SIGNATURE_32 ('E', 'X', 'O', 'P')
249
250 typedef struct {
251 UINTN Signature;
252 LIST_ENTRY Link;
253
254 UINT8 Operand;
255
256 UINT8 Format; // For EFI_IFR_TO_STRING, EFI_IFR_FIND
257 UINT8 Flags; // For EFI_IFR_SPAN
258 UINT8 RuleId; // For EFI_IFR_RULE_REF
259
260 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
261
262 EFI_QUESTION_ID QuestionId; // For EFI_IFR_EQ_ID_ID, EFI_IFR_EQ_ID_VAL_LIST, EFI_IFR_QUESTION_REF1
263 EFI_QUESTION_ID QuestionId2;
264
265 UINT16 ListLength; // For EFI_IFR_EQ_ID_VAL_LIST
266 UINT16 *ValueList;
267
268 EFI_STRING_ID DevicePath; // For EFI_IFR_QUESTION_REF3_2, EFI_IFR_QUESTION_REF3_3
269 EFI_GUID Guid;
270
271 FORMSET_STORAGE *VarStorage; // For EFI_IFR_SET, EFI_IFR_GET
272 VAR_STORE_INFO VarStoreInfo;// For EFI_IFR_SET, EFI_IFR_GET
273 UINT8 ValueType; // For EFI_IFR_SET, EFI_IFR_GET
274 UINT8 ValueWidth; // For EFI_IFR_SET, EFI_IFR_GET
275 CHAR16 *ValueName; // For EFI_IFR_SET, EFI_IFR_GET
276 LIST_ENTRY MapExpressionList; // nested expressions inside of Map opcode.
277 } EXPRESSION_OPCODE;
278
279 #define EXPRESSION_OPCODE_FROM_LINK(a) CR (a, EXPRESSION_OPCODE, Link, EXPRESSION_OPCODE_SIGNATURE)
280
281 #define FORM_EXPRESSION_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'P')
282
283 typedef struct {
284 UINTN Signature;
285 LIST_ENTRY Link;
286
287 UINT8 Type; // Type for this expression
288
289 UINT8 RuleId; // For EFI_IFR_RULE only
290 EFI_STRING_ID Error; // For EFI_IFR_NO_SUBMIT_IF, EFI_IFR_INCONSISTENT_IF only
291
292 EFI_HII_VALUE Result; // Expression evaluation result
293
294 LIST_ENTRY OpCodeListHead; // OpCodes consist of this expression (EXPRESSION_OPCODE)
295 } FORM_EXPRESSION;
296
297 #define FORM_EXPRESSION_FROM_LINK(a) CR (a, FORM_EXPRESSION, Link, FORM_EXPRESSION_SIGNATURE)
298
299 #define QUESTION_DEFAULT_SIGNATURE SIGNATURE_32 ('Q', 'D', 'F', 'T')
300
301 typedef struct {
302 UINTN Signature;
303 LIST_ENTRY Link;
304
305 UINT16 DefaultId;
306 EFI_HII_VALUE Value; // Default value
307
308 FORM_EXPRESSION *ValueExpression; // Not-NULL indicates default value is provided by EFI_IFR_VALUE
309 } QUESTION_DEFAULT;
310
311 #define QUESTION_DEFAULT_FROM_LINK(a) CR (a, QUESTION_DEFAULT, Link, QUESTION_DEFAULT_SIGNATURE)
312
313 #define QUESTION_OPTION_SIGNATURE SIGNATURE_32 ('Q', 'O', 'P', 'T')
314
315 typedef struct {
316 UINTN Signature;
317 LIST_ENTRY Link;
318
319 EFI_STRING_ID Text;
320 UINT8 Flags;
321 EFI_HII_VALUE Value;
322 EFI_IMAGE_ID ImageId;
323
324 FORM_EXPRESSION *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf
325 } QUESTION_OPTION;
326
327 #define QUESTION_OPTION_FROM_LINK(a) CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)
328
329 #define FORM_BROWSER_STATEMENT_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'A')
330
331 typedef struct {
332 UINTN Signature;
333 LIST_ENTRY Link;
334
335 UINT8 Operand; // The operand (first byte) of this Statement or Question
336
337 //
338 // Statement Header
339 //
340 EFI_STRING_ID Prompt;
341 EFI_STRING_ID Help;
342 EFI_STRING_ID TextTwo; // For EFI_IFR_TEXT
343
344 //
345 // Question Header
346 //
347 EFI_QUESTION_ID QuestionId; // The value of zero is reserved
348 EFI_VARSTORE_ID VarStoreId; // A value of zero indicates no variable storage
349 FORMSET_STORAGE *Storage;
350 VAR_STORE_INFO VarStoreInfo;
351 UINT16 StorageWidth;
352 UINT8 QuestionFlags;
353 CHAR16 *VariableName; // Name/Value or EFI Variable name
354 CHAR16 *BlockName; // Buffer storage block name: "OFFSET=...WIDTH=..."
355
356 EFI_HII_VALUE HiiValue; // Edit copy for checkbox, numberic, oneof
357 UINT8 *BufferValue; // Edit copy for string, password, orderedlist
358 UINT8 ValueType; // Data type for orderedlist value array
359
360 //
361 // OpCode specific members
362 //
363 UINT8 Flags; // for EFI_IFR_CHECKBOX, EFI_IFR_DATE, EFI_IFR_NUMERIC, EFI_IFR_ONE_OF,
364 // EFI_IFR_ORDERED_LIST, EFI_IFR_STRING,EFI_IFR_SUBTITLE,EFI_IFR_TIME, EFI_IFR_BANNER
365 UINT8 MaxContainers; // for EFI_IFR_ORDERED_LIST
366
367 UINT16 BannerLineNumber; // for EFI_IFR_BANNER, 1-based line number
368 EFI_STRING_ID QuestionConfig; // for EFI_IFR_ACTION, if 0 then no configuration string will be processed
369
370 UINT64 Minimum; // for EFI_IFR_ONE_OF/EFI_IFR_NUMERIC, it's Min/Max value
371 UINT64 Maximum; // for EFI_IFR_STRING/EFI_IFR_PASSWORD, it's Min/Max length
372 UINT64 Step;
373
374 EFI_DEFAULT_ID DefaultId; // for EFI_IFR_RESET_BUTTON
375 EFI_FORM_ID RefFormId; // for EFI_IFR_REF
376 EFI_QUESTION_ID RefQuestionId; // for EFI_IFR_REF2
377 EFI_GUID RefFormSetId; // for EFI_IFR_REF3
378 EFI_STRING_ID RefDevicePath; // for EFI_IFR_REF4
379 EFI_GUID RefreshGuid; // for EFI_IFR_REFRESH_ID
380
381 //
382 // Get from IFR parsing
383 //
384 FORM_EXPRESSION *ValueExpression; // nested EFI_IFR_VALUE, provide Question value and indicate Question is ReadOnly
385 LIST_ENTRY DefaultListHead; // nested EFI_IFR_DEFAULT list (QUESTION_DEFAULT), provide default values
386 LIST_ENTRY OptionListHead; // nested EFI_IFR_ONE_OF_OPTION list (QUESTION_OPTION)
387
388 EFI_IMAGE_ID ImageId; // nested EFI_IFR_IMAGE
389 UINT8 RefreshInterval; // nested EFI_IFR_REFRESH, refresh interval(in seconds) for Question value, 0 means no refresh
390 BOOLEAN InSubtitle; // nesting inside of EFI_IFR_SUBTITLE
391
392 LIST_ENTRY InconsistentListHead;// nested inconsistent expression list (FORM_EXPRESSION)
393 LIST_ENTRY NoSubmitListHead; // nested nosubmit expression list (FORM_EXPRESSION)
394 FORM_EXPRESSION *GrayOutExpression; // nesting inside of GrayOutIf
395 FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf
396 FORM_EXPRESSION *DisableExpression; // nesting inside of DisableIf
397
398 FORM_EXPRESSION *ReadExpression; // nested EFI_IFR_READ, provide this question value by read expression.
399 FORM_EXPRESSION *WriteExpression; // nested EFI_IFR_WRITE, evaluate write expression after this question value is set.
400 } FORM_BROWSER_STATEMENT;
401
402 #define FORM_BROWSER_STATEMENT_FROM_LINK(a) CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)
403
404 #define FORM_BROWSER_CONFIG_REQUEST_SIGNATURE SIGNATURE_32 ('F', 'C', 'R', 'S')
405 typedef struct {
406 UINTN Signature;
407 LIST_ENTRY Link;
408
409 CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>
410 UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>
411 UINTN SpareStrLen;
412
413 FORMSET_STORAGE *Storage;
414 } FORM_BROWSER_CONFIG_REQUEST;
415 #define FORM_BROWSER_CONFIG_REQUEST_FROM_LINK(a) CR (a, FORM_BROWSER_CONFIG_REQUEST, Link, FORM_BROWSER_CONFIG_REQUEST_SIGNATURE)
416
417 #define FORM_BROWSER_FORM_SIGNATURE SIGNATURE_32 ('F', 'F', 'R', 'M')
418 #define STANDARD_MAP_FORM_TYPE 0x01
419
420 typedef struct {
421 UINTN Signature;
422 LIST_ENTRY Link;
423
424 UINT16 FormId; // FormId of normal form or formmap form.
425 EFI_STRING_ID FormTitle; // FormTile of normal form, or FormMapMethod title of formmap form.
426 UINT16 FormType; // Specific form type for the different form.
427
428 EFI_IMAGE_ID ImageId;
429
430 BOOLEAN ModalForm; // Whether this is a modal form.
431
432 BOOLEAN NvUpdateRequired; // Whether this form has NV update request.
433
434 LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)
435 LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)
436 LIST_ENTRY ConfigRequestHead; // List of configreques for all storage.
437 FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf
438 } FORM_BROWSER_FORM;
439
440 #define FORM_BROWSER_FORM_FROM_LINK(a) CR (a, FORM_BROWSER_FORM, Link, FORM_BROWSER_FORM_SIGNATURE)
441
442 #define FORMSET_DEFAULTSTORE_SIGNATURE SIGNATURE_32 ('F', 'D', 'F', 'S')
443
444 typedef struct {
445 UINTN Signature;
446 LIST_ENTRY Link;
447
448 UINT16 DefaultId;
449 EFI_STRING_ID DefaultName;
450 } FORMSET_DEFAULTSTORE;
451
452 #define FORMSET_DEFAULTSTORE_FROM_LINK(a) CR (a, FORMSET_DEFAULTSTORE, Link, FORMSET_DEFAULTSTORE_SIGNATURE)
453
454 typedef struct {
455 EFI_HII_HANDLE HiiHandle;
456 EFI_HANDLE DriverHandle;
457 EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;
458 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
459
460 UINTN IfrBinaryLength;
461 UINT8 *IfrBinaryData;
462
463 EFI_GUID Guid;
464 EFI_STRING_ID FormSetTitle;
465 EFI_STRING_ID Help;
466 UINT8 NumberOfClassGuid;
467 EFI_GUID ClassGuid[3]; // Up to three ClassGuid
468 UINT16 Class; // Tiano extended Class code
469 UINT16 SubClass; // Tiano extended Subclass code
470 EFI_IMAGE_ID ImageId;
471
472 FORM_BROWSER_STATEMENT *StatementBuffer; // Buffer for all Statements and Questions
473 EXPRESSION_OPCODE *ExpressionBuffer; // Buffer for all Expression OpCode
474
475 LIST_ENTRY StorageListHead; // Storage list (FORMSET_STORAGE)
476 LIST_ENTRY DefaultStoreListHead; // DefaultStore list (FORMSET_DEFAULTSTORE)
477 LIST_ENTRY FormListHead; // Form list (FORM_BROWSER_FORM)
478 LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)
479 } FORM_BROWSER_FORMSET;
480
481 #define BROWSER_CONTEXT_SIGNATURE SIGNATURE_32 ('B', 'C', 'T', 'X')
482
483 typedef struct {
484 UINTN Signature;
485 LIST_ENTRY Link;
486
487 //
488 // Globals defined in Setup.c
489 //
490 BANNER_DATA *BannerData;
491 UINTN ClassOfVfr;
492 UINTN FunctionKeySetting;
493 BOOLEAN ResetRequired;
494 UINT16 Direction;
495 EFI_SCREEN_DESCRIPTOR ScreenDimensions;
496 CHAR16 *FunctionNineString;
497 CHAR16 *FunctionTenString;
498 CHAR16 *EnterString;
499 CHAR16 *EnterCommitString;
500 CHAR16 *EnterEscapeString;
501 CHAR16 *EscapeString;
502 CHAR16 *SaveFailed;
503 CHAR16 *MoveHighlight;
504 CHAR16 *MakeSelection;
505 CHAR16 *DecNumericInput;
506 CHAR16 *HexNumericInput;
507 CHAR16 *ToggleCheckBox;
508 CHAR16 *PromptForData;
509 CHAR16 *PromptForPassword;
510 CHAR16 *PromptForNewPassword;
511 CHAR16 *ConfirmPassword;
512 CHAR16 *ConfirmError;
513 CHAR16 *PassowordInvalid;
514 CHAR16 *PressEnter;
515 CHAR16 *EmptyString;
516 CHAR16 *AreYouSure;
517 CHAR16 *YesResponse;
518 CHAR16 *NoResponse;
519 CHAR16 *MiniString;
520 CHAR16 *PlusString;
521 CHAR16 *MinusString;
522 CHAR16 *AdjustNumber;
523 CHAR16 *SaveChanges;
524 CHAR16 *OptionMismatch;
525 CHAR16 *FormSuppress;
526 CHAR16 PromptBlockWidth;
527 CHAR16 OptionBlockWidth;
528 CHAR16 HelpBlockWidth;
529 FORM_BROWSER_FORMSET *OldFormSet;
530
531 //
532 // Globals defined in Ui.c
533 //
534 LIST_ENTRY MenuOption;
535 VOID *MenuRefreshHead;
536 } BROWSER_CONTEXT;
537
538 #define BROWSER_CONTEXT_FROM_LINK(a) CR (a, BROWSER_CONTEXT, Link, BROWSER_CONTEXT_SIGNATURE)
539
540 extern EFI_HII_DATABASE_PROTOCOL *mHiiDatabase;
541 extern EFI_HII_STRING_PROTOCOL *mHiiString;
542 extern EFI_HII_CONFIG_ROUTING_PROTOCOL *mHiiConfigRouting;
543
544 extern BANNER_DATA *gBannerData;
545 extern EFI_HII_HANDLE gFrontPageHandle;
546 extern UINTN gClassOfVfr;
547 extern UINTN gFunctionKeySetting;
548 extern BOOLEAN gResetRequired;
549 extern EFI_HII_HANDLE gHiiHandle;
550 extern UINT16 gDirection;
551 extern EFI_SCREEN_DESCRIPTOR gScreenDimensions;
552
553 extern FORM_BROWSER_FORMSET *gOldFormSet;
554
555 //
556 // Browser Global Strings
557 //
558 extern CHAR16 *gFunctionNineString;
559 extern CHAR16 *gFunctionTenString;
560 extern CHAR16 *gEnterString;
561 extern CHAR16 *gEnterCommitString;
562 extern CHAR16 *gEnterEscapeString;
563 extern CHAR16 *gEscapeString;
564 extern CHAR16 *gSaveFailed;
565 extern CHAR16 *gMoveHighlight;
566 extern CHAR16 *gMakeSelection;
567 extern CHAR16 *gDecNumericInput;
568 extern CHAR16 *gHexNumericInput;
569 extern CHAR16 *gToggleCheckBox;
570 extern CHAR16 *gPromptForData;
571 extern CHAR16 *gPromptForPassword;
572 extern CHAR16 *gPromptForNewPassword;
573 extern CHAR16 *gConfirmPassword;
574 extern CHAR16 *gConfirmError;
575 extern CHAR16 *gPassowordInvalid;
576 extern CHAR16 *gPressEnter;
577 extern CHAR16 *gEmptyString;
578 extern CHAR16 *gAreYouSure;
579 extern CHAR16 *gYesResponse;
580 extern CHAR16 *gNoResponse;
581 extern CHAR16 *gMiniString;
582 extern CHAR16 *gPlusString;
583 extern CHAR16 *gMinusString;
584 extern CHAR16 *gAdjustNumber;
585 extern CHAR16 *gSaveChanges;
586 extern CHAR16 *gOptionMismatch;
587 extern CHAR16 *gFormSuppress;
588
589 extern CHAR16 gPromptBlockWidth;
590 extern CHAR16 gOptionBlockWidth;
591 extern CHAR16 gHelpBlockWidth;
592
593 extern EFI_GUID gZeroGuid;
594 extern EFI_GUID gTianoHiiIfrGuid;
595
596 #include "Ui.h"
597 //
598 // Global Procedure Defines
599 //
600
601 /**
602 Initialize the HII String Token to the correct values.
603
604 **/
605 VOID
606 InitializeBrowserStrings (
607 VOID
608 );
609
610 /**
611 Prints a unicode string to the default console,
612 using L"%s" format.
613
614 @param String String pointer.
615
616 @return Length of string printed to the console
617
618 **/
619 UINTN
620 PrintString (
621 IN CHAR16 *String
622 );
623
624 /**
625 Prints a chracter to the default console,
626 using L"%c" format.
627
628 @param Character Character to print.
629
630 @return Length of string printed to the console.
631
632 **/
633 UINTN
634 PrintChar (
635 CHAR16 Character
636 );
637
638 /**
639 Prints a formatted unicode string to the default console, at
640 the supplied cursor position.
641
642 @param Column The cursor position to print the string at.
643 @param Row The cursor position to print the string at
644 @param Fmt Format string
645 @param ... Variable argument list for formating string.
646
647 @return Length of string printed to the console
648
649 **/
650 UINTN
651 EFIAPI
652 PrintAt (
653 IN UINTN Column,
654 IN UINTN Row,
655 IN CHAR16 *Fmt,
656 ...
657 );
658
659 /**
660 Prints a unicode string to the default console, at
661 the supplied cursor position, using L"%s" format.
662
663 @param Column The cursor position to print the string at.
664 @param Row The cursor position to print the string at
665 @param String String pointer.
666
667 @return Length of string printed to the console
668
669 **/
670 UINTN
671 PrintStringAt (
672 IN UINTN Column,
673 IN UINTN Row,
674 IN CHAR16 *String
675 );
676
677 /**
678 Prints a chracter to the default console, at
679 the supplied cursor position, using L"%c" format.
680
681 @param Column The cursor position to print the string at.
682 @param Row The cursor position to print the string at.
683 @param Character Character to print.
684
685 @return Length of string printed to the console.
686
687 **/
688 UINTN
689 PrintCharAt (
690 IN UINTN Column,
691 IN UINTN Row,
692 CHAR16 Character
693 );
694
695 /**
696 Parse opcodes in the formset IFR binary.
697
698 @param FormSet Pointer of the FormSet data structure.
699
700 @retval EFI_SUCCESS Opcode parse success.
701 @retval Other Opcode parse fail.
702
703 **/
704 EFI_STATUS
705 ParseOpCodes (
706 IN FORM_BROWSER_FORMSET *FormSet
707 );
708
709 /**
710 Free resources allocated for a FormSet.
711
712 @param FormSet Pointer of the FormSet
713
714 **/
715 VOID
716 DestroyFormSet (
717 IN OUT FORM_BROWSER_FORMSET *FormSet
718 );
719
720 /**
721 This function displays the page frame.
722
723 @param Selection Selection contains the information about
724 the Selection, form and formset to be displayed.
725 Selection action may be updated in retrieve callback.
726 **/
727 VOID
728 DisplayPageFrame (
729 IN UI_MENU_SELECTION *Selection
730 );
731
732 /**
733 Create a new string in HII Package List.
734
735 @param String The String to be added
736 @param HiiHandle The package list in the HII database to insert the
737 specified string.
738
739 @return The output string.
740
741 **/
742 EFI_STRING_ID
743 NewString (
744 IN CHAR16 *String,
745 IN EFI_HII_HANDLE HiiHandle
746 );
747
748 /**
749 Delete a string from HII Package List.
750
751 @param StringId Id of the string in HII database.
752 @param HiiHandle The HII package list handle.
753
754 @retval EFI_SUCCESS The string was deleted successfully.
755
756 **/
757 EFI_STATUS
758 DeleteString (
759 IN EFI_STRING_ID StringId,
760 IN EFI_HII_HANDLE HiiHandle
761 );
762
763 /**
764 Get the string based on the StringId and HII Package List Handle.
765
766 @param Token The String's ID.
767 @param HiiHandle The package list in the HII database to search for
768 the specified string.
769
770 @return The output string.
771
772 **/
773 CHAR16 *
774 GetToken (
775 IN EFI_STRING_ID Token,
776 IN EFI_HII_HANDLE HiiHandle
777 );
778
779 /**
780 Draw a pop up windows based on the dimension, number of lines and
781 strings specified.
782
783 @param RequestedWidth The width of the pop-up.
784 @param NumberOfLines The number of lines.
785 @param Marker The variable argument list for the list of string to be printed.
786
787 **/
788 VOID
789 CreateSharedPopUp (
790 IN UINTN RequestedWidth,
791 IN UINTN NumberOfLines,
792 IN VA_LIST Marker
793 );
794
795 /**
796 Routine used to abstract a generic dialog interface and return the selected key or string
797
798 @param NumberOfLines The number of lines for the dialog box
799 @param HotKey Defines whether a single character is parsed
800 (TRUE) and returned in KeyValue or a string is
801 returned in StringBuffer. Two special characters
802 are considered when entering a string, a SCAN_ESC
803 and an CHAR_CARRIAGE_RETURN. SCAN_ESC terminates
804 string input and returns
805 @param MaximumStringSize The maximum size in bytes of a typed in string
806 (each character is a CHAR16) and the minimum
807 string returned is two bytes
808 @param StringBuffer The passed in pointer to the buffer which will
809 hold the typed in string if HotKey is FALSE
810 @param KeyValue The EFI_KEY value returned if HotKey is TRUE..
811 @param ... A series of (quantity == NumberOfLines) text
812 strings which will be used to construct the dialog
813 box
814
815 @retval EFI_SUCCESS Displayed dialog and received user interaction
816 @retval EFI_INVALID_PARAMETER One of the parameters was invalid (e.g.
817 (StringBuffer == NULL) && (HotKey == FALSE))
818 @retval EFI_DEVICE_ERROR User typed in an ESC character to exit the routine
819
820 **/
821 EFI_STATUS
822 EFIAPI
823 CreateDialog (
824 IN UINTN NumberOfLines,
825 IN BOOLEAN HotKey,
826 IN UINTN MaximumStringSize,
827 OUT CHAR16 *StringBuffer,
828 OUT EFI_INPUT_KEY *KeyValue,
829 ...
830 );
831
832 /**
833 Get Value for given Name from a NameValue Storage.
834
835 @param Storage The NameValue Storage.
836 @param Name The Name.
837 @param Value The retured Value.
838
839 @retval EFI_SUCCESS Value found for given Name.
840 @retval EFI_NOT_FOUND No such Name found in NameValue storage.
841
842 **/
843 EFI_STATUS
844 GetValueByName (
845 IN FORMSET_STORAGE *Storage,
846 IN CHAR16 *Name,
847 IN OUT CHAR16 **Value
848 );
849
850 /**
851 Set Value of given Name in a NameValue Storage.
852
853 @param Storage The NameValue Storage.
854 @param Name The Name.
855 @param Value The Value to set.
856 @param Edit Whether update editValue or Value.
857
858 @retval EFI_SUCCESS Value found for given Name.
859 @retval EFI_NOT_FOUND No such Name found in NameValue storage.
860
861 **/
862 EFI_STATUS
863 SetValueByName (
864 IN FORMSET_STORAGE *Storage,
865 IN CHAR16 *Name,
866 IN CHAR16 *Value,
867 IN BOOLEAN Edit
868 );
869
870 /**
871 Get Question's current Value.
872
873 @param FormSet FormSet data structure.
874 @param Form Form data structure.
875 @param Question Question to be initialized.
876 @param Cached TRUE: get from Edit copy FALSE: get from original
877 Storage
878
879 @retval EFI_SUCCESS The function completed successfully.
880
881 **/
882 EFI_STATUS
883 GetQuestionValue (
884 IN FORM_BROWSER_FORMSET *FormSet,
885 IN FORM_BROWSER_FORM *Form,
886 IN OUT FORM_BROWSER_STATEMENT *Question,
887 IN BOOLEAN Cached
888 );
889
890 /**
891 Save Question Value to edit copy(cached) or Storage(uncached).
892
893 @param FormSet FormSet data structure.
894 @param Form Form data structure.
895 @param Question Pointer to the Question.
896 @param Cached TRUE: set to Edit copy FALSE: set to original
897 Storage
898
899 @retval EFI_SUCCESS The function completed successfully.
900
901 **/
902 EFI_STATUS
903 SetQuestionValue (
904 IN FORM_BROWSER_FORMSET *FormSet,
905 IN FORM_BROWSER_FORM *Form,
906 IN OUT FORM_BROWSER_STATEMENT *Question,
907 IN BOOLEAN Cached
908 );
909
910 /**
911 Perform inconsistent check for a Form.
912
913 @param FormSet FormSet data structure.
914 @param Form Form data structure.
915 @param Question The Question to be validated.
916 @param Type Validation type: InConsistent or NoSubmit
917
918 @retval EFI_SUCCESS Form validation pass.
919 @retval other Form validation failed.
920
921 **/
922 EFI_STATUS
923 ValidateQuestion (
924 IN FORM_BROWSER_FORMSET *FormSet,
925 IN FORM_BROWSER_FORM *Form,
926 IN FORM_BROWSER_STATEMENT *Question,
927 IN UINTN Type
928 );
929
930 /**
931 Discard data for form level or formset level.
932
933 @param FormSet FormSet data structure.
934 @param Form Form data structure.
935 @param SingleForm whether submit single form or formset.
936
937 @retval EFI_SUCCESS The function completed successfully.
938
939 **/
940 EFI_STATUS
941 DiscardForm (
942 IN FORM_BROWSER_FORMSET *FormSet,
943 IN FORM_BROWSER_FORM *Form,
944 IN BOOLEAN SingleForm
945 );
946
947 /**
948 Submit data for form level or formset level.
949
950 @param FormSet FormSet data structure.
951 @param Form Form data structure.
952 @param SingleForm whether submit single form or formset.
953
954 @retval EFI_SUCCESS The function completed successfully.
955
956 **/
957 EFI_STATUS
958 SubmitForm (
959 IN FORM_BROWSER_FORMSET *FormSet,
960 IN FORM_BROWSER_FORM *Form,
961 IN BOOLEAN SingleForm
962 );
963
964 /**
965 Reset Question to its default value.
966
967 @param FormSet The form set.
968 @param Form The form.
969 @param Question The question.
970 @param DefaultId The Class of the default.
971
972 @retval EFI_SUCCESS Question is reset to default value.
973
974 **/
975 EFI_STATUS
976 GetQuestionDefault (
977 IN FORM_BROWSER_FORMSET *FormSet,
978 IN FORM_BROWSER_FORM *Form,
979 IN FORM_BROWSER_STATEMENT *Question,
980 IN UINT16 DefaultId
981 );
982
983 /**
984 Get current setting of Questions.
985
986 @param FormSet FormSet data structure.
987
988 @retval EFI_SUCCESS The function completed successfully.
989
990 **/
991 EFI_STATUS
992 InitializeCurrentSetting (
993 IN OUT FORM_BROWSER_FORMSET *FormSet
994 );
995
996 /**
997 Initialize the internal data structure of a FormSet.
998
999 @param Handle PackageList Handle
1000 @param FormSetGuid GUID of a formset. If not specified (NULL or zero
1001 GUID), take the first FormSet found in package
1002 list.
1003 @param FormSet FormSet data structure.
1004
1005 @retval EFI_SUCCESS The function completed successfully.
1006 @retval EFI_NOT_FOUND The specified FormSet could not be found.
1007
1008 **/
1009 EFI_STATUS
1010 InitializeFormSet (
1011 IN EFI_HII_HANDLE Handle,
1012 IN OUT EFI_GUID *FormSetGuid,
1013 OUT FORM_BROWSER_FORMSET *FormSet
1014 );
1015
1016 /**
1017 Reset Questions in a Form to their default value.
1018
1019 @param FormSet FormSet data structure.
1020 @param Form The Form which to be reset.
1021 @param DefaultId The Class of the default.
1022
1023 @retval EFI_SUCCESS The function completed successfully.
1024
1025 **/
1026 EFI_STATUS
1027 ExtractFormDefault (
1028 IN FORM_BROWSER_FORMSET *FormSet,
1029 IN FORM_BROWSER_FORM *Form,
1030 IN UINT16 DefaultId
1031 );
1032
1033 /**
1034 Initialize Question's Edit copy from Storage.
1035
1036 @param Selection Selection contains the information about
1037 the Selection, form and formset to be displayed.
1038 Selection action may be updated in retrieve callback.
1039 @param FormSet FormSet data structure.
1040 @param Form Form data structure.
1041
1042 @retval EFI_SUCCESS The function completed successfully.
1043
1044 **/
1045 EFI_STATUS
1046 LoadFormConfig (
1047 IN OUT UI_MENU_SELECTION *Selection,
1048 IN FORM_BROWSER_FORMSET *FormSet,
1049 IN FORM_BROWSER_FORM *Form
1050 );
1051
1052 /**
1053 Initialize Question's Edit copy from Storage for the whole Formset.
1054
1055 @param Selection Selection contains the information about
1056 the Selection, form and formset to be displayed.
1057 Selection action may be updated in retrieve callback.
1058 @param FormSet FormSet data structure.
1059
1060 @retval EFI_SUCCESS The function completed successfully.
1061
1062 **/
1063 EFI_STATUS
1064 LoadFormSetConfig (
1065 IN OUT UI_MENU_SELECTION *Selection,
1066 IN FORM_BROWSER_FORMSET *FormSet
1067 );
1068
1069 /**
1070 Convert setting of Buffer Storage or NameValue Storage to <ConfigResp>.
1071
1072 @param Buffer The Storage to be conveted.
1073 @param ConfigResp The returned <ConfigResp>.
1074 @param SingleForm Whether update data for single form or formset level.
1075
1076 @retval EFI_SUCCESS Convert success.
1077 @retval EFI_INVALID_PARAMETER Incorrect storage type.
1078
1079 **/
1080 EFI_STATUS
1081 StorageToConfigResp (
1082 IN VOID *Buffer,
1083 IN CHAR16 **ConfigResp,
1084 IN BOOLEAN SingleForm
1085 );
1086
1087 /**
1088 Convert <ConfigResp> to settings in Buffer Storage or NameValue Storage.
1089
1090 @param Storage The Storage to receive the settings.
1091 @param ConfigResp The <ConfigResp> to be converted.
1092
1093 @retval EFI_SUCCESS Convert success.
1094 @retval EFI_INVALID_PARAMETER Incorrect storage type.
1095
1096 **/
1097 EFI_STATUS
1098 ConfigRespToStorage (
1099 IN FORMSET_STORAGE *Storage,
1100 IN CHAR16 *ConfigResp
1101 );
1102
1103 /**
1104 Fill storage's edit copy with settings requested from Configuration Driver.
1105
1106 @param FormSet FormSet data structure.
1107 @param Storage Buffer Storage.
1108
1109 @retval EFI_SUCCESS The function completed successfully.
1110
1111 **/
1112 EFI_STATUS
1113 LoadStorage (
1114 IN FORM_BROWSER_FORMSET *FormSet,
1115 IN FORMSET_STORAGE *Storage
1116 );
1117
1118 /**
1119 Fetch the Ifr binary data of a FormSet.
1120
1121 @param Handle PackageList Handle
1122 @param FormSetGuid GUID of a formset. If not specified (NULL or zero
1123 GUID), take the first FormSet found in package
1124 list.
1125 @param BinaryLength The length of the FormSet IFR binary.
1126 @param BinaryData The buffer designed to receive the FormSet.
1127
1128 @retval EFI_SUCCESS Buffer filled with the requested FormSet.
1129 BufferLength was updated.
1130 @retval EFI_INVALID_PARAMETER The handle is unknown.
1131 @retval EFI_NOT_FOUND A form or FormSet on the requested handle cannot
1132 be found with the requested FormId.
1133
1134 **/
1135 EFI_STATUS
1136 GetIfrBinaryData (
1137 IN EFI_HII_HANDLE Handle,
1138 IN OUT EFI_GUID *FormSetGuid,
1139 OUT UINTN *BinaryLength,
1140 OUT UINT8 **BinaryData
1141 );
1142
1143 /**
1144 Save globals used by previous call to SendForm(). SendForm() may be called from
1145 HiiConfigAccess.Callback(), this will cause SendForm() be reentried.
1146 So, save globals of previous call to SendForm() and restore them upon exit.
1147
1148 **/
1149 VOID
1150 SaveBrowserContext (
1151 VOID
1152 );
1153
1154 /**
1155 Restore globals used by previous call to SendForm().
1156
1157 **/
1158 VOID
1159 RestoreBrowserContext (
1160 VOID
1161 );
1162
1163 /**
1164 This is the routine which an external caller uses to direct the browser
1165 where to obtain it's information.
1166
1167
1168 @param This The Form Browser protocol instanse.
1169 @param Handles A pointer to an array of Handles. If HandleCount > 1 we
1170 display a list of the formsets for the handles specified.
1171 @param HandleCount The number of Handles specified in Handle.
1172 @param FormSetGuid This field points to the EFI_GUID which must match the Guid
1173 field in the EFI_IFR_FORM_SET op-code for the specified
1174 forms-based package. If FormSetGuid is NULL, then this
1175 function will display the first found forms package.
1176 @param FormId This field specifies which EFI_IFR_FORM to render as the first
1177 displayable page. If this field has a value of 0x0000, then
1178 the forms browser will render the specified forms in their encoded order.
1179 ScreenDimenions - This allows the browser to be called so that it occupies a
1180 portion of the physical screen instead of dynamically determining the screen dimensions.
1181 ActionRequest - Points to the action recommended by the form.
1182 @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in
1183 characters.
1184 @param ActionRequest Points to the action recommended by the form.
1185
1186 @retval EFI_SUCCESS The function completed successfully.
1187 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
1188 @retval EFI_NOT_FOUND No valid forms could be found to display.
1189
1190 **/
1191 EFI_STATUS
1192 EFIAPI
1193 SendForm (
1194 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
1195 IN EFI_HII_HANDLE *Handles,
1196 IN UINTN HandleCount,
1197 IN EFI_GUID *FormSetGuid, OPTIONAL
1198 IN UINT16 FormId, OPTIONAL
1199 IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
1200 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
1201 );
1202
1203 /**
1204 This function is called by a callback handler to retrieve uncommitted state
1205 data from the browser.
1206
1207 @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL
1208 instance.
1209 @param ResultsDataSize A pointer to the size of the buffer associated
1210 with ResultsData.
1211 @param ResultsData A string returned from an IFR browser or
1212 equivalent. The results string will have no
1213 routing information in them.
1214 @param RetrieveData A BOOLEAN field which allows an agent to retrieve
1215 (if RetrieveData = TRUE) data from the uncommitted
1216 browser state information or set (if RetrieveData
1217 = FALSE) data in the uncommitted browser state
1218 information.
1219 @param VariableGuid An optional field to indicate the target variable
1220 GUID name to use.
1221 @param VariableName An optional field to indicate the target
1222 human-readable variable name.
1223
1224 @retval EFI_SUCCESS The results have been distributed or are awaiting
1225 distribution.
1226 @retval EFI_BUFFER_TOO_SMALL The ResultsDataSize specified was too small to
1227 contain the results data.
1228
1229 **/
1230 EFI_STATUS
1231 EFIAPI
1232 BrowserCallback (
1233 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
1234 IN OUT UINTN *ResultsDataSize,
1235 IN OUT EFI_STRING ResultsData,
1236 IN BOOLEAN RetrieveData,
1237 IN CONST EFI_GUID *VariableGuid, OPTIONAL
1238 IN CONST CHAR16 *VariableName OPTIONAL
1239 );
1240
1241 /**
1242 Find menu which will show next time.
1243
1244 @param Selection On input, Selection tell setup browser the information
1245 about the Selection, form and formset to be displayed.
1246 On output, Selection return the screen item that is selected
1247 by user.
1248 @param Repaint Whether need to repaint the menu.
1249 @param NewLine Whether need to show at new line.
1250
1251 @retval TRUE Need return.
1252 @retval FALSE No need to return.
1253 **/
1254 BOOLEAN
1255 FindNextMenu (
1256 IN OUT UI_MENU_SELECTION *Selection,
1257 IN BOOLEAN *Repaint,
1258 IN BOOLEAN *NewLine
1259 );
1260
1261 /**
1262 check whether the formset need to update the NV.
1263
1264 @param FormSet FormSet data structure.
1265 @param SetValue Whether set new value or clear old value.
1266
1267 **/
1268 VOID
1269 UpdateNvInfoInForm (
1270 IN FORM_BROWSER_FORMSET *FormSet,
1271 IN BOOLEAN SetValue
1272 );
1273
1274 /**
1275 check whether the formset need to update the NV.
1276
1277 @param FormSet FormSet data structure.
1278
1279 @retval TRUE Need to update the NV.
1280 @retval FALSE No need to update the NV.
1281 **/
1282 BOOLEAN
1283 IsNvUpdateRequired (
1284 IN FORM_BROWSER_FORMSET *FormSet
1285 );
1286
1287 /**
1288 Call the call back function for the question and process the return action.
1289
1290 @param Selection On input, Selection tell setup browser the information
1291 about the Selection, form and formset to be displayed.
1292 On output, Selection return the screen item that is selected
1293 by user.
1294 @param Statement The Question which need to call.
1295 @param Action The action request.
1296 @param SkipSaveOrDiscard Whether skip save or discard action.
1297
1298 @retval EFI_SUCCESS The call back function excutes successfully.
1299 @return Other value if the call back function failed to excute.
1300 **/
1301 EFI_STATUS
1302 ProcessCallBackFunction (
1303 IN OUT UI_MENU_SELECTION *Selection,
1304 IN FORM_BROWSER_STATEMENT *Question,
1305 IN EFI_BROWSER_ACTION Action,
1306 IN BOOLEAN SkipSaveOrDiscard
1307 );
1308 #endif