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