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