]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/IfrSupportLib.h
1) StrGather (Build.exe) in compatible mode add a Framework Package Header to replace...
[mirror_edk2.git] / MdeModulePkg / Include / Library / IfrSupportLib.h
1 /** @file
2 This library contains functions to do IFR opcode creation and utility functions
3 to help module to interact with a UEFI Form Browser.
4
5 Copyright (c) 2007 - 2008, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _IFR_SUPPORT_LIBRARY_H_
17 #define _IFR_SUPPORT_LIBRARY_H_
18
19
20 #include <Protocol/HiiFont.h>
21 #include <Protocol/HiiImage.h>
22 #include <Protocol/HiiString.h>
23 #include <Protocol/HiiDatabase.h>
24 #include <Protocol/HiiConfigRouting.h>
25 #include <Protocol/HiiConfigAccess.h>
26 #include <Protocol/FormBrowser2.h>
27 #include <Protocol/SimpleTextOut.h>
28
29 #include <Guid/GlobalVariable.h>
30
31 //
32 // The architectural variable "Lang" and "LangCodes" are deprecated in UEFI
33 // specification. While, UEFI specification also states that these deprecated
34 // variables may be provided for backwards compatibility.
35
36 #define EFI_LANGUAGE_VARIABLE L"Lang"
37 #define EFI_LANGUAGE_CODES_VARIABLE L"LangCodes"
38
39 #define UEFI_LANGUAGE_VARIABLE L"PlatformLang"
40 #define UEFI_LANGUAGE_CODES_VARIABLE L"PlatformLangCodes"
41
42 #define INVALID_VARSTORE_ID 0
43
44 #define QUESTION_FLAGS (EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_OPTIONS_ONLY)
45 #define QUESTION_FLAGS_MASK (~QUESTION_FLAGS)
46
47 #pragma pack(1)
48 typedef struct {
49 EFI_STRING_ID StringToken;
50 EFI_IFR_TYPE_VALUE Value;
51 UINT8 Flags;
52 } IFR_OPTION;
53 #pragma pack()
54
55 typedef struct {
56 ///
57 /// Buffer size allocated for Data.
58 ///
59 UINT32 BufferSize;
60
61 ///
62 /// Offset in Data to append the newly created opcode binary.
63 /// It will be adjusted automatically in Create***OpCode(), and should be
64 /// initialized to 0 before invocation of a serial of Create***OpCode()
65 ///
66 UINT32 Offset;
67
68 ///
69 /// The destination buffer for created op-codes
70 ///
71 UINT8 *Data;
72 } EFI_HII_UPDATE_DATA;
73
74
75 /**
76 Create EFI_IFR_END_OP opcode.
77
78 If Data is NULL or Data->Data is NULL, then ASSERT.
79
80 @param Data Destination for the created opcode binary
81
82 @retval EFI_SUCCESS Opcode is created successfully.
83 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
84
85 **/
86 EFI_STATUS
87 EFIAPI
88 CreateEndOpCode (
89 IN OUT EFI_HII_UPDATE_DATA *Data
90 )
91 ;
92
93 /**
94 Create EFI_IFR_DEFAULT_OP opcode.
95
96 If Data is NULL or Data->Data is NULL, then ASSERT.
97
98 @param Value Value for the default
99 @param Type Type for the default
100 @param Data Destination for the created opcode binary
101
102 @retval EFI_SUCCESS Opcode is created successfully.
103 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
104 @retval EFI_INVALID_PARAMETER The type is not valid.
105
106 **/
107 EFI_STATUS
108 EFIAPI
109 CreateDefaultOpCode (
110 IN EFI_IFR_TYPE_VALUE *Value,
111 IN UINT8 Type,
112 IN OUT EFI_HII_UPDATE_DATA *Data
113 )
114 ;
115
116 /**
117 Create EFI_IFR_ACTION_OP opcode.
118
119 If Data is NULL or Data->Data is NULL, then ASSERT.
120
121 @param QuestionId Question ID
122 @param Prompt String ID for Prompt
123 @param Help String ID for Help
124 @param QuestionFlags Flags in Question Header
125 @param QuestionConfig String ID for configuration
126 @param Data Destination for the created opcode binary
127
128 @retval EFI_SUCCESS Opcode is created successfully.
129 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
130 @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.
131
132 **/
133 EFI_STATUS
134 EFIAPI
135 CreateActionOpCode (
136 IN EFI_QUESTION_ID QuestionId,
137 IN EFI_STRING_ID Prompt,
138 IN EFI_STRING_ID Help,
139 IN UINT8 QuestionFlags,
140 IN EFI_STRING_ID QuestionConfig,
141 IN OUT EFI_HII_UPDATE_DATA *Data
142 )
143 ;
144
145 /**
146 Create EFI_IFR_SUBTITLE_OP opcode.
147
148 If Data is NULL or Data->Data is NULL, then ASSERT.
149
150 @param Prompt String ID for Prompt
151 @param Help String ID for Help
152 @param Flags Subtitle opcode flags
153 @param Scope Subtitle Scope bit
154 @param Data Destination for the created opcode binary
155
156 @retval EFI_SUCCESS Opcode is created successfully.
157 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
158
159 **/
160 EFI_STATUS
161 EFIAPI
162 CreateSubTitleOpCode (
163 IN EFI_STRING_ID Prompt,
164 IN EFI_STRING_ID Help,
165 IN UINT8 Flags,
166 IN UINT8 Scope,
167 IN OUT EFI_HII_UPDATE_DATA *Data
168 )
169 ;
170
171 /**
172 Create EFI_IFR_TEXT_OP opcode.
173
174 If Data is NULL or Data->Data is NULL, then ASSERT.
175
176 @param Prompt String ID for Prompt
177 @param Help String ID for Help
178 @param TextTwo String ID for text two
179 @param Data Destination for the created opcode binary
180
181 @retval EFI_SUCCESS Opcode is created successfully.
182 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
183
184 **/
185 EFI_STATUS
186 EFIAPI
187 CreateTextOpCode (
188 IN EFI_STRING_ID Prompt,
189 IN EFI_STRING_ID Help,
190 IN EFI_STRING_ID TextTwo,
191 IN OUT EFI_HII_UPDATE_DATA *Data
192 )
193 ;
194
195 /**
196 Create EFI_IFR_REF_OP opcode.
197
198 If Data is NULL or Data->Data is NULL, then ASSERT.
199
200 @param FormId Destination Form ID
201 @param Prompt String ID for Prompt
202 @param Help String ID for Help
203 @param QuestionFlags Flags in Question Header
204 @param QuestionId Question ID
205 @param Data Destination for the created opcode binary
206
207 @retval EFI_SUCCESS Opcode is created successfully.
208 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
209 @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.
210
211 **/
212 EFI_STATUS
213 EFIAPI
214 CreateGotoOpCode (
215 IN EFI_FORM_ID FormId,
216 IN EFI_STRING_ID Prompt,
217 IN EFI_STRING_ID Help,
218 IN UINT8 QuestionFlags,
219 IN EFI_QUESTION_ID QuestionId,
220 IN OUT EFI_HII_UPDATE_DATA *Data
221 )
222 ;
223
224 /**
225 Create EFI_IFR_ONE_OF_OPTION_OP opcode.
226
227 If Data is NULL or Data->Data is NULL, then ASSERT.
228
229 @param OptionCount The number of options.
230 @param OptionsList The list of Options.
231 @param Type The data type.
232 @param Data Destination for the created opcode binary
233
234 @retval EFI_SUCCESS Opcode is created successfully.
235 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
236 @retval EFI_INVALID_PARAMETER If OptionCount is not zero but OptionsList is NULL.
237
238 **/
239 EFI_STATUS
240 EFIAPI
241 CreateOneOfOptionOpCode (
242 IN UINTN OptionCount,
243 IN IFR_OPTION *OptionsList,
244 IN UINT8 Type,
245 IN OUT EFI_HII_UPDATE_DATA *Data
246 )
247 ;
248
249 /**
250 Create EFI_IFR_ONE_OF_OP opcode.
251
252 If Data is NULL or Data->Data is NULL, then ASSERT.
253
254 @param QuestionId Question ID
255 @param VarStoreId Storage ID
256 @param VarOffset Offset in Storage
257 @param Prompt String ID for Prompt
258 @param Help String ID for Help
259 @param QuestionFlags Flags in Question Header
260 @param OneOfFlags Flags for oneof opcode
261 @param OptionsList List of options
262 @param OptionCount Number of options in option list
263 @param Data Destination for the created opcode binary
264
265 @retval EFI_SUCCESS Opcode is created successfully.
266 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
267 @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.
268
269 **/
270 EFI_STATUS
271 EFIAPI
272 CreateOneOfOpCode (
273 IN EFI_QUESTION_ID QuestionId,
274 IN EFI_VARSTORE_ID VarStoreId,
275 IN UINT16 VarOffset,
276 IN EFI_STRING_ID Prompt,
277 IN EFI_STRING_ID Help,
278 IN UINT8 QuestionFlags,
279 IN UINT8 OneOfFlags,
280 IN IFR_OPTION *OptionsList,
281 IN UINTN OptionCount,
282 IN OUT EFI_HII_UPDATE_DATA *Data
283 )
284 ;
285
286 /**
287 Create EFI_IFR_ORDERED_LIST_OP opcode.
288
289 If Data is NULL or Data->Data is NULL, then ASSERT.
290
291 @param QuestionId Question ID
292 @param VarStoreId Storage ID
293 @param VarOffset Offset in Storage
294 @param Prompt String ID for Prompt
295 @param Help String ID for Help
296 @param QuestionFlags Flags in Question Header
297 @param OrderedListFlags Flags for ordered list opcode
298 @param DataType Type for option value
299 @param MaxContainers Maximum count for options in this ordered list
300 @param OptionsList List of options
301 @param OptionCount Number of options in option list
302 @param Data Destination for the created opcode binary
303
304 @retval EFI_SUCCESS Opcode is created successfully.
305 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
306 @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.
307
308 **/
309 EFI_STATUS
310 EFIAPI
311 CreateOrderedListOpCode (
312 IN EFI_QUESTION_ID QuestionId,
313 IN EFI_VARSTORE_ID VarStoreId,
314 IN UINT16 VarOffset,
315 IN EFI_STRING_ID Prompt,
316 IN EFI_STRING_ID Help,
317 IN UINT8 QuestionFlags,
318 IN UINT8 OrderedListFlags,
319 IN UINT8 DataType,
320 IN UINT8 MaxContainers,
321 IN IFR_OPTION *OptionsList,
322 IN UINTN OptionCount,
323 IN OUT EFI_HII_UPDATE_DATA *Data
324 )
325 ;
326
327 /**
328 Create EFI_IFR_CHECKBOX_OP opcode.
329
330 If Data is NULL or Data->Data is NULL, then ASSERT.
331
332 @param QuestionId Question ID
333 @param VarStoreId Storage ID
334 @param VarOffset Offset in Storage
335 @param Prompt String ID for Prompt
336 @param Help String ID for Help
337 @param QuestionFlags Flags in Question Header
338 @param CheckBoxFlags Flags for checkbox opcode
339 @param Data Destination for the created opcode binary
340
341 @retval EFI_SUCCESS Opcode is created successfully.
342 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
343 @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.
344
345 **/
346 EFI_STATUS
347 EFIAPI
348 CreateCheckBoxOpCode (
349 IN EFI_QUESTION_ID QuestionId,
350 IN EFI_VARSTORE_ID VarStoreId,
351 IN UINT16 VarOffset,
352 IN EFI_STRING_ID Prompt,
353 IN EFI_STRING_ID Help,
354 IN UINT8 QuestionFlags,
355 IN UINT8 CheckBoxFlags,
356 IN OUT EFI_HII_UPDATE_DATA *Data
357 )
358 ;
359
360 /**
361 Create EFI_IFR_NUMERIC_OP opcode.
362
363 If Data is NULL or Data->Data is NULL, then ASSERT.
364
365 @param QuestionId Question ID
366 @param VarStoreId Storage ID
367 @param VarOffset Offset in Storage
368 @param Prompt String ID for Prompt
369 @param Help String ID for Help
370 @param QuestionFlags Flags in Question Header
371 @param NumericFlags Flags for numeric opcode
372 @param Minimum Numeric minimum value
373 @param Maximum Numeric maximum value
374 @param Step Numeric step for edit
375 @param Default Numeric default value
376 @param Data Destination for the created opcode binary
377
378 @retval EFI_SUCCESS Opcode is created successfully.
379 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
380 @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.
381
382 **/
383 EFI_STATUS
384 EFIAPI
385 CreateNumericOpCode (
386 IN EFI_QUESTION_ID QuestionId,
387 IN EFI_VARSTORE_ID VarStoreId,
388 IN UINT16 VarOffset,
389 IN EFI_STRING_ID Prompt,
390 IN EFI_STRING_ID Help,
391 IN UINT8 QuestionFlags,
392 IN UINT8 NumericFlags,
393 IN UINT64 Minimum,
394 IN UINT64 Maximum,
395 IN UINT64 Step,
396 IN UINT64 Default,
397 IN OUT EFI_HII_UPDATE_DATA *Data
398 )
399 ;
400
401 /**
402 Create EFI_IFR_STRING_OP opcode.
403
404 If Data is NULL or Data->Data is NULL, then ASSERT.
405
406 @param QuestionId Question ID
407 @param VarStoreId Storage ID
408 @param VarOffset Offset in Storage
409 @param Prompt String ID for Prompt
410 @param Help String ID for Help
411 @param QuestionFlags Flags in Question Header
412 @param StringFlags Flags for string opcode
413 @param MinSize String minimum length
414 @param MaxSize String maximum length
415 @param Data Destination for the created opcode binary
416
417 @retval EFI_SUCCESS Opcode is created successfully.
418 @retval EFI_BUFFER_TOO_SMALL The space reserved in Data field is too small.
419 @retval EFI_INVALID_PARAMETER If QuestionFlags is not valid.
420
421 **/
422 EFI_STATUS
423 EFIAPI
424 CreateStringOpCode (
425 IN EFI_QUESTION_ID QuestionId,
426 IN EFI_VARSTORE_ID VarStoreId,
427 IN UINT16 VarOffset,
428 IN EFI_STRING_ID Prompt,
429 IN EFI_STRING_ID Help,
430 IN UINT8 QuestionFlags,
431 IN UINT8 StringFlags,
432 IN UINT8 MinSize,
433 IN UINT8 MaxSize,
434 IN OUT EFI_HII_UPDATE_DATA *Data
435 )
436 ;
437 /**
438 Construct <ConfigAltResp> for a buffer storage.
439
440 @param ConfigRequest The Config request string. If set to NULL, all the
441 configurable elements will be extracted from BlockNameArray.
442 @param ConfigAltResp The returned <ConfigAltResp>.
443 @param Progress On return, points to a character in the Request.
444 @param Guid GUID of the buffer storage.
445 @param Name Name of the buffer storage.
446 @param DriverHandle The DriverHandle which is used to invoke HiiDatabase
447 protocol interface NewPackageList().
448 @param BufferStorage Content of the buffer storage.
449 @param BufferStorageSize Length in bytes of the buffer storage.
450 @param BlockNameArray Array generated by VFR compiler.
451 @param NumberAltCfg Number of Default value array generated by VFR compiler.
452 The sequential input parameters will be number of
453 AltCfgId and DefaultValueArray pairs. When set to 0,
454 there will be no <AltResp>.
455
456 retval EFI_OUT_OF_RESOURCES Run out of memory resource.
457 retval EFI_INVALID_PARAMETER ConfigAltResp is NULL.
458 retval EFI_SUCCESS Operation successful.
459
460 **/
461 EFI_STATUS
462 ConstructConfigAltResp (
463 IN EFI_STRING ConfigRequest, OPTIONAL
464 OUT EFI_STRING *Progress,
465 OUT EFI_STRING *ConfigAltResp,
466 IN EFI_GUID *Guid,
467 IN CHAR16 *Name,
468 IN EFI_HANDLE *DriverHandle,
469 IN VOID *BufferStorage,
470 IN UINTN BufferStorageSize,
471 IN VOID *BlockNameArray, OPTIONAL
472 IN UINTN NumberAltCfg,
473 ...
474 //IN UINT16 AltCfgId,
475 //IN VOID *DefaultValueArray,
476 )
477 ;
478
479 /**
480 Converts the unicode character of the string from uppercase to lowercase.
481
482 @param Str String to be converted
483
484
485 **/
486 VOID
487 EFIAPI
488 ToLower (
489 IN OUT CHAR16 *Str
490 )
491 ;
492
493 /**
494 Converts binary buffer to a Unicode string. The byte buffer is in a reversed byte order
495 compared with the byte order defined in BufToHexString().
496
497 @param Str String for output
498 @param Buffer Binary buffer.
499 @param BufferSize Size of the buffer in bytes.
500
501 @retval EFI_SUCCESS The function completed successfully.
502 @retval EFI_OUT_OF_RESOURCES There is no enough available memory space.
503
504 **/
505 EFI_STATUS
506 EFIAPI
507 BufInReverseOrderToHexString (
508 IN OUT CHAR16 *Str,
509 IN UINT8 *Buffer,
510 IN UINTN BufferSize
511 )
512 ;
513
514 /**
515 Converts Hex String to binary buffer in reversed byte order to HexStringToBuf().
516
517 @param Buffer Pointer to buffer that receives the data.
518 @param BufferSize Length in bytes of the buffer to hold converted
519 data. If routine return with EFI_SUCCESS,
520 containing length of converted data. If routine
521 return with EFI_BUFFER_TOO_SMALL, containg length
522 of buffer desired.
523 @param Str String to be converted from.
524
525 @retval EFI_SUCCESS The function completed successfully.
526 @retval RETURN_BUFFER_TOO_SMALL The input BufferSize is too small to hold the output. BufferSize
527 will be updated to the size required for the converstion.
528
529 **/
530 EFI_STATUS
531 EFIAPI
532 HexStringToBufInReverseOrder (
533 IN OUT UINT8 *Buffer,
534 IN OUT UINTN *BufferSize,
535 IN CHAR16 *Str
536 )
537 ;
538
539 /**
540 Convert binary representation Config string (e.g. "0041004200430044") to the
541 original string (e.g. "ABCD"). Config string appears in <ConfigHdr> (i.e.
542 "&NAME=<string>"), or Name/Value pair in <ConfigBody> (i.e. "label=<string>").
543
544 @param UnicodeString Original Unicode string.
545 @param StrBufferLen On input: Length in bytes of buffer to hold the Unicode string.
546 Includes tailing '\0' character.
547 On output:
548 containing length of Unicode string buffer when returning EFI_SUCCESS;
549 containg length of string buffer desired when returning EFI_BUFFER_TOO_SMALL.
550 @param ConfigString Binary representation of Unicode String, <string> := (<HexCh>4)+
551
552 @retval EFI_SUCCESS Operation completes successfully.
553 @retval EFI_BUFFER_TOO_SMALL The string buffer is too small.
554
555 **/
556 EFI_STATUS
557 EFIAPI
558 ConfigStringToUnicode (
559 IN OUT CHAR16 *UnicodeString,
560 IN OUT UINTN *StrBufferLen,
561 IN CHAR16 *ConfigString
562 )
563 ;
564
565 /**
566 Convert Unicode string to binary representation Config string, e.g.
567 "ABCD" => "0041004200430044". Config string appears in <ConfigHdr> (i.e.
568 "&NAME=<string>"), or Name/Value pair in <ConfigBody> (i.e. "label=<string>").
569
570 @param ConfigString Binary representation of Unicode String, <string> := (<HexCh>4)+
571 @param StrBufferLen On input: Length in bytes of buffer to hold the Unicode string.
572 Includes tailing '\0' character.
573 On output:
574 If return EFI_SUCCESS, containing length of Unicode string buffer.
575 If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired.
576 @param UnicodeString Original Unicode string.
577
578 @retval EFI_SUCCESS Operation completes successfully.
579 @retval EFI_BUFFER_TOO_SMALL The string buffer is too small.
580
581 **/
582 EFI_STATUS
583 EFIAPI
584 UnicodeToConfigString (
585 IN OUT CHAR16 *ConfigString,
586 IN OUT UINTN *StrBufferLen,
587 IN CHAR16 *UnicodeString
588 )
589 ;
590
591 /**
592 Construct <ConfigHdr> using routing information GUID/NAME/PATH.
593
594 @param ConfigHdr Pointer to the ConfigHdr string.
595 @param StrBufferLen On input: Length in bytes of buffer to hold the
596 ConfigHdr string. Includes tailing '\0' character.
597 On output: If return EFI_SUCCESS, containing
598 length of ConfigHdr string buffer. If return
599 EFI_BUFFER_TOO_SMALL, containg length of string
600 buffer desired.
601 @param Guid Routing information: GUID.
602 @param Name Routing information: NAME.
603 @param DriverHandle Driver handle which contains the routing
604 information: PATH.
605
606 @retval EFI_SUCCESS Operation completes successfully.
607 @retval EFI_BUFFER_TOO_SMALL The ConfigHdr string buffer is too small.
608
609 **/
610 EFI_STATUS
611 EFIAPI
612 ConstructConfigHdr (
613 IN OUT CHAR16 *ConfigHdr,
614 IN OUT UINTN *StrBufferLen,
615 IN CONST EFI_GUID *Guid,
616 IN CHAR16 *Name, OPTIONAL
617 IN EFI_HANDLE *DriverHandle
618 )
619
620 ;
621
622 /**
623 Determines if the Routing data (Guid and Name) is correct in <ConfigHdr>.
624
625 @param ConfigString Either <ConfigRequest> or <ConfigResp>.
626 @param StorageGuid GUID of the storage.
627 @param StorageName Name of the stoarge.
628
629 @retval TRUE Routing information is correct in ConfigString.
630 @retval FALSE Routing information is incorrect in ConfigString.
631
632 **/
633 BOOLEAN
634 IsConfigHdrMatch (
635 IN EFI_STRING ConfigString,
636 IN EFI_GUID *StorageGuid, OPTIONAL
637 IN CHAR16 *StorageName OPTIONAL
638 )
639 ;
640
641 /**
642 Search BlockName "&OFFSET=Offset&WIDTH=Width" in a string.
643
644 @param String The string to be searched in.
645 @param Offset Offset in BlockName.
646 @param Width Width in BlockName.
647
648 @retval TRUE Block name found.
649 @retval FALSE Block name not found.
650
651 **/
652 BOOLEAN
653 EFIAPI
654 FindBlockName (
655 IN OUT CHAR16 *String,
656 IN UINTN Offset,
657 IN UINTN Width
658 )
659 ;
660
661 /**
662 This routine is invoked by ConfigAccess.Callback() to retrived uncommitted data from Form Browser.
663
664 @param VariableGuid An optional field to indicate the target variable
665 GUID name to use.
666 @param VariableName An optional field to indicate the target
667 human-readable variable name.
668 @param BufferSize On input: Length in bytes of buffer to hold
669 retrived data. On output: If return
670 EFI_BUFFER_TOO_SMALL, containg length of buffer
671 desired.
672 @param Buffer Buffer to hold retrived data.
673
674 @retval EFI_SUCCESS Operation completes successfully.
675 @retval EFI_BUFFER_TOO_SMALL The intput buffer is too small.
676
677 **/
678 EFI_STATUS
679 EFIAPI
680 GetBrowserData (
681 IN CONST EFI_GUID *VariableGuid, OPTIONAL
682 IN CONST CHAR16 *VariableName, OPTIONAL
683 IN OUT UINTN *BufferSize,
684 IN OUT UINT8 *Buffer
685 )
686 ;
687
688 /**
689 This routine is invoked by ConfigAccess.Callback() to update uncommitted data of Form Browser.
690
691 @param VariableGuid An optional field to indicate the target variable
692 GUID name to use.
693 @param VariableName An optional field to indicate the target
694 human-readable variable name.
695 @param BufferSize Length in bytes of buffer to hold retrived data.
696 @param Buffer Buffer to hold retrived data.
697 @param RequestElement An optional field to specify which part of the
698 buffer data will be send back to Browser. If NULL,
699 the whole buffer of data will be committed to
700 Browser. <RequestElement> ::=
701 &OFFSET=<Number>&WIDTH=<Number>*
702
703 @retval EFI_SUCCESS Operation completes successfully.
704 @retval Other Updating Browser uncommitted data failed.
705
706 **/
707 EFI_STATUS
708 EFIAPI
709 SetBrowserData (
710 IN CONST EFI_GUID *VariableGuid, OPTIONAL
711 IN CONST CHAR16 *VariableName, OPTIONAL
712 IN UINTN BufferSize,
713 IN CONST UINT8 *Buffer,
714 IN CONST CHAR16 *RequestElement OPTIONAL
715 )
716 ;
717
718 /**
719 Draw a dialog and return the selected key.
720
721 @param NumberOfLines The number of lines for the dialog box
722 @param KeyValue The EFI_KEY value returned if HotKey is TRUE..
723 @param String Pointer to the first string in the list
724 @param ... A series of (quantity == NumberOfLines - 1) text
725 strings which will be used to construct the dialog
726 box
727
728 @retval EFI_SUCCESS Displayed dialog and received user interaction
729 @retval EFI_INVALID_PARAMETER One of the parameters was invalid.
730
731 **/
732 EFI_STATUS
733 EFIAPI
734 IfrLibCreatePopUp (
735 IN UINTN NumberOfLines,
736 OUT EFI_INPUT_KEY *KeyValue,
737 IN CHAR16 *String,
738 ...
739 )
740 ;
741
742 /**
743 Draw a dialog and return the selected key using Variable Argument List.
744
745 @param NumberOfLines The number of lines for the dialog box
746 @param KeyValue The EFI_KEY value returned if HotKey is TRUE..
747 @param String The first String to be displayed in the Pop-Up.
748 @param Args VA_LIST marker for the variable argument list.
749 A series of (quantity == NumberOfLines - 1) text
750 strings which will be used to construct the dialog
751 box
752
753 @retval EFI_SUCCESS Displayed dialog and received user interaction
754 @retval EFI_INVALID_PARAMETER One of the parameters was invalid.
755
756 **/
757 EFI_STATUS
758 EFIAPI
759 IfrLibCreatePopUp2 (
760 IN UINTN NumberOfLines,
761 OUT EFI_INPUT_KEY *KeyValue,
762 IN CHAR16 *String,
763 IN VA_LIST Args
764 )
765 ;
766
767 #endif