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