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