]>
Commit | Line | Data |
---|---|---|
7936fb6a | 1 | /** @file\r |
2 | Private MACRO, structure and function definitions for Setup Browser module. \r | |
3 | \r | |
4 | Copyright (c) 2007, Intel Corporation\r | |
5 | All rights reserved. This program and the accompanying materials\r | |
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 | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef _SETUP_H_\r | |
17 | #define _SETUP_H_\r | |
18 | \r | |
19 | \r | |
20 | #include <PiDxe.h>\r | |
21 | \r | |
22 | #include <Protocol/Print.h>\r | |
23 | #include <Protocol/SimpleTextOut.h>\r | |
24 | #include <Protocol/SimpleTextIn.h>\r | |
25 | #include <Protocol/FormBrowser2.h>\r | |
26 | #include <Protocol/DevicePath.h>\r | |
27 | #include <Protocol/UnicodeCollation.h>\r | |
28 | #include <Protocol/HiiConfigAccess.h>\r | |
29 | #include <Protocol/HiiConfigRouting.h>\r | |
30 | #include <Protocol/HiiDatabase.h>\r | |
31 | #include <Protocol/HiiString.h>\r | |
32 | \r | |
33 | #include <MdeModuleHii.h>\r | |
34 | \r | |
35 | #include <Library/GraphicsLib.h>\r | |
36 | #include <Library/PrintLib.h>\r | |
37 | #include <Library/DebugLib.h>\r | |
38 | #include <Library/BaseMemoryLib.h>\r | |
39 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
40 | #include <Library/UefiDriverEntryPoint.h>\r | |
41 | #include <Library/UefiBootServicesTableLib.h>\r | |
42 | #include <Library/BaseLib.h>\r | |
43 | #include <Library/MemoryAllocationLib.h>\r | |
44 | #include <Library/IfrSupportLib.h>\r | |
45 | #include <Library/ExtendedIfrSupportLib.h>\r | |
46 | #include <Library/HiiLib.h>\r | |
47 | #include <Library/ExtendedHiiLib.h>\r | |
48 | \r | |
49 | #include "Colors.h"\r | |
50 | \r | |
51 | //\r | |
52 | // This is the generated header file which includes whatever needs to be exported (strings + IFR)\r | |
53 | //\r | |
54 | \r | |
55 | extern UINT8 SetupBrowserStrings[];\r | |
56 | \r | |
57 | //\r | |
58 | // Screen definitions\r | |
59 | //\r | |
60 | #define BANNER_HEIGHT 6\r | |
61 | #define BANNER_COLUMNS 3\r | |
62 | \r | |
63 | #define FRONT_PAGE_HEADER_HEIGHT 6\r | |
64 | #define NONE_FRONT_PAGE_HEADER_HEIGHT 3\r | |
65 | #define LEFT_SKIPPED_COLUMNS 4\r | |
66 | #define FOOTER_HEIGHT 4\r | |
67 | #define STATUS_BAR_HEIGHT 1\r | |
68 | #define SCROLL_ARROW_HEIGHT 1\r | |
69 | #define POPUP_PAD_SPACE_COUNT 5\r | |
70 | #define POPUP_FRAME_WIDTH 2\r | |
71 | \r | |
72 | //\r | |
73 | // Definition for function key setting\r | |
74 | //\r | |
75 | #define NONE_FUNCTION_KEY_SETTING 0\r | |
76 | #define DEFAULT_FUNCTION_KEY_SETTING (FUNCTION_ONE | FUNCTION_TWO | FUNCTION_NINE | FUNCTION_TEN)\r | |
77 | \r | |
78 | #define FUNCTION_ONE (1 << 0)\r | |
79 | #define FUNCTION_TWO (1 << 1)\r | |
80 | #define FUNCTION_NINE (1 << 2)\r | |
81 | #define FUNCTION_TEN (1 << 3)\r | |
82 | \r | |
83 | typedef struct {\r | |
84 | EFI_GUID FormSetGuid;\r | |
85 | UINTN KeySetting;\r | |
86 | } FUNCTIION_KEY_SETTING;\r | |
87 | \r | |
88 | //\r | |
89 | // Character definitions\r | |
90 | //\r | |
91 | #define CHAR_SPACE 0x0020\r | |
92 | #define UPPER_LOWER_CASE_OFFSET 0x20\r | |
93 | \r | |
94 | //\r | |
95 | // Time definitions\r | |
96 | //\r | |
97 | #define ONE_SECOND 10000000\r | |
98 | \r | |
99 | //\r | |
100 | // Display definitions\r | |
101 | //\r | |
102 | #define LEFT_HYPER_DELIMITER L'<'\r | |
103 | #define RIGHT_HYPER_DELIMITER L'>'\r | |
104 | \r | |
105 | #define LEFT_ONEOF_DELIMITER L'<'\r | |
106 | #define RIGHT_ONEOF_DELIMITER L'>'\r | |
107 | \r | |
108 | #define LEFT_NUMERIC_DELIMITER L'['\r | |
109 | #define RIGHT_NUMERIC_DELIMITER L']'\r | |
110 | \r | |
111 | #define LEFT_CHECKBOX_DELIMITER L'['\r | |
112 | #define RIGHT_CHECKBOX_DELIMITER L']'\r | |
113 | \r | |
114 | #define CHECK_ON L'X'\r | |
115 | #define CHECK_OFF L' '\r | |
116 | \r | |
117 | #define TIME_SEPARATOR L':'\r | |
118 | #define DATE_SEPARATOR L'/'\r | |
119 | \r | |
120 | #define YES_ANSWER L'Y'\r | |
121 | #define NO_ANSWER L'N'\r | |
122 | \r | |
123 | //\r | |
124 | // This is the Input Error Message\r | |
125 | //\r | |
126 | #define INPUT_ERROR 1\r | |
127 | \r | |
128 | //\r | |
129 | // This is the NV RAM update required Message\r | |
130 | //\r | |
131 | #define NV_UPDATE_REQUIRED 2\r | |
132 | \r | |
133 | //\r | |
134 | // Refresh the Status Bar with flags\r | |
135 | //\r | |
136 | #define REFRESH_STATUS_BAR 0xff\r | |
137 | \r | |
138 | //\r | |
139 | // Incremental string lenght of ConfigRequest\r | |
140 | //\r | |
141 | #define CONFIG_REQUEST_STRING_INCREMENTAL 1024\r | |
142 | \r | |
143 | //\r | |
144 | // HII value compare result\r | |
145 | //\r | |
146 | #define HII_VALUE_UNDEFINED 0\r | |
147 | #define HII_VALUE_EQUAL 1\r | |
148 | #define HII_VALUE_LESS_THAN 2\r | |
149 | #define HII_VALUE_GREATER_THAN 3\r | |
150 | \r | |
151 | //\r | |
152 | // Incremental size of stack for expression\r | |
153 | //\r | |
154 | #define EXPRESSION_STACK_SIZE_INCREMENT 0x100\r | |
155 | \r | |
156 | \r | |
157 | #define EFI_SPECIFICATION_ERRATA_VERSION 0\r | |
158 | \r | |
159 | #define EFI_IFR_SPECIFICATION_VERSION \\r | |
160 | ((((EFI_SPECIFICATION_VERSION) >> 8) & 0xff00) | \\r | |
161 | (((EFI_SPECIFICATION_VERSION) & 0xf) << 4) | \\r | |
162 | ((EFI_SPECIFICATION_ERRATA_VERSION) & 0xf))\r | |
163 | \r | |
164 | #define SETUP_DRIVER_SIGNATURE EFI_SIGNATURE_32 ('F', 'B', 'D', 'V')\r | |
165 | typedef struct {\r | |
166 | UINT32 Signature;\r | |
167 | \r | |
168 | EFI_HANDLE Handle;\r | |
169 | \r | |
170 | //\r | |
171 | // Produced protocol\r | |
172 | //\r | |
173 | EFI_FORM_BROWSER2_PROTOCOL FormBrowser2;\r | |
174 | EFI_PRINT_PROTOCOL Print;\r | |
175 | \r | |
176 | } SETUP_DRIVER_PRIVATE_DATA;\r | |
177 | \r | |
178 | typedef struct {\r | |
179 | EFI_STRING_ID Banner[BANNER_HEIGHT][BANNER_COLUMNS];\r | |
180 | } BANNER_DATA;\r | |
181 | \r | |
182 | //\r | |
183 | // IFR relative definition\r | |
184 | //\r | |
185 | #define EFI_HII_EXPRESSION_INCONSISTENT_IF 0\r | |
186 | #define EFI_HII_EXPRESSION_NO_SUBMIT_IF 1\r | |
187 | #define EFI_HII_EXPRESSION_GRAY_OUT_IF 2\r | |
188 | #define EFI_HII_EXPRESSION_SUPPRESS_IF 3\r | |
189 | #define EFI_HII_EXPRESSION_DISABLE_IF 4\r | |
190 | #define EFI_HII_EXPRESSION_VALUE 5\r | |
191 | #define EFI_HII_EXPRESSION_RULE 6\r | |
192 | \r | |
193 | #define EFI_HII_VARSTORE_BUFFER 0\r | |
194 | #define EFI_HII_VARSTORE_NAME_VALUE 1\r | |
195 | #define EFI_HII_VARSTORE_EFI_VARIABLE 2\r | |
196 | \r | |
197 | #define FORM_INCONSISTENT_VALIDATION 0\r | |
198 | #define FORM_NO_SUBMIT_VALIDATION 1\r | |
199 | \r | |
200 | typedef struct {\r | |
201 | UINT8 Type;\r | |
202 | EFI_IFR_TYPE_VALUE Value;\r | |
203 | } EFI_HII_VALUE;\r | |
204 | \r | |
205 | #define NAME_VALUE_NODE_SIGNATURE EFI_SIGNATURE_32 ('N', 'V', 'S', 'T')\r | |
206 | \r | |
207 | typedef struct {\r | |
208 | UINTN Signature;\r | |
209 | LIST_ENTRY Link;\r | |
210 | CHAR16 *Name;\r | |
211 | CHAR16 *Value;\r | |
212 | CHAR16 *EditValue;\r | |
213 | } NAME_VALUE_NODE;\r | |
214 | \r | |
215 | #define NAME_VALUE_NODE_FROM_LINK(a) CR (a, NAME_VALUE_NODE, Link, NAME_VALUE_NODE_SIGNATURE)\r | |
216 | \r | |
217 | #define FORMSET_STORAGE_SIGNATURE EFI_SIGNATURE_32 ('F', 'S', 'T', 'G')\r | |
218 | \r | |
219 | typedef struct {\r | |
220 | UINTN Signature;\r | |
221 | LIST_ENTRY Link;\r | |
222 | \r | |
223 | UINT8 Type; // Storage type\r | |
224 | \r | |
225 | UINT16 VarStoreId;\r | |
226 | EFI_GUID Guid;\r | |
227 | \r | |
228 | CHAR16 *Name; // For EFI_IFR_VARSTORE\r | |
229 | UINT16 Size;\r | |
230 | UINT8 *Buffer;\r | |
231 | UINT8 *EditBuffer; // Edit copy for Buffer Storage\r | |
232 | \r | |
233 | LIST_ENTRY NameValueListHead; // List of NAME_VALUE_NODE\r | |
234 | \r | |
235 | UINT32 Attributes; // For EFI_IFR_VARSTORE_EFI: EFI Variable attribute\r | |
236 | \r | |
237 | CHAR16 *ConfigHdr; // <ConfigHdr>\r | |
238 | CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r | |
239 | UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>\r | |
240 | UINTN SpareStrLen; // Spare length of ConfigRequest string buffer\r | |
241 | } FORMSET_STORAGE;\r | |
242 | \r | |
243 | #define FORMSET_STORAGE_FROM_LINK(a) CR (a, FORMSET_STORAGE, Link, FORMSET_STORAGE_SIGNATURE)\r | |
244 | \r | |
245 | #define EXPRESSION_OPCODE_SIGNATURE EFI_SIGNATURE_32 ('E', 'X', 'O', 'P')\r | |
246 | \r | |
247 | typedef struct {\r | |
248 | UINTN Signature;\r | |
249 | LIST_ENTRY Link;\r | |
250 | \r | |
251 | UINT8 Operand;\r | |
252 | \r | |
253 | UINT8 Format; // For EFI_IFR_TO_STRING, EFI_IFR_FIND\r | |
254 | UINT8 Flags; // For EFI_IFR_SPAN\r | |
255 | UINT8 RuleId; // For EFI_IFR_RULE_REF\r | |
256 | \r | |
257 | EFI_HII_VALUE Value; // For EFI_IFR_EQ_ID_VAL, EFI_IFR_UINT64, EFI_IFR_UINT32, EFI_IFR_UINT16, EFI_IFR_UINT8, EFI_IFR_STRING_REF1\r | |
258 | \r | |
259 | EFI_QUESTION_ID QuestionId; // For EFI_IFR_EQ_ID_ID, EFI_IFR_EQ_ID_LIST, EFI_IFR_QUESTION_REF1\r | |
260 | EFI_QUESTION_ID QuestionId2;\r | |
261 | \r | |
262 | UINT16 ListLength; // For EFI_IFR_EQ_ID_LIST\r | |
263 | UINT16 *ValueList;\r | |
264 | \r | |
265 | EFI_STRING_ID DevicePath; // For EFI_IFR_QUESTION_REF3_2, EFI_IFR_QUESTION_REF3_3\r | |
266 | EFI_GUID Guid;\r | |
267 | } EXPRESSION_OPCODE;\r | |
268 | \r | |
269 | #define EXPRESSION_OPCODE_FROM_LINK(a) CR (a, EXPRESSION_OPCODE, Link, EXPRESSION_OPCODE_SIGNATURE)\r | |
270 | \r | |
271 | #define FORM_EXPRESSION_SIGNATURE EFI_SIGNATURE_32 ('F', 'E', 'X', 'P')\r | |
272 | \r | |
273 | typedef struct {\r | |
274 | UINTN Signature;\r | |
275 | LIST_ENTRY Link;\r | |
276 | \r | |
277 | UINT8 Type; // Type for this expression\r | |
278 | \r | |
279 | UINT8 RuleId; // For EFI_IFR_RULE only\r | |
280 | EFI_STRING_ID Error; // For EFI_IFR_NO_SUBMIT_IF, EFI_IFR_INCONSISTENT_IF only\r | |
281 | \r | |
282 | EFI_HII_VALUE Result; // Expression evaluation result\r | |
283 | \r | |
284 | LIST_ENTRY OpCodeListHead; // OpCodes consist of this expression (EXPRESSION_OPCODE)\r | |
285 | } FORM_EXPRESSION;\r | |
286 | \r | |
287 | #define FORM_EXPRESSION_FROM_LINK(a) CR (a, FORM_EXPRESSION, Link, FORM_EXPRESSION_SIGNATURE)\r | |
288 | \r | |
289 | #define QUESTION_DEFAULT_SIGNATURE EFI_SIGNATURE_32 ('Q', 'D', 'F', 'T')\r | |
290 | \r | |
291 | typedef struct {\r | |
292 | UINTN Signature;\r | |
293 | LIST_ENTRY Link;\r | |
294 | \r | |
295 | UINT16 DefaultId;\r | |
296 | EFI_HII_VALUE Value; // Default value\r | |
297 | \r | |
298 | FORM_EXPRESSION *ValueExpression; // Not-NULL indicates default value is provided by EFI_IFR_VALUE\r | |
299 | } QUESTION_DEFAULT;\r | |
300 | \r | |
301 | #define QUESTION_DEFAULT_FROM_LINK(a) CR (a, QUESTION_DEFAULT, Link, QUESTION_DEFAULT_SIGNATURE)\r | |
302 | \r | |
303 | #define QUESTION_OPTION_SIGNATURE EFI_SIGNATURE_32 ('Q', 'O', 'P', 'T')\r | |
304 | \r | |
305 | typedef struct {\r | |
306 | UINTN Signature;\r | |
307 | LIST_ENTRY Link;\r | |
308 | \r | |
309 | EFI_STRING_ID Text;\r | |
310 | UINT8 Flags;\r | |
311 | EFI_HII_VALUE Value;\r | |
312 | EFI_IMAGE_ID ImageId;\r | |
313 | \r | |
314 | FORM_EXPRESSION *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf\r | |
315 | } QUESTION_OPTION;\r | |
316 | \r | |
317 | #define QUESTION_OPTION_FROM_LINK(a) CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)\r | |
318 | \r | |
319 | #define FORM_BROWSER_STATEMENT_SIGNATURE EFI_SIGNATURE_32 ('F', 'S', 'T', 'A')\r | |
320 | typedef struct {\r | |
321 | UINTN Signature;\r | |
322 | LIST_ENTRY Link;\r | |
323 | \r | |
324 | UINT8 Operand; // The operand (first byte) of this Statement or Question\r | |
325 | \r | |
326 | //\r | |
327 | // Statement Header\r | |
328 | //\r | |
329 | EFI_STRING_ID Prompt;\r | |
330 | EFI_STRING_ID Help;\r | |
331 | EFI_STRING_ID TextTwo; // For EFI_IFR_TEXT\r | |
332 | \r | |
333 | //\r | |
334 | // Question Header\r | |
335 | //\r | |
336 | EFI_QUESTION_ID QuestionId; // The value of zero is reserved\r | |
337 | EFI_VARSTORE_ID VarStoreId; // A value of zero indicates no variable storage\r | |
338 | FORMSET_STORAGE *Storage;\r | |
339 | union {\r | |
340 | EFI_STRING_ID VarName;\r | |
341 | UINT16 VarOffset;\r | |
342 | } VarStoreInfo;\r | |
343 | UINT16 StorageWidth;\r | |
344 | UINT8 QuestionFlags;\r | |
345 | CHAR16 *VariableName; // Name/Value or EFI Variable name\r | |
346 | CHAR16 *BlockName; // Buffer storage block name: "OFFSET=...WIDTH=..."\r | |
347 | \r | |
348 | EFI_HII_VALUE HiiValue; // Edit copy for checkbox, numberic, oneof\r | |
349 | UINT8 *BufferValue; // Edit copy for string, password, orderedlist\r | |
350 | \r | |
351 | //\r | |
352 | // OpCode specific members\r | |
353 | //\r | |
354 | UINT8 Flags; // for EFI_IFR_CHECKBOX, EFI_IFR_DATE, EFI_IFR_NUMERIC, EFI_IFR_ONE_OF,\r | |
355 | // EFI_IFR_ORDERED_LIST, EFI_IFR_STRING,EFI_IFR_SUBTITLE,EFI_IFR_TIME, EFI_IFR_BANNER\r | |
356 | UINT8 MaxContainers; // for EFI_IFR_ORDERED_LIST\r | |
357 | \r | |
358 | UINT16 BannerLineNumber; // for EFI_IFR_BANNER, 1-based line number\r | |
359 | EFI_STRING_ID QuestionConfig; // for EFI_IFR_ACTION, if 0 then no configuration string will be processed\r | |
360 | \r | |
361 | UINT64 Minimum; // for EFI_IFR_ONE_OF/EFI_IFR_NUMERIC, it's Min/Max value\r | |
362 | UINT64 Maximum; // for EFI_IFR_STRING/EFI_IFR_PASSWORD, it's Min/Max length\r | |
363 | UINT64 Step;\r | |
364 | \r | |
365 | EFI_DEFAULT_ID DefaultId; // for EFI_IFR_RESET_BUTTON\r | |
366 | EFI_FORM_ID RefFormId; // for EFI_IFR_REF\r | |
367 | EFI_QUESTION_ID RefQuestionId; // for EFI_IFR_REF2\r | |
368 | EFI_GUID RefFormSetId; // for EFI_IFR_REF3\r | |
369 | EFI_STRING_ID RefDevicePath; // for EFI_IFR_REF4\r | |
370 | \r | |
371 | //\r | |
372 | // Get from IFR parsing\r | |
373 | //\r | |
374 | FORM_EXPRESSION *ValueExpression; // nested EFI_IFR_VALUE, provide Question value and indicate Question is ReadOnly\r | |
375 | LIST_ENTRY DefaultListHead; // nested EFI_IFR_DEFAULT list (QUESTION_DEFAULT), provide default values\r | |
376 | LIST_ENTRY OptionListHead; // nested EFI_IFR_ONE_OF_OPTION list (QUESTION_OPTION)\r | |
377 | \r | |
378 | EFI_IMAGE_ID ImageId; // nested EFI_IFR_IMAGE\r | |
379 | UINT8 RefreshInterval; // nested EFI_IFR_REFRESH, refresh interval(in seconds) for Question value, 0 means no refresh\r | |
380 | BOOLEAN InSubtitle; // nesting inside of EFI_IFR_SUBTITLE\r | |
381 | \r | |
382 | LIST_ENTRY InconsistentListHead;// nested inconsistent expression list (FORM_EXPRESSION)\r | |
383 | LIST_ENTRY NoSubmitListHead; // nested nosubmit expression list (FORM_EXPRESSION)\r | |
384 | FORM_EXPRESSION *GrayOutExpression; // nesting inside of GrayOutIf\r | |
385 | FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf\r | |
386 | \r | |
387 | } FORM_BROWSER_STATEMENT;\r | |
388 | \r | |
389 | #define FORM_BROWSER_STATEMENT_FROM_LINK(a) CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)\r | |
390 | \r | |
391 | #define FORM_BROWSER_FORM_SIGNATURE EFI_SIGNATURE_32 ('F', 'F', 'R', 'M')\r | |
392 | \r | |
393 | typedef struct {\r | |
394 | UINTN Signature;\r | |
395 | LIST_ENTRY Link;\r | |
396 | \r | |
397 | UINT16 FormId;\r | |
398 | EFI_STRING_ID FormTitle;\r | |
399 | \r | |
400 | EFI_IMAGE_ID ImageId;\r | |
401 | \r | |
402 | LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r | |
403 | LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)\r | |
404 | } FORM_BROWSER_FORM;\r | |
405 | \r | |
406 | #define FORM_BROWSER_FORM_FROM_LINK(a) CR (a, FORM_BROWSER_FORM, Link, FORM_BROWSER_FORM_SIGNATURE)\r | |
407 | \r | |
408 | #define FORMSET_DEFAULTSTORE_SIGNATURE EFI_SIGNATURE_32 ('F', 'D', 'F', 'S')\r | |
409 | \r | |
410 | typedef struct {\r | |
411 | UINTN Signature;\r | |
412 | LIST_ENTRY Link;\r | |
413 | \r | |
414 | UINT16 DefaultId;\r | |
415 | EFI_STRING_ID DefaultName;\r | |
416 | } FORMSET_DEFAULTSTORE;\r | |
417 | \r | |
418 | #define FORMSET_DEFAULTSTORE_FROM_LINK(a) CR (a, FORMSET_DEFAULTSTORE, Link, FORMSET_DEFAULTSTORE_SIGNATURE)\r | |
419 | \r | |
420 | typedef struct {\r | |
421 | EFI_HII_HANDLE HiiHandle;\r | |
422 | EFI_HANDLE DriverHandle;\r | |
423 | EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;\r | |
424 | EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r | |
425 | \r | |
426 | UINTN IfrBinaryLength;\r | |
427 | UINT8 *IfrBinaryData;\r | |
428 | \r | |
429 | EFI_GUID Guid;\r | |
430 | EFI_STRING_ID FormSetTitle;\r | |
431 | EFI_STRING_ID Help;\r | |
432 | UINT16 Class;\r | |
433 | UINT16 SubClass;\r | |
434 | EFI_IMAGE_ID ImageId;\r | |
435 | \r | |
436 | FORM_BROWSER_STATEMENT *StatementBuffer; // Buffer for all Statements and Questions\r | |
437 | EXPRESSION_OPCODE *ExpressionBuffer; // Buffer for all Expression OpCode\r | |
438 | \r | |
439 | LIST_ENTRY StorageListHead; // Storage list (FORMSET_STORAGE)\r | |
440 | LIST_ENTRY DefaultStoreListHead; // DefaultStore list (FORMSET_DEFAULTSTORE)\r | |
441 | LIST_ENTRY FormListHead; // Form list (FORM_BROWSER_FORM)\r | |
442 | } FORM_BROWSER_FORMSET;\r | |
443 | \r | |
444 | \r | |
445 | extern EFI_HII_DATABASE_PROTOCOL *mHiiDatabase;\r | |
446 | extern EFI_HII_STRING_PROTOCOL *mHiiString;\r | |
447 | extern EFI_HII_CONFIG_ROUTING_PROTOCOL *mHiiConfigRouting;\r | |
448 | \r | |
449 | extern BANNER_DATA *BannerData;\r | |
450 | extern EFI_HII_HANDLE FrontPageHandle;\r | |
451 | extern UINTN gClassOfVfr;\r | |
452 | extern UINTN gFunctionKeySetting;\r | |
453 | extern BOOLEAN gResetRequired;\r | |
454 | extern BOOLEAN gNvUpdateRequired;\r | |
455 | extern EFI_HII_HANDLE gHiiHandle;\r | |
456 | extern BOOLEAN gFirstIn;\r | |
457 | extern UINT16 gDirection;\r | |
458 | extern EFI_SCREEN_DESCRIPTOR gScreenDimensions;\r | |
459 | extern BOOLEAN gUpArrow;\r | |
460 | extern BOOLEAN gDownArrow;\r | |
461 | \r | |
462 | //\r | |
463 | // Browser Global Strings\r | |
464 | //\r | |
465 | extern CHAR16 *gFunctionOneString;\r | |
466 | extern CHAR16 *gFunctionTwoString;\r | |
467 | extern CHAR16 *gFunctionNineString;\r | |
468 | extern CHAR16 *gFunctionTenString;\r | |
469 | extern CHAR16 *gEnterString;\r | |
470 | extern CHAR16 *gEnterCommitString;\r | |
471 | extern CHAR16 *gEscapeString;\r | |
472 | extern CHAR16 *gSaveFailed;\r | |
473 | extern CHAR16 *gMoveHighlight;\r | |
474 | extern CHAR16 *gMakeSelection;\r | |
475 | extern CHAR16 *gDecNumericInput;\r | |
476 | extern CHAR16 *gHexNumericInput;\r | |
477 | extern CHAR16 *gToggleCheckBox;\r | |
478 | extern CHAR16 *gPromptForData;\r | |
479 | extern CHAR16 *gPromptForPassword;\r | |
480 | extern CHAR16 *gPromptForNewPassword;\r | |
481 | extern CHAR16 *gConfirmPassword;\r | |
482 | extern CHAR16 *gConfirmError;\r | |
483 | extern CHAR16 *gPassowordInvalid;\r | |
484 | extern CHAR16 *gPressEnter;\r | |
485 | extern CHAR16 *gEmptyString;\r | |
486 | extern CHAR16 *gAreYouSure;\r | |
487 | extern CHAR16 *gYesResponse;\r | |
488 | extern CHAR16 *gNoResponse;\r | |
489 | extern CHAR16 *gMiniString;\r | |
490 | extern CHAR16 *gPlusString;\r | |
491 | extern CHAR16 *gMinusString;\r | |
492 | extern CHAR16 *gAdjustNumber;\r | |
493 | \r | |
494 | extern CHAR16 gPromptBlockWidth;\r | |
495 | extern CHAR16 gOptionBlockWidth;\r | |
496 | extern CHAR16 gHelpBlockWidth;\r | |
497 | \r | |
498 | extern EFI_GUID gZeroGuid;\r | |
499 | extern EFI_GUID gTianoHiiIfrGuid;\r | |
500 | \r | |
501 | //\r | |
502 | // Global Procedure Defines\r | |
503 | //\r | |
504 | \r | |
505 | /**\r | |
506 | Initialize the HII String Token to the correct values.\r | |
507 | \r | |
508 | **/\r | |
509 | VOID\r | |
510 | InitializeBrowserStrings (\r | |
511 | VOID\r | |
512 | )\r | |
513 | ;\r | |
514 | \r | |
515 | /**\r | |
516 | Prints a unicode string to the default console,\r | |
517 | using L"%s" format.\r | |
518 | \r | |
519 | @param String String pointer.\r | |
520 | \r | |
521 | @return Length of string printed to the console\r | |
522 | \r | |
523 | **/\r | |
524 | UINTN\r | |
525 | PrintString (\r | |
526 | IN CHAR16 *String\r | |
527 | )\r | |
528 | ;\r | |
529 | \r | |
530 | /**\r | |
531 | Prints a chracter to the default console,\r | |
532 | using L"%c" format.\r | |
533 | \r | |
534 | @param Character Character to print.\r | |
535 | \r | |
536 | @return Length of string printed to the console.\r | |
537 | \r | |
538 | **/\r | |
539 | UINTN\r | |
540 | PrintChar (\r | |
541 | CHAR16 Character\r | |
542 | )\r | |
543 | ;\r | |
544 | \r | |
545 | /**\r | |
546 | Prints a formatted unicode string to the default console, at\r | |
547 | the supplied cursor position.\r | |
548 | \r | |
549 | @param Column The cursor position to print the string at.\r | |
550 | @param Row The cursor position to print the string at\r | |
551 | @param Fmt Format string\r | |
552 | @param ... Variable argument list for formating string.\r | |
553 | \r | |
554 | @return Length of string printed to the console\r | |
555 | \r | |
556 | **/\r | |
557 | UINTN\r | |
558 | PrintAt (\r | |
559 | IN UINTN Column,\r | |
560 | IN UINTN Row,\r | |
561 | IN CHAR16 *Fmt,\r | |
562 | ...\r | |
563 | )\r | |
564 | ;\r | |
565 | \r | |
566 | /**\r | |
567 | Prints a unicode string to the default console, at\r | |
568 | the supplied cursor position, using L"%s" format.\r | |
569 | \r | |
570 | @param Column The cursor position to print the string at.\r | |
571 | @param Row The cursor position to print the string at\r | |
572 | @param String String pointer.\r | |
573 | \r | |
574 | @return Length of string printed to the console\r | |
575 | \r | |
576 | **/\r | |
577 | UINTN\r | |
578 | PrintStringAt (\r | |
579 | IN UINTN Column,\r | |
580 | IN UINTN Row,\r | |
581 | IN CHAR16 *String\r | |
582 | )\r | |
583 | ;\r | |
584 | \r | |
585 | /**\r | |
586 | Prints a chracter to the default console, at\r | |
587 | the supplied cursor position, using L"%c" format.\r | |
588 | \r | |
589 | @param Column The cursor position to print the string at.\r | |
590 | @param Row The cursor position to print the string at.\r | |
591 | @param Character Character to print.\r | |
592 | \r | |
593 | @return Length of string printed to the console.\r | |
594 | \r | |
595 | **/\r | |
596 | UINTN\r | |
597 | PrintCharAt (\r | |
598 | IN UINTN Column,\r | |
599 | IN UINTN Row,\r | |
600 | CHAR16 Character\r | |
601 | )\r | |
602 | ;\r | |
603 | \r | |
604 | /**\r | |
605 | Parse opcodes in the formset IFR binary.\r | |
606 | \r | |
607 | @param FormSet Pointer of the FormSet data structure.\r | |
608 | \r | |
609 | @retval EFI_SUCCESS Opcode parse success.\r | |
610 | @retval Other Opcode parse fail.\r | |
611 | \r | |
612 | **/\r | |
613 | EFI_STATUS\r | |
614 | ParseOpCodes (\r | |
615 | IN FORM_BROWSER_FORMSET *FormSet\r | |
616 | )\r | |
617 | ;\r | |
618 | \r | |
619 | /**\r | |
620 | Free resources allocated for a FormSet.\r | |
621 | \r | |
622 | @param FormSet Pointer of the FormSet\r | |
623 | \r | |
624 | **/\r | |
625 | VOID\r | |
626 | DestroyFormSet (\r | |
627 | IN OUT FORM_BROWSER_FORMSET *FormSet\r | |
628 | )\r | |
629 | ;\r | |
630 | \r | |
631 | /**\r | |
632 | This function displays the page frame.\r | |
633 | \r | |
634 | **/\r | |
635 | VOID\r | |
636 | DisplayPageFrame (\r | |
637 | VOID\r | |
638 | )\r | |
639 | ;\r | |
640 | \r | |
641 | /**\r | |
642 | Create a new string in HII Package List.\r | |
643 | \r | |
644 | @param String The String to be added\r | |
645 | @param HiiHandle The package list in the HII database to insert the\r | |
646 | specified string.\r | |
647 | \r | |
648 | @return The output string.\r | |
649 | \r | |
650 | **/\r | |
651 | EFI_STRING_ID\r | |
652 | NewString (\r | |
653 | IN CHAR16 *String,\r | |
654 | IN EFI_HII_HANDLE HiiHandle\r | |
655 | )\r | |
656 | ;\r | |
657 | \r | |
658 | /**\r | |
659 | Delete a string from HII Package List.\r | |
660 | \r | |
661 | @param StringId Id of the string in HII database.\r | |
662 | @param HiiHandle The HII package list handle.\r | |
663 | \r | |
664 | @retval EFI_SUCCESS The string was deleted successfully.\r | |
665 | \r | |
666 | **/\r | |
667 | EFI_STATUS\r | |
668 | DeleteString (\r | |
669 | IN EFI_STRING_ID StringId,\r | |
670 | IN EFI_HII_HANDLE HiiHandle\r | |
671 | )\r | |
672 | ;\r | |
673 | \r | |
674 | /**\r | |
675 | Get the string based on the StringId and HII Package List Handle.\r | |
676 | \r | |
677 | @param Token The String's ID.\r | |
678 | @param HiiHandle The package list in the HII database to search for\r | |
679 | the specified string.\r | |
680 | \r | |
681 | @return The output string.\r | |
682 | \r | |
683 | **/\r | |
684 | CHAR16 *\r | |
685 | GetToken (\r | |
686 | IN EFI_STRING_ID Token,\r | |
687 | IN EFI_HII_HANDLE HiiHandle\r | |
688 | )\r | |
689 | ;\r | |
690 | \r | |
691 | /**\r | |
692 | Draw a pop up windows based on the dimension, number of lines and\r | |
693 | strings specified.\r | |
694 | \r | |
695 | @param RequestedWidth The width of the pop-up.\r | |
696 | @param NumberOfLines The number of lines.\r | |
f4bcc90f | 697 | @param Marker The variable argument list for the list of string to be printed.\r |
7936fb6a | 698 | \r |
699 | **/\r | |
700 | VOID\r | |
701 | CreateSharedPopUp (\r | |
702 | IN UINTN RequestedWidth,\r | |
703 | IN UINTN NumberOfLines,\r | |
f4bcc90f | 704 | IN VA_LIST Marker\r |
7936fb6a | 705 | )\r |
706 | ;\r | |
707 | \r | |
708 | /**\r | |
709 | Routine used to abstract a generic dialog interface and return the selected key or string\r | |
710 | \r | |
711 | @param NumberOfLines The number of lines for the dialog box\r | |
712 | @param HotKey Defines whether a single character is parsed\r | |
713 | (TRUE) and returned in KeyValue or a string is\r | |
714 | returned in StringBuffer. Two special characters\r | |
715 | are considered when entering a string, a SCAN_ESC\r | |
716 | and an CHAR_CARRIAGE_RETURN. SCAN_ESC terminates\r | |
717 | string input and returns\r | |
718 | @param MaximumStringSize The maximum size in bytes of a typed in string\r | |
719 | (each character is a CHAR16) and the minimum\r | |
720 | string returned is two bytes\r | |
721 | @param StringBuffer The passed in pointer to the buffer which will\r | |
722 | hold the typed in string if HotKey is FALSE\r | |
723 | @param KeyValue The EFI_KEY value returned if HotKey is TRUE..\r | |
724 | @param String Pointer to the first string in the list\r | |
725 | @param ... A series of (quantity == NumberOfLines) text\r | |
726 | strings which will be used to construct the dialog\r | |
727 | box\r | |
728 | \r | |
729 | @retval EFI_SUCCESS Displayed dialog and received user interaction\r | |
730 | @retval EFI_INVALID_PARAMETER One of the parameters was invalid (e.g.\r | |
731 | (StringBuffer == NULL) && (HotKey == FALSE))\r | |
732 | @retval EFI_DEVICE_ERROR User typed in an ESC character to exit the routine\r | |
733 | \r | |
734 | **/\r | |
735 | EFI_STATUS\r | |
736 | CreateDialog (\r | |
737 | IN UINTN NumberOfLines,\r | |
738 | IN BOOLEAN HotKey,\r | |
739 | IN UINTN MaximumStringSize,\r | |
740 | OUT CHAR16 *StringBuffer,\r | |
741 | OUT EFI_INPUT_KEY *KeyValue,\r | |
7936fb6a | 742 | ...\r |
743 | )\r | |
744 | ;\r | |
745 | \r | |
746 | /**\r | |
747 | Get Question's current Value.\r | |
748 | \r | |
749 | @param FormSet FormSet data structure.\r | |
750 | @param Form Form data structure.\r | |
751 | @param Question Question to be initialized.\r | |
752 | @param Cached TRUE: get from Edit copy FALSE: get from original\r | |
753 | Storage\r | |
754 | \r | |
755 | @retval EFI_SUCCESS The function completed successfully.\r | |
756 | \r | |
757 | **/\r | |
758 | EFI_STATUS\r | |
759 | GetQuestionValue (\r | |
760 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
761 | IN FORM_BROWSER_FORM *Form,\r | |
762 | IN OUT FORM_BROWSER_STATEMENT *Question,\r | |
763 | IN BOOLEAN Cached\r | |
764 | )\r | |
765 | ;\r | |
766 | \r | |
767 | /**\r | |
768 | Save Question Value to edit copy(cached) or Storage(uncached).\r | |
769 | \r | |
770 | @param FormSet FormSet data structure.\r | |
771 | @param Form Form data structure.\r | |
772 | @param Question Pointer to the Question.\r | |
773 | @param Cached TRUE: set to Edit copy FALSE: set to original\r | |
774 | Storage\r | |
775 | \r | |
776 | @retval EFI_SUCCESS The function completed successfully.\r | |
777 | \r | |
778 | **/\r | |
779 | EFI_STATUS\r | |
780 | SetQuestionValue (\r | |
781 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
782 | IN FORM_BROWSER_FORM *Form,\r | |
783 | IN OUT FORM_BROWSER_STATEMENT *Question,\r | |
784 | IN BOOLEAN Cached\r | |
785 | )\r | |
786 | ;\r | |
787 | \r | |
788 | /**\r | |
789 | Perform inconsistent check for a Form.\r | |
790 | \r | |
791 | @param FormSet FormSet data structure.\r | |
792 | @param Form Form data structure.\r | |
793 | @param Question The Question to be validated.\r | |
794 | @param Type Validation type: InConsistent or NoSubmit\r | |
795 | \r | |
796 | @retval EFI_SUCCESS Form validation pass.\r | |
797 | @retval other Form validation failed.\r | |
798 | \r | |
799 | **/\r | |
800 | EFI_STATUS\r | |
801 | ValidateQuestion (\r | |
802 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
803 | IN FORM_BROWSER_FORM *Form,\r | |
804 | IN FORM_BROWSER_STATEMENT *Question,\r | |
805 | IN UINTN Type\r | |
806 | )\r | |
807 | ;\r | |
808 | \r | |
809 | /**\r | |
810 | Submit a Form.\r | |
811 | \r | |
812 | @param FormSet FormSet data structure.\r | |
813 | @param Form Form data structure.\r | |
814 | \r | |
815 | @retval EFI_SUCCESS The function completed successfully.\r | |
816 | \r | |
817 | **/\r | |
818 | EFI_STATUS\r | |
819 | SubmitForm (\r | |
820 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
821 | IN FORM_BROWSER_FORM *Form\r | |
822 | )\r | |
823 | ;\r | |
824 | \r | |
825 | /**\r | |
826 | Reset Question to its default value.\r | |
827 | \r | |
828 | @param FormSet The form set.\r | |
829 | @param Form The form.\r | |
830 | @param Question The question.\r | |
831 | @param DefaultId The Class of the default.\r | |
832 | \r | |
833 | @retval EFI_SUCCESS Question is reset to default value.\r | |
834 | \r | |
835 | **/\r | |
836 | EFI_STATUS\r | |
837 | GetQuestionDefault (\r | |
838 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
839 | IN FORM_BROWSER_FORM *Form,\r | |
840 | IN FORM_BROWSER_STATEMENT *Question,\r | |
841 | IN UINT16 DefaultId\r | |
842 | )\r | |
843 | ;\r | |
844 | \r | |
845 | /**\r | |
846 | Get current setting of Questions.\r | |
847 | \r | |
848 | @param FormSet FormSet data structure.\r | |
849 | \r | |
850 | @retval EFI_SUCCESS The function completed successfully.\r | |
851 | \r | |
852 | **/\r | |
853 | EFI_STATUS\r | |
854 | InitializeCurrentSetting (\r | |
855 | IN OUT FORM_BROWSER_FORMSET *FormSet\r | |
856 | )\r | |
857 | ;\r | |
858 | \r | |
859 | /**\r | |
860 | Initialize the internal data structure of a FormSet.\r | |
861 | \r | |
862 | @param Handle PackageList Handle\r | |
863 | @param FormSetGuid GUID of a formset. If not specified (NULL or zero\r | |
864 | GUID), take the first FormSet found in package\r | |
865 | list.\r | |
866 | @param FormSet FormSet data structure.\r | |
867 | \r | |
868 | @retval EFI_SUCCESS The function completed successfully.\r | |
869 | @retval EFI_NOT_FOUND The specified FormSet could not be found.\r | |
870 | \r | |
871 | **/\r | |
872 | EFI_STATUS\r | |
873 | InitializeFormSet (\r | |
874 | IN EFI_HII_HANDLE Handle,\r | |
875 | IN OUT EFI_GUID *FormSetGuid,\r | |
876 | OUT FORM_BROWSER_FORMSET *FormSet\r | |
877 | )\r | |
878 | ;\r | |
879 | \r | |
880 | /**\r | |
881 | Reset Questions in a Form to their default value.\r | |
882 | \r | |
883 | @param FormSet FormSet data structure.\r | |
884 | @param Form The Form which to be reset.\r | |
885 | @param DefaultId The Class of the default.\r | |
886 | \r | |
887 | @retval EFI_SUCCESS The function completed successfully.\r | |
888 | \r | |
889 | **/\r | |
890 | EFI_STATUS\r | |
891 | ExtractFormDefault (\r | |
892 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
893 | IN FORM_BROWSER_FORM *Form,\r | |
894 | IN UINT16 DefaultId\r | |
895 | )\r | |
896 | ;\r | |
897 | \r | |
898 | /**\r | |
899 | Initialize Question's Edit copy from Storage.\r | |
900 | \r | |
901 | @param FormSet FormSet data structure.\r | |
902 | @param Form Form data structure.\r | |
903 | \r | |
904 | @retval EFI_SUCCESS The function completed successfully.\r | |
905 | \r | |
906 | **/\r | |
907 | EFI_STATUS\r | |
908 | LoadFormConfig (\r | |
909 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
910 | IN FORM_BROWSER_FORM *Form\r | |
911 | )\r | |
912 | ;\r | |
913 | \r | |
914 | /**\r | |
915 | Convert setting of Buffer Storage or NameValue Storage to <ConfigResp>.\r | |
916 | \r | |
917 | @param Storage The Storage to be conveted.\r | |
918 | @param ConfigResp The returned <ConfigResp>.\r | |
919 | \r | |
920 | @retval EFI_SUCCESS Convert success.\r | |
921 | @retval EFI_INVALID_PARAMETER Incorrect storage type.\r | |
922 | \r | |
923 | **/\r | |
924 | EFI_STATUS\r | |
925 | StorageToConfigResp (\r | |
926 | IN FORMSET_STORAGE *Storage,\r | |
927 | IN CHAR16 **ConfigResp\r | |
928 | )\r | |
929 | ;\r | |
930 | \r | |
931 | /**\r | |
932 | Convert <ConfigResp> to settings in Buffer Storage or NameValue Storage.\r | |
933 | \r | |
934 | @param Storage The Storage to receive the settings.\r | |
935 | @param ConfigResp The <ConfigResp> to be converted.\r | |
936 | \r | |
937 | @retval EFI_SUCCESS Convert success.\r | |
938 | @retval EFI_INVALID_PARAMETER Incorrect storage type.\r | |
939 | \r | |
940 | **/\r | |
941 | EFI_STATUS\r | |
942 | ConfigRespToStorage (\r | |
943 | IN FORMSET_STORAGE *Storage,\r | |
944 | IN CHAR16 *ConfigResp\r | |
945 | )\r | |
946 | ;\r | |
947 | \r | |
948 | /**\r | |
949 | Fill storage's edit copy with settings requested from Configuration Driver.\r | |
950 | \r | |
951 | @param FormSet FormSet data structure.\r | |
952 | @param Storage Buffer Storage.\r | |
953 | \r | |
954 | @retval EFI_SUCCESS The function completed successfully.\r | |
955 | \r | |
956 | **/\r | |
957 | EFI_STATUS\r | |
958 | LoadStorage (\r | |
959 | IN FORM_BROWSER_FORMSET *FormSet,\r | |
960 | IN FORMSET_STORAGE *Storage\r | |
961 | )\r | |
962 | ;\r | |
963 | \r | |
964 | /**\r | |
965 | Fetch the Ifr binary data of a FormSet.\r | |
966 | \r | |
967 | @param Handle PackageList Handle\r | |
968 | @param FormSetGuid GUID of a formset. If not specified (NULL or zero\r | |
969 | GUID), take the first FormSet found in package\r | |
970 | list.\r | |
971 | @param BinaryLength The length of the FormSet IFR binary.\r | |
972 | @param BinaryData The buffer designed to receive the FormSet.\r | |
973 | \r | |
974 | @retval EFI_SUCCESS Buffer filled with the requested FormSet.\r | |
975 | BufferLength was updated.\r | |
976 | @retval EFI_INVALID_PARAMETER The handle is unknown.\r | |
977 | @retval EFI_NOT_FOUND A form or FormSet on the requested handle cannot\r | |
978 | be found with the requested FormId.\r | |
979 | \r | |
980 | **/\r | |
981 | EFI_STATUS\r | |
982 | GetIfrBinaryData (\r | |
983 | IN EFI_HII_HANDLE Handle,\r | |
984 | IN OUT EFI_GUID *FormSetGuid,\r | |
985 | OUT UINTN *BinaryLength,\r | |
986 | OUT UINT8 **BinaryData\r | |
987 | )\r | |
988 | ;\r | |
989 | \r | |
990 | /**\r | |
991 | This is the routine which an external caller uses to direct the browser\r | |
992 | where to obtain it's information.\r | |
993 | \r | |
994 | \r | |
995 | @param This The Form Browser protocol instanse.\r | |
996 | @param Handles A pointer to an array of Handles. If HandleCount > 1 we\r | |
997 | display a list of the formsets for the handles specified.\r | |
998 | @param HandleCount The number of Handles specified in Handle.\r | |
999 | @param FormSetGuid This field points to the EFI_GUID which must match the Guid\r | |
1000 | field in the EFI_IFR_FORM_SET op-code for the specified\r | |
1001 | forms-based package. If FormSetGuid is NULL, then this\r | |
1002 | function will display the first found forms package.\r | |
1003 | @param FormId This field specifies which EFI_IFR_FORM to render as the first\r | |
1004 | displayable page. If this field has a value of 0x0000, then\r | |
1005 | the forms browser will render the specified forms in their encoded order.\r | |
1006 | ScreenDimenions - This allows the browser to be called so that it occupies a\r | |
1007 | portion of the physical screen instead of dynamically determining the screen dimensions.\r | |
1008 | ActionRequest - Points to the action recommended by the form.\r | |
1009 | @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in \r | |
1010 | characters.\r | |
1011 | @param ActionRequest Points to the action recommended by the form.\r | |
1012 | \r | |
1013 | @retval EFI_SUCCESS The function completed successfully.\r | |
1014 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r | |
1015 | @retval EFI_NOT_FOUND No valid forms could be found to display.\r | |
1016 | \r | |
1017 | **/\r | |
1018 | EFI_STATUS\r | |
1019 | EFIAPI\r | |
1020 | SendForm (\r | |
1021 | IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,\r | |
1022 | IN EFI_HII_HANDLE *Handles,\r | |
1023 | IN UINTN HandleCount,\r | |
1024 | IN EFI_GUID *FormSetGuid, OPTIONAL\r | |
1025 | IN UINT16 FormId, OPTIONAL\r | |
1026 | IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r | |
1027 | OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL\r | |
1028 | )\r | |
1029 | ;\r | |
1030 | \r | |
1031 | /**\r | |
1032 | This function is called by a callback handler to retrieve uncommitted state\r | |
1033 | data from the browser.\r | |
1034 | \r | |
1035 | @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL\r | |
1036 | instance.\r | |
1037 | @param ResultsDataSize A pointer to the size of the buffer associated\r | |
1038 | with ResultsData.\r | |
1039 | @param ResultsData A string returned from an IFR browser or\r | |
1040 | equivalent. The results string will have no\r | |
1041 | routing information in them.\r | |
1042 | @param RetrieveData A BOOLEAN field which allows an agent to retrieve\r | |
1043 | (if RetrieveData = TRUE) data from the uncommitted\r | |
1044 | browser state information or set (if RetrieveData\r | |
1045 | = FALSE) data in the uncommitted browser state\r | |
1046 | information.\r | |
1047 | @param VariableGuid An optional field to indicate the target variable\r | |
1048 | GUID name to use.\r | |
1049 | @param VariableName An optional field to indicate the target\r | |
1050 | human-readable variable name.\r | |
1051 | \r | |
1052 | @retval EFI_SUCCESS The results have been distributed or are awaiting\r | |
1053 | distribution.\r | |
1054 | @retval EFI_BUFFER_TOO_SMALL The ResultsDataSize specified was too small to\r | |
1055 | contain the results data.\r | |
1056 | \r | |
1057 | **/\r | |
1058 | EFI_STATUS\r | |
1059 | EFIAPI\r | |
1060 | BrowserCallback (\r | |
1061 | IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,\r | |
1062 | IN OUT UINTN *ResultsDataSize,\r | |
1063 | IN OUT EFI_STRING ResultsData,\r | |
1064 | IN BOOLEAN RetrieveData,\r | |
1065 | IN CONST EFI_GUID *VariableGuid, OPTIONAL\r | |
1066 | IN CONST CHAR16 *VariableName OPTIONAL\r | |
1067 | )\r | |
1068 | ;\r | |
1069 | \r | |
1070 | #endif\r |