]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
MdeModulePkg/HiiDatabase: Handle questions with Bit VarStore
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / HiiDatabase.h
1 /** @file
2 Private structures definitions in HiiDatabase.
3
4 Copyright (c) 2007 - 2017, 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 #ifndef __HII_DATABASE_PRIVATE_H__
16 #define __HII_DATABASE_PRIVATE_H__
17
18 #include <Uefi.h>
19
20 #include <Protocol/DevicePath.h>
21 #include <Protocol/HiiFont.h>
22 #include <Protocol/HiiImage.h>
23 #include <Protocol/HiiImageEx.h>
24 #include <Protocol/HiiImageDecoder.h>
25 #include <Protocol/HiiString.h>
26 #include <Protocol/HiiDatabase.h>
27 #include <Protocol/HiiConfigRouting.h>
28 #include <Protocol/HiiConfigAccess.h>
29 #include <Protocol/HiiConfigKeyword.h>
30 #include <Protocol/SimpleTextOut.h>
31
32 #include <Guid/HiiKeyBoardLayout.h>
33 #include <Guid/GlobalVariable.h>
34 #include <Guid/MdeModuleHii.h>
35
36
37 #include <Library/DebugLib.h>
38 #include <Library/BaseMemoryLib.h>
39 #include <Library/UefiDriverEntryPoint.h>
40 #include <Library/UefiBootServicesTableLib.h>
41 #include <Library/BaseLib.h>
42 #include <Library/DevicePathLib.h>
43 #include <Library/MemoryAllocationLib.h>
44 #include <Library/UefiLib.h>
45 #include <Library/PcdLib.h>
46 #include <Library/UefiRuntimeServicesTableLib.h>
47 #include <Library/PrintLib.h>
48
49 #define MAX_STRING_LENGTH 1024
50 #define MAX_FONT_NAME_LEN 256
51 #define NARROW_BASELINE 15
52 #define WIDE_BASELINE 14
53 #define SYS_FONT_INFO_MASK 0x37
54 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
55 #define PROPORTIONAL_GLYPH 0x80
56 #define NARROW_GLYPH 0x40
57
58 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
59 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
60 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
61 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
62
63 //
64 // IFR data structure
65 //
66 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.
67
68 typedef struct {
69 LIST_ENTRY Entry; // Link to VarStorage
70 EFI_GUID Guid;
71 CHAR16 *Name;
72 UINT16 Size;
73 UINT8 Type;
74 LIST_ENTRY BlockEntry; // Link to its Block array
75 } IFR_VARSTORAGE_DATA;
76
77 typedef struct {
78 LIST_ENTRY Entry; // Link to Block array
79 UINT16 Offset;
80 UINT16 Width;
81 UINT16 BitOffset;
82 UINT16 BitWidth;
83 EFI_QUESTION_ID QuestionId;
84 UINT8 OpCode;
85 UINT8 Scope;
86 LIST_ENTRY DefaultValueEntry; // Link to its default value array
87 CHAR16 *Name;
88 BOOLEAN IsBitVar;
89 } IFR_BLOCK_DATA;
90
91 //
92 // Get default value from IFR data.
93 //
94 typedef enum {
95 DefaultValueFromDefault = 0, // Get from the minimum or first one when not set default value.
96 DefaultValueFromOtherDefault, // Get default vale from other default when no default(When other
97 // defaults are more than one, use the default with smallest default id).
98 DefaultValueFromFlag, // Get default value from the default flag.
99 DefaultValueFromOpcode // Get default value from default opcode, highest priority.
100 } DEFAULT_VALUE_TYPE;
101
102 typedef struct {
103 LIST_ENTRY Entry;
104 DEFAULT_VALUE_TYPE Type;
105 BOOLEAN Cleaned; // Whether this value is cleaned
106 // TRUE Cleaned, the value can't be used
107 // FALSE Not cleaned, the value can be used.
108 UINT16 DefaultId;
109 EFI_IFR_TYPE_VALUE Value;
110 } IFR_DEFAULT_DATA;
111
112 //
113 // Storage types
114 //
115 #define EFI_HII_VARSTORE_BUFFER 0
116 #define EFI_HII_VARSTORE_NAME_VALUE 1
117 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
118 #define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3
119
120 //
121 // Keyword handler protocol filter type.
122 //
123 #define EFI_KEYWORD_FILTER_READONY 0x01
124 #define EFI_KEYWORD_FILTER_REAWRITE 0x02
125 #define EFI_KEYWORD_FILTER_BUFFER 0x10
126 #define EFI_KEYWORD_FILTER_NUMERIC 0x20
127 #define EFI_KEYWORD_FILTER_NUMERIC_1 0x30
128 #define EFI_KEYWORD_FILTER_NUMERIC_2 0x40
129 #define EFI_KEYWORD_FILTER_NUMERIC_4 0x50
130 #define EFI_KEYWORD_FILTER_NUMERIC_8 0x60
131
132
133 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
134 typedef struct {
135 UINTN Signature;
136 LIST_ENTRY Entry;
137
138 EFI_HII_HANDLE HiiHandle;
139 EFI_HANDLE DriverHandle;
140
141 UINT8 Type; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
142 EFI_GUID Guid;
143 CHAR16 *Name;
144 UINT16 Size;
145 } HII_FORMSET_STORAGE;
146
147
148 //
149 // String Package definitions
150 //
151 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
152 typedef struct _HII_STRING_PACKAGE_INSTANCE {
153 UINTN Signature;
154 EFI_HII_STRING_PACKAGE_HDR *StringPkgHdr;
155 UINT8 *StringBlock;
156 LIST_ENTRY StringEntry;
157 LIST_ENTRY FontInfoList; // local font info list
158 UINT8 FontId;
159 EFI_STRING_ID MaxStringId; // record StringId
160 } HII_STRING_PACKAGE_INSTANCE;
161
162 //
163 // Form Package definitions
164 //
165 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
166 typedef struct _HII_IFR_PACKAGE_INSTANCE {
167 UINTN Signature;
168 EFI_HII_PACKAGE_HEADER FormPkgHdr;
169 UINT8 *IfrData;
170 LIST_ENTRY IfrEntry;
171 } HII_IFR_PACKAGE_INSTANCE;
172
173 //
174 // Simple Font Package definitions
175 //
176 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
177 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE {
178 UINTN Signature;
179 EFI_HII_SIMPLE_FONT_PACKAGE_HDR *SimpleFontPkgHdr;
180 LIST_ENTRY SimpleFontEntry;
181 } HII_SIMPLE_FONT_PACKAGE_INSTANCE;
182
183 //
184 // Font Package definitions
185 //
186 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
187 typedef struct _HII_FONT_PACKAGE_INSTANCE {
188 UINTN Signature;
189 EFI_HII_FONT_PACKAGE_HDR *FontPkgHdr;
190 UINT16 Height;
191 UINT16 BaseLine;
192 UINT8 *GlyphBlock;
193 LIST_ENTRY FontEntry;
194 LIST_ENTRY GlyphInfoList;
195 } HII_FONT_PACKAGE_INSTANCE;
196
197 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
198 typedef struct _HII_GLYPH_INFO {
199 UINTN Signature;
200 LIST_ENTRY Entry;
201 CHAR16 CharId;
202 EFI_HII_GLYPH_INFO Cell;
203 } HII_GLYPH_INFO;
204
205 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
206 typedef struct _HII_FONT_INFO {
207 UINTN Signature;
208 LIST_ENTRY Entry;
209 LIST_ENTRY *GlobalEntry;
210 UINT8 FontId;
211 } HII_FONT_INFO;
212
213 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
214 typedef struct _HII_GLOBAL_FONT_INFO {
215 UINTN Signature;
216 LIST_ENTRY Entry;
217 HII_FONT_PACKAGE_INSTANCE *FontPackage;
218 UINTN FontInfoSize;
219 EFI_FONT_INFO *FontInfo;
220 } HII_GLOBAL_FONT_INFO;
221
222 //
223 // Image Package definitions
224 //
225
226 #define HII_PIXEL_MASK 0x80
227
228 typedef struct _HII_IMAGE_PACKAGE_INSTANCE {
229 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr;
230 UINT32 ImageBlockSize;
231 UINT32 PaletteInfoSize;
232 EFI_HII_IMAGE_BLOCK *ImageBlock;
233 UINT8 *PaletteBlock;
234 } HII_IMAGE_PACKAGE_INSTANCE;
235
236 //
237 // Keyboard Layout Package definitions
238 //
239 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
240 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE {
241 UINTN Signature;
242 UINT8 *KeyboardPkg;
243 LIST_ENTRY KeyboardEntry;
244 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE;
245
246 //
247 // Guid Package definitions
248 //
249 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
250 typedef struct _HII_GUID_PACKAGE_INSTANCE {
251 UINTN Signature;
252 UINT8 *GuidPkg;
253 LIST_ENTRY GuidEntry;
254 } HII_GUID_PACKAGE_INSTANCE;
255
256 //
257 // A package list can contain only one or less than one device path package.
258 // This rule also applies to image package since ImageId can not be duplicate.
259 //
260 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE {
261 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr;
262 LIST_ENTRY GuidPkgHdr;
263 LIST_ENTRY FormPkgHdr;
264 LIST_ENTRY KeyboardLayoutHdr;
265 LIST_ENTRY StringPkgHdr;
266 LIST_ENTRY FontPkgHdr;
267 HII_IMAGE_PACKAGE_INSTANCE *ImagePkg;
268 LIST_ENTRY SimpleFontPkgHdr;
269 UINT8 *DevicePathPkg;
270 } HII_DATABASE_PACKAGE_LIST_INSTANCE;
271
272 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
273
274 typedef struct {
275 UINTN Signature;
276 LIST_ENTRY Handle;
277 UINTN Key;
278 } HII_HANDLE;
279
280 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
281
282 typedef struct _HII_DATABASE_RECORD {
283 UINTN Signature;
284 HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList;
285 EFI_HANDLE DriverHandle;
286 EFI_HII_HANDLE Handle;
287 LIST_ENTRY DatabaseEntry;
288 } HII_DATABASE_RECORD;
289
290 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
291
292 typedef struct _HII_DATABASE_NOTIFY {
293 UINTN Signature;
294 EFI_HANDLE NotifyHandle;
295 UINT8 PackageType;
296 EFI_GUID *PackageGuid;
297 EFI_HII_DATABASE_NOTIFY PackageNotifyFn;
298 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType;
299 LIST_ENTRY DatabaseNotifyEntry;
300 } HII_DATABASE_NOTIFY;
301
302 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
303
304 typedef struct _HII_DATABASE_PRIVATE_DATA {
305 UINTN Signature;
306 LIST_ENTRY DatabaseList;
307 LIST_ENTRY DatabaseNotifyList;
308 EFI_HII_FONT_PROTOCOL HiiFont;
309 EFI_HII_IMAGE_PROTOCOL HiiImage;
310 EFI_HII_IMAGE_EX_PROTOCOL HiiImageEx;
311 EFI_HII_STRING_PROTOCOL HiiString;
312 EFI_HII_DATABASE_PROTOCOL HiiDatabase;
313 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting;
314 EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL ConfigKeywordHandler;
315 LIST_ENTRY HiiHandleList;
316 INTN HiiHandleCount;
317 LIST_ENTRY FontInfoList; // global font info list
318 UINTN Attribute; // default system color
319 EFI_GUID CurrentLayoutGuid;
320 EFI_HII_KEYBOARD_LAYOUT *CurrentLayout;
321 } HII_DATABASE_PRIVATE_DATA;
322
323 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
324 CR (a, \
325 HII_DATABASE_PRIVATE_DATA, \
326 HiiFont, \
327 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
328 )
329
330 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
331 CR (a, \
332 HII_DATABASE_PRIVATE_DATA, \
333 HiiImage, \
334 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
335 )
336
337 #define HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
338 CR (a, \
339 HII_DATABASE_PRIVATE_DATA, \
340 HiiImageEx, \
341 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
342 )
343
344 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
345 CR (a, \
346 HII_DATABASE_PRIVATE_DATA, \
347 HiiString, \
348 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
349 )
350
351 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
352 CR (a, \
353 HII_DATABASE_PRIVATE_DATA, \
354 HiiDatabase, \
355 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
356 )
357
358 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
359 CR (a, \
360 HII_DATABASE_PRIVATE_DATA, \
361 ConfigRouting, \
362 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
363 )
364
365 #define CONFIG_KEYWORD_HANDLER_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
366 CR (a, \
367 HII_DATABASE_PRIVATE_DATA, \
368 ConfigKeywordHandler, \
369 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
370 )
371
372 //
373 // Internal function prototypes.
374 //
375
376 /**
377 Generate a sub string then output it.
378
379 This is a internal function.
380
381 @param String A constant string which is the prefix of the to be
382 generated string, e.g. GUID=
383
384 @param BufferLen The length of the Buffer in bytes.
385
386 @param Buffer Points to a buffer which will be converted to be the
387 content of the generated string.
388
389 @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
390 UINT8 *; if 2, the buffer contains unicode string for the value of NAME;
391 if 3, the buffer contains other data.
392
393 @param SubStr Points to the output string. It's caller's
394 responsibility to free this buffer.
395
396
397 **/
398 VOID
399 GenerateSubStr (
400 IN CONST EFI_STRING String,
401 IN UINTN BufferLen,
402 IN VOID *Buffer,
403 IN UINT8 Flag,
404 OUT EFI_STRING *SubStr
405 );
406
407 /**
408 This function checks whether a handle is a valid EFI_HII_HANDLE.
409
410 @param Handle Pointer to a EFI_HII_HANDLE
411
412 @retval TRUE Valid
413 @retval FALSE Invalid
414
415 **/
416 BOOLEAN
417 IsHiiHandleValid (
418 EFI_HII_HANDLE Handle
419 );
420
421
422 /**
423 This function checks whether EFI_FONT_INFO exists in current database. If
424 FontInfoMask is specified, check what options can be used to make a match.
425 Note that the masks relate to where the system default should be supplied
426 are ignored by this function.
427
428 @param Private Hii database private structure.
429 @param FontInfo Points to EFI_FONT_INFO structure.
430 @param FontInfoMask If not NULL, describes what options can be used
431 to make a match between the font requested and
432 the font available. The caller must guarantee
433 this mask is valid.
434 @param FontHandle On entry, Points to the font handle returned by a
435 previous call to GetFontInfo() or NULL to start
436 with the first font.
437 @param GlobalFontInfo If not NULL, output the corresponding global font
438 info.
439
440 @retval TRUE Existed
441 @retval FALSE Not existed
442
443 **/
444 BOOLEAN
445 IsFontInfoExisted (
446 IN HII_DATABASE_PRIVATE_DATA *Private,
447 IN EFI_FONT_INFO *FontInfo,
448 IN EFI_FONT_INFO_MASK *FontInfoMask, OPTIONAL
449 IN EFI_FONT_HANDLE FontHandle, OPTIONAL
450 OUT HII_GLOBAL_FONT_INFO **GlobalFontInfo OPTIONAL
451 );
452
453 /**
454
455 This function invokes the matching registered function.
456
457 @param Private HII Database driver private structure.
458 @param NotifyType The type of change concerning the database.
459 @param PackageInstance Points to the package referred to by the notification.
460 @param PackageType Package type
461 @param Handle The handle of the package list which contains the specified package.
462
463 @retval EFI_SUCCESS Already checked all registered function and invoked
464 if matched.
465 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
466
467 **/
468 EFI_STATUS
469 InvokeRegisteredFunction (
470 IN HII_DATABASE_PRIVATE_DATA *Private,
471 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
472 IN VOID *PackageInstance,
473 IN UINT8 PackageType,
474 IN EFI_HII_HANDLE Handle
475 )
476 ;
477
478 /**
479 Retrieve system default font and color.
480
481 @param Private HII database driver private data.
482 @param FontInfo Points to system default font output-related
483 information. It's caller's responsibility to free
484 this buffer.
485 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
486
487 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
488 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
489 task.
490 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
491
492 **/
493 EFI_STATUS
494 GetSystemFont (
495 IN HII_DATABASE_PRIVATE_DATA *Private,
496 OUT EFI_FONT_DISPLAY_INFO **FontInfo,
497 OUT UINTN *FontInfoSize OPTIONAL
498 );
499
500
501 /**
502 Parse all string blocks to find a String block specified by StringId.
503 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
504 within this string package and backup its information. If LastStringId is
505 specified, the string id of last string block will also be output.
506 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
507
508 @param Private Hii database private structure.
509 @param StringPackage Hii string package instance.
510 @param StringId The string's id, which is unique within
511 PackageList.
512 @param BlockType Output the block type of found string block.
513 @param StringBlockAddr Output the block address of found string block.
514 @param StringTextOffset Offset, relative to the found block address, of
515 the string text information.
516 @param LastStringId Output the last string id when StringId = 0 or StringId = -1.
517 @param StartStringId The first id in the skip block which StringId in the block.
518
519 @retval EFI_SUCCESS The string text and font is retrieved
520 successfully.
521 @retval EFI_NOT_FOUND The specified text or font info can not be found
522 out.
523 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
524 task.
525
526 **/
527 EFI_STATUS
528 FindStringBlock (
529 IN HII_DATABASE_PRIVATE_DATA *Private,
530 IN HII_STRING_PACKAGE_INSTANCE *StringPackage,
531 IN EFI_STRING_ID StringId,
532 OUT UINT8 *BlockType, OPTIONAL
533 OUT UINT8 **StringBlockAddr, OPTIONAL
534 OUT UINTN *StringTextOffset, OPTIONAL
535 OUT EFI_STRING_ID *LastStringId, OPTIONAL
536 OUT EFI_STRING_ID *StartStringId OPTIONAL
537 );
538
539
540 /**
541 Parse all glyph blocks to find a glyph block specified by CharValue.
542 If CharValue = (CHAR16) (-1), collect all default character cell information
543 within this font package and backup its information.
544
545 @param FontPackage Hii string package instance.
546 @param CharValue Unicode character value, which identifies a glyph
547 block.
548 @param GlyphBuffer Output the corresponding bitmap data of the found
549 block. It is the caller's responsibility to free
550 this buffer.
551 @param Cell Output cell information of the encoded bitmap.
552 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
553
554 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
555 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
556 database.
557 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
558 task.
559
560 **/
561 EFI_STATUS
562 FindGlyphBlock (
563 IN HII_FONT_PACKAGE_INSTANCE *FontPackage,
564 IN CHAR16 CharValue,
565 OUT UINT8 **GlyphBuffer, OPTIONAL
566 OUT EFI_HII_GLYPH_INFO *Cell, OPTIONAL
567 OUT UINTN *GlyphBufferLen OPTIONAL
568 );
569
570 /**
571 This function exports Form packages to a buffer.
572 This is a internal function.
573
574 @param Private Hii database private structure.
575 @param Handle Identification of a package list.
576 @param PackageList Pointer to a package list which will be exported.
577 @param UsedSize The length of buffer be used.
578 @param BufferSize Length of the Buffer.
579 @param Buffer Allocated space for storing exported data.
580 @param ResultSize The size of the already exported content of this
581 package list.
582
583 @retval EFI_SUCCESS Form Packages are exported successfully.
584 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
585
586 **/
587 EFI_STATUS
588 ExportFormPackages (
589 IN HII_DATABASE_PRIVATE_DATA *Private,
590 IN EFI_HII_HANDLE Handle,
591 IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList,
592 IN UINTN UsedSize,
593 IN UINTN BufferSize,
594 IN OUT VOID *Buffer,
595 IN OUT UINTN *ResultSize
596 );
597
598 //
599 // EFI_HII_FONT_PROTOCOL protocol interfaces
600 //
601
602
603 /**
604 Renders a string to a bitmap or to the display.
605
606 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
607 @param Flags Describes how the string is to be drawn.
608 @param String Points to the null-terminated string to be
609 displayed.
610 @param StringInfo Points to the string output information,
611 including the color and font. If NULL, then the
612 string will be output in the default system font
613 and color.
614 @param Blt If this points to a non-NULL on entry, this
615 points to the image, which is Width pixels wide
616 and Height pixels high. The string will be drawn
617 onto this image and
618 EFI_HII_OUT_FLAG_CLIP is implied. If this points
619 to a NULL on entry, then a buffer
620 will be allocated to hold the generated image and
621 the pointer updated on exit. It is the caller's
622 responsibility to free this buffer.
623 @param BltX Together with BltX, Specifies the offset from the left and top edge
624 of the image of the first character cell in the
625 image.
626 @param BltY Together with BltY, Specifies the offset from the left and top edge
627 of the image of the first character cell in the
628 image.
629 @param RowInfoArray If this is non-NULL on entry, then on exit, this
630 will point to an allocated buffer containing
631 row information and RowInfoArraySize will be
632 updated to contain the number of elements.
633 This array describes the characters which were at
634 least partially drawn and the heights of the
635 rows. It is the caller's responsibility to free
636 this buffer.
637 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
638 contains the number of elements in RowInfoArray.
639 @param ColumnInfoArray If this is non-NULL, then on return it will be
640 filled with the horizontal offset for each
641 character in the string on the row where it is
642 displayed. Non-printing characters will have
643 the offset ~0. The caller is responsible to
644 allocate a buffer large enough so that there
645 is one entry for each character in the string,
646 not including the null-terminator. It is possible
647 when character display is normalized that some
648 character cells overlap.
649
650 @retval EFI_SUCCESS The string was successfully rendered.
651 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
652 RowInfoArray or Blt.
653 @retval EFI_INVALID_PARAMETER The String or Blt.
654 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
655
656 **/
657 EFI_STATUS
658 EFIAPI
659 HiiStringToImage (
660 IN CONST EFI_HII_FONT_PROTOCOL *This,
661 IN EFI_HII_OUT_FLAGS Flags,
662 IN CONST EFI_STRING String,
663 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
664 IN OUT EFI_IMAGE_OUTPUT **Blt,
665 IN UINTN BltX,
666 IN UINTN BltY,
667 OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
668 OUT UINTN *RowInfoArraySize OPTIONAL,
669 OUT UINTN *ColumnInfoArray OPTIONAL
670 );
671
672
673 /**
674 Render a string to a bitmap or the screen containing the contents of the specified string.
675
676 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
677 @param Flags Describes how the string is to be drawn.
678 @param PackageList The package list in the HII database to search
679 for the specified string.
680 @param StringId The string's id, which is unique within
681 PackageList.
682 @param Language Points to the language for the retrieved string.
683 If NULL, then the current system language is
684 used.
685 @param StringInfo Points to the string output information,
686 including the color and font. If NULL, then the
687 string will be output in the default system font
688 and color.
689 @param Blt If this points to a non-NULL on entry, this
690 points to the image, which is Width pixels wide
691 and Height pixels high. The string will be drawn
692 onto this image and
693 EFI_HII_OUT_FLAG_CLIP is implied. If this points
694 to a NULL on entry, then a buffer
695 will be allocated to hold the generated image and
696 the pointer updated on exit. It is the caller's
697 responsibility to free this buffer.
698 @param BltX Together with BltX, Specifies the offset from the left and top edge
699 of the image of the first character cell in the
700 image.
701 @param BltY Together with BltY, Specifies the offset from the left and top edge
702 of the image of the first character cell in the
703 image.
704 @param RowInfoArray If this is non-NULL on entry, then on exit, this
705 will point to an allocated buffer containing
706 row information and RowInfoArraySize will be
707 updated to contain the number of elements.
708 This array describes the characters which were at
709 least partially drawn and the heights of the
710 rows. It is the caller's responsibility to free
711 this buffer.
712 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
713 contains the number of elements in RowInfoArray.
714 @param ColumnInfoArray If this is non-NULL, then on return it will be
715 filled with the horizontal offset for each
716 character in the string on the row where it is
717 displayed. Non-printing characters will have
718 the offset ~0. The caller is responsible to
719 allocate a buffer large enough so that there
720 is one entry for each character in the string,
721 not including the null-terminator. It is possible
722 when character display is normalized that some
723 character cells overlap.
724
725 @retval EFI_SUCCESS The string was successfully rendered.
726 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
727 RowInfoArray or Blt.
728 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
729 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
730 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
731 in the specified PackageList.
732
733 **/
734 EFI_STATUS
735 EFIAPI
736 HiiStringIdToImage (
737 IN CONST EFI_HII_FONT_PROTOCOL *This,
738 IN EFI_HII_OUT_FLAGS Flags,
739 IN EFI_HII_HANDLE PackageList,
740 IN EFI_STRING_ID StringId,
741 IN CONST CHAR8* Language,
742 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
743 IN OUT EFI_IMAGE_OUTPUT **Blt,
744 IN UINTN BltX,
745 IN UINTN BltY,
746 OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
747 OUT UINTN *RowInfoArraySize OPTIONAL,
748 OUT UINTN *ColumnInfoArray OPTIONAL
749 );
750
751
752 /**
753 Convert the glyph for a single character into a bitmap.
754
755 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
756 @param Char Character to retrieve.
757 @param StringInfo Points to the string font and color information
758 or NULL if the string should use the default
759 system font and color.
760 @param Blt Thus must point to a NULL on entry. A buffer will
761 be allocated to hold the output and the pointer
762 updated on exit. It is the caller's
763 responsibility to free this buffer.
764 @param Baseline Number of pixels from the bottom of the bitmap to
765 the baseline.
766
767 @retval EFI_SUCCESS Glyph bitmap created.
768 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
769 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
770 glyph for Unicode character 0xFFFD.
771 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
772
773 **/
774 EFI_STATUS
775 EFIAPI
776 HiiGetGlyph (
777 IN CONST EFI_HII_FONT_PROTOCOL *This,
778 IN CHAR16 Char,
779 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,
780 OUT EFI_IMAGE_OUTPUT **Blt,
781 OUT UINTN *Baseline OPTIONAL
782 );
783
784
785 /**
786 This function iterates through fonts which match the specified font, using
787 the specified criteria. If String is non-NULL, then all of the characters in
788 the string must exist in order for a candidate font to be returned.
789
790 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
791 @param FontHandle On entry, points to the font handle returned by a
792 previous call to GetFontInfo() or NULL to start
793 with the first font. On return, points to the
794 returned font handle or points to NULL if there
795 are no more matching fonts.
796 @param StringInfoIn Upon entry, points to the font to return information
797 about. If NULL, then the information about the system
798 default font will be returned.
799 @param StringInfoOut Upon return, contains the matching font's information.
800 If NULL, then no information is returned. This buffer
801 is allocated with a call to the Boot Service AllocatePool().
802 It is the caller's responsibility to call the Boot
803 Service FreePool() when the caller no longer requires
804 the contents of StringInfoOut.
805 @param String Points to the string which will be tested to
806 determine if all characters are available. If
807 NULL, then any font is acceptable.
808
809 @retval EFI_SUCCESS Matching font returned successfully.
810 @retval EFI_NOT_FOUND No matching font was found.
811 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
812 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
813 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
814 request.
815 **/
816 EFI_STATUS
817 EFIAPI
818 HiiGetFontInfo (
819 IN CONST EFI_HII_FONT_PROTOCOL *This,
820 IN OUT EFI_FONT_HANDLE *FontHandle,
821 IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL
822 OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,
823 IN CONST EFI_STRING String OPTIONAL
824 );
825
826 //
827 // EFI_HII_IMAGE_PROTOCOL interfaces
828 //
829
830 /**
831 Get the image id of last image block: EFI_HII_IIBT_END_BLOCK when input
832 ImageId is zero, otherwise return the address of the
833 corresponding image block with identifier specified by ImageId.
834
835 This is a internal function.
836
837 @param ImageBlocks Points to the beginning of a series of image blocks stored in order.
838 @param ImageId If input ImageId is 0, output the image id of the EFI_HII_IIBT_END_BLOCK;
839 else use this id to find its corresponding image block address.
840
841 @return The image block address when input ImageId is not zero; otherwise return NULL.
842
843 **/
844 EFI_HII_IMAGE_BLOCK *
845 GetImageIdOrAddress (
846 IN EFI_HII_IMAGE_BLOCK *ImageBlocks,
847 IN OUT EFI_IMAGE_ID *ImageId
848 );
849
850 /**
851 Return the HII package list identified by PackageList HII handle.
852
853 @param Database Pointer to HII database list header.
854 @param PackageList HII handle of the package list to locate.
855
856 @retval The HII package list instance.
857 **/
858 HII_DATABASE_PACKAGE_LIST_INSTANCE *
859 LocatePackageList (
860 IN LIST_ENTRY *Database,
861 IN EFI_HII_HANDLE PackageList
862 );
863
864 /**
865 This function retrieves the image specified by ImageId which is associated with
866 the specified PackageList and copies it into the buffer specified by Image.
867
868 @param Database A pointer to the database list header.
869 @param PackageList Handle of the package list where this image will
870 be searched.
871 @param ImageId The image's id,, which is unique within
872 PackageList.
873 @param Image Points to the image.
874 @param BitmapOnly TRUE to only return the bitmap type image.
875 FALSE to locate image decoder instance to decode image.
876
877 @retval EFI_SUCCESS The new image was returned successfully.
878 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
879 database. The specified PackageList is not in the database.
880 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
881 hold the image.
882 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
883 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
884 enough memory.
885 **/
886 EFI_STATUS
887 IGetImage (
888 IN LIST_ENTRY *Database,
889 IN EFI_HII_HANDLE PackageList,
890 IN EFI_IMAGE_ID ImageId,
891 OUT EFI_IMAGE_INPUT *Image,
892 IN BOOLEAN BitmapOnly
893 );
894
895 /**
896 Return the first HII image decoder instance which supports the DecoderName.
897
898 @param BlockType The image block type.
899
900 @retval Pointer to the HII image decoder instance.
901 **/
902 EFI_HII_IMAGE_DECODER_PROTOCOL *
903 LocateHiiImageDecoder (
904 UINT8 BlockType
905 );
906
907 /**
908 This function adds the image Image to the group of images owned by PackageList, and returns
909 a new image identifier (ImageId).
910
911 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
912 @param PackageList Handle of the package list where this image will
913 be added.
914 @param ImageId On return, contains the new image id, which is
915 unique within PackageList.
916 @param Image Points to the image.
917
918 @retval EFI_SUCCESS The new image was added successfully.
919 @retval EFI_NOT_FOUND The specified PackageList could not be found in
920 database.
921 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
922 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
923
924 **/
925 EFI_STATUS
926 EFIAPI
927 HiiNewImage (
928 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
929 IN EFI_HII_HANDLE PackageList,
930 OUT EFI_IMAGE_ID *ImageId,
931 IN CONST EFI_IMAGE_INPUT *Image
932 );
933
934
935 /**
936 This function retrieves the image specified by ImageId which is associated with
937 the specified PackageList and copies it into the buffer specified by Image.
938
939 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
940 @param PackageList Handle of the package list where this image will
941 be searched.
942 @param ImageId The image's id,, which is unique within
943 PackageList.
944 @param Image Points to the image.
945
946 @retval EFI_SUCCESS The new image was returned successfully.
947 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
948 The specified PackageList is not in the database.
949 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
950 hold the image.
951 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
952 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
953 enough memory.
954
955 **/
956 EFI_STATUS
957 EFIAPI
958 HiiGetImage (
959 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
960 IN EFI_HII_HANDLE PackageList,
961 IN EFI_IMAGE_ID ImageId,
962 OUT EFI_IMAGE_INPUT *Image
963 );
964
965
966 /**
967 This function updates the image specified by ImageId in the specified PackageListHandle to
968 the image specified by Image.
969
970 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
971 @param PackageList The package list containing the images.
972 @param ImageId The image's id,, which is unique within
973 PackageList.
974 @param Image Points to the image.
975
976 @retval EFI_SUCCESS The new image was updated successfully.
977 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
978 database. The specified PackageList is not in the database.
979 @retval EFI_INVALID_PARAMETER The Image was NULL.
980
981 **/
982 EFI_STATUS
983 EFIAPI
984 HiiSetImage (
985 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
986 IN EFI_HII_HANDLE PackageList,
987 IN EFI_IMAGE_ID ImageId,
988 IN CONST EFI_IMAGE_INPUT *Image
989 );
990
991
992 /**
993 This function renders an image to a bitmap or the screen using the specified
994 color and options. It draws the image on an existing bitmap, allocates a new
995 bitmap or uses the screen. The images can be clipped.
996
997 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
998 @param Flags Describes how the image is to be drawn.
999 @param Image Points to the image to be displayed.
1000 @param Blt If this points to a non-NULL on entry, this
1001 points to the image, which is Width pixels wide
1002 and Height pixels high. The image will be drawn
1003 onto this image and EFI_HII_DRAW_FLAG_CLIP is
1004 implied. If this points to a NULL on entry, then
1005 a buffer will be allocated to hold the generated
1006 image and the pointer updated on exit. It is the
1007 caller's responsibility to free this buffer.
1008 @param BltX Specifies the offset from the left and top edge
1009 of the output image of the first pixel in the
1010 image.
1011 @param BltY Specifies the offset from the left and top edge
1012 of the output image of the first pixel in the
1013 image.
1014
1015 @retval EFI_SUCCESS The image was successfully drawn.
1016 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1017 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1018 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
1019
1020 **/
1021 EFI_STATUS
1022 EFIAPI
1023 HiiDrawImage (
1024 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
1025 IN EFI_HII_DRAW_FLAGS Flags,
1026 IN CONST EFI_IMAGE_INPUT *Image,
1027 IN OUT EFI_IMAGE_OUTPUT **Blt,
1028 IN UINTN BltX,
1029 IN UINTN BltY
1030 );
1031
1032
1033 /**
1034 This function renders an image to a bitmap or the screen using the specified
1035 color and options. It draws the image on an existing bitmap, allocates a new
1036 bitmap or uses the screen. The images can be clipped.
1037
1038 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
1039 @param Flags Describes how the image is to be drawn.
1040 @param PackageList The package list in the HII database to search
1041 for the specified image.
1042 @param ImageId The image's id, which is unique within
1043 PackageList.
1044 @param Blt If this points to a non-NULL on entry, this
1045 points to the image, which is Width pixels wide
1046 and Height pixels high. The image will be drawn
1047 onto this image and
1048 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
1049 to a NULL on entry, then a buffer will be
1050 allocated to hold the generated image and the
1051 pointer updated on exit. It is the caller's
1052 responsibility to free this buffer.
1053 @param BltX Specifies the offset from the left and top edge
1054 of the output image of the first pixel in the
1055 image.
1056 @param BltY Specifies the offset from the left and top edge
1057 of the output image of the first pixel in the
1058 image.
1059
1060 @retval EFI_SUCCESS The image was successfully drawn.
1061 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1062 @retval EFI_INVALID_PARAMETER The Blt was NULL.
1063 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1064 The specified PackageList is not in the database.
1065
1066 **/
1067 EFI_STATUS
1068 EFIAPI
1069 HiiDrawImageId (
1070 IN CONST EFI_HII_IMAGE_PROTOCOL *This,
1071 IN EFI_HII_DRAW_FLAGS Flags,
1072 IN EFI_HII_HANDLE PackageList,
1073 IN EFI_IMAGE_ID ImageId,
1074 IN OUT EFI_IMAGE_OUTPUT **Blt,
1075 IN UINTN BltX,
1076 IN UINTN BltY
1077 );
1078
1079 /**
1080 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.NewImage().
1081 This protocol invokes EFI_HII_IMAGE_PROTOCOL.NewImage() implicitly.
1082
1083 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1084 @param PackageList Handle of the package list where this image will
1085 be added.
1086 @param ImageId On return, contains the new image id, which is
1087 unique within PackageList.
1088 @param Image Points to the image.
1089
1090 @retval EFI_SUCCESS The new image was added successfully.
1091 @retval EFI_NOT_FOUND The PackageList could not be found.
1092 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
1093 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
1094 **/
1095 EFI_STATUS
1096 EFIAPI
1097 HiiNewImageEx (
1098 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1099 IN EFI_HII_HANDLE PackageList,
1100 OUT EFI_IMAGE_ID *ImageId,
1101 IN CONST EFI_IMAGE_INPUT *Image
1102 );
1103
1104 /**
1105 Return the information about the image, associated with the package list.
1106 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.GetImage().
1107
1108 This function is similar to EFI_HII_IMAGE_PROTOCOL.GetImage(). The difference is that
1109 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1110 system if the decoder of the certain image type is not supported by the
1111 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1112 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1113 supports the requested image type.
1114
1115 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1116 @param PackageList The package list in the HII database to search for the
1117 specified image.
1118 @param ImageId The image's id, which is unique within PackageList.
1119 @param Image Points to the image.
1120
1121 @retval EFI_SUCCESS The new image was returned successfully.
1122 @retval EFI_NOT_FOUND The image specified by ImageId is not available. The specified
1123 PackageList is not in the Database.
1124 @retval EFI_INVALID_PARAMETER Image was NULL or ImageId was 0.
1125 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1126 was not enough memory.
1127
1128 **/
1129 EFI_STATUS
1130 EFIAPI
1131 HiiGetImageEx (
1132 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1133 IN EFI_HII_HANDLE PackageList,
1134 IN EFI_IMAGE_ID ImageId,
1135 OUT EFI_IMAGE_INPUT *Image
1136 );
1137
1138 /**
1139 Change the information about the image.
1140
1141 Same with EFI_HII_IMAGE_PROTOCOL.SetImage(), this protocol invokes
1142 EFI_HII_IMAGE_PROTOCOL.SetImage()implicitly.
1143
1144 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1145 @param PackageList The package list containing the images.
1146 @param ImageId The image's id, which is unique within PackageList.
1147 @param Image Points to the image.
1148
1149 @retval EFI_SUCCESS The new image was successfully updated.
1150 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1151 database. The specified PackageList is not in
1152 the database.
1153 @retval EFI_INVALID_PARAMETER The Image was NULL, the ImageId was 0 or
1154 the Image->Bitmap was NULL.
1155
1156 **/
1157 EFI_STATUS
1158 EFIAPI
1159 HiiSetImageEx (
1160 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1161 IN EFI_HII_HANDLE PackageList,
1162 IN EFI_IMAGE_ID ImageId,
1163 IN CONST EFI_IMAGE_INPUT *Image
1164 );
1165
1166 /**
1167 Renders an image to a bitmap or to the display.
1168
1169 The prototype of this extension function is the same with
1170 EFI_HII_IMAGE_PROTOCOL.DrawImage(). This protocol invokes
1171 EFI_HII_IMAGE_PROTOCOL.DrawImage() implicitly.
1172
1173 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1174 @param Flags Describes how the image is to be drawn.
1175 @param Image Points to the image to be displayed.
1176 @param Blt If this points to a non-NULL on entry, this points
1177 to the image, which is Width pixels wide and
1178 Height pixels high. The image will be drawn onto
1179 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1180 If this points to a NULL on entry, then a buffer
1181 will be allocated to hold the generated image and
1182 the pointer updated on exit. It is the caller's
1183 responsibility to free this buffer.
1184 @param BltX Specifies the offset from the left and top edge of
1185 the output image of the first pixel in the image.
1186 @param BltY Specifies the offset from the left and top edge of
1187 the output image of the first pixel in the image.
1188
1189 @retval EFI_SUCCESS The image was successfully drawn.
1190 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1191 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1192
1193 **/
1194 EFI_STATUS
1195 EFIAPI
1196 HiiDrawImageEx (
1197 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1198 IN EFI_HII_DRAW_FLAGS Flags,
1199 IN CONST EFI_IMAGE_INPUT *Image,
1200 IN OUT EFI_IMAGE_OUTPUT **Blt,
1201 IN UINTN BltX,
1202 IN UINTN BltY
1203 );
1204
1205 /**
1206 Renders an image to a bitmap or the screen containing the contents of the specified
1207 image.
1208
1209 This function is similar to EFI_HII_IMAGE_PROTOCOL.DrawImageId(). The difference is that
1210 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1211 system if the decoder of the certain image type is not supported by the
1212 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1213 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1214 supports the requested image type.
1215
1216 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1217 @param Flags Describes how the image is to be drawn.
1218 @param PackageList The package list in the HII database to search for
1219 the specified image.
1220 @param ImageId The image's id, which is unique within PackageList.
1221 @param Blt If this points to a non-NULL on entry, this points
1222 to the image, which is Width pixels wide and
1223 Height pixels high. The image will be drawn onto
1224 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1225 If this points to a NULL on entry, then a buffer
1226 will be allocated to hold the generated image
1227 and the pointer updated on exit. It is the caller's
1228 responsibility to free this buffer.
1229 @param BltX Specifies the offset from the left and top edge of
1230 the output image of the first pixel in the image.
1231 @param BltY Specifies the offset from the left and top edge of
1232 the output image of the first pixel in the image.
1233
1234 @retval EFI_SUCCESS The image was successfully drawn.
1235 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1236 @retval EFI_INVALID_PARAMETER The Blt was NULL or ImageId was 0.
1237 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1238 The specified PackageList is not in the database.
1239
1240 **/
1241 EFI_STATUS
1242 EFIAPI
1243 HiiDrawImageIdEx (
1244 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1245 IN EFI_HII_DRAW_FLAGS Flags,
1246 IN EFI_HII_HANDLE PackageList,
1247 IN EFI_IMAGE_ID ImageId,
1248 IN OUT EFI_IMAGE_OUTPUT **Blt,
1249 IN UINTN BltX,
1250 IN UINTN BltY
1251 );
1252
1253 /**
1254 This function returns the image information to EFI_IMAGE_OUTPUT. Only the width
1255 and height are returned to the EFI_IMAGE_OUTPUT instead of decoding the image
1256 to the buffer. This function is used to get the geometry of the image. This function
1257 will try to locate all of the EFI_HII_IMAGE_DECODER_PROTOCOL installed on the
1258 system if the decoder of image type is not supported by the EFI_HII_IMAGE_EX_PROTOCOL.
1259
1260 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1261 @param PackageList Handle of the package list where this image will
1262 be searched.
1263 @param ImageId The image's id, which is unique within PackageList.
1264 @param Image Points to the image.
1265
1266 @retval EFI_SUCCESS The new image was returned successfully.
1267 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1268 database. The specified PackageList is not in the database.
1269 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
1270 hold the image.
1271 @retval EFI_INVALID_PARAMETER The Image was NULL or the ImageId was 0.
1272 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1273 was not enough memory.
1274
1275 **/
1276 EFI_STATUS
1277 EFIAPI
1278 HiiGetImageInfo (
1279 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,
1280 IN EFI_HII_HANDLE PackageList,
1281 IN EFI_IMAGE_ID ImageId,
1282 OUT EFI_IMAGE_OUTPUT *Image
1283 );
1284 //
1285 // EFI_HII_STRING_PROTOCOL
1286 //
1287
1288
1289 /**
1290 This function adds the string String to the group of strings owned by PackageList, with the
1291 specified font information StringFontInfo and returns a new string id.
1292
1293 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1294 instance.
1295 @param PackageList Handle of the package list where this string will
1296 be added.
1297 @param StringId On return, contains the new strings id, which is
1298 unique within PackageList.
1299 @param Language Points to the language for the new string.
1300 @param LanguageName Points to the printable language name to
1301 associate with the passed in Language field.If
1302 LanguageName is not NULL and the string package
1303 header's LanguageName associated with a given
1304 Language is not zero, the LanguageName being
1305 passed in will be ignored.
1306 @param String Points to the new null-terminated string.
1307 @param StringFontInfo Points to the new string's font information or
1308 NULL if the string should have the default system
1309 font, size and style.
1310
1311 @retval EFI_SUCCESS The new string was added successfully.
1312 @retval EFI_NOT_FOUND The specified PackageList could not be found in
1313 database.
1314 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
1315 resources.
1316 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
1317 NULL.
1318
1319 **/
1320 EFI_STATUS
1321 EFIAPI
1322 HiiNewString (
1323 IN CONST EFI_HII_STRING_PROTOCOL *This,
1324 IN EFI_HII_HANDLE PackageList,
1325 OUT EFI_STRING_ID *StringId,
1326 IN CONST CHAR8 *Language,
1327 IN CONST CHAR16 *LanguageName, OPTIONAL
1328 IN CONST EFI_STRING String,
1329 IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
1330 );
1331
1332
1333 /**
1334 This function retrieves the string specified by StringId which is associated
1335 with the specified PackageList in the language Language and copies it into
1336 the buffer specified by String.
1337
1338 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1339 instance.
1340 @param Language Points to the language for the retrieved string.
1341 @param PackageList The package list in the HII database to search
1342 for the specified string.
1343 @param StringId The string's id, which is unique within
1344 PackageList.
1345 @param String Points to the new null-terminated string.
1346 @param StringSize On entry, points to the size of the buffer
1347 pointed to by String, in bytes. On return,
1348 points to the length of the string, in bytes.
1349 @param StringFontInfo If not NULL, points to the string's font
1350 information. It's caller's responsibility to
1351 free this buffer.
1352
1353 @retval EFI_SUCCESS The string was returned successfully.
1354 @retval EFI_NOT_FOUND The string specified by StringId is not
1355 available.
1356 The specified PackageList is not in the database.
1357 @retval EFI_INVALID_LANGUAGE The string specified by StringId is available but
1358 not in the specified language.
1359 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
1360 to hold the string.
1361 @retval EFI_INVALID_PARAMETER The Language or StringSize was NULL.
1362 @retval EFI_INVALID_PARAMETER The value referenced by StringSize was not zero
1363 and String was NULL.
1364 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
1365 request.
1366
1367 **/
1368 EFI_STATUS
1369 EFIAPI
1370 HiiGetString (
1371 IN CONST EFI_HII_STRING_PROTOCOL *This,
1372 IN CONST CHAR8 *Language,
1373 IN EFI_HII_HANDLE PackageList,
1374 IN EFI_STRING_ID StringId,
1375 OUT EFI_STRING String,
1376 IN OUT UINTN *StringSize,
1377 OUT EFI_FONT_INFO **StringFontInfo OPTIONAL
1378 );
1379
1380
1381 /**
1382 This function updates the string specified by StringId in the specified PackageList to the text
1383 specified by String and, optionally, the font information specified by StringFontInfo.
1384
1385 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1386 instance.
1387 @param PackageList The package list containing the strings.
1388 @param StringId The string's id, which is unique within
1389 PackageList.
1390 @param Language Points to the language for the updated string.
1391 @param String Points to the new null-terminated string.
1392 @param StringFontInfo Points to the string's font information or NULL
1393 if the string font information is not changed.
1394
1395 @retval EFI_SUCCESS The string was updated successfully.
1396 @retval EFI_NOT_FOUND The string specified by StringId is not in the
1397 database.
1398 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
1399 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
1400 task.
1401
1402 **/
1403 EFI_STATUS
1404 EFIAPI
1405 HiiSetString (
1406 IN CONST EFI_HII_STRING_PROTOCOL *This,
1407 IN EFI_HII_HANDLE PackageList,
1408 IN EFI_STRING_ID StringId,
1409 IN CONST CHAR8 *Language,
1410 IN CONST EFI_STRING String,
1411 IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL
1412 );
1413
1414
1415 /**
1416 This function returns the list of supported languages, in the format specified
1417 in Appendix M of UEFI 2.1 spec.
1418
1419 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1420 instance.
1421 @param PackageList The package list to examine.
1422 @param Languages Points to the buffer to hold the returned
1423 null-terminated ASCII string.
1424 @param LanguagesSize On entry, points to the size of the buffer
1425 pointed to by Languages, in bytes. On return,
1426 points to the length of Languages, in bytes.
1427
1428 @retval EFI_SUCCESS The languages were returned successfully.
1429 @retval EFI_INVALID_PARAMETER The LanguagesSize was NULL.
1430 @retval EFI_INVALID_PARAMETER The value referenced by LanguagesSize is not zero and Languages is NULL.
1431 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1432 of supported languages. LanguageSize is updated
1433 to contain the required size.
1434 @retval EFI_NOT_FOUND Could not find string package in specified
1435 packagelist.
1436
1437 **/
1438 EFI_STATUS
1439 EFIAPI
1440 HiiGetLanguages (
1441 IN CONST EFI_HII_STRING_PROTOCOL *This,
1442 IN EFI_HII_HANDLE PackageList,
1443 IN OUT CHAR8 *Languages,
1444 IN OUT UINTN *LanguagesSize
1445 );
1446
1447
1448 /**
1449 Each string package has associated with it a single primary language and zero
1450 or more secondary languages. This routine returns the secondary languages
1451 associated with a package list.
1452
1453 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1454 instance.
1455 @param PackageList The package list to examine.
1456 @param PrimaryLanguage Points to the null-terminated ASCII string that specifies
1457 the primary language. Languages are specified in the
1458 format specified in Appendix M of the UEFI 2.0 specification.
1459 @param SecondaryLanguages Points to the buffer to hold the returned null-terminated
1460 ASCII string that describes the list of
1461 secondary languages for the specified
1462 PrimaryLanguage. If there are no secondary
1463 languages, the function returns successfully,
1464 but this is set to NULL.
1465 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1466 pointed to by SecondaryLanguages, in bytes. On
1467 return, points to the length of SecondaryLanguages
1468 in bytes.
1469
1470 @retval EFI_SUCCESS Secondary languages were correctly returned.
1471 @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguagesSize was NULL.
1472 @retval EFI_INVALID_PARAMETER The value referenced by SecondaryLanguagesSize is not
1473 zero and SecondaryLanguages is NULL.
1474 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is
1475 too small to hold the returned information.
1476 SecondaryLanguageSize is updated to hold the size of
1477 the buffer required.
1478 @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not
1479 present in the specified package list.
1480 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1481
1482 **/
1483 EFI_STATUS
1484 EFIAPI
1485 HiiGetSecondaryLanguages (
1486 IN CONST EFI_HII_STRING_PROTOCOL *This,
1487 IN EFI_HII_HANDLE PackageList,
1488 IN CONST CHAR8 *PrimaryLanguage,
1489 IN OUT CHAR8 *SecondaryLanguages,
1490 IN OUT UINTN *SecondaryLanguagesSize
1491 );
1492
1493 //
1494 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1495 //
1496
1497
1498 /**
1499 This function adds the packages in the package list to the database and returns a handle. If there is a
1500 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1501 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1502
1503 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1504 instance.
1505 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1506 structure.
1507 @param DriverHandle Associate the package list with this EFI handle.
1508 If a NULL is specified, this data will not be associate
1509 with any drivers and cannot have a callback induced.
1510 @param Handle A pointer to the EFI_HII_HANDLE instance.
1511
1512 @retval EFI_SUCCESS The package list associated with the Handle was
1513 added to the HII database.
1514 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1515 new database contents.
1516 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1517
1518 **/
1519 EFI_STATUS
1520 EFIAPI
1521 HiiNewPackageList (
1522 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1523 IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList,
1524 IN CONST EFI_HANDLE DriverHandle, OPTIONAL
1525 OUT EFI_HII_HANDLE *Handle
1526 );
1527
1528
1529 /**
1530 This function removes the package list that is associated with a handle Handle
1531 from the HII database. Before removing the package, any registered functions
1532 with the notification type REMOVE_PACK and the same package type will be called.
1533
1534 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1535 instance.
1536 @param Handle The handle that was registered to the data that
1537 is requested for removal.
1538
1539 @retval EFI_SUCCESS The data associated with the Handle was removed
1540 from the HII database.
1541 @retval EFI_NOT_FOUND The specified Handle is not in database.
1542
1543 **/
1544 EFI_STATUS
1545 EFIAPI
1546 HiiRemovePackageList (
1547 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1548 IN EFI_HII_HANDLE Handle
1549 );
1550
1551
1552 /**
1553 This function updates the existing package list (which has the specified Handle)
1554 in the HII databases, using the new package list specified by PackageList.
1555
1556 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1557 instance.
1558 @param Handle The handle that was registered to the data that
1559 is requested to be updated.
1560 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1561 package.
1562
1563 @retval EFI_SUCCESS The HII database was successfully updated.
1564 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1565 database.
1566 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1567 @retval EFI_NOT_FOUND The specified Handle is not in database.
1568
1569 **/
1570 EFI_STATUS
1571 EFIAPI
1572 HiiUpdatePackageList (
1573 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1574 IN EFI_HII_HANDLE Handle,
1575 IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList
1576 );
1577
1578
1579 /**
1580 This function returns a list of the package handles of the specified type
1581 that are currently active in the database. The pseudo-type
1582 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1583
1584 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1585 instance.
1586 @param PackageType Specifies the package type of the packages to
1587 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1588 to be listed.
1589 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1590 this is the pointer to the GUID which must match
1591 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1592 Otherwise, it must be NULL.
1593 @param HandleBufferLength On input, a pointer to the length of the handle
1594 buffer. On output, the length of the handle
1595 buffer that is required for the handles found.
1596 @param Handle An array of EFI_HII_HANDLE instances returned.
1597
1598 @retval EFI_SUCCESS The matching handles are outputted successfully.
1599 HandleBufferLength is updated with the actual length.
1600 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1601 Handle is too small to support the number of
1602 handles. HandleBufferLength is updated with a
1603 value that will enable the data to fit.
1604 @retval EFI_NOT_FOUND No matching handle could not be found in
1605 database.
1606 @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL.
1607 @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not
1608 zero and Handle was NULL.
1609 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1610 PackageGuid is not NULL, PackageType is a EFI_HII_
1611 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1612
1613 **/
1614 EFI_STATUS
1615 EFIAPI
1616 HiiListPackageLists (
1617 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1618 IN UINT8 PackageType,
1619 IN CONST EFI_GUID *PackageGuid,
1620 IN OUT UINTN *HandleBufferLength,
1621 OUT EFI_HII_HANDLE *Handle
1622 );
1623
1624
1625 /**
1626 This function will export one or all package lists in the database to a buffer.
1627 For each package list exported, this function will call functions registered
1628 with EXPORT_PACK and then copy the package list to the buffer.
1629
1630 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1631 instance.
1632 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1633 package list in the HII database to export or
1634 NULL to indicate all package lists should be
1635 exported.
1636 @param BufferSize On input, a pointer to the length of the buffer.
1637 On output, the length of the buffer that is
1638 required for the exported data.
1639 @param Buffer A pointer to a buffer that will contain the
1640 results of the export function.
1641
1642 @retval EFI_SUCCESS Package exported.
1643 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1644 Handle is too small to support the number of
1645 handles. HandleBufferLength is updated with
1646 a value that will enable the data to fit.
1647 @retval EFI_NOT_FOUND The specified Handle could not be found in the
1648 current database.
1649 @retval EFI_INVALID_PARAMETER BufferSize was NULL.
1650 @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
1651 and Buffer was NULL.
1652
1653 **/
1654 EFI_STATUS
1655 EFIAPI
1656 HiiExportPackageLists (
1657 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1658 IN EFI_HII_HANDLE Handle,
1659 IN OUT UINTN *BufferSize,
1660 OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer
1661 );
1662
1663
1664 /**
1665 This function registers a function which will be called when specified actions related to packages of
1666 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1667 notified when specific package types are added, removed or updated in the HII database.
1668 Each driver or application which registers a notification should use
1669 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1670
1671 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1672 instance.
1673 @param PackageType Specifies the package type of the packages to
1674 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1675 to be listed.
1676 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1677 this is the pointer to the GUID which must match
1678 the Guid field of
1679 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1680 be NULL.
1681 @param PackageNotifyFn Points to the function to be called when the
1682 event specified by
1683 NotificationType occurs.
1684 @param NotifyType Describes the types of notification which this
1685 function will be receiving.
1686 @param NotifyHandle Points to the unique handle assigned to the
1687 registered notification. Can be used in
1688 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1689 to stop notifications.
1690
1691 @retval EFI_SUCCESS Notification registered successfully.
1692 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1693 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1694 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1695 EFI_HII_PACKAGE_TYPE_GUID.
1696 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1697 EFI_HII_PACKAGE_TYPE_GUID.
1698
1699 **/
1700 EFI_STATUS
1701 EFIAPI
1702 HiiRegisterPackageNotify (
1703 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1704 IN UINT8 PackageType,
1705 IN CONST EFI_GUID *PackageGuid,
1706 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn,
1707 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,
1708 OUT EFI_HANDLE *NotifyHandle
1709 );
1710
1711
1712 /**
1713 Removes the specified HII database package-related notification.
1714
1715 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1716 instance.
1717 @param NotificationHandle The handle of the notification function being
1718 unregistered.
1719
1720 @retval EFI_SUCCESS Notification is unregistered successfully.
1721 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1722 in current hii database.
1723
1724 **/
1725 EFI_STATUS
1726 EFIAPI
1727 HiiUnregisterPackageNotify (
1728 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1729 IN EFI_HANDLE NotificationHandle
1730 );
1731
1732
1733 /**
1734 This routine retrieves an array of GUID values for each keyboard layout that
1735 was previously registered in the system.
1736
1737 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1738 instance.
1739 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1740 GUID buffer. On output, the length of the handle
1741 buffer that is required for the handles found.
1742 @param KeyGuidBuffer An array of keyboard layout GUID instances
1743 returned.
1744
1745 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1746 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1747 that KeyGuidBuffer is too small to support the
1748 number of GUIDs. KeyGuidBufferLength is
1749 updated with a value that will enable the data to
1750 fit.
1751 @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL.
1752 @retval EFI_INVALID_PARAMETER The value referenced by KeyGuidBufferLength is not
1753 zero and KeyGuidBuffer is NULL.
1754 @retval EFI_NOT_FOUND There was no keyboard layout.
1755
1756 **/
1757 EFI_STATUS
1758 EFIAPI
1759 HiiFindKeyboardLayouts (
1760 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1761 IN OUT UINT16 *KeyGuidBufferLength,
1762 OUT EFI_GUID *KeyGuidBuffer
1763 );
1764
1765
1766 /**
1767 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1768 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1769
1770 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1771 instance.
1772 @param KeyGuid A pointer to the unique ID associated with a
1773 given keyboard layout. If KeyGuid is NULL then
1774 the current layout will be retrieved.
1775 @param KeyboardLayoutLength On input, a pointer to the length of the
1776 KeyboardLayout buffer. On output, the length of
1777 the data placed into KeyboardLayout.
1778 @param KeyboardLayout A pointer to a buffer containing the retrieved
1779 keyboard layout.
1780
1781 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1782 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1783 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1784 NULL.
1785
1786 **/
1787 EFI_STATUS
1788 EFIAPI
1789 HiiGetKeyboardLayout (
1790 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1791 IN CONST EFI_GUID *KeyGuid,
1792 IN OUT UINT16 *KeyboardLayoutLength,
1793 OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout
1794 );
1795
1796
1797 /**
1798 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1799 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1800 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1801 can be notified of this change.
1802
1803 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1804 instance.
1805 @param KeyGuid A pointer to the unique ID associated with a
1806 given keyboard layout.
1807
1808 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1809 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1810 action was taken.
1811 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1812
1813 **/
1814 EFI_STATUS
1815 EFIAPI
1816 HiiSetKeyboardLayout (
1817 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1818 IN CONST EFI_GUID *KeyGuid
1819 );
1820
1821
1822 /**
1823 Return the EFI handle associated with a package list.
1824
1825 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1826 instance.
1827 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1828 package list in the HIIdatabase.
1829 @param DriverHandle On return, contains the EFI_HANDLE which was
1830 registered with the package list in
1831 NewPackageList().
1832
1833 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1834 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1835 DriverHandle was NULL.
1836
1837 **/
1838 EFI_STATUS
1839 EFIAPI
1840 HiiGetPackageListHandle (
1841 IN CONST EFI_HII_DATABASE_PROTOCOL *This,
1842 IN EFI_HII_HANDLE PackageListHandle,
1843 OUT EFI_HANDLE *DriverHandle
1844 );
1845
1846 //
1847 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1848 //
1849
1850
1851 /**
1852 This function allows a caller to extract the current configuration
1853 for one or more named elements from one or more drivers.
1854
1855 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1856 instance.
1857 @param Request A null-terminated Unicode string in
1858 <MultiConfigRequest> format.
1859 @param Progress On return, points to a character in the Request
1860 string. Points to the string's null terminator if
1861 request was successful. Points to the most recent
1862 & before the first failing name / value pair (or
1863 the beginning of the string if the failure is in
1864 the first name / value pair) if the request was
1865 not successful.
1866 @param Results Null-terminated Unicode string in
1867 <MultiConfigAltResp> format which has all values
1868 filled in for the names in the Request string.
1869 String to be allocated by the called function.
1870
1871 @retval EFI_SUCCESS The Results string is filled with the values
1872 corresponding to all requested names.
1873 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1874 results that must be stored awaiting possible
1875 future protocols.
1876 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1877 Progress set to the "G" in "GUID" of the
1878 routing header that doesn't match. Note: There
1879 is no requirement that all routing data
1880 be validated before any configuration extraction.
1881 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1882 parameter would result in this type of error. The
1883 Progress parameter is set to NULL.
1884 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1885 before the error or the beginning of the string.
1886 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1887 name in question.
1888
1889 **/
1890 EFI_STATUS
1891 EFIAPI
1892 HiiConfigRoutingExtractConfig (
1893 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1894 IN CONST EFI_STRING Request,
1895 OUT EFI_STRING *Progress,
1896 OUT EFI_STRING *Results
1897 );
1898
1899
1900 /**
1901 This function allows the caller to request the current configuration for the
1902 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1903
1904 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1905 instance.
1906 @param Results Null-terminated Unicode string in
1907 <MultiConfigAltResp> format which has all values
1908 filled in for the entirety of the current HII
1909 database. String to be allocated by the called
1910 function. De-allocation is up to the caller.
1911
1912 @retval EFI_SUCCESS The Results string is filled with the values
1913 corresponding to all requested names.
1914 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1915 results that must be stored awaiting possible
1916 future protocols.
1917 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1918 parameter would result in this type of error.
1919
1920 **/
1921 EFI_STATUS
1922 EFIAPI
1923 HiiConfigRoutingExportConfig (
1924 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1925 OUT EFI_STRING *Results
1926 );
1927
1928
1929 /**
1930 This function processes the results of processing forms and routes it to the
1931 appropriate handlers or storage.
1932
1933 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1934 instance.
1935 @param Configuration A null-terminated Unicode string in
1936 <MulltiConfigResp> format.
1937 @param Progress A pointer to a string filled in with the offset
1938 of the most recent & before the first failing
1939 name / value pair (or the beginning of the string
1940 if the failure is in the first name / value pair)
1941 or the terminating NULL if all was successful.
1942
1943 @retval EFI_SUCCESS The results have been distributed or are awaiting
1944 distribution.
1945 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1946 results that must be stored awaiting possible
1947 future protocols.
1948 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1949 would result in this type of error.
1950 @retval EFI_NOT_FOUND Target for the specified routing data was not
1951 found.
1952
1953 **/
1954 EFI_STATUS
1955 EFIAPI
1956 HiiConfigRoutingRouteConfig (
1957 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
1958 IN CONST EFI_STRING Configuration,
1959 OUT EFI_STRING *Progress
1960 );
1961
1962
1963
1964 /**
1965 This helper function is to be called by drivers to map configuration data stored
1966 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1967
1968 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1969 instance.
1970 @param ConfigRequest A null-terminated Unicode string in
1971 <ConfigRequest> format.
1972 @param Block Array of bytes defining the block's
1973 configuration.
1974 @param BlockSize Length in bytes of Block.
1975 @param Config Filled-in configuration string. String allocated
1976 by the function. Returned only if call is
1977 successful.
1978 @param Progress A pointer to a string filled in with the offset
1979 of the most recent & before the first failing
1980 name/value pair (or the beginning of the string
1981 if the failure is in the first name / value pair)
1982 or the terminating NULL if all was successful.
1983
1984 @retval EFI_SUCCESS The request succeeded. Progress points to the
1985 null terminator at the end of the ConfigRequest
1986 string.
1987 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1988 Progress points to the first character of
1989 ConfigRequest.
1990 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1991 Block parameter would result in this type of
1992 error. Progress points to the first character of
1993 ConfigRequest.
1994 @retval EFI_NOT_FOUND Target for the specified routing data was not
1995 found. Progress points to the "G" in "GUID" of
1996 the errant routing data.
1997 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1998 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1999 Block is left updated and Progress points at
2000 the '&' preceding the first non-<BlockName>.
2001
2002 **/
2003 EFI_STATUS
2004 EFIAPI
2005 HiiBlockToConfig (
2006 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
2007 IN CONST EFI_STRING ConfigRequest,
2008 IN CONST UINT8 *Block,
2009 IN CONST UINTN BlockSize,
2010 OUT EFI_STRING *Config,
2011 OUT EFI_STRING *Progress
2012 );
2013
2014
2015 /**
2016 This helper function is to be called by drivers to map configuration strings
2017 to configurations stored in byte array ("block") formats such as UEFI Variables.
2018
2019 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2020 instance.
2021 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
2022 format.
2023 @param Block A possibly null array of bytes representing the
2024 current block. Only bytes referenced in the
2025 ConfigResp string in the block are modified. If
2026 this parameter is null or if the *BlockSize
2027 parameter is (on input) shorter than required by
2028 the Configuration string, only the BlockSize
2029 parameter is updated and an appropriate status
2030 (see below) is returned.
2031 @param BlockSize The length of the Block in units of UINT8. On
2032 input, this is the size of the Block. On output,
2033 if successful, contains the largest index of the
2034 modified byte in the Block, or the required buffer
2035 size if the Block is not large enough.
2036 @param Progress On return, points to an element of the ConfigResp
2037 string filled in with the offset of the most
2038 recent '&' before the first failing name / value
2039 pair (or the beginning of the string if the
2040 failure is in the first name / value pair) or
2041 the terminating NULL if all was successful.
2042
2043 @retval EFI_SUCCESS The request succeeded. Progress points to the
2044 null terminator at the end of the ConfigResp
2045 string.
2046 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
2047 Progress points to the first character of
2048 ConfigResp.
2049 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
2050 Block parameter would result in this type of
2051 error. Progress points to the first character of
2052 ConfigResp.
2053 @retval EFI_NOT_FOUND Target for the specified routing data was not
2054 found. Progress points to the "G" in "GUID" of
2055 the errant routing data.
2056 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
2057 value pair. Block is left updated and
2058 Progress points at the '&' preceding the first
2059 non-<BlockName>.
2060 @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
2061 BlockSize is updated with the required buffer size.
2062
2063 **/
2064 EFI_STATUS
2065 EFIAPI
2066 HiiConfigToBlock (
2067 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
2068 IN CONST EFI_STRING ConfigResp,
2069 IN OUT UINT8 *Block,
2070 IN OUT UINTN *BlockSize,
2071 OUT EFI_STRING *Progress
2072 );
2073
2074
2075 /**
2076 This helper function is to be called by drivers to extract portions of
2077 a larger configuration string.
2078
2079 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2080 instance.
2081 @param Configuration A null-terminated Unicode string in
2082 <MultiConfigAltResp> format.
2083 @param Guid A pointer to the GUID value to search for in the
2084 routing portion of the ConfigResp string when
2085 retrieving the requested data. If Guid is NULL,
2086 then all GUID values will be searched for.
2087 @param Name A pointer to the NAME value to search for in the
2088 routing portion of the ConfigResp string when
2089 retrieving the requested data. If Name is NULL,
2090 then all Name values will be searched for.
2091 @param DevicePath A pointer to the PATH value to search for in the
2092 routing portion of the ConfigResp string when
2093 retrieving the requested data. If DevicePath is
2094 NULL, then all DevicePath values will be
2095 searched for.
2096 @param AltCfgId A pointer to the ALTCFG value to search for in
2097 the routing portion of the ConfigResp string
2098 when retrieving the requested data. If this
2099 parameter is NULL, then the current setting will
2100 be retrieved.
2101 @param AltCfgResp A pointer to a buffer which will be allocated by
2102 the function which contains the retrieved string
2103 as requested. This buffer is only allocated if
2104 the call was successful.
2105
2106 @retval EFI_SUCCESS The request succeeded. The requested data was
2107 extracted and placed in the newly allocated
2108 AltCfgResp buffer.
2109 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
2110 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
2111 @retval EFI_NOT_FOUND Target for the specified routing data was not
2112 found.
2113
2114 **/
2115 EFI_STATUS
2116 EFIAPI
2117 HiiGetAltCfg (
2118 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,
2119 IN CONST EFI_STRING Configuration,
2120 IN CONST EFI_GUID *Guid,
2121 IN CONST EFI_STRING Name,
2122 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
2123 IN CONST UINT16 *AltCfgId,
2124 OUT EFI_STRING *AltCfgResp
2125 );
2126
2127 /**
2128
2129 This function accepts a <MultiKeywordResp> formatted string, finds the associated
2130 keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
2131 EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
2132
2133 If there is an issue in resolving the contents of the KeywordString, then the
2134 function returns an error and also sets the Progress and ProgressErr with the
2135 appropriate information about where the issue occurred and additional data about
2136 the nature of the issue.
2137
2138 In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
2139 error is generated during processing the second or later keyword element, the system
2140 storage associated with earlier keywords is not modified. All elements of the
2141 KeywordString must successfully pass all tests for format and access prior to making
2142 any modifications to storage.
2143
2144 In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
2145 containing multiple keywords, the state of storage associated with earlier keywords
2146 is undefined.
2147
2148
2149 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2150
2151 @param KeywordString A null-terminated string in <MultiKeywordResp> format.
2152
2153 @param Progress On return, points to a character in the KeywordString.
2154 Points to the string's NULL terminator if the request
2155 was successful. Points to the most recent '&' before
2156 the first failing name / value pair (or the beginning
2157 of the string if the failure is in the first name / value
2158 pair) if the request was not successful.
2159
2160 @param ProgressErr If during the processing of the KeywordString there was
2161 a failure, this parameter gives additional information
2162 about the possible source of the problem. The various
2163 errors are defined in "Related Definitions" below.
2164
2165
2166 @retval EFI_SUCCESS The specified action was completed successfully.
2167
2168 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2169 1. KeywordString is NULL.
2170 2. Parsing of the KeywordString resulted in an
2171 error. See Progress and ProgressErr for more data.
2172
2173 @retval EFI_NOT_FOUND An element of the KeywordString was not found.
2174 See ProgressErr for more data.
2175
2176 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
2177 See ProgressErr for more data.
2178
2179 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
2180 for more data.
2181
2182 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2183 for more data.
2184
2185 **/
2186 EFI_STATUS
2187 EFIAPI
2188 EfiConfigKeywordHandlerSetData (
2189 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
2190 IN CONST EFI_STRING KeywordString,
2191 OUT EFI_STRING *Progress,
2192 OUT UINT32 *ProgressErr
2193 );
2194
2195 /**
2196
2197 This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
2198 keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
2199 EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
2200
2201 If there is an issue in resolving the contents of the KeywordString, then the function
2202 returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
2203 appropriate information about where the issue occurred and additional data about the
2204 nature of the issue.
2205
2206 In the case when KeywordString is NULL, or contains multiple keywords, or when
2207 EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
2208 contains values returned for all keywords processed prior to the keyword generating the
2209 error but no values for the keyword with error or any following keywords.
2210
2211
2212 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2213
2214 @param NameSpaceId A null-terminated string containing the platform configuration
2215 language to search through in the system. If a NULL is passed
2216 in, then it is assumed that any platform configuration language
2217 with the prefix of "x-UEFI-" are searched.
2218
2219 @param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
2220 NULL is passed in the KeywordString field, all of the known
2221 keywords in the system for the NameSpaceId specified are
2222 returned in the Results field.
2223
2224 @param Progress On return, points to a character in the KeywordString. Points
2225 to the string's NULL terminator if the request was successful.
2226 Points to the most recent '&' before the first failing name / value
2227 pair (or the beginning of the string if the failure is in the first
2228 name / value pair) if the request was not successful.
2229
2230 @param ProgressErr If during the processing of the KeywordString there was a
2231 failure, this parameter gives additional information about the
2232 possible source of the problem. See the definitions in SetData()
2233 for valid value definitions.
2234
2235 @param Results A null-terminated string in <MultiKeywordResp> format is returned
2236 which has all the values filled in for the keywords in the
2237 KeywordString. This is a callee-allocated field, and must be freed
2238 by the caller after being used.
2239
2240 @retval EFI_SUCCESS The specified action was completed successfully.
2241
2242 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2243 1.Progress, ProgressErr, or Results is NULL.
2244 2.Parsing of the KeywordString resulted in an error. See
2245 Progress and ProgressErr for more data.
2246
2247
2248 @retval EFI_NOT_FOUND An element of the KeywordString was not found. See
2249 ProgressErr for more data.
2250
2251 @retval EFI_NOT_FOUND The NamespaceId specified was not found. See ProgressErr
2252 for more data.
2253
2254 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
2255 ProgressErr for more data.
2256
2257 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
2258 more data.
2259
2260 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2261 for more data.
2262
2263 **/
2264 EFI_STATUS
2265 EFIAPI
2266 EfiConfigKeywordHandlerGetData (
2267 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This,
2268 IN CONST EFI_STRING NameSpaceId, OPTIONAL
2269 IN CONST EFI_STRING KeywordString, OPTIONAL
2270 OUT EFI_STRING *Progress,
2271 OUT UINT32 *ProgressErr,
2272 OUT EFI_STRING *Results
2273 );
2274
2275 /**
2276 Compare whether two names of languages are identical.
2277
2278 @param Language1 Name of language 1 from StringPackage
2279 @param Language2 Name of language 2 to be compared with language 1.
2280
2281 @retval TRUE same
2282 @retval FALSE not same
2283
2284 **/
2285 BOOLEAN
2286 HiiCompareLanguage (
2287 IN CHAR8 *Language1,
2288 IN CHAR8 *Language2
2289 )
2290 ;
2291
2292 /**
2293 Retrieves a pointer to a Null-terminated ASCII string containing the list
2294 of languages that an HII handle in the HII Database supports. The returned
2295 string is allocated using AllocatePool(). The caller is responsible for freeing
2296 the returned string using FreePool(). The format of the returned string follows
2297 the language format assumed the HII Database.
2298
2299 If HiiHandle is NULL, then ASSERT().
2300
2301 @param[in] HiiHandle A handle that was previously registered in the HII Database.
2302
2303 @retval NULL HiiHandle is not registered in the HII database
2304 @retval NULL There are not enough resources available to retrieve the supported
2305 languages.
2306 @retval NULL The list of supported languages could not be retrieved.
2307 @retval Other A pointer to the Null-terminated ASCII string of supported languages.
2308
2309 **/
2310 CHAR8 *
2311 GetSupportedLanguages (
2312 IN EFI_HII_HANDLE HiiHandle
2313 );
2314
2315 /**
2316 This function mainly use to get HiiDatabase information.
2317
2318 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2319
2320 @retval EFI_SUCCESS Get the information successfully.
2321 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Hiidatabase data.
2322
2323 **/
2324 EFI_STATUS
2325 HiiGetDatabaseInfo(
2326 IN CONST EFI_HII_DATABASE_PROTOCOL *This
2327 );
2328
2329 /**
2330 This is an internal function,mainly use to get and update configuration settings information.
2331
2332 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2333
2334 @retval EFI_SUCCESS Get the information successfully.
2335 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Configuration Setting data.
2336
2337 **/
2338 EFI_STATUS
2339 HiiGetConfigurationSetting(
2340 IN CONST EFI_HII_DATABASE_PROTOCOL *This
2341 );
2342
2343 //
2344 // Global variables
2345 //
2346 extern EFI_EVENT gHiiKeyboardLayoutChanged;
2347 extern BOOLEAN gExportAfterReadyToBoot;
2348
2349 #endif