]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
Set the free buffer pointer to NULL to avoid later free again.
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.h
index 77a0ad1baccd3a4913417278714bc60194d07888..8fe9e98e63d0fd4952c8e2147413c85c76782d18 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Private MACRO, structure and function definitions for Setup Browser module.\r
 \r
-Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, 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
@@ -136,6 +136,9 @@ typedef struct {
 \r
   UINT8            Type;           // Storage type\r
 \r
+  BOOLEAN          Initialized;    // Whether this varstore is initialized, efi varstore not used.\r
+\r
+  EFI_HII_HANDLE   HiiHandle;      // HiiHandle for this varstore, efi varstore not used.\r
   EFI_GUID         Guid;\r
 \r
   CHAR16           *Name;          // For EFI_IFR_VARSTORE\r
@@ -285,9 +288,11 @@ typedef enum {
   ExpressOption\r
 } EXPRESS_LEVEL;\r
 \r
+typedef struct _FORM_BROWSER_STATEMENT FORM_BROWSER_STATEMENT;\r
+\r
 #define FORM_BROWSER_STATEMENT_SIGNATURE  SIGNATURE_32 ('F', 'S', 'T', 'A')\r
 \r
-typedef struct {\r
+struct _FORM_BROWSER_STATEMENT{\r
   UINTN                 Signature;\r
   LIST_ENTRY            Link;\r
 \r
@@ -349,7 +354,8 @@ typedef struct {
 \r
   EFI_IMAGE_ID          ImageId;             // nested EFI_IFR_IMAGE\r
   UINT8                 RefreshInterval;     // nested EFI_IFR_REFRESH, refresh interval(in seconds) for Question value, 0 means no refresh\r
-  BOOLEAN               InSubtitle;          // nesting inside of EFI_IFR_SUBTITLE\r
+\r
+  FORM_BROWSER_STATEMENT *ParentStatement;\r
 \r
   LIST_ENTRY            InconsistentListHead;// nested inconsistent expression list (FORM_EXPRESSION)\r
   LIST_ENTRY            NoSubmitListHead;    // nested nosubmit expression list (FORM_EXPRESSION)\r
@@ -358,7 +364,7 @@ typedef struct {
 \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
 \r
 #define FORM_BROWSER_STATEMENT_FROM_LINK(a)  CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)\r
 \r
@@ -706,6 +712,35 @@ IsQuestionValueChanged (
   IN GET_SET_QUESTION_VALUE_WITH      GetValueFrom\r
   );\r
 \r
+/**\r
+  Validate the FormSet. If the formset is not validate, remove it from the list.\r
+\r
+  @param  FormSet                The input FormSet which need to validate.\r
+\r
+  @retval TRUE                   The handle is validate.\r
+  @retval FALSE                  The handle is invalidate.\r
+\r
+**/\r
+BOOLEAN\r
+ValidateFormSet (\r
+  FORM_BROWSER_FORMSET    *FormSet\r
+  );\r
+\r
+/**\r
+  Update the ValueChanged status for questions.\r
+\r
+  @param  FormSet                FormSet data structure.\r
+  @param  Form                   Form data structure.\r
+  @param  SettingScope           Setting Scope for Default action.\r
+\r
+**/\r
+VOID \r
+UpdateStatementStatus (\r
+  IN FORM_BROWSER_FORMSET             *FormSet,\r
+  IN FORM_BROWSER_FORM                *Form, \r
+  IN BROWSER_SETTING_SCOPE            SettingScope\r
+  );\r
+\r
 /**\r
   Get Question's current Value.\r
 \r
@@ -1321,6 +1356,7 @@ ExecuteAction (
   @retval BROWSER_NO_CHANGES       No browser data is changed.\r
   @retval BROWSER_SAVE_CHANGES     The changed browser data is saved.\r
   @retval BROWSER_DISCARD_CHANGES  The changed browser data is discard.\r
+  @retval BROWSER_KEEP_CURRENT     Browser keep current changes.\r
 \r
 **/\r
 UINT32\r
@@ -1613,5 +1649,25 @@ VOID
 CleanBrowserStorage (\r
   IN OUT FORM_BROWSER_FORMSET  *FormSet\r
   );\r
-  \r
+\r
+/**\r
+  Find HII Handle in the HII database associated with given Device Path.\r
+\r
+  If DevicePath is NULL, then ASSERT.\r
+\r
+  @param  DevicePath             Device Path associated with the HII package list\r
+                                 handle.\r
+  @param  FormsetGuid            The formset guid for this formset.\r
+\r
+  @retval Handle                 HII package list Handle associated with the Device\r
+                                        Path.\r
+  @retval NULL                   Hii Package list handle is not found.\r
+\r
+**/\r
+EFI_HII_HANDLE\r
+DevicePathToHiiHandle (\r
+  IN EFI_DEVICE_PATH_PROTOCOL   *DevicePath,\r
+  IN EFI_GUID                   *FormsetGuid\r
+  );\r
+\r
 #endif\r