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