]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h
edk2/MdePkg/Include/Ia32/ProcessorBind.h:
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / HiiDatabase.h
CommitLineData
ac644614 1/** @file\r
e90b081a 2Private structures definitions in HiiDatabase.\r
ac644614 3\r
813acf3a 4Copyright (c) 2007 - 2008, Intel Corporation\r
ac644614 5All rights reserved. This program and the accompanying materials\r
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
18#include <PiDxe.h>\r
19\r
20#include <Protocol/ConsoleControl.h>\r
21#include <Protocol/DevicePath.h>\r
22#include <Protocol/HiiFont.h>\r
23#include <Protocol/HiiImage.h>\r
24#include <Protocol/HiiString.h>\r
25#include <Protocol/HiiDatabase.h>\r
26#include <Protocol/HiiConfigRouting.h>\r
27#include <Protocol/HiiConfigAccess.h>\r
28#include <Protocol/SimpleTextOut.h>\r
29\r
30#include <Guid/HiiKeyBoardLayout.h>\r
31\r
32\r
33#include <Library/DebugLib.h>\r
34#include <Library/BaseMemoryLib.h>\r
35#include <Library/UefiDriverEntryPoint.h>\r
36#include <Library/UefiBootServicesTableLib.h>\r
37#include <Library/BaseLib.h>\r
38#include <Library/DevicePathLib.h>\r
39#include <Library/MemoryAllocationLib.h>\r
813acf3a 40#include <Library/IfrSupportLib.h>\r
41#include <Library/HiiLib.h>\r
e94358a3 42#include <Library/PcdLib.h>\r
ac644614 43\r
44#define HII_DATABASE_NOTIFY_GUID \\r
45 { \\r
46 0xc1c76, 0xd79e, 0x42fe, {0x86, 0xb, 0x8b, 0xe8, 0x7b, 0x3e, 0x7a, 0x78} \\r
47 }\r
48\r
49#define MAX_STRING_LENGTH 1024\r
50#define MAX_FONT_NAME_LEN 256\r
51#define NARROW_BASELINE 15\r
52#define WIDE_BASELINE 14\r
53#define SYS_FONT_INFO_MASK 0x37\r
54#define REPLACE_UNKNOWN_GLYPH 0xFFFD\r
55#define PROPORTIONAL_GLYPH 0x80\r
56#define NARROW_GLYPH 0x40\r
57\r
58#define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))\r
59#define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))\r
60#define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))\r
61#define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)\r
62\r
63//\r
64// Storage types\r
65//\r
66#define EFI_HII_VARSTORE_BUFFER 0\r
67#define EFI_HII_VARSTORE_NAME_VALUE 1\r
68#define EFI_HII_VARSTORE_EFI_VARIABLE 2\r
69\r
70#define HII_FORMSET_STORAGE_SIGNATURE EFI_SIGNATURE_32 ('H', 'S', 'T', 'G')\r
71typedef struct {\r
72 UINTN Signature;\r
73 LIST_ENTRY Entry;\r
74\r
75 EFI_HII_HANDLE HiiHandle;\r
76 EFI_HANDLE DriverHandle;\r
77\r
78 UINT8 Type; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE\r
79 EFI_GUID Guid;\r
80 CHAR16 *Name;\r
81 UINT16 Size;\r
82} HII_FORMSET_STORAGE;\r
83\r
84#define HII_FORMSET_STORAGE_FROM_LINK(a) CR (a, HII_FORMSET_STORAGE, Link, HII_FORMSET_STORAGE_SIGNATURE)\r
85\r
86\r
87//\r
88// String Package definitions\r
89//\r
90#define HII_STRING_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','s','p')\r
91typedef struct _HII_STRING_PACKAGE_INSTANCE {\r
92 UINTN Signature;\r
93 EFI_HII_STRING_PACKAGE_HDR *StringPkgHdr;\r
94 UINT8 *StringBlock;\r
95 LIST_ENTRY StringEntry;\r
96 LIST_ENTRY FontInfoList; // local font info list\r
97 UINT8 FontId;\r
98} HII_STRING_PACKAGE_INSTANCE;\r
99\r
100//\r
101// Form Package definitions\r
102//\r
103#define HII_IFR_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','f','r','p')\r
104typedef struct _HII_IFR_PACKAGE_INSTANCE {\r
105 UINTN Signature;\r
106 EFI_HII_PACKAGE_HEADER FormPkgHdr;\r
107 UINT8 *IfrData;\r
108 LIST_ENTRY IfrEntry;\r
109} HII_IFR_PACKAGE_INSTANCE;\r
110\r
111//\r
112// Simple Font Package definitions\r
113//\r
114#define HII_S_FONT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','s','f','p')\r
115typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE {\r
116 UINTN Signature;\r
117 EFI_HII_SIMPLE_FONT_PACKAGE_HDR *SimpleFontPkgHdr;\r
118 LIST_ENTRY SimpleFontEntry;\r
119} HII_SIMPLE_FONT_PACKAGE_INSTANCE;\r
120\r
121//\r
122// Font Package definitions\r
123//\r
124#define HII_FONT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','f','p')\r
125typedef struct _HII_FONT_PACKAGE_INSTANCE {\r
126 UINTN Signature;\r
127 EFI_HII_FONT_PACKAGE_HDR *FontPkgHdr;\r
128 UINT8 *GlyphBlock;\r
129 LIST_ENTRY FontEntry;\r
130 LIST_ENTRY GlyphInfoList;\r
131} HII_FONT_PACKAGE_INSTANCE;\r
132\r
133#define HII_GLYPH_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','g','i','s')\r
134typedef struct _HII_GLYPH_INFO {\r
135 UINTN Signature;\r
136 LIST_ENTRY Entry;\r
137 CHAR16 CharId;\r
138 EFI_HII_GLYPH_INFO Cell;\r
139} HII_GLYPH_INFO;\r
140\r
141#define HII_FONT_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','l','f','i')\r
142typedef struct _HII_FONT_INFO {\r
143 UINTN Signature;\r
144 LIST_ENTRY Entry;\r
145 LIST_ENTRY *GlobalEntry;\r
146 UINT8 FontId;\r
147} HII_FONT_INFO;\r
148\r
149#define HII_GLOBAL_FONT_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','g','f','i')\r
150typedef struct _HII_GLOBAL_FONT_INFO {\r
151 UINTN Signature;\r
152 LIST_ENTRY Entry;\r
153 HII_FONT_PACKAGE_INSTANCE *FontPackage;\r
154 UINTN FontInfoSize;\r
155 EFI_FONT_INFO *FontInfo;\r
156} HII_GLOBAL_FONT_INFO;\r
157\r
158//\r
159// Image Package definitions\r
160//\r
161\r
162#define HII_PIXEL_MASK 0x80\r
163\r
164typedef struct _HII_IMAGE_PACKAGE_INSTANCE {\r
165 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr;\r
166 UINT32 ImageBlockSize;\r
167 UINT32 PaletteInfoSize;\r
168 UINT8 *ImageBlock;\r
169 UINT8 *PaletteBlock;\r
170} HII_IMAGE_PACKAGE_INSTANCE;\r
171\r
172//\r
173// Keyboard Layout Pacakge definitions\r
174//\r
175#define HII_KB_LAYOUT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','k','l','p')\r
176typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE {\r
177 UINTN Signature;\r
178 UINT8 *KeyboardPkg;\r
179 LIST_ENTRY KeyboardEntry;\r
180} HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE;\r
181\r
182//\r
183// Guid Package definitions\r
184//\r
185#define HII_GUID_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','g','p')\r
186typedef struct _HII_GUID_PACKAGE_INSTANCE {\r
187 UINTN Signature;\r
188 UINT8 *GuidPkg;\r
189 LIST_ENTRY GuidEntry;\r
190} HII_GUID_PACKAGE_INSTANCE;\r
191\r
192//\r
193// A package list can contain only one or less than one device path package.\r
194// This rule also applies to image package since ImageId can not be duplicate.\r
195//\r
196typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE {\r
197 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr;\r
198 LIST_ENTRY GuidPkgHdr;\r
199 LIST_ENTRY FormPkgHdr;\r
200 LIST_ENTRY KeyboardLayoutHdr;\r
201 LIST_ENTRY StringPkgHdr;\r
202 LIST_ENTRY FontPkgHdr;\r
203 HII_IMAGE_PACKAGE_INSTANCE *ImagePkg;\r
204 LIST_ENTRY SimpleFontPkgHdr;\r
205 UINT8 *DevicePathPkg;\r
206} HII_DATABASE_PACKAGE_LIST_INSTANCE;\r
207\r
208#define HII_HANDLE_SIGNATURE EFI_SIGNATURE_32 ('h','i','h','l')\r
209\r
210typedef struct {\r
211 UINTN Signature;\r
212 LIST_ENTRY Handle;\r
213 UINTN Key;\r
214} HII_HANDLE;\r
215\r
216#define HII_DATABASE_RECORD_SIGNATURE EFI_SIGNATURE_32 ('h','i','d','r')\r
217\r
218typedef struct _HII_DATABASE_RECORD {\r
219 UINTN Signature;\r
220 HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList;\r
221 EFI_HANDLE DriverHandle;\r
222 EFI_HII_HANDLE Handle;\r
223 LIST_ENTRY DatabaseEntry;\r
224} HII_DATABASE_RECORD;\r
225\r
226#define HII_DATABASE_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('h','i','d','n')\r
227\r
228typedef struct _HII_DATABASE_NOTIFY {\r
229 UINTN Signature;\r
230 EFI_HANDLE NotifyHandle;\r
231 UINT8 PackageType;\r
232 EFI_GUID *PackageGuid;\r
233 EFI_HII_DATABASE_NOTIFY PackageNotifyFn;\r
234 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType;\r
235 LIST_ENTRY DatabaseNotifyEntry;\r
236} HII_DATABASE_NOTIFY;\r
237\r
238#define HII_DATABASE_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('H', 'i', 'D', 'p')\r
239\r
240typedef struct _HII_DATABASE_PRIVATE_DATA {\r
241 UINTN Signature;\r
242 LIST_ENTRY DatabaseList;\r
243 LIST_ENTRY DatabaseNotifyList;\r
244 EFI_HII_FONT_PROTOCOL HiiFont;\r
ac644614 245 EFI_HII_IMAGE_PROTOCOL HiiImage;\r
ac644614 246 EFI_HII_STRING_PROTOCOL HiiString;\r
247 EFI_HII_DATABASE_PROTOCOL HiiDatabase;\r
248 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting;\r
249 LIST_ENTRY HiiHandleList;\r
250 INTN HiiHandleCount;\r
251 LIST_ENTRY FontInfoList; // global font info list\r
252 UINTN Attribute; // default system color\r
253 EFI_GUID CurrentLayoutGuid;\r
254 EFI_HII_KEYBOARD_LAYOUT *CurrentLayout;\r
255} HII_DATABASE_PRIVATE_DATA;\r
256\r
257#define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r
258 CR (a, \\r
259 HII_DATABASE_PRIVATE_DATA, \\r
260 HiiFont, \\r
261 HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r
262 )\r
263\r
264#define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r
265 CR (a, \\r
266 HII_DATABASE_PRIVATE_DATA, \\r
267 HiiImage, \\r
268 HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r
269 )\r
270\r
271#define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r
272 CR (a, \\r
273 HII_DATABASE_PRIVATE_DATA, \\r
274 HiiString, \\r
275 HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r
276 )\r
277\r
278#define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r
279 CR (a, \\r
280 HII_DATABASE_PRIVATE_DATA, \\r
281 HiiDatabase, \\r
282 HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r
283 )\r
284\r
285#define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r
286 CR (a, \\r
287 HII_DATABASE_PRIVATE_DATA, \\r
288 ConfigRouting, \\r
289 HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r
290 )\r
291\r
292//\r
293// Internal function prototypes.\r
294//\r
295\r
296/**\r
e90b081a 297 This function checks whether a handle is a valid EFI_HII_HANDLE.\r
ac644614 298\r
299 @param Handle Pointer to a EFI_HII_HANDLE\r
300\r
301 @retval TRUE Valid\r
302 @retval FALSE Invalid\r
303\r
304**/\r
305BOOLEAN\r
306IsHiiHandleValid (\r
307 EFI_HII_HANDLE Handle\r
308 )\r
309;\r
310\r
311\r
312/**\r
313 This function checks whether EFI_FONT_INFO exists in current database. If\r
314 FontInfoMask is specified, check what options can be used to make a match.\r
315 Note that the masks relate to where the system default should be supplied\r
316 are ignored by this function.\r
317\r
318 @param Private Hii database private structure.\r
319 @param FontInfo Points to EFI_FONT_INFO structure.\r
320 @param FontInfoMask If not NULL, describes what options can be used\r
321 to make a match between the font requested and\r
322 the font available. The caller must guarantee\r
323 this mask is valid.\r
324 @param FontHandle On entry, Points to the font handle returned by a\r
325 previous call to GetFontInfo() or NULL to start\r
326 with the first font.\r
327 @param GlobalFontInfo If not NULL, output the corresponding globa font\r
328 info.\r
329\r
330 @retval TRUE Existed\r
331 @retval FALSE Not existed\r
332\r
333**/\r
334BOOLEAN\r
335IsFontInfoExisted (\r
336 IN HII_DATABASE_PRIVATE_DATA *Private,\r
337 IN EFI_FONT_INFO *FontInfo,\r
338 IN EFI_FONT_INFO_MASK *FontInfoMask, OPTIONAL\r
339 IN EFI_FONT_HANDLE FontHandle, OPTIONAL\r
340 OUT HII_GLOBAL_FONT_INFO **GlobalFontInfo OPTIONAL\r
341 )\r
342;\r
343\r
344\r
345/**\r
346 Retrieve system default font and color.\r
347\r
348 @param Private HII database driver private data.\r
349 @param FontInfo Points to system default font output-related\r
350 information. It's caller's responsibility to free\r
351 this buffer.\r
352 @param FontInfoSize If not NULL, output the size of buffer FontInfo.\r
353\r
354 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.\r
355 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the\r
356 task.\r
357 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.\r
358\r
359**/\r
360EFI_STATUS\r
361GetSystemFont (\r
362 IN HII_DATABASE_PRIVATE_DATA *Private,\r
363 OUT EFI_FONT_DISPLAY_INFO **FontInfo,\r
364 OUT UINTN *FontInfoSize OPTIONAL\r
365 )\r
366;\r
367\r
368\r
369/**\r
370 Parse all string blocks to find a String block specified by StringId.\r
371 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks\r
372 within this string package and backup its information.\r
373 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_END).\r
374\r
375 @param Private Hii database private structure.\r
376 @param StringPackage Hii string package instance.\r
377 @param StringId The string's id, which is unique within\r
378 PackageList.\r
379 @param BlockType Output the block type of found string block.\r
380 @param StringBlockAddr Output the block address of found string block.\r
381 @param StringTextOffset Offset, relative to the found block address, of\r
382 the string text information.\r
383 @param LastStringId Output the last string id when StringId = 0.\r
384\r
385 @retval EFI_SUCCESS The string text and font is retrieved\r
386 successfully.\r
387 @retval EFI_NOT_FOUND The specified text or font info can not be found\r
388 out.\r
389 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the\r
390 task.\r
391\r
392**/\r
393EFI_STATUS\r
394FindStringBlock (\r
395 IN HII_DATABASE_PRIVATE_DATA *Private,\r
396 IN HII_STRING_PACKAGE_INSTANCE *StringPackage,\r
397 IN EFI_STRING_ID StringId,\r
398 OUT UINT8 *BlockType, OPTIONAL\r
399 OUT UINT8 **StringBlockAddr, OPTIONAL\r
400 OUT UINTN *StringTextOffset, OPTIONAL\r
401 OUT EFI_STRING_ID *LastStringId OPTIONAL\r
402 )\r
403;\r
404\r
405\r
406/**\r
407 Parse all glyph blocks to find a glyph block specified by CharValue.\r
408 If CharValue = (CHAR16) (-1), collect all default character cell information\r
409 within this font package and backup its information.\r
410\r
411 @param FontPackage Hii string package instance.\r
412 @param CharValue Unicode character value, which identifies a glyph\r
413 block.\r
414 @param GlyphBuffer Output the corresponding bitmap data of the found\r
415 block. It is the caller's responsiblity to free\r
416 this buffer.\r
417 @param Cell Output cell information of the encoded bitmap.\r
418 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.\r
419\r
420 @retval EFI_SUCCESS The bitmap data is retrieved successfully.\r
421 @retval EFI_NOT_FOUND The specified CharValue does not exist in current\r
422 database.\r
423 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the\r
424 task.\r
425\r
426**/\r
427EFI_STATUS\r
428FindGlyphBlock (\r
429 IN HII_FONT_PACKAGE_INSTANCE *FontPackage,\r
430 IN CHAR16 CharValue,\r
431 OUT UINT8 **GlyphBuffer, OPTIONAL\r
432 OUT EFI_HII_GLYPH_INFO *Cell, OPTIONAL\r
433 OUT UINTN *GlyphBufferLen OPTIONAL\r
434 )\r
435;\r
436\r
437//\r
438// EFI_HII_FONT_PROTOCOL protocol interfaces\r
439//\r
440\r
441\r
442/**\r
443 Renders a string to a bitmap or to the display.\r
444\r
445 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.\r
446 @param Flags Describes how the string is to be drawn.\r
447 @param String Points to the null-terminated string to be\r
448 displayed.\r
449 @param StringInfo Points to the string output information,\r
450 including the color and font. If NULL, then the\r
451 string will be output in the default system font\r
452 and color.\r
453 @param Blt If this points to a non-NULL on entry, this\r
454 points to the image, which is Width pixels wide\r
455 and Height pixels high. The string will be drawn\r
456 onto this image and\r
457 EFI_HII_OUT_FLAG_CLIP is implied. If this points\r
458 to a NULL on entry, then a buffer\r
459 will be allocated to hold the generated image and\r
460 the pointer updated on exit. It is the caller's\r
461 responsibility to free this buffer.\r
e90b081a 462 @param BltX Together with BltX, Specifies the offset from the left and top edge\r
463 of the image of the first character cell in the\r
464 image.\r
465 @param BltY Together with BltY, Specifies the offset from the left and top edge\r
ac644614 466 of the image of the first character cell in the\r
467 image.\r
468 @param RowInfoArray If this is non-NULL on entry, then on exit, this\r
469 will point to an allocated buffer containing\r
470 row information and RowInfoArraySize will be\r
471 updated to contain the number of elements.\r
472 This array describes the characters which were at\r
473 least partially drawn and the heights of the\r
474 rows. It is the caller's responsibility to free\r
475 this buffer.\r
476 @param RowInfoArraySize If this is non-NULL on entry, then on exit it\r
477 contains the number of elements in RowInfoArray.\r
478 @param ColumnInfoArray If this is non-NULL, then on return it will be\r
479 filled with the horizontal offset for each\r
480 character in the string on the row where it is\r
481 displayed. Non-printing characters will have\r
482 the offset ~0. The caller is responsible to\r
483 allocate a buffer large enough so that there\r
484 is one entry for each character in the string,\r
485 not including the null-terminator. It is possible\r
486 when character display is normalized that some\r
487 character cells overlap.\r
488\r
489 @retval EFI_SUCCESS The string was successfully rendered.\r
490 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for\r
491 RowInfoArray or Blt.\r
813acf3a 492 @retval EFI_INVALID_PARAMETER The String or Blt.\r
493 @retval EFI_INVALID_PARAMETER Flags were invalid combination..\r
ac644614 494\r
495**/\r
496EFI_STATUS\r
497EFIAPI\r
498HiiStringToImage (\r
499 IN CONST EFI_HII_FONT_PROTOCOL *This,\r
500 IN EFI_HII_OUT_FLAGS Flags,\r
501 IN CONST EFI_STRING String,\r
502 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,\r
503 IN OUT EFI_IMAGE_OUTPUT **Blt,\r
504 IN UINTN BltX,\r
505 IN UINTN BltY,\r
506 OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,\r
507 OUT UINTN *RowInfoArraySize OPTIONAL,\r
508 OUT UINTN *ColumnInfoArray OPTIONAL\r
509 )\r
510;\r
511\r
512\r
513/**\r
514 Render a string to a bitmap or the screen containing the contents of the specified string.\r
515\r
516 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.\r
517 @param Flags Describes how the string is to be drawn.\r
518 @param PackageList The package list in the HII database to search\r
519 for the specified string.\r
520 @param StringId The string's id, which is unique within\r
521 PackageList.\r
522 @param Language Points to the language for the retrieved string.\r
523 If NULL, then the current system language is\r
524 used.\r
525 @param StringInfo Points to the string output information,\r
526 including the color and font. If NULL, then the\r
527 string will be output in the default system font\r
528 and color.\r
529 @param Blt If this points to a non-NULL on entry, this\r
530 points to the image, which is Width pixels wide\r
531 and Height pixels high. The string will be drawn\r
532 onto this image and\r
533 EFI_HII_OUT_FLAG_CLIP is implied. If this points\r
534 to a NULL on entry, then a buffer\r
535 will be allocated to hold the generated image and\r
536 the pointer updated on exit. It is the caller's\r
537 responsibility to free this buffer.\r
e90b081a 538 @param BltX Together with BltX, Specifies the offset from the left and top edge\r
539 of the image of the first character cell in the\r
540 image.\r
541 @param BltY Together with BltY, Specifies the offset from the left and top edge\r
ac644614 542 of the image of the first character cell in the\r
543 image.\r
544 @param RowInfoArray If this is non-NULL on entry, then on exit, this\r
545 will point to an allocated buffer containing\r
546 row information and RowInfoArraySize will be\r
547 updated to contain the number of elements.\r
548 This array describes the characters which were at\r
549 least partially drawn and the heights of the\r
550 rows. It is the caller's responsibility to free\r
551 this buffer.\r
552 @param RowInfoArraySize If this is non-NULL on entry, then on exit it\r
553 contains the number of elements in RowInfoArray.\r
554 @param ColumnInfoArray If this is non-NULL, then on return it will be\r
555 filled with the horizontal offset for each\r
556 character in the string on the row where it is\r
557 displayed. Non-printing characters will have\r
558 the offset ~0. The caller is responsible to\r
559 allocate a buffer large enough so that there\r
560 is one entry for each character in the string,\r
561 not including the null-terminator. It is possible\r
562 when character display is normalized that some\r
563 character cells overlap.\r
564\r
565 @retval EFI_SUCCESS The string was successfully rendered.\r
566 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for\r
567 RowInfoArray or Blt.\r
813acf3a 568 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.\r
569 @retval EFI_INVALID_PARAMETER Flags were invalid combination.\r
570 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not \r
571 in the specified PackageList. \r
ac644614 572\r
573**/\r
574EFI_STATUS\r
575EFIAPI\r
576HiiStringIdToImage (\r
577 IN CONST EFI_HII_FONT_PROTOCOL *This,\r
578 IN EFI_HII_OUT_FLAGS Flags,\r
579 IN EFI_HII_HANDLE PackageList,\r
580 IN EFI_STRING_ID StringId,\r
581 IN CONST CHAR8* Language,\r
582 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,\r
583 IN OUT EFI_IMAGE_OUTPUT **Blt,\r
584 IN UINTN BltX,\r
585 IN UINTN BltY,\r
586 OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,\r
587 OUT UINTN *RowInfoArraySize OPTIONAL,\r
588 OUT UINTN *ColumnInfoArray OPTIONAL\r
589 )\r
590;\r
591\r
592\r
593/**\r
594 Convert the glyph for a single character into a bitmap.\r
595\r
596 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.\r
597 @param Char Character to retrieve.\r
598 @param StringInfo Points to the string font and color information\r
599 or NULL if the string should use the default\r
600 system font and color.\r
601 @param Blt Thus must point to a NULL on entry. A buffer will\r
602 be allocated to hold the output and the pointer\r
603 updated on exit. It is the caller's\r
604 responsibility to free this buffer.\r
605 @param Baseline Number of pixels from the bottom of the bitmap to\r
606 the baseline.\r
607\r
608 @retval EFI_SUCCESS Glyph bitmap created.\r
609 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.\r
610 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the\r
611 glyph for Unicode character 0xFFFD.\r
612 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.\r
613\r
614**/\r
615EFI_STATUS\r
616EFIAPI\r
617HiiGetGlyph (\r
618 IN CONST EFI_HII_FONT_PROTOCOL *This,\r
619 IN CHAR16 Char,\r
e90b081a 620 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,\r
ac644614 621 OUT EFI_IMAGE_OUTPUT **Blt,\r
622 OUT UINTN *Baseline OPTIONAL\r
623 )\r
624;\r
625\r
626\r
627/**\r
628 This function iterates through fonts which match the specified font, using\r
629 the specified criteria. If String is non-NULL, then all of the characters in\r
630 the string must exist in order for a candidate font to be returned.\r
631\r
632 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.\r
633 @param FontHandle On entry, points to the font handle returned by a\r
634 previous call to GetFontInfo() or NULL to start\r
635 with the first font. On return, points to the\r
636 returned font handle or points to NULL if there\r
637 are no more matching fonts.\r
638 @param StringInfoIn Upon entry, points to the font to return\r
813acf3a 639 information about. If NULL, then the information about the system default \r
640 font will be returned.\r
ac644614 641 @param StringInfoOut Upon return, contains the matching font's\r
642 information. If NULL, then no information is\r
643 returned. It's caller's responsibility to free\r
644 this buffer.\r
645 @param String Points to the string which will be tested to\r
646 determine if all characters are available. If\r
647 NULL, then any font is acceptable.\r
648\r
649 @retval EFI_SUCCESS Matching font returned successfully.\r
650 @retval EFI_NOT_FOUND No matching font was found.\r
651 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.\r
813acf3a 652 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.\r
ac644614 653 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the\r
654 request.\r
ac644614 655**/\r
656EFI_STATUS\r
657EFIAPI\r
658HiiGetFontInfo (\r
659 IN CONST EFI_HII_FONT_PROTOCOL *This,\r
660 IN OUT EFI_FONT_HANDLE *FontHandle,\r
e90b081a 661 IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL\r
ac644614 662 OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,\r
663 IN CONST EFI_STRING String OPTIONAL\r
664 )\r
665;\r
666\r
667//\r
668// EFI_HII_IMAGE_PROTOCOL interfaces\r
669//\r
670\r
671\r
672/**\r
673 This function adds the image Image to the group of images owned by PackageList, and returns\r
674 a new image identifier (ImageId).\r
675\r
676 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.\r
677 @param PackageList Handle of the package list where this image will\r
678 be added.\r
679 @param ImageId On return, contains the new image id, which is\r
680 unique within PackageList.\r
681 @param Image Points to the image.\r
682\r
683 @retval EFI_SUCCESS The new image was added successfully.\r
684 @retval EFI_NOT_FOUND The specified PackageList could not be found in\r
685 database.\r
686 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.\r
687 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.\r
688\r
689**/\r
690EFI_STATUS\r
691EFIAPI\r
692HiiNewImage (\r
693 IN CONST EFI_HII_IMAGE_PROTOCOL *This,\r
694 IN EFI_HII_HANDLE PackageList,\r
695 OUT EFI_IMAGE_ID *ImageId,\r
696 IN CONST EFI_IMAGE_INPUT *Image\r
697 )\r
698;\r
699\r
700\r
701/**\r
702 This function retrieves the image specified by ImageId which is associated with\r
703 the specified PackageList and copies it into the buffer specified by Image.\r
704\r
705 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.\r
706 @param PackageList Handle of the package list where this image will\r
707 be searched.\r
708 @param ImageId The image's id,, which is unique within\r
709 PackageList.\r
710 @param Image Points to the image.\r
ac644614 711\r
712 @retval EFI_SUCCESS The new image was returned successfully.\r
713 @retval EFI_NOT_FOUND The image specified by ImageId is not available.\r
813acf3a 714 The specified PackageList is not in the database.\r
ac644614 715 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to\r
716 hold the image.\r
717 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.\r
813acf3a 718 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not\r
719 enough memory.\r
ac644614 720\r
721**/\r
722EFI_STATUS\r
723EFIAPI\r
724HiiGetImage (\r
725 IN CONST EFI_HII_IMAGE_PROTOCOL *This,\r
726 IN EFI_HII_HANDLE PackageList,\r
727 IN EFI_IMAGE_ID ImageId,\r
813acf3a 728 OUT EFI_IMAGE_INPUT *Image\r
ac644614 729 )\r
730;\r
731\r
732\r
733/**\r
734 This function updates the image specified by ImageId in the specified PackageListHandle to\r
735 the image specified by Image.\r
736\r
737 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.\r
738 @param PackageList The package list containing the images.\r
739 @param ImageId The image's id,, which is unique within\r
740 PackageList.\r
741 @param Image Points to the image.\r
742\r
743 @retval EFI_SUCCESS The new image was updated successfully.\r
744 @retval EFI_NOT_FOUND The image specified by ImageId is not in the\r
813acf3a 745 database. The specified PackageList is not in the database.\r
ac644614 746 @retval EFI_INVALID_PARAMETER The Image was NULL.\r
747\r
748**/\r
749EFI_STATUS\r
750EFIAPI\r
751HiiSetImage (\r
752 IN CONST EFI_HII_IMAGE_PROTOCOL *This,\r
753 IN EFI_HII_HANDLE PackageList,\r
754 IN EFI_IMAGE_ID ImageId,\r
755 IN CONST EFI_IMAGE_INPUT *Image\r
756 )\r
757;\r
758\r
759\r
760/**\r
761 This function renders an image to a bitmap or the screen using the specified\r
762 color and options. It draws the image on an existing bitmap, allocates a new\r
763 bitmap or uses the screen. The images can be clipped.\r
764\r
765 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.\r
766 @param Flags Describes how the image is to be drawn.\r
767 @param Image Points to the image to be displayed.\r
768 @param Blt If this points to a non-NULL on entry, this\r
769 points to the image, which is Width pixels wide\r
770 and Height pixels high. The image will be drawn\r
771 onto this image and EFI_HII_DRAW_FLAG_CLIP is\r
772 implied. If this points to a NULL on entry, then\r
773 a buffer will be allocated to hold the generated\r
774 image and the pointer updated on exit. It is the\r
775 caller's responsibility to free this buffer.\r
e90b081a 776 @param BltX Specifies the offset from the left and top edge\r
777 of the output image of the first pixel in the\r
778 image.\r
ac644614 779 @param BltY Specifies the offset from the left and top edge\r
780 of the output image of the first pixel in the\r
781 image.\r
782\r
783 @retval EFI_SUCCESS The image was successfully drawn.\r
784 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.\r
785 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.\r
786 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.\r
787\r
788**/\r
789EFI_STATUS\r
790EFIAPI\r
791HiiDrawImage (\r
792 IN CONST EFI_HII_IMAGE_PROTOCOL *This,\r
793 IN EFI_HII_DRAW_FLAGS Flags,\r
794 IN CONST EFI_IMAGE_INPUT *Image,\r
795 IN OUT EFI_IMAGE_OUTPUT **Blt,\r
796 IN UINTN BltX,\r
797 IN UINTN BltY\r
798 )\r
799;\r
800\r
801\r
802/**\r
803 This function renders an image to a bitmap or the screen using the specified\r
804 color and options. It draws the image on an existing bitmap, allocates a new\r
805 bitmap or uses the screen. The images can be clipped.\r
806\r
807 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.\r
808 @param Flags Describes how the image is to be drawn.\r
809 @param PackageList The package list in the HII database to search\r
810 for the specified image.\r
811 @param ImageId The image's id, which is unique within\r
812 PackageList.\r
813 @param Blt If this points to a non-NULL on entry, this\r
814 points to the image, which is Width pixels wide\r
815 and Height pixels high. The image will be drawn\r
816 onto this image and\r
817 EFI_HII_DRAW_FLAG_CLIP is implied. If this points\r
818 to a NULL on entry, then a buffer will be\r
819 allocated to hold the generated image and the\r
820 pointer updated on exit. It is the caller's\r
821 responsibility to free this buffer.\r
e90b081a 822 @param BltX Specifies the offset from the left and top edge\r
823 of the output image of the first pixel in the\r
824 image.\r
ac644614 825 @param BltY Specifies the offset from the left and top edge\r
826 of the output image of the first pixel in the\r
827 image.\r
828\r
829 @retval EFI_SUCCESS The image was successfully drawn.\r
830 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.\r
813acf3a 831 @retval EFI_INVALID_PARAMETER The Blt was NULL.\r
832 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database. \r
833 The specified PackageList is not in the database.\r
ac644614 834\r
835**/\r
836EFI_STATUS\r
837EFIAPI\r
838HiiDrawImageId (\r
839 IN CONST EFI_HII_IMAGE_PROTOCOL *This,\r
840 IN EFI_HII_DRAW_FLAGS Flags,\r
841 IN EFI_HII_HANDLE PackageList,\r
842 IN EFI_IMAGE_ID ImageId,\r
843 IN OUT EFI_IMAGE_OUTPUT **Blt,\r
844 IN UINTN BltX,\r
845 IN UINTN BltY\r
846 )\r
847\r
848;\r
849\r
850//\r
851// EFI_HII_STRING_PROTOCOL\r
852//\r
853\r
854\r
855/**\r
856 This function adds the string String to the group of strings owned by PackageList, with the\r
857 specified font information StringFontInfo and returns a new string id.\r
858\r
859 @param This A pointer to the EFI_HII_STRING_PROTOCOL\r
860 instance.\r
861 @param PackageList Handle of the package list where this string will\r
862 be added.\r
863 @param StringId On return, contains the new strings id, which is\r
864 unique within PackageList.\r
865 @param Language Points to the language for the new string.\r
866 @param LanguageName Points to the printable language name to\r
867 associate with the passed in Language field.If\r
868 LanguageName is not NULL and the string package\r
869 header's LanguageName associated with a given\r
870 Language is not zero, the LanguageName being\r
871 passed in will be ignored.\r
872 @param String Points to the new null-terminated string.\r
873 @param StringFontInfo Points to the new string's font information or\r
874 NULL if the string should have the default system\r
875 font, size and style.\r
876\r
877 @retval EFI_SUCCESS The new string was added successfully.\r
878 @retval EFI_NOT_FOUND The specified PackageList could not be found in\r
879 database.\r
880 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of\r
881 resources.\r
882 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is\r
883 NULL.\r
884\r
885**/\r
886EFI_STATUS\r
887EFIAPI\r
888HiiNewString (\r
889 IN CONST EFI_HII_STRING_PROTOCOL *This,\r
890 IN EFI_HII_HANDLE PackageList,\r
891 OUT EFI_STRING_ID *StringId,\r
892 IN CONST CHAR8 *Language,\r
893 IN CONST CHAR16 *LanguageName, OPTIONAL\r
894 IN CONST EFI_STRING String,\r
895 IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL\r
896 )\r
897;\r
898\r
899\r
900/**\r
901 This function retrieves the string specified by StringId which is associated\r
902 with the specified PackageList in the language Language and copies it into\r
903 the buffer specified by String.\r
904\r
905 @param This A pointer to the EFI_HII_STRING_PROTOCOL\r
906 instance.\r
907 @param Language Points to the language for the retrieved string.\r
908 @param PackageList The package list in the HII database to search\r
909 for the specified string.\r
910 @param StringId The string's id, which is unique within\r
911 PackageList.\r
912 @param String Points to the new null-terminated string.\r
913 @param StringSize On entry, points to the size of the buffer\r
914 pointed to by String, in bytes. On return,\r
915 points to the length of the string, in bytes.\r
916 @param StringFontInfo If not NULL, points to the string's font\r
917 information. It's caller's responsibility to\r
918 free this buffer.\r
919\r
920 @retval EFI_SUCCESS The string was returned successfully.\r
921 @retval EFI_NOT_FOUND The string specified by StringId is not\r
922 available.\r
923 @retval EFI_NOT_FOUND The string specified by StringId is available but\r
813acf3a 924 not in the specified language.\r
925 The specified PackageList is not in the database.\r
926 @retval EFI_INVALID_LANGUAGE - The string specified by StringId is available but\r
ac644614 927 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small\r
928 to hold the string.\r
929 @retval EFI_INVALID_PARAMETER The String or Language or StringSize was NULL.\r
930 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the\r
931 request.\r
932\r
933**/\r
934EFI_STATUS\r
935EFIAPI\r
936HiiGetString (\r
937 IN CONST EFI_HII_STRING_PROTOCOL *This,\r
938 IN CONST CHAR8 *Language,\r
939 IN EFI_HII_HANDLE PackageList,\r
940 IN EFI_STRING_ID StringId,\r
941 OUT EFI_STRING String,\r
942 IN OUT UINTN *StringSize,\r
943 OUT EFI_FONT_INFO **StringFontInfo OPTIONAL\r
944 )\r
945;\r
946\r
947\r
948/**\r
949 This function updates the string specified by StringId in the specified PackageList to the text\r
950 specified by String and, optionally, the font information specified by StringFontInfo.\r
951\r
952 @param This A pointer to the EFI_HII_STRING_PROTOCOL\r
953 instance.\r
954 @param PackageList The package list containing the strings.\r
955 @param StringId The string's id, which is unique within\r
956 PackageList.\r
957 @param Language Points to the language for the updated string.\r
958 @param String Points to the new null-terminated string.\r
959 @param StringFontInfo Points to the string's font information or NULL\r
960 if the string font information is not changed.\r
961\r
962 @retval EFI_SUCCESS The string was updated successfully.\r
963 @retval EFI_NOT_FOUND The string specified by StringId is not in the\r
964 database.\r
965 @retval EFI_INVALID_PARAMETER The String or Language was NULL.\r
966 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the\r
967 task.\r
968\r
969**/\r
970EFI_STATUS\r
971EFIAPI\r
972HiiSetString (\r
973 IN CONST EFI_HII_STRING_PROTOCOL *This,\r
974 IN EFI_HII_HANDLE PackageList,\r
975 IN EFI_STRING_ID StringId,\r
976 IN CONST CHAR8 *Language,\r
977 IN CONST EFI_STRING String,\r
978 IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL\r
979 )\r
980;\r
981\r
982\r
983/**\r
984 This function returns the list of supported languages, in the format specified\r
985 in Appendix M of UEFI 2.1 spec.\r
986\r
987 @param This A pointer to the EFI_HII_STRING_PROTOCOL\r
988 instance.\r
989 @param PackageList The package list to examine.\r
990 @param Languages Points to the buffer to hold the returned string.\r
991 @param LanguagesSize On entry, points to the size of the buffer\r
992 pointed to by Languages, in bytes. On return,\r
993 points to the length of Languages, in bytes.\r
994\r
995 @retval EFI_SUCCESS The languages were returned successfully.\r
996 @retval EFI_INVALID_PARAMETER The Languages or LanguagesSize was NULL.\r
997 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list\r
998 of supported languages. LanguageSize is updated\r
999 to contain the required size.\r
1000 @retval EFI_NOT_FOUND Could not find string package in specified\r
1001 packagelist.\r
1002\r
1003**/\r
1004EFI_STATUS\r
1005EFIAPI\r
1006HiiGetLanguages (\r
1007 IN CONST EFI_HII_STRING_PROTOCOL *This,\r
1008 IN EFI_HII_HANDLE PackageList,\r
1009 IN OUT CHAR8 *Languages,\r
1010 IN OUT UINTN *LanguagesSize\r
1011 )\r
1012;\r
1013\r
1014\r
1015/**\r
1016 Each string package has associated with it a single primary language and zero\r
1017 or more secondary languages. This routine returns the secondary languages\r
1018 associated with a package list.\r
1019\r
1020 @param This A pointer to the EFI_HII_STRING_PROTOCOL\r
1021 instance.\r
1022 @param PackageList The package list to examine.\r
1023 @param FirstLanguage Points to the primary language.\r
1024 @param SecondaryLanguages Points to the buffer to hold the returned list of\r
1025 secondary languages for the specified\r
1026 FirstLanguage. If there are no secondary\r
1027 languages, the function returns successfully,\r
1028 but this is set to NULL.\r
e90b081a 1029 @param SecondaryLanguagesSize On entry, points to the size of the buffer\r
ac644614 1030 pointed to by SecondLanguages, in bytes. On\r
1031 return, points to the length of SecondLanguages\r
1032 in bytes.\r
1033\r
1034 @retval EFI_SUCCESS Secondary languages were correctly returned.\r
1035 @retval EFI_INVALID_PARAMETER FirstLanguage or SecondLanguages or\r
1036 SecondLanguagesSize was NULL.\r
1037 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondLanguagesSize is\r
1038 too small to hold the returned information.\r
1039 SecondLanguageSize is updated to hold the size of\r
1040 the buffer required.\r
813acf3a 1041 @retval EFI_INVALID_LANGUAGE The language specified by FirstLanguage is not\r
ac644614 1042 present in the specified package list.\r
813acf3a 1043 @retval EFI_NOT_FOUND The specified PackageList is not in the Database. \r
ac644614 1044\r
1045**/\r
1046EFI_STATUS\r
1047EFIAPI\r
1048HiiGetSecondaryLanguages (\r
1049 IN CONST EFI_HII_STRING_PROTOCOL *This,\r
1050 IN EFI_HII_HANDLE PackageList,\r
1051 IN CONST CHAR8 *FirstLanguage,\r
e90b081a 1052 IN OUT CHAR8 *SecondaryLanguages,\r
1053 IN OUT UINTN *SecondaryLanguagesSize\r
ac644614 1054 )\r
1055;\r
1056\r
1057//\r
1058// EFI_HII_DATABASE_PROTOCOL protocol interfaces\r
1059//\r
1060\r
1061\r
1062/**\r
1063 This function adds the packages in the package list to the database and returns a handle. If there is a\r
1064 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will\r
1065 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.\r
1066\r
1067 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1068 instance.\r
1069 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER\r
1070 structure.\r
1071 @param DriverHandle Associate the package list with this EFI handle.\r
1072 @param Handle A pointer to the EFI_HII_HANDLE instance.\r
1073\r
1074 @retval EFI_SUCCESS The package list associated with the Handle was\r
1075 added to the HII database.\r
1076 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the\r
1077 new database contents.\r
1078 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.\r
1079\r
1080**/\r
1081EFI_STATUS\r
1082EFIAPI\r
1083HiiNewPackageList (\r
1084 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1085 IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList,\r
1086 IN CONST EFI_HANDLE DriverHandle,\r
1087 OUT EFI_HII_HANDLE *Handle\r
1088 )\r
1089;\r
1090\r
1091\r
1092/**\r
1093 This function removes the package list that is associated with a handle Handle\r
1094 from the HII database. Before removing the package, any registered functions\r
1095 with the notification type REMOVE_PACK and the same package type will be called.\r
1096\r
1097 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1098 instance.\r
1099 @param Handle The handle that was registered to the data that\r
1100 is requested for removal.\r
1101\r
1102 @retval EFI_SUCCESS The data associated with the Handle was removed\r
1103 from the HII database.\r
813acf3a 1104 @retval EFI_NOT_FOUND The specified Handle is not in database.\r
ac644614 1105\r
1106**/\r
1107EFI_STATUS\r
1108EFIAPI\r
1109HiiRemovePackageList (\r
1110 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1111 IN EFI_HII_HANDLE Handle\r
1112 )\r
1113;\r
1114\r
1115\r
1116/**\r
1117 This function updates the existing package list (which has the specified Handle)\r
1118 in the HII databases, using the new package list specified by PackageList.\r
1119\r
1120 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1121 instance.\r
1122 @param Handle The handle that was registered to the data that\r
1123 is requested to be updated.\r
1124 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER\r
1125 package.\r
1126\r
1127 @retval EFI_SUCCESS The HII database was successfully updated.\r
1128 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated\r
1129 database.\r
813acf3a 1130 @retval EFI_INVALID_PARAMETER PackageList was NULL.\r
1131 @retval EFI_NOT_FOUND The specified Handle is not in database.\r
ac644614 1132\r
1133**/\r
1134EFI_STATUS\r
1135EFIAPI\r
1136HiiUpdatePackageList (\r
1137 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1138 IN EFI_HII_HANDLE Handle,\r
1139 IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList\r
1140 )\r
1141;\r
1142\r
1143\r
1144/**\r
1145 This function returns a list of the package handles of the specified type\r
1146 that are currently active in the database. The pseudo-type\r
1147 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.\r
1148\r
1149 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1150 instance.\r
1151 @param PackageType Specifies the package type of the packages to\r
1152 list or EFI_HII_PACKAGE_TYPE_ALL for all packages\r
1153 to be listed.\r
1154 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then\r
1155 this is the pointer to the GUID which must match\r
1156 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.\r
1157 Otherwise, it must be NULL.\r
1158 @param HandleBufferLength On input, a pointer to the length of the handle\r
1159 buffer. On output, the length of the handle\r
1160 buffer that is required for the handles found.\r
1161 @param Handle An array of EFI_HII_HANDLE instances returned.\r
1162\r
1163 @retval EFI_SUCCESS The matching handles are outputed successfully.\r
813acf3a 1164 HandleBufferLength is updated with the actual length.\r
ac644614 1165 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that\r
1166 Handle is too small to support the number of\r
1167 handles. HandleBufferLength is updated with a\r
1168 value that will enable the data to fit.\r
1169 @retval EFI_NOT_FOUND No matching handle could not be found in\r
1170 database.\r
1171 @retval EFI_INVALID_PARAMETER Handle or HandleBufferLength was NULL.\r
813acf3a 1172 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but\r
1173 PackageGuid is not NULL, PackageType is a EFI_HII_\r
1174 PACKAGE_TYPE_GUID but PackageGuid is NULL.\r
1175 \r
ac644614 1176\r
1177**/\r
1178EFI_STATUS\r
1179EFIAPI\r
1180HiiListPackageLists (\r
1181 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1182 IN UINT8 PackageType,\r
1183 IN CONST EFI_GUID *PackageGuid,\r
1184 IN OUT UINTN *HandleBufferLength,\r
1185 OUT EFI_HII_HANDLE *Handle\r
1186 )\r
1187;\r
1188\r
1189\r
1190/**\r
1191 This function will export one or all package lists in the database to a buffer.\r
1192 For each package list exported, this function will call functions registered\r
1193 with EXPORT_PACK and then copy the package list to the buffer.\r
1194\r
1195 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1196 instance.\r
1197 @param Handle An EFI_HII_HANDLE that corresponds to the desired\r
1198 package list in the HII database to export or\r
1199 NULL to indicate all package lists should be\r
1200 exported.\r
1201 @param BufferSize On input, a pointer to the length of the buffer.\r
1202 On output, the length of the buffer that is\r
1203 required for the exported data.\r
1204 @param Buffer A pointer to a buffer that will contain the\r
1205 results of the export function.\r
1206\r
1207 @retval EFI_SUCCESS Package exported.\r
1208 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that\r
1209 Handle is too small to support the number of\r
1210 handles. HandleBufferLength is updated with\r
1211 a value that will enable the data to fit.\r
1212 @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the\r
1213 current database.\r
1214 @retval EFI_INVALID_PARAMETER Handle or Buffer or BufferSize was NULL.\r
1215\r
1216**/\r
1217EFI_STATUS\r
1218EFIAPI\r
1219HiiExportPackageLists (\r
1220 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1221 IN EFI_HII_HANDLE Handle,\r
1222 IN OUT UINTN *BufferSize,\r
1223 OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer\r
1224 )\r
1225;\r
1226\r
1227\r
1228/**\r
1229 This function registers a function which will be called when specified actions related to packages of\r
1230 the specified type occur in the HII database. By registering a function, other HII-related drivers are\r
1231 notified when specific package types are added, removed or updated in the HII database.\r
1232 Each driver or application which registers a notification should use\r
1233 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.\r
1234\r
1235 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1236 instance.\r
1237 @param PackageType Specifies the package type of the packages to\r
1238 list or EFI_HII_PACKAGE_TYPE_ALL for all packages\r
1239 to be listed.\r
1240 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then\r
1241 this is the pointer to the GUID which must match\r
1242 the Guid field of\r
1243 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must\r
1244 be NULL.\r
1245 @param PackageNotifyFn Points to the function to be called when the\r
1246 event specified by\r
1247 NotificationType occurs.\r
1248 @param NotifyType Describes the types of notification which this\r
1249 function will be receiving.\r
1250 @param NotifyHandle Points to the unique handle assigned to the\r
1251 registered notification. Can be used in\r
1252 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()\r
1253 to stop notifications.\r
1254\r
1255 @retval EFI_SUCCESS Notification registered successfully.\r
1256 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures\r
1257 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.\r
1258 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not\r
1259 EFI_HII_PACKAGE_TYPE_GUID.\r
1260 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is\r
1261 EFI_HII_PACKAGE_TYPE_GUID.\r
1262\r
1263**/\r
1264EFI_STATUS\r
1265EFIAPI\r
1266HiiRegisterPackageNotify (\r
1267 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1268 IN UINT8 PackageType,\r
1269 IN CONST EFI_GUID *PackageGuid,\r
1270 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn,\r
1271 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,\r
1272 OUT EFI_HANDLE *NotifyHandle\r
1273 )\r
1274;\r
1275\r
1276\r
1277/**\r
1278 Removes the specified HII database package-related notification.\r
1279\r
1280 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1281 instance.\r
e90b081a 1282 @param NotificationHandle The handle of the notification function being\r
ac644614 1283 unregistered.\r
1284\r
1285 @retval EFI_SUCCESS Notification is unregistered successfully.\r
813acf3a 1286 @retval EFI_NOT_FOUND The incoming notification handle does not exist \r
1287 in current hii database.\r
ac644614 1288\r
1289**/\r
1290EFI_STATUS\r
1291EFIAPI\r
1292HiiUnregisterPackageNotify (\r
1293 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1294 IN EFI_HANDLE NotificationHandle\r
1295 )\r
1296;\r
1297\r
1298\r
1299/**\r
1300 This routine retrieves an array of GUID values for each keyboard layout that\r
1301 was previously registered in the system.\r
1302\r
1303 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1304 instance.\r
1305 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard\r
1306 GUID buffer. On output, the length of the handle\r
1307 buffer that is required for the handles found.\r
1308 @param KeyGuidBuffer An array of keyboard layout GUID instances\r
1309 returned.\r
1310\r
1311 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.\r
1312 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates\r
1313 that KeyGuidBuffer is too small to support the\r
1314 number of GUIDs. KeyGuidBufferLength is\r
1315 updated with a value that will enable the data to\r
1316 fit.\r
1317 @retval EFI_INVALID_PARAMETER The KeyGuidBuffer or KeyGuidBufferLength was\r
1318 NULL.\r
1319 @retval EFI_NOT_FOUND There was no keyboard layout.\r
1320\r
1321**/\r
1322EFI_STATUS\r
1323EFIAPI\r
1324HiiFindKeyboardLayouts (\r
1325 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1326 IN OUT UINT16 *KeyGuidBufferLength,\r
1327 OUT EFI_GUID *KeyGuidBuffer\r
1328 )\r
1329;\r
1330\r
1331\r
1332/**\r
1333 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys\r
1334 on a keyboard and the character(s) that are associated with a particular set of key strokes.\r
1335\r
1336 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1337 instance.\r
1338 @param KeyGuid A pointer to the unique ID associated with a\r
1339 given keyboard layout. If KeyGuid is NULL then\r
1340 the current layout will be retrieved.\r
1341 @param KeyboardLayoutLength On input, a pointer to the length of the\r
1342 KeyboardLayout buffer. On output, the length of\r
1343 the data placed into KeyboardLayout.\r
1344 @param KeyboardLayout A pointer to a buffer containing the retrieved\r
1345 keyboard layout.\r
1346\r
1347 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.\r
1348 @retval EFI_NOT_FOUND The requested keyboard layout was not found.\r
1349 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was\r
1350 NULL.\r
1351\r
1352**/\r
1353EFI_STATUS\r
1354EFIAPI\r
1355HiiGetKeyboardLayout (\r
1356 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1357 IN CONST EFI_GUID *KeyGuid,\r
1358 IN OUT UINT16 *KeyboardLayoutLength,\r
1359 OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout\r
1360 )\r
1361;\r
1362\r
1363\r
1364/**\r
1365 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine\r
1366 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID\r
1367 group type. This is so that agents which are sensitive to the current keyboard layout being changed\r
1368 can be notified of this change.\r
1369\r
1370 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1371 instance.\r
1372 @param KeyGuid A pointer to the unique ID associated with a\r
1373 given keyboard layout.\r
1374\r
1375 @retval EFI_SUCCESS The current keyboard layout was successfully set.\r
1376 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so\r
1377 action was taken.\r
1378 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.\r
1379\r
1380**/\r
1381EFI_STATUS\r
1382EFIAPI\r
1383HiiSetKeyboardLayout (\r
1384 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1385 IN CONST EFI_GUID *KeyGuid\r
1386 )\r
1387;\r
1388\r
1389\r
1390/**\r
1391 Return the EFI handle associated with a package list.\r
1392\r
1393 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r
1394 instance.\r
1395 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired\r
1396 package list in the HIIdatabase.\r
1397 @param DriverHandle On return, contains the EFI_HANDLE which was\r
1398 registered with the package list in\r
1399 NewPackageList().\r
1400\r
1401 @retval EFI_SUCCESS The DriverHandle was returned successfully.\r
1402 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or\r
1403 DriverHandle was NULL.\r
1404\r
1405**/\r
1406EFI_STATUS\r
1407EFIAPI\r
1408HiiGetPackageListHandle (\r
1409 IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r
1410 IN EFI_HII_HANDLE PackageListHandle,\r
1411 OUT EFI_HANDLE *DriverHandle\r
1412 )\r
1413;\r
1414\r
1415//\r
1416// EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces\r
1417//\r
1418\r
1419\r
1420/**\r
1421 This function allows a caller to extract the current configuration\r
1422 for one or more named elements from one or more drivers.\r
1423\r
1424 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r
1425 instance.\r
1426 @param Request A null-terminated Unicode string in\r
1427 <MultiConfigRequest> format.\r
1428 @param Progress On return, points to a character in the Request\r
1429 string. Points to the string's null terminator if\r
1430 request was successful. Points to the most recent\r
1431 & before the first failing name / value pair (or\r
1432 the beginning of the string if the failure is in\r
1433 the first name / value pair) if the request was\r
1434 not successful.\r
1435 @param Results Null-terminated Unicode string in\r
1436 <MultiConfigAltResp> format which has all values\r
1437 filled in for the names in the Request string.\r
1438 String to be allocated by the called function.\r
1439\r
1440 @retval EFI_SUCCESS The Results string is filled with the values\r
1441 corresponding to all requested names.\r
1442 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the\r
1443 results that must be stored awaiting possible\r
1444 future protocols.\r
1445 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.\r
1446 Progress set to the "G" in "GUID" of the\r
1447 routing header that doesn't match. Note: There\r
1448 is no requirement that all routing data\r
1449 be validated before any configuration extraction.\r
1450 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request\r
1451 parameter would result in this type of error. The\r
1452 Progress parameter is set to NULL.\r
1453 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &\r
1454 before the error or the beginning of the string.\r
1455 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the\r
1456 name in question.\r
1457\r
1458**/\r
1459EFI_STATUS\r
1460EFIAPI\r
1461HiiConfigRoutingExtractConfig (\r
1462 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r
1463 IN CONST EFI_STRING Request,\r
1464 OUT EFI_STRING *Progress,\r
1465 OUT EFI_STRING *Results\r
1466 )\r
1467;\r
1468\r
1469\r
1470/**\r
1471 This function allows the caller to request the current configuration for the\r
1472 entirety of the current HII database and returns the data in a null-terminated Unicode string.\r
1473\r
1474 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r
1475 instance.\r
1476 @param Results Null-terminated Unicode string in\r
1477 <MultiConfigAltResp> format which has all values\r
1478 filled in for the names in the Request string.\r
1479 String to be allocated by the called function.\r
1480 De-allocation is up to the caller.\r
1481\r
1482 @retval EFI_SUCCESS The Results string is filled with the values\r
1483 corresponding to all requested names.\r
1484 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the\r
1485 results that must be stored awaiting possible\r
1486 future protocols.\r
1487 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results\r
1488 parameter would result in this type of error.\r
1489\r
1490**/\r
1491EFI_STATUS\r
1492EFIAPI\r
1493HiiConfigRoutingExportConfig (\r
1494 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r
1495 OUT EFI_STRING *Results\r
1496 )\r
1497;\r
1498\r
1499\r
1500/**\r
1501 This function processes the results of processing forms and routes it to the\r
1502 appropriate handlers or storage.\r
1503\r
1504 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r
1505 instance.\r
1506 @param Configuration A null-terminated Unicode string in\r
1507 <MulltiConfigResp> format.\r
1508 @param Progress A pointer to a string filled in with the offset\r
1509 of the most recent & before the first failing\r
1510 name / value pair (or the beginning of the string\r
1511 if the failure is in the first name / value pair)\r
1512 or the terminating NULL if all was successful.\r
1513\r
1514 @retval EFI_SUCCESS The results have been distributed or are awaiting\r
1515 distribution.\r
1516 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the\r
1517 results that must be stored awaiting possible\r
1518 future protocols.\r
1519 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter\r
1520 would result in this type of error.\r
1521 @retval EFI_NOT_FOUND Target for the specified routing data was not\r
1522 found.\r
1523\r
1524**/\r
1525EFI_STATUS\r
1526EFIAPI\r
813acf3a 1527HiiConfigRoutingRouteConfig (\r
ac644614 1528 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r
1529 IN CONST EFI_STRING Configuration,\r
1530 OUT EFI_STRING *Progress\r
1531 )\r
1532;\r
1533\r
1534\r
1535\r
1536/**\r
1537 This helper function is to be called by drivers to map configuration data stored\r
1538 in byte array ("block") formats such as UEFI Variables into current configuration strings.\r
1539\r
1540 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r
1541 instance.\r
1542 @param ConfigRequest A null-terminated Unicode string in\r
1543 <ConfigRequest> format.\r
1544 @param Block Array of bytes defining the block's\r
1545 configuration.\r
1546 @param BlockSize Length in bytes of Block.\r
1547 @param Config Filled-in configuration string. String allocated\r
1548 by the function. Returned only if call is\r
1549 successful.\r
1550 @param Progress A pointer to a string filled in with the offset\r
1551 of the most recent & before the first failing\r
1552 name/value pair (or the beginning of the string\r
1553 if the failure is in the first name / value pair)\r
1554 or the terminating NULL if all was successful.\r
1555\r
1556 @retval EFI_SUCCESS The request succeeded. Progress points to the\r
1557 null terminator at the end of the ConfigRequest\r
1558 string.\r
1559 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.\r
1560 Progress points to the first character of\r
1561 ConfigRequest.\r
1562 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or\r
1563 Block parameter would result in this type of\r
1564 error. Progress points to the first character of\r
1565 ConfigRequest.\r
1566 @retval EFI_NOT_FOUND Target for the specified routing data was not\r
1567 found. Progress points to the "G" in "GUID" of\r
1568 the errant routing data.\r
1569 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.\r
1570 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.\r
1571 Block is left updated and Progress points at\r
1572 the '&' preceding the first non-<BlockName>.\r
1573\r
1574**/\r
1575EFI_STATUS\r
1576EFIAPI\r
1577HiiBlockToConfig (\r
1578 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r
1579 IN CONST EFI_STRING ConfigRequest,\r
1580 IN CONST UINT8 *Block,\r
1581 IN CONST UINTN BlockSize,\r
1582 OUT EFI_STRING *Config,\r
1583 OUT EFI_STRING *Progress\r
1584 )\r
1585;\r
1586\r
1587\r
1588/**\r
1589 This helper function is to be called by drivers to map configuration strings\r
1590 to configurations stored in byte array ("block") formats such as UEFI Variables.\r
1591\r
1592 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r
1593 instance.\r
1594 @param ConfigResp A null-terminated Unicode string in <ConfigResp>\r
1595 format.\r
1596 @param Block A possibly null array of bytes representing the\r
1597 current block. Only bytes referenced in the\r
1598 ConfigResp string in the block are modified. If\r
1599 this parameter is null or if the *BlockSize\r
1600 parameter is (on input) shorter than required by\r
1601 the Configuration string, only the BlockSize\r
1602 parameter is updated and an appropriate status\r
1603 (see below) is returned.\r
1604 @param BlockSize The length of the Block in units of UINT8. On\r
1605 input, this is the size of the Block. On output,\r
1606 if successful, contains the index of the last\r
1607 modified byte in the Block.\r
1608 @param Progress On return, points to an element of the ConfigResp\r
1609 string filled in with the offset of the most\r
1610 recent '&' before the first failing name / value\r
1611 pair (or the beginning of the string if the\r
1612 failure is in the first name / value pair) or\r
1613 the terminating NULL if all was successful.\r
1614\r
1615 @retval EFI_SUCCESS The request succeeded. Progress points to the\r
1616 null terminator at the end of the ConfigResp\r
1617 string.\r
1618 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.\r
1619 Progress points to the first character of\r
1620 ConfigResp.\r
1621 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or\r
1622 Block parameter would result in this type of\r
1623 error. Progress points to the first character of\r
1624 ConfigResp.\r
1625 @retval EFI_NOT_FOUND Target for the specified routing data was not\r
1626 found. Progress points to the "G" in "GUID" of\r
1627 the errant routing data.\r
1628 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /\r
1629 value pair. Block is left updated and\r
1630 Progress points at the '&' preceding the first\r
1631 non-<BlockName>.\r
1632\r
1633**/\r
1634EFI_STATUS\r
1635EFIAPI\r
1636HiiConfigToBlock (\r
1637 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r
1638 IN CONST EFI_STRING ConfigResp,\r
1639 IN OUT UINT8 *Block,\r
1640 IN OUT UINTN *BlockSize,\r
1641 OUT EFI_STRING *Progress\r
1642 )\r
1643;\r
1644\r
1645\r
1646/**\r
1647 This helper function is to be called by drivers to extract portions of\r
1648 a larger configuration string.\r
1649\r
1650 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r
1651 instance.\r
1652 @param Configuration A null-terminated Unicode string in\r
1653 <MultiConfigAltResp> format.\r
1654 @param Guid A pointer to the GUID value to search for in the\r
1655 routing portion of the ConfigResp string when\r
1656 retrieving the requested data. If Guid is NULL,\r
1657 then all GUID values will be searched for.\r
1658 @param Name A pointer to the NAME value to search for in the\r
1659 routing portion of the ConfigResp string when\r
1660 retrieving the requested data. If Name is NULL,\r
1661 then all Name values will be searched for.\r
1662 @param DevicePath A pointer to the PATH value to search for in the\r
1663 routing portion of the ConfigResp string when\r
1664 retrieving the requested data. If DevicePath is\r
1665 NULL, then all DevicePath values will be\r
1666 searched for.\r
1667 @param AltCfgId A pointer to the ALTCFG value to search for in\r
1668 the routing portion of the ConfigResp string\r
1669 when retrieving the requested data. If this\r
1670 parameter is NULL, then the current setting will\r
1671 be retrieved.\r
1672 @param AltCfgResp A pointer to a buffer which will be allocated by\r
1673 the function which contains the retrieved string\r
1674 as requested. This buffer is only allocated if\r
1675 the call was successful.\r
1676\r
1677 @retval EFI_SUCCESS The request succeeded. The requested data was\r
1678 extracted and placed in the newly allocated\r
1679 AltCfgResp buffer.\r
1680 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.\r
1681 @retval EFI_INVALID_PARAMETER Any parameter is invalid.\r
1682 @retval EFI_NOT_FOUND Target for the specified routing data was not\r
1683 found.\r
1684\r
1685**/\r
1686EFI_STATUS\r
1687EFIAPI\r
1688HiiGetAltCfg (\r
1689 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r
1690 IN CONST EFI_STRING Configuration,\r
1691 IN CONST EFI_GUID *Guid,\r
1692 IN CONST EFI_STRING Name,\r
1693 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
1694 IN CONST UINT16 *AltCfgId,\r
1695 OUT EFI_STRING *AltCfgResp\r
1696 )\r
1697;\r
1698\r
1699\r
1700//\r
1701// Global variables\r
1702//\r
1703extern EFI_EVENT gHiiKeyboardLayoutChanged;\r
1704\r
1705#include "R8Lib.h"\r
1706\r
1707#endif\r