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