/** @file\r
Private MACRO, structure and function definitions for Setup Browser module.\r
\r
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
typedef struct {\r
UINT8 Type;\r
+ UINT8 *Buffer;\r
+ UINT16 BufferLen;\r
EFI_IFR_TYPE_VALUE Value;\r
} EFI_HII_VALUE;\r
\r
\r
#define FORM_EXPRESSION_FROM_LINK(a) CR (a, FORM_EXPRESSION, Link, FORM_EXPRESSION_SIGNATURE)\r
\r
+#define FORM_EXPRESSION_LIST_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'R')\r
+\r
+typedef struct {\r
+ UINTN Signature;\r
+ UINTN Count;\r
+ FORM_EXPRESSION *Expression[1]; // Array[Count] of expressions\r
+} FORM_EXPRESSION_LIST;\r
+\r
#define QUESTION_DEFAULT_SIGNATURE SIGNATURE_32 ('Q', 'D', 'F', 'T')\r
\r
typedef struct {\r
#define QUESTION_OPTION_SIGNATURE SIGNATURE_32 ('Q', 'O', 'P', 'T')\r
\r
typedef struct {\r
- UINTN Signature;\r
- LIST_ENTRY Link;\r
+ UINTN Signature;\r
+ LIST_ENTRY Link;\r
\r
- EFI_STRING_ID Text;\r
- UINT8 Flags;\r
- EFI_HII_VALUE Value;\r
- EFI_IMAGE_ID ImageId;\r
+ EFI_STRING_ID Text;\r
+ UINT8 Flags;\r
+ EFI_HII_VALUE Value;\r
+ EFI_IMAGE_ID ImageId;\r
\r
- FORM_EXPRESSION *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf\r
+ FORM_EXPRESSION_LIST *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf\r
} QUESTION_OPTION;\r
\r
#define QUESTION_OPTION_FROM_LINK(a) CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)\r
\r
+typedef enum {\r
+ ExpressFalse = 0,\r
+ ExpressGrayOut, \r
+ ExpressSuppress,\r
+ ExpressDisable\r
+} EXPRESS_RESULT;\r
+\r
+typedef enum {\r
+ ExpressNone = 0,\r
+ ExpressForm, \r
+ ExpressStatement,\r
+ ExpressOption\r
+} EXPRESS_LEVEL;\r
+\r
#define FORM_BROWSER_STATEMENT_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'A')\r
\r
typedef struct {\r
\r
LIST_ENTRY InconsistentListHead;// nested inconsistent expression list (FORM_EXPRESSION)\r
LIST_ENTRY NoSubmitListHead; // nested nosubmit expression list (FORM_EXPRESSION)\r
- FORM_EXPRESSION *GrayOutExpression; // nesting inside of GrayOutIf\r
- FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf\r
- FORM_EXPRESSION *DisableExpression; // nesting inside of DisableIf\r
+ FORM_EXPRESSION_LIST *Expression; // nesting inside of GrayOutIf/DisableIf/SuppressIf\r
\r
FORM_EXPRESSION *ReadExpression; // nested EFI_IFR_READ, provide this question value by read expression.\r
FORM_EXPRESSION *WriteExpression; // nested EFI_IFR_WRITE, evaluate write expression after this question value is set.\r
#define STANDARD_MAP_FORM_TYPE 0x01\r
\r
typedef struct {\r
- UINTN Signature;\r
- LIST_ENTRY Link;\r
+ UINTN Signature;\r
+ LIST_ENTRY Link;\r
\r
- UINT16 FormId; // FormId of normal form or formmap form.\r
- EFI_STRING_ID FormTitle; // FormTile of normal form, or FormMapMethod title of formmap form.\r
- UINT16 FormType; // Specific form type for the different form.\r
+ UINT16 FormId; // FormId of normal form or formmap form.\r
+ EFI_STRING_ID FormTitle; // FormTile of normal form, or FormMapMethod title of formmap form.\r
+ UINT16 FormType; // Specific form type for the different form.\r
\r
- EFI_IMAGE_ID ImageId;\r
+ EFI_IMAGE_ID ImageId;\r
\r
- BOOLEAN ModalForm; // Whether this is a modal form.\r
- BOOLEAN Locked; // Whether this form is locked.\r
+ BOOLEAN ModalForm; // Whether this is a modal form.\r
+ BOOLEAN Locked; // Whether this form is locked.\r
\r
- BOOLEAN NvUpdateRequired; // Whether this form has NV update request.\r
+ BOOLEAN NvUpdateRequired; // Whether this form has NV update request.\r
\r
- LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r
- LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)\r
- LIST_ENTRY ConfigRequestHead; // List of configreques for all storage.\r
- FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf\r
+ LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r
+ LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)\r
+ LIST_ENTRY ConfigRequestHead; // List of configreques for all storage.\r
+ FORM_EXPRESSION_LIST *SuppressExpression; // nesting inside of SuppressIf\r
} FORM_BROWSER_FORM;\r
\r
#define FORM_BROWSER_FORM_FROM_LINK(a) CR (a, FORM_BROWSER_FORM, Link, FORM_BROWSER_FORM_SIGNATURE)\r
GUID), take the first FormSet found in package\r
list.\r
@param FormSet FormSet data structure.\r
+ @param UpdateGlobalVar Whether need to update the global variable.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
@retval EFI_NOT_FOUND The specified FormSet could not be found.\r
InitializeFormSet (\r
IN EFI_HII_HANDLE Handle,\r
IN OUT EFI_GUID *FormSetGuid,\r
- OUT FORM_BROWSER_FORMSET *FormSet\r
+ OUT FORM_BROWSER_FORMSET *FormSet,\r
+ IN BOOLEAN UpdateGlobalVar \r
);\r
\r
/**\r
@param Selection Selection contains the information about \r
the Selection, form and formset to be displayed.\r
Selection action may be updated in retrieve callback.\r
+ If Selection is NULL, only initialize Question value.\r
@param FormSet FormSet data structure.\r
@param Form Form data structure.\r
\r
@param Selection Selection contains the information about \r
the Selection, form and formset to be displayed.\r
Selection action may be updated in retrieve callback.\r
+ If Selection is NULL, only initialize Question value.\r
@param FormSet FormSet data structure.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r