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