/** @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
\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
BROWSER_STORAGE *BrowserStorage;\r
\r
CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r
- CHAR16 *ConfigElements;// Elements need to load initial data.\r
UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>\r
UINTN SpareStrLen; // Spare length of ConfigRequest string buffer\r
} FORMSET_STORAGE;\r
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
\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
\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
\r
extern BOOLEAN gResetRequired;\r
extern BOOLEAN gExitRequired;\r
-\r
+extern BOOLEAN gFinishRetrieveCall;\r
extern LIST_ENTRY gBrowserFormSetList;\r
extern LIST_ENTRY gBrowserHotKeyList;\r
extern BROWSER_SETTING_SCOPE gBrowserSettingScope;\r
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
IN FORM_BROWSER_FORMSET *FormSet\r
);\r
\r
-/**\r
- Check whether the storage data for current form set is changed.\r
-\r
- @param FormSet FormSet data structure.\r
-\r
- @retval TRUE Data is changed.\r
- @retval FALSE Data is not changed.\r
-**/\r
-BOOLEAN \r
-IsStorageDataChangedForFormSet (\r
- IN FORM_BROWSER_FORMSET *FormSet\r
- );\r
-\r
/**\r
Call the call back function for the question and process the return action.\r
\r
about the Selection, form and formset to be displayed.\r
On output, Selection return the screen item that is selected\r
by user.\r
- @param Statement The Question which need to call.\r
+ @param FormSet The formset this question belong to.\r
+ @param Form The form this question belong to.\r
+ @param Question The Question which need to call.\r
@param Action The action request.\r
@param SkipSaveOrDiscard Whether skip save or discard action.\r
\r
EFI_STATUS \r
ProcessCallBackFunction (\r
IN OUT UI_MENU_SELECTION *Selection,\r
+ IN FORM_BROWSER_FORMSET *FormSet,\r
+ IN FORM_BROWSER_FORM *Form,\r
IN FORM_BROWSER_STATEMENT *Question,\r
IN EFI_BROWSER_ACTION Action,\r
IN BOOLEAN SkipSaveOrDiscard\r
\r
@param ConfigAccess The config access protocol produced by the hii driver.\r
@param Statement The Question which need to call.\r
+ @param FormSet The formset this question belong to.\r
\r
@retval EFI_SUCCESS The call back function excutes successfully.\r
@return Other value if the call back function failed to excute. \r
EFI_STATUS \r
ProcessRetrieveForQuestion (\r
IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess,\r
- IN FORM_BROWSER_STATEMENT *Statement\r
+ IN FORM_BROWSER_STATEMENT *Statement,\r
+ IN FORM_BROWSER_FORMSET *FormSet\r
);\r
\r
/**\r
@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
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
+/**\r
+ Adjust the config request info, remove the request elements which already in AllConfigRequest string.\r
+\r
+ @param Storage Form set Storage.\r
+ @param Request The input request string.\r
+ @param RespString Whether the input is ConfigRequest or ConfigResp format.\r
+\r
+ @retval TRUE Has element not covered by current used elements, need to continue to call ExtractConfig\r
+ @retval FALSE All elements covered by current used elements.\r
+\r
+**/\r
+BOOLEAN \r
+ConfigRequestAdjust (\r
+ IN BROWSER_STORAGE *Storage,\r
+ IN CHAR16 *Request,\r
+ IN BOOLEAN RespString\r
+ );\r
+\r
#endif\r