]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
MdeModulePkg: Add match2 opcode support in SetupBrowserDxe and sample code in DriverS...
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.h
index 34b6d944d01f1e3d4631e346441ab0884dd5717c..8fabf6f3c6b560c17854fd76907ecb5ffb30edd6 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Private MACRO, structure and function definitions for Setup Browser module.\r
 \r
-Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2015, 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
@@ -32,6 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/HiiString.h>\r
 #include <Protocol/UserManager.h>\r
 #include <Protocol/DevicePathFromText.h>\r
+#include <Protocol/RegularExpressionProtocol.h>\r
 \r
 #include <Guid/MdeModuleHii.h>\r
 #include <Guid/HiiPlatformSetupFormset.h>\r
@@ -150,7 +151,6 @@ typedef struct {
 \r
   UINT32           Attributes;     // For EFI_IFR_VARSTORE_EFI: EFI Variable attribute\r
 \r
-  CHAR16           *ConfigHdr;     // <ConfigHdr>\r
   CHAR16           *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r
                                    // <RequestElement> includes all fields which is used by current form sets.\r
   UINTN            SpareStrLen;    // Spare length of ConfigRequest string buffer\r
@@ -170,7 +170,11 @@ typedef struct {
 \r
   BROWSER_STORAGE  *BrowserStorage;\r
 \r
+  CHAR16           *ConfigHdr;     // <ConfigHdr>\r
+\r
   CHAR16           *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r
+  CHAR16           *ConfigAltResp; // Alt config response string for this ConfigRequest.\r
+  BOOLEAN          HasCallAltCfg;  // Flag to show whether browser has call ExtractConfig to get Altcfg string.\r
   UINTN            ElementCount;   // Number of <RequestElement> in the <ConfigRequest>\r
   UINTN            SpareStrLen;    // Spare length of ConfigRequest string buffer\r
 } FORMSET_STORAGE;\r
@@ -379,6 +383,7 @@ typedef struct {
   LIST_ENTRY            SaveFailLink;\r
 \r
   CHAR16                *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r
+  CHAR16                *ConfigAltResp; // Alt config response string for this ConfigRequest.\r
   UINTN                 ElementCount;   // Number of <RequestElement> in the <ConfigRequest>  \r
   UINTN                 SpareStrLen;\r
 \r
@@ -402,6 +407,7 @@ typedef struct {
 \r
   BOOLEAN              ModalForm;            // Whether this is a modal form.\r
   BOOLEAN              Locked;               // Whether this form is locked.\r
+  EFI_GUID             RefreshGuid;          // Form refresh event guid.\r
 \r
   LIST_ENTRY           FormViewListHead;     // List of type FORMID_INFO is Browser View Form History List.\r
   LIST_ENTRY           ExpressionListHead;   // List of Expressions (FORM_EXPRESSION)\r
@@ -915,6 +921,7 @@ InitializeFormSet (
   @param  RetrieveValueFirst     Whether call the retrieve call back to\r
                                  get the initial value before get default\r
                                  value.\r
+  @param  SkipGetAltCfg          Whether skip the get altcfg string process.\r
 \r
   @retval EFI_SUCCESS            The function completed successfully.\r
   @retval EFI_UNSUPPORTED        Unsupport SettingScope.\r
@@ -928,7 +935,8 @@ ExtractDefault (
   IN BROWSER_SETTING_SCOPE            SettingScope,\r
   IN BROWSER_GET_DEFAULT_VALUE        GetDefaultValueScope,\r
   IN BROWSER_STORAGE                  *Storage,\r
-  IN BOOLEAN                          RetrieveValueFirst\r
+  IN BOOLEAN                          RetrieveValueFirst,\r
+  IN BOOLEAN                          SkipGetAltCfg\r
   );\r
 \r
 /**\r
@@ -1530,12 +1538,31 @@ UiFreeMenuList (
   Find parent menu for current menu.\r
 \r
   @param  CurrentMenu    Current Menu\r
+  @param  SettingLevel   Whether find parent menu in Form Level or Formset level.\r
+                         In form level, just find the parent menu; \r
+                         In formset level, find the parent menu which has different\r
+                         formset guid value.\r
 \r
   @retval   The parent menu for current menu.\r
 **/\r
 FORM_ENTRY_INFO *\r
 UiFindParentMenu (\r
-  IN FORM_ENTRY_INFO  *CurrentMenu\r
+  IN FORM_ENTRY_INFO          *CurrentMenu,\r
+  IN BROWSER_SETTING_SCOPE    SettingLevel\r
+  );\r
+  \r
+/**\r
+  Validate the HiiHandle.\r
+\r
+  @param  HiiHandle              The input HiiHandle which need to validate.\r
+\r
+  @retval TRUE                   The handle is validate.\r
+  @retval FALSE                  The handle is invalidate.\r
+\r
+**/\r
+BOOLEAN\r
+ValidateHiiHandle (\r
+  EFI_HII_HANDLE          HiiHandle\r
   );\r
 \r
 /**\r
@@ -1771,4 +1798,37 @@ IsTrue (
   IN EFI_HII_VALUE     *Result\r
   );\r
 \r
+/**\r
+  Get Formset_storage base on the input varstoreid info.\r
+\r
+  @param  FormSet                Pointer of the current FormSet.\r
+  @param  VarStoreId             Varstore ID info.\r
+\r
+  @return Pointer to a FORMSET_STORAGE data structure.\r
+\r
+**/\r
+FORMSET_STORAGE *\r
+GetFstStgFromVarId (\r
+  IN FORM_BROWSER_FORMSET  *FormSet,\r
+  IN EFI_VARSTORE_ID       VarStoreId\r
+  );\r
+\r
+/**\r
+  Get Formset_storage base on the input browser storage.\r
+\r
+  More than one formsets may share the same browser storage,\r
+  this function just get the first formset storage which\r
+  share the browser storage.\r
+\r
+  @param  Storage              browser storage info.\r
+\r
+  @return Pointer to a FORMSET_STORAGE data structure.\r
+  \r
+\r
+**/\r
+FORMSET_STORAGE *\r
+GetFstStgFromBrsStg (\r
+  IN BROWSER_STORAGE       *Storage\r
+  );\r
+\r
 #endif\r