]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
647c4488fc3f99a8f3cddb54ef0c809e081153f2
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.h
1 /** @file
2
3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 Setup.h
15
16 Abstract:
17
18
19 Revision History
20
21
22 **/
23
24 #ifndef _SETUP_H
25 #define _SETUP_H
26
27
28 #include <PiDxe.h>
29
30 #include <Protocol/Print.h>
31 #include <Protocol/SimpleTextOut.h>
32 #include <Protocol/SimpleTextIn.h>
33 #include <Protocol/FormBrowser2.h>
34 #include <Protocol/DevicePath.h>
35 #include <Protocol/UnicodeCollation.h>
36 #include <Protocol/HiiConfigAccess.h>
37 #include <Protocol/HiiConfigRouting.h>
38 #include <Protocol/HiiDatabase.h>
39 #include <Protocol/HiiString.h>
40
41 #include <MdeModuleHii.h>
42
43 #include <Library/GraphicsLib.h>
44 #include <Library/PrintLib.h>
45 #include <Library/DebugLib.h>
46 #include <Library/BaseMemoryLib.h>
47 #include <Library/UefiRuntimeServicesTableLib.h>
48 #include <Library/UefiDriverEntryPoint.h>
49 #include <Library/UefiBootServicesTableLib.h>
50 #include <Library/BaseLib.h>
51 #include <Library/MemoryAllocationLib.h>
52 #include <Library/IfrSupportLib.h>
53 #include <Library/ExtendedIfrSupportLib.h>
54 #include <Library/HiiLib.h>
55 #include <Library/ExtendedHiiLib.h>
56
57 #include "R8Lib.h"
58
59 #include "Colors.h"
60
61 //@MT:#include EFI_PROTOCOL_DEFINITION (HiiDatabase)
62 //@MT:#include EFI_PROTOCOL_DEFINITION (HiiString)
63 //@MT:#include EFI_PROTOCOL_DEFINITION (HiiConfigRouting)
64 //@MT:#include EFI_PROTOCOL_DEFINITION (HiiConfigAccess)
65 //@MT:#include EFI_PROTOCOL_DEFINITION (FormBrowser2)
66
67 //@MT:#include EFI_GUID_DEFINITION (GlobalVariable)
68 //@MT:#include EFI_PROTOCOL_DEFINITION (DevicePath)
69 //@MT:#include EFI_PROTOCOL_DEFINITION (SimpleTextOut)
70 //@MT:#include EFI_PROTOCOL_DEFINITION (SimpleTextIn)
71 //@MT:#include EFI_PROTOCOL_DEFINITION (Print)
72 //@MT:#include EFI_PROTOCOL_DEFINITION (UnicodeCollation)
73
74 //
75 // This is the generated header file which includes whatever needs to be exported (strings + IFR)
76 //
77
78 extern UINT8 SetupBrowserStrings[];
79
80 //
81 // Screen definitions
82 //
83 #define BANNER_HEIGHT 6
84 #define BANNER_COLUMNS 3
85
86 #define FRONT_PAGE_HEADER_HEIGHT 6
87 #define NONE_FRONT_PAGE_HEADER_HEIGHT 3
88 #define LEFT_SKIPPED_COLUMNS 4
89 #define FOOTER_HEIGHT 4
90 #define STATUS_BAR_HEIGHT 1
91 #define SCROLL_ARROW_HEIGHT 1
92 #define POPUP_PAD_SPACE_COUNT 5
93 #define POPUP_FRAME_WIDTH 2
94
95 //
96 // Definition for function key setting
97 //
98 #define NONE_FUNCTION_KEY_SETTING 0
99 #define DEFAULT_FUNCTION_KEY_SETTING (FUNCTION_ONE | FUNCTION_TWO | FUNCTION_NINE | FUNCTION_TEN)
100
101 #define FUNCTION_ONE (1 << 0)
102 #define FUNCTION_TWO (1 << 1)
103 #define FUNCTION_NINE (1 << 2)
104 #define FUNCTION_TEN (1 << 3)
105
106 typedef struct {
107 EFI_GUID FormSetGuid;
108 UINTN KeySetting;
109 } FUNCTIION_KEY_SETTING;
110
111 //
112 // Character definitions
113 //
114 #define CHAR_SPACE 0x0020
115 #define UPPER_LOWER_CASE_OFFSET 0x20
116
117 //
118 // Time definitions
119 //
120 #define ONE_SECOND 10000000
121
122 //
123 // Display definitions
124 //
125 #define LEFT_HYPER_DELIMITER L'<'
126 #define RIGHT_HYPER_DELIMITER L'>'
127
128 #define LEFT_ONEOF_DELIMITER L'<'
129 #define RIGHT_ONEOF_DELIMITER L'>'
130
131 #define LEFT_NUMERIC_DELIMITER L'['
132 #define RIGHT_NUMERIC_DELIMITER L']'
133
134 #define LEFT_CHECKBOX_DELIMITER L'['
135 #define RIGHT_CHECKBOX_DELIMITER L']'
136
137 #define CHECK_ON L'X'
138 #define CHECK_OFF L' '
139
140 #define TIME_SEPARATOR L':'
141 #define DATE_SEPARATOR L'/'
142
143 #define YES_ANSWER L'Y'
144 #define NO_ANSWER L'N'
145
146 //
147 // This is the Input Error Message
148 //
149 #define INPUT_ERROR 1
150
151 //
152 // This is the NV RAM update required Message
153 //
154 #define NV_UPDATE_REQUIRED 2
155
156 //
157 // Refresh the Status Bar with flags
158 //
159 #define REFRESH_STATUS_BAR 0xff
160
161 //
162 // Incremental string lenght of ConfigRequest
163 //
164 #define CONFIG_REQUEST_STRING_INCREMENTAL 1024
165
166 //
167 // HII value compare result
168 //
169 #define HII_VALUE_UNDEFINED 0
170 #define HII_VALUE_EQUAL 1
171 #define HII_VALUE_LESS_THAN 2
172 #define HII_VALUE_GREATER_THAN 3
173
174 //
175 // Incremental size of stack for expression
176 //
177 #define EXPRESSION_STACK_SIZE_INCREMENT 0x100
178
179
180 #define EFI_SPECIFICATION_ERRATA_VERSION 0
181
182 #define EFI_IFR_SPECIFICATION_VERSION \
183 ((((EFI_SPECIFICATION_VERSION) >> 8) & 0xff00) | \
184 (((EFI_SPECIFICATION_VERSION) & 0xf) << 4) | \
185 ((EFI_SPECIFICATION_ERRATA_VERSION) & 0xf))
186
187 #define SETUP_DRIVER_SIGNATURE EFI_SIGNATURE_32 ('F', 'B', 'D', 'V')
188 typedef struct {
189 UINT32 Signature;
190
191 EFI_HANDLE Handle;
192
193 //
194 // Produced protocol
195 //
196 EFI_FORM_BROWSER2_PROTOCOL FormBrowser2;
197 EFI_PRINT_PROTOCOL Print;
198
199 } SETUP_DRIVER_PRIVATE_DATA;
200
201 typedef struct {
202 EFI_STRING_ID Banner[BANNER_HEIGHT][BANNER_COLUMNS];
203 } BANNER_DATA;
204
205 //
206 // IFR relative definition
207 //
208 #define EFI_HII_EXPRESSION_INCONSISTENT_IF 0
209 #define EFI_HII_EXPRESSION_NO_SUBMIT_IF 1
210 #define EFI_HII_EXPRESSION_GRAY_OUT_IF 2
211 #define EFI_HII_EXPRESSION_SUPPRESS_IF 3
212 #define EFI_HII_EXPRESSION_DISABLE_IF 4
213 #define EFI_HII_EXPRESSION_VALUE 5
214 #define EFI_HII_EXPRESSION_RULE 6
215
216 #define EFI_HII_VARSTORE_BUFFER 0
217 #define EFI_HII_VARSTORE_NAME_VALUE 1
218 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
219
220 #define FORM_INCONSISTENT_VALIDATION 0
221 #define FORM_NO_SUBMIT_VALIDATION 1
222
223 typedef struct {
224 UINT8 Type;
225 EFI_IFR_TYPE_VALUE Value;
226 } EFI_HII_VALUE;
227
228 #define NAME_VALUE_NODE_SIGNATURE EFI_SIGNATURE_32 ('N', 'V', 'S', 'T')
229
230 typedef struct {
231 UINTN Signature;
232 LIST_ENTRY Link;
233 CHAR16 *Name;
234 CHAR16 *Value;
235 CHAR16 *EditValue;
236 } NAME_VALUE_NODE;
237
238 #define NAME_VALUE_NODE_FROM_LINK(a) CR (a, NAME_VALUE_NODE, Link, NAME_VALUE_NODE_SIGNATURE)
239
240 #define FORMSET_STORAGE_SIGNATURE EFI_SIGNATURE_32 ('F', 'S', 'T', 'G')
241
242 typedef struct {
243 UINTN Signature;
244 LIST_ENTRY Link;
245
246 UINT8 Type; // Storage type
247
248 UINT16 VarStoreId;
249 EFI_GUID Guid;
250
251 CHAR16 *Name; // For EFI_IFR_VARSTORE
252 UINT16 Size;
253 UINT8 *Buffer;
254 UINT8 *EditBuffer; // Edit copy for Buffer Storage
255
256 LIST_ENTRY NameValueListHead; // List of NAME_VALUE_NODE
257
258 UINT32 Attributes; // For EFI_IFR_VARSTORE_EFI: EFI Variable attribute
259
260 CHAR16 *ConfigHdr; // <ConfigHdr>
261 CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>
262 UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>
263 UINTN SpareStrLen; // Spare length of ConfigRequest string buffer
264 } FORMSET_STORAGE;
265
266 #define FORMSET_STORAGE_FROM_LINK(a) CR (a, FORMSET_STORAGE, Link, FORMSET_STORAGE_SIGNATURE)
267
268 #define EXPRESSION_OPCODE_SIGNATURE EFI_SIGNATURE_32 ('E', 'X', 'O', 'P')
269
270 typedef struct {
271 UINTN Signature;
272 LIST_ENTRY Link;
273
274 UINT8 Operand;
275
276 UINT8 Format; // For EFI_IFR_TO_STRING, EFI_IFR_FIND
277 UINT8 Flags; // For EFI_IFR_SPAN
278 UINT8 RuleId; // For EFI_IFR_RULE_REF
279
280 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
281
282 EFI_QUESTION_ID QuestionId; // For EFI_IFR_EQ_ID_ID, EFI_IFR_EQ_ID_LIST, EFI_IFR_QUESTION_REF1
283 EFI_QUESTION_ID QuestionId2;
284
285 UINT16 ListLength; // For EFI_IFR_EQ_ID_LIST
286 UINT16 *ValueList;
287
288 EFI_STRING_ID DevicePath; // For EFI_IFR_QUESTION_REF3_2, EFI_IFR_QUESTION_REF3_3
289 EFI_GUID Guid;
290 } EXPRESSION_OPCODE;
291
292 #define EXPRESSION_OPCODE_FROM_LINK(a) CR (a, EXPRESSION_OPCODE, Link, EXPRESSION_OPCODE_SIGNATURE)
293
294 #define FORM_EXPRESSION_SIGNATURE EFI_SIGNATURE_32 ('F', 'E', 'X', 'P')
295
296 typedef struct {
297 UINTN Signature;
298 LIST_ENTRY Link;
299
300 UINT8 Type; // Type for this expression
301
302 UINT8 RuleId; // For EFI_IFR_RULE only
303 EFI_STRING_ID Error; // For EFI_IFR_NO_SUBMIT_IF, EFI_IFR_INCONSISTENT_IF only
304
305 EFI_HII_VALUE Result; // Expression evaluation result
306
307 LIST_ENTRY OpCodeListHead; // OpCodes consist of this expression (EXPRESSION_OPCODE)
308 } FORM_EXPRESSION;
309
310 #define FORM_EXPRESSION_FROM_LINK(a) CR (a, FORM_EXPRESSION, Link, FORM_EXPRESSION_SIGNATURE)
311
312 #define QUESTION_DEFAULT_SIGNATURE EFI_SIGNATURE_32 ('Q', 'D', 'F', 'T')
313
314 typedef struct {
315 UINTN Signature;
316 LIST_ENTRY Link;
317
318 UINT16 DefaultId;
319 EFI_HII_VALUE Value; // Default value
320
321 FORM_EXPRESSION *ValueExpression; // Not-NULL indicates default value is provided by EFI_IFR_VALUE
322 } QUESTION_DEFAULT;
323
324 #define QUESTION_DEFAULT_FROM_LINK(a) CR (a, QUESTION_DEFAULT, Link, QUESTION_DEFAULT_SIGNATURE)
325
326 #define QUESTION_OPTION_SIGNATURE EFI_SIGNATURE_32 ('Q', 'O', 'P', 'T')
327
328 typedef struct {
329 UINTN Signature;
330 LIST_ENTRY Link;
331
332 EFI_STRING_ID Text;
333 UINT8 Flags;
334 EFI_HII_VALUE Value;
335 EFI_IMAGE_ID ImageId;
336
337 FORM_EXPRESSION *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf
338 } QUESTION_OPTION;
339
340 #define QUESTION_OPTION_FROM_LINK(a) CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)
341
342 #define FORM_BROWSER_STATEMENT_SIGNATURE EFI_SIGNATURE_32 ('F', 'S', 'T', 'A')
343 typedef struct {
344 UINTN Signature;
345 LIST_ENTRY Link;
346
347 UINT8 Operand; // The operand (first byte) of this Statement or Question
348
349 //
350 // Statement Header
351 //
352 EFI_STRING_ID Prompt;
353 EFI_STRING_ID Help;
354 EFI_STRING_ID TextTwo; // For EFI_IFR_TEXT
355
356 //
357 // Question Header
358 //
359 EFI_QUESTION_ID QuestionId; // The value of zero is reserved
360 EFI_VARSTORE_ID VarStoreId; // A value of zero indicates no variable storage
361 FORMSET_STORAGE *Storage;
362 union {
363 EFI_STRING_ID VarName;
364 UINT16 VarOffset;
365 } VarStoreInfo;
366 UINT16 StorageWidth;
367 UINT8 QuestionFlags;
368 CHAR16 *VariableName; // Name/Value or EFI Variable name
369 CHAR16 *BlockName; // Buffer storage block name: "OFFSET=...WIDTH=..."
370
371 EFI_HII_VALUE HiiValue; // Edit copy for checkbox, numberic, oneof
372 UINT8 *BufferValue; // Edit copy for string, password, orderedlist
373
374 //
375 // OpCode specific members
376 //
377 UINT8 Flags; // for EFI_IFR_CHECKBOX, EFI_IFR_DATE, EFI_IFR_NUMERIC, EFI_IFR_ONE_OF,
378 // EFI_IFR_ORDERED_LIST, EFI_IFR_STRING,EFI_IFR_SUBTITLE,EFI_IFR_TIME, EFI_IFR_BANNER
379 UINT8 MaxContainers; // for EFI_IFR_ORDERED_LIST
380
381 UINT16 BannerLineNumber; // for EFI_IFR_BANNER, 1-based line number
382 EFI_STRING_ID QuestionConfig; // for EFI_IFR_ACTION, if 0 then no configuration string will be processed
383
384 UINT64 Minimum; // for EFI_IFR_ONE_OF/EFI_IFR_NUMERIC, it's Min/Max value
385 UINT64 Maximum; // for EFI_IFR_STRING/EFI_IFR_PASSWORD, it's Min/Max length
386 UINT64 Step;
387
388 EFI_DEFAULT_ID DefaultId; // for EFI_IFR_RESET_BUTTON
389 EFI_FORM_ID RefFormId; // for EFI_IFR_REF
390 EFI_QUESTION_ID RefQuestionId; // for EFI_IFR_REF2
391 EFI_GUID RefFormSetId; // for EFI_IFR_REF3
392 EFI_STRING_ID RefDevicePath; // for EFI_IFR_REF4
393
394 //
395 // Get from IFR parsing
396 //
397 FORM_EXPRESSION *ValueExpression; // nested EFI_IFR_VALUE, provide Question value and indicate Question is ReadOnly
398 LIST_ENTRY DefaultListHead; // nested EFI_IFR_DEFAULT list (QUESTION_DEFAULT), provide default values
399 LIST_ENTRY OptionListHead; // nested EFI_IFR_ONE_OF_OPTION list (QUESTION_OPTION)
400
401 EFI_IMAGE_ID ImageId; // nested EFI_IFR_IMAGE
402 UINT8 RefreshInterval; // nested EFI_IFR_REFRESH, refresh interval(in seconds) for Question value, 0 means no refresh
403 BOOLEAN InSubtitle; // nesting inside of EFI_IFR_SUBTITLE
404
405 LIST_ENTRY InconsistentListHead;// nested inconsistent expression list (FORM_EXPRESSION)
406 LIST_ENTRY NoSubmitListHead; // nested nosubmit expression list (FORM_EXPRESSION)
407 FORM_EXPRESSION *GrayOutExpression; // nesting inside of GrayOutIf
408 FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf
409
410 } FORM_BROWSER_STATEMENT;
411
412 #define FORM_BROWSER_STATEMENT_FROM_LINK(a) CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)
413
414 #define FORM_BROWSER_FORM_SIGNATURE EFI_SIGNATURE_32 ('F', 'F', 'R', 'M')
415
416 typedef struct {
417 UINTN Signature;
418 LIST_ENTRY Link;
419
420 UINT16 FormId;
421 EFI_STRING_ID FormTitle;
422
423 EFI_IMAGE_ID ImageId;
424
425 LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)
426 LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)
427 } FORM_BROWSER_FORM;
428
429 #define FORM_BROWSER_FORM_FROM_LINK(a) CR (a, FORM_BROWSER_FORM, Link, FORM_BROWSER_FORM_SIGNATURE)
430
431 #define FORMSET_DEFAULTSTORE_SIGNATURE EFI_SIGNATURE_32 ('F', 'D', 'F', 'S')
432
433 typedef struct {
434 UINTN Signature;
435 LIST_ENTRY Link;
436
437 UINT16 DefaultId;
438 EFI_STRING_ID DefaultName;
439 } FORMSET_DEFAULTSTORE;
440
441 #define FORMSET_DEFAULTSTORE_FROM_LINK(a) CR (a, FORMSET_DEFAULTSTORE, Link, FORMSET_DEFAULTSTORE_SIGNATURE)
442
443 typedef struct {
444 EFI_HII_HANDLE HiiHandle;
445 EFI_HANDLE DriverHandle;
446 EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;
447 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
448
449 UINTN IfrBinaryLength;
450 UINT8 *IfrBinaryData;
451
452 EFI_GUID Guid;
453 EFI_STRING_ID FormSetTitle;
454 EFI_STRING_ID Help;
455 UINT16 Class;
456 UINT16 SubClass;
457 EFI_IMAGE_ID ImageId;
458
459 FORM_BROWSER_STATEMENT *StatementBuffer; // Buffer for all Statements and Questions
460 EXPRESSION_OPCODE *ExpressionBuffer; // Buffer for all Expression OpCode
461
462 LIST_ENTRY StorageListHead; // Storage list (FORMSET_STORAGE)
463 LIST_ENTRY DefaultStoreListHead; // DefaultStore list (FORMSET_DEFAULTSTORE)
464 LIST_ENTRY FormListHead; // Form list (FORM_BROWSER_FORM)
465 } FORM_BROWSER_FORMSET;
466
467
468 extern EFI_HII_DATABASE_PROTOCOL *mHiiDatabase;
469 extern EFI_HII_STRING_PROTOCOL *mHiiString;
470 extern EFI_HII_CONFIG_ROUTING_PROTOCOL *mHiiConfigRouting;
471
472 extern BANNER_DATA *BannerData;
473 extern EFI_HII_HANDLE FrontPageHandle;
474 extern UINTN gClassOfVfr;
475 extern UINTN gFunctionKeySetting;
476 extern BOOLEAN gResetRequired;
477 extern BOOLEAN gNvUpdateRequired;
478 extern EFI_HII_HANDLE gHiiHandle;
479 extern BOOLEAN gFirstIn;
480 extern UINT16 gDirection;
481 extern EFI_SCREEN_DESCRIPTOR gScreenDimensions;
482 extern BOOLEAN gUpArrow;
483 extern BOOLEAN gDownArrow;
484
485 //
486 // Browser Global Strings
487 //
488 extern CHAR16 *gFunctionOneString;
489 extern CHAR16 *gFunctionTwoString;
490 extern CHAR16 *gFunctionNineString;
491 extern CHAR16 *gFunctionTenString;
492 extern CHAR16 *gEnterString;
493 extern CHAR16 *gEnterCommitString;
494 extern CHAR16 *gEscapeString;
495 extern CHAR16 *gSaveFailed;
496 extern CHAR16 *gMoveHighlight;
497 extern CHAR16 *gMakeSelection;
498 extern CHAR16 *gDecNumericInput;
499 extern CHAR16 *gHexNumericInput;
500 extern CHAR16 *gToggleCheckBox;
501 extern CHAR16 *gPromptForData;
502 extern CHAR16 *gPromptForPassword;
503 extern CHAR16 *gPromptForNewPassword;
504 extern CHAR16 *gConfirmPassword;
505 extern CHAR16 *gConfirmError;
506 extern CHAR16 *gPassowordInvalid;
507 extern CHAR16 *gPressEnter;
508 extern CHAR16 *gEmptyString;
509 extern CHAR16 *gAreYouSure;
510 extern CHAR16 *gYesResponse;
511 extern CHAR16 *gNoResponse;
512 extern CHAR16 *gMiniString;
513 extern CHAR16 *gPlusString;
514 extern CHAR16 *gMinusString;
515 extern CHAR16 *gAdjustNumber;
516
517 extern CHAR16 gPromptBlockWidth;
518 extern CHAR16 gOptionBlockWidth;
519 extern CHAR16 gHelpBlockWidth;
520
521 extern EFI_GUID gZeroGuid;
522 extern EFI_GUID gTianoHiiIfrGuid;
523
524 //
525 // Global Procedure Defines
526 //
527 VOID
528 InitializeBrowserStrings (
529 VOID
530 )
531 ;
532
533 UINTN
534 _Print (
535 IN CHAR16 *fmt,
536 ...
537 )
538 ;
539
540 UINTN
541 PrintString (
542 CHAR16 *String
543 )
544 ;
545
546 UINTN
547 PrintChar (
548 CHAR16 Character
549 )
550 ;
551
552 UINTN
553 PrintAt (
554 IN UINTN Column,
555 IN UINTN Row,
556 IN CHAR16 *fmt,
557 ...
558 )
559 ;
560
561 UINTN
562 PrintStringAt (
563 IN UINTN Column,
564 IN UINTN Row,
565 CHAR16 *String
566 )
567 ;
568
569 UINTN
570 PrintCharAt (
571 IN UINTN Column,
572 IN UINTN Row,
573 CHAR16 Character
574 )
575 ;
576
577 EFI_STATUS
578 ParseOpCodes (
579 IN FORM_BROWSER_FORMSET *FormSet
580 )
581 ;
582
583 VOID
584 DestroyFormSet (
585 IN OUT FORM_BROWSER_FORMSET *FormSet
586 )
587 ;
588
589 VOID
590 DisplayPageFrame (
591 VOID
592 )
593 ;
594
595 EFI_STRING_ID
596 NewString (
597 IN CHAR16 *String,
598 IN EFI_HII_HANDLE HiiHandle
599 )
600 ;
601
602 EFI_STATUS
603 DeleteString (
604 IN EFI_STRING_ID StringId,
605 IN EFI_HII_HANDLE HiiHandle
606 )
607 ;
608 CHAR16 *
609 GetToken (
610 IN EFI_STRING_ID Token,
611 IN EFI_HII_HANDLE HiiHandle
612 )
613 ;
614
615 VOID
616 CreateSharedPopUp (
617 IN UINTN RequestedWidth,
618 IN UINTN NumberOfLines,
619 IN CHAR16 **ArrayOfStrings
620 )
621 ;
622
623 EFI_STATUS
624 CreateDialog (
625 IN UINTN NumberOfLines,
626 IN BOOLEAN HotKey,
627 IN UINTN MaximumStringSize,
628 OUT CHAR16 *StringBuffer,
629 OUT EFI_INPUT_KEY *KeyValue,
630 IN CHAR16 *String,
631 ...
632 )
633 ;
634
635 EFI_STATUS
636 GetQuestionValue (
637 IN FORM_BROWSER_FORMSET *FormSet,
638 IN FORM_BROWSER_FORM *Form,
639 IN OUT FORM_BROWSER_STATEMENT *Question,
640 IN BOOLEAN Cached
641 )
642 ;
643
644 EFI_STATUS
645 SetQuestionValue (
646 IN FORM_BROWSER_FORMSET *FormSet,
647 IN FORM_BROWSER_FORM *Form,
648 IN OUT FORM_BROWSER_STATEMENT *Question,
649 IN BOOLEAN Cached
650 )
651 ;
652
653 EFI_STATUS
654 ValidateQuestion (
655 IN FORM_BROWSER_FORMSET *FormSet,
656 IN FORM_BROWSER_FORM *Form,
657 IN FORM_BROWSER_STATEMENT *Question,
658 IN UINTN Type
659 )
660 ;
661
662 EFI_STATUS
663 SubmitForm (
664 IN FORM_BROWSER_FORMSET *FormSet,
665 IN FORM_BROWSER_FORM *Form
666 )
667 ;
668
669 EFI_STATUS
670 GetQuestionDefault (
671 IN FORM_BROWSER_FORMSET *FormSet,
672 IN FORM_BROWSER_FORM *Form,
673 IN FORM_BROWSER_STATEMENT *Question,
674 IN UINT16 DefaultId
675 )
676 ;
677
678 EFI_STATUS
679 InitializeCurrentSetting (
680 IN OUT FORM_BROWSER_FORMSET *FormSet
681 )
682 ;
683
684 EFI_STATUS
685 InitializeFormSet (
686 IN EFI_HII_HANDLE Handle,
687 IN OUT EFI_GUID *FormSetGuid,
688 OUT FORM_BROWSER_FORMSET *FormSet
689 )
690 ;
691
692 EFI_STATUS
693 ExtractFormDefault (
694 IN FORM_BROWSER_FORMSET *FormSet,
695 IN FORM_BROWSER_FORM *Form,
696 IN UINT16 DefaultId
697 )
698 ;
699
700 EFI_STATUS
701 LoadFormConfig (
702 IN FORM_BROWSER_FORMSET *FormSet,
703 IN FORM_BROWSER_FORM *Form
704 )
705 ;
706
707 EFI_STATUS
708 StorageToConfigResp (
709 IN FORMSET_STORAGE *Storage,
710 IN CHAR16 **ConfigResp
711 )
712 ;
713
714 EFI_STATUS
715 ConfigRespToStorage (
716 IN FORMSET_STORAGE *Storage,
717 IN CHAR16 *ConfigResp
718 )
719 ;
720
721 EFI_STATUS
722 LoadStorage (
723 IN FORM_BROWSER_FORMSET *FormSet,
724 IN FORMSET_STORAGE *Storage
725 )
726 ;
727
728 EFI_STATUS
729 GetIfrBinaryData (
730 IN EFI_HII_HANDLE Handle,
731 IN OUT EFI_GUID *FormSetGuid,
732 OUT UINTN *BinaryLength,
733 OUT UINT8 **BinaryData
734 )
735 ;
736
737 EFI_STATUS
738 EFIAPI
739 SendForm (
740 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
741 IN EFI_HII_HANDLE *Handles,
742 IN UINTN HandleCount,
743 IN EFI_GUID *FormSetGuid, OPTIONAL
744 IN UINT16 FormId, OPTIONAL
745 IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
746 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
747 )
748 ;
749
750 EFI_STATUS
751 EFIAPI
752 BrowserCallback (
753 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
754 IN OUT UINTN *ResultsDataSize,
755 IN OUT EFI_STRING ResultsData,
756 IN BOOLEAN RetrieveData,
757 IN CONST EFI_GUID *VariableGuid, OPTIONAL
758 IN CONST CHAR16 *VariableName OPTIONAL
759 )
760 ;
761
762 #endif