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