/** @file\r
Private MACRO, structure and function definitions for Setup Browser module.\r
\r
-Copyright (c) 2007 - 2010, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2007 - 2010, 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
http://opensource.org/licenses/bsd-license.php\r
\r
#include <Guid/MdeModuleHii.h>\r
#include <Guid/HiiPlatformSetupFormset.h>\r
+#include <Guid/HiiFormMapMethodGuid.h>\r
\r
#include <Library/PrintLib.h>\r
#include <Library/DebugLib.h>\r
#define EFI_HII_EXPRESSION_DISABLE_IF 4\r
#define EFI_HII_EXPRESSION_VALUE 5\r
#define EFI_HII_EXPRESSION_RULE 6\r
+#define EFI_HII_EXPRESSION_READ 7\r
+#define EFI_HII_EXPRESSION_WRITE 8\r
\r
#define EFI_HII_VARSTORE_BUFFER 0\r
#define EFI_HII_VARSTORE_NAME_VALUE 1\r
\r
#define FORMSET_STORAGE_FROM_LINK(a) CR (a, FORMSET_STORAGE, Link, FORMSET_STORAGE_SIGNATURE)\r
\r
+typedef union {\r
+ EFI_STRING_ID VarName;\r
+ UINT16 VarOffset;\r
+} VAR_STORE_INFO;\r
+\r
#define EXPRESSION_OPCODE_SIGNATURE SIGNATURE_32 ('E', 'X', 'O', 'P')\r
\r
typedef struct {\r
\r
EFI_STRING_ID DevicePath; // For EFI_IFR_QUESTION_REF3_2, EFI_IFR_QUESTION_REF3_3\r
EFI_GUID Guid;\r
+\r
+ FORMSET_STORAGE *VarStorage; // For EFI_IFR_SET, EFI_IFR_GET\r
+ VAR_STORE_INFO VarStoreInfo;// For EFI_IFR_SET, EFI_IFR_GET\r
+ UINT8 ValueType; // For EFI_IFR_SET, EFI_IFR_GET\r
+ UINT8 ValueWidth; // For EFI_IFR_SET, EFI_IFR_GET\r
+ CHAR16 *ValueName; // For EFI_IFR_SET, EFI_IFR_GET\r
+ LIST_ENTRY MapExpressionList; // nested expressions inside of Map opcode.\r
} EXPRESSION_OPCODE;\r
\r
#define EXPRESSION_OPCODE_FROM_LINK(a) CR (a, EXPRESSION_OPCODE, Link, EXPRESSION_OPCODE_SIGNATURE)\r
\r
#define FORM_BROWSER_STATEMENT_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'A')\r
\r
-typedef union {\r
- EFI_STRING_ID VarName;\r
- UINT16 VarOffset;\r
-} VAR_STORE_INFO;\r
-\r
typedef struct {\r
UINTN Signature;\r
LIST_ENTRY Link;\r
FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf\r
FORM_EXPRESSION *DisableExpression; // nesting inside of DisableIf\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
} FORM_BROWSER_STATEMENT;\r
\r
#define FORM_BROWSER_STATEMENT_FROM_LINK(a) CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)\r
\r
#define FORM_BROWSER_FORM_SIGNATURE SIGNATURE_32 ('F', 'F', 'R', 'M')\r
+#define STANDARD_MAP_FORM_TYPE 0x01\r
\r
typedef struct {\r
UINTN Signature;\r
LIST_ENTRY Link;\r
\r
- UINT16 FormId;\r
- EFI_STRING_ID FormTitle;\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
\r
...\r
);\r
\r
+/**\r
+ Get Value for given Name from a NameValue Storage.\r
+\r
+ @param Storage The NameValue Storage.\r
+ @param Name The Name.\r
+ @param Value The retured Value.\r
+\r
+ @retval EFI_SUCCESS Value found for given Name.\r
+ @retval EFI_NOT_FOUND No such Name found in NameValue storage.\r
+\r
+**/\r
+EFI_STATUS\r
+GetValueByName (\r
+ IN FORMSET_STORAGE *Storage,\r
+ IN CHAR16 *Name,\r
+ IN OUT CHAR16 **Value\r
+ );\r
+\r
+/**\r
+ Set Value of given Name in a NameValue Storage.\r
+\r
+ @param Storage The NameValue Storage.\r
+ @param Name The Name.\r
+ @param Value The Value to set.\r
+\r
+ @retval EFI_SUCCESS Value found for given Name.\r
+ @retval EFI_NOT_FOUND No such Name found in NameValue storage.\r
+\r
+**/\r
+EFI_STATUS\r
+SetValueByName (\r
+ IN FORMSET_STORAGE *Storage,\r
+ IN CHAR16 *Name,\r
+ IN CHAR16 *Value\r
+ );\r
+\r
/**\r
Get Question's current Value.\r
\r