/** @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
-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
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
\r
**/\r
#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
#include <Guid/HiiFormMapMethodGuid.h>\r
+#include <Guid/ZeroGuid.h>\r
\r
#include <Library/PrintLib.h>\r
#include <Library/DebugLib.h>\r
// Produced protocol\r
//\r
EFI_FORM_BROWSER2_PROTOCOL FormBrowser2;\r
- EFI_FORM_BROWSER_EXTENSION_PROTOCOL FormBrowserEx;\r
+ EDKII_FORM_BROWSER_EXTENSION_PROTOCOL FormBrowserEx;\r
\r
EDKII_FORM_BROWSER_EXTENSION2_PROTOCOL FormBrowserEx2;\r
\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
\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
- UINT8 ReferenceCount; // How many form set storage refrence this storage.\r
} BROWSER_STORAGE;\r
\r
#define BROWSER_STORAGE_FROM_LINK(a) CR (a, BROWSER_STORAGE, Link, BROWSER_STORAGE_SIGNATURE)\r
UINTN Signature;\r
LIST_ENTRY Link;\r
\r
+ LIST_ENTRY SaveFailLink;\r
+\r
UINT16 VarStoreId;\r
\r
BROWSER_STORAGE *BrowserStorage;\r
\r
+ CHAR16 *ConfigHdr; // <ConfigHdr>\r
+\r
CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r
- CHAR16 *ConfigElements;// Elements need to load initial data.\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
+ CHAR16 *RestoreConfigRequest; // When submit formset fail, the element need to be restored\r
+ CHAR16 *SyncConfigRequest; // When submit formset fail, the element need to be synced\r
} FORMSET_STORAGE;\r
\r
#define FORMSET_STORAGE_FROM_LINK(a) CR (a, FORMSET_STORAGE, Link, FORMSET_STORAGE_SIGNATURE)\r
+#define FORMSET_STORAGE_FROM_SAVE_FAIL_LINK(a) CR (a, FORMSET_STORAGE, SaveFailLink, FORMSET_STORAGE_SIGNATURE)\r
\r
typedef union {\r
EFI_STRING_ID VarName;\r
EFI_HII_VALUE Result; // Expression evaluation result\r
\r
UINT8 TimeOut; // For EFI_IFR_WARNING_IF\r
+ EFI_IFR_OP_HEADER *OpCode; // Save the opcode buffer.\r
\r
LIST_ENTRY OpCodeListHead; // OpCodes consist of this expression (EXPRESSION_OPCODE)\r
} FORM_EXPRESSION;\r
typedef struct {\r
UINTN Signature;\r
LIST_ENTRY Link;\r
- \r
+\r
EFI_IFR_ONE_OF_OPTION *OpCode; // OneOfOption Data\r
\r
EFI_STRING_ID Text;\r
\r
typedef enum {\r
ExpressFalse = 0,\r
- ExpressGrayOut, \r
+ ExpressGrayOut,\r
ExpressSuppress,\r
ExpressDisable\r
} EXPRESS_RESULT;\r
\r
typedef enum {\r
ExpressNone = 0,\r
- ExpressForm, \r
+ ExpressForm,\r
ExpressStatement,\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
BROWSER_STORAGE *Storage;\r
VAR_STORE_INFO VarStoreInfo;\r
UINT16 StorageWidth;\r
+ UINT16 BitStorageWidth;\r
+ UINT16 BitVarOffset;\r
UINT8 QuestionFlags;\r
+ BOOLEAN QuestionReferToBitField;// Whether the question is stored in a bit field.\r
CHAR16 *VariableName; // Name/Value or EFI Variable name\r
CHAR16 *BlockName; // Buffer storage block name: "OFFSET=...WIDTH=..."\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
UINTN Signature;\r
LIST_ENTRY Link;\r
\r
+ LIST_ENTRY SaveFailLink;\r
+\r
CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r
- UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest> \r
+ CHAR16 *ConfigAltResp; // Alt config response string for this ConfigRequest.\r
+ UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>\r
UINTN SpareStrLen;\r
+ CHAR16 *RestoreConfigRequest; // When submit form fail, the element need to be restored\r
+ CHAR16 *SyncConfigRequest; // When submit form fail, the element need to be synced\r
\r
BROWSER_STORAGE *Storage;\r
} FORM_BROWSER_CONFIG_REQUEST;\r
#define FORM_BROWSER_CONFIG_REQUEST_FROM_LINK(a) CR (a, FORM_BROWSER_CONFIG_REQUEST, Link, FORM_BROWSER_CONFIG_REQUEST_SIGNATURE)\r
+#define FORM_BROWSER_CONFIG_REQUEST_FROM_SAVE_FAIL_LINK(a) CR (a, FORM_BROWSER_CONFIG_REQUEST, SaveFailLink, FORM_BROWSER_CONFIG_REQUEST_SIGNATURE)\r
\r
#define FORM_BROWSER_FORM_SIGNATURE SIGNATURE_32 ('F', 'F', 'R', 'M')\r
#define STANDARD_MAP_FORM_TYPE 0x01\r
\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
LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)\r
LIST_ENTRY ConfigRequestHead; // List of configreques for all storage.\r
typedef struct {\r
UINTN Signature;\r
LIST_ENTRY Link;\r
+ LIST_ENTRY SaveFailLink;\r
+\r
EFI_HII_HANDLE HiiHandle; // unique id for formset.\r
EFI_HANDLE DriverHandle;\r
EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;\r
UINT16 Class; // Tiano extended Class code\r
UINT16 SubClass; // Tiano extended Subclass code\r
EFI_IMAGE_ID ImageId;\r
+ EFI_IFR_OP_HEADER *OpCode; //mainly for formset op to get ClassGuid\r
\r
FORM_BROWSER_STATEMENT *StatementBuffer; // Buffer for all Statements and Questions\r
EXPRESSION_OPCODE *ExpressionBuffer; // Buffer for all Expression OpCode\r
+ FORM_BROWSER_FORM *SaveFailForm; // The form which failed to save.\r
+ FORM_BROWSER_STATEMENT *SaveFailStatement; // The Statement which failed to save.\r
\r
LIST_ENTRY StatementListOSF; // Statement list out side of the form.\r
LIST_ENTRY StorageListHead; // Storage list (FORMSET_STORAGE)\r
+ LIST_ENTRY SaveFailStorageListHead; // Storage list for the save fail storage.\r
LIST_ENTRY DefaultStoreListHead; // DefaultStore list (FORMSET_DEFAULTSTORE)\r
LIST_ENTRY FormListHead; // Form list (FORM_BROWSER_FORM)\r
LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r
} FORM_BROWSER_FORMSET;\r
#define FORM_BROWSER_FORMSET_FROM_LINK(a) CR (a, FORM_BROWSER_FORMSET, Link, FORM_BROWSER_FORMSET_SIGNATURE)\r
\r
+#define FORM_BROWSER_FORMSET_FROM_SAVE_FAIL_LINK(a) CR (a, FORM_BROWSER_FORMSET, SaveFailLink, FORM_BROWSER_FORMSET_SIGNATURE)\r
+\r
typedef struct {\r
LIST_ENTRY Link;\r
EFI_EVENT RefreshEvent;\r
//\r
// Globals defined in Setup.c\r
//\r
+ BOOLEAN FlagReconnect;\r
+ BOOLEAN CallbackReconnect;\r
BOOLEAN ResetRequired;\r
BOOLEAN ExitRequired;\r
EFI_HII_HANDLE HiiHandle;\r
EFI_GUID FormSetGuid;\r
EFI_FORM_ID FormId;\r
UI_MENU_SELECTION *Selection;\r
-\r
- LIST_ENTRY FormHistoryList;\r
+ FORM_BROWSER_FORMSET *SystemLevelFormSet;\r
+ EFI_QUESTION_ID CurFakeQestId;\r
+ BOOLEAN HiiPackageListUpdated;\r
+ BOOLEAN FinishRetrieveCall;\r
+ LIST_ENTRY FormHistoryList;\r
+ LIST_ENTRY FormSetList;\r
} BROWSER_CONTEXT;\r
\r
#define BROWSER_CONTEXT_FROM_LINK(a) CR (a, BROWSER_CONTEXT, Link, BROWSER_CONTEXT_SIGNATURE)\r
// Get/set question value from/to.\r
//\r
typedef enum {\r
- GetSetValueWithEditBuffer, // Get/Set question value from/to editbuffer in the storage.\r
+ GetSetValueWithEditBuffer = 0, // Get/Set question value from/to editbuffer in the storage.\r
GetSetValueWithBuffer, // Get/Set question value from/to buffer in the storage.\r
GetSetValueWithHiiDriver, // Get/Set question value from/to hii driver.\r
+ GetSetValueWithBothBuffer, // Compare the editbuffer with buffer for this question, not use the question value.\r
GetSetValueWithMax // Invalid value.\r
} GET_SET_QUESTION_VALUE_WITH;\r
\r
extern EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mPathFromText;\r
extern EDKII_FORM_DISPLAY_ENGINE_PROTOCOL *mFormDisplay;\r
\r
-extern BOOLEAN gResetRequired;\r
+extern BOOLEAN gCallbackReconnect;\r
+extern BOOLEAN gFlagReconnect;\r
+extern BOOLEAN gResetRequiredFormLevel;\r
+extern BOOLEAN gResetRequiredSystemLevel;\r
extern BOOLEAN gExitRequired;\r
-\r
extern LIST_ENTRY gBrowserFormSetList;\r
extern LIST_ENTRY gBrowserHotKeyList;\r
extern BROWSER_SETTING_SCOPE gBrowserSettingScope;\r
extern EXIT_HANDLER ExitHandlerFunction;\r
extern EFI_HII_HANDLE mCurrentHiiHandle;\r
+extern SETUP_DRIVER_PRIVATE_DATA mPrivateData;\r
//\r
// Browser Global Strings\r
//\r
extern CHAR16 *gEmptyString;\r
\r
-extern EFI_GUID gZeroGuid;\r
-\r
extern UI_MENU_SELECTION *gCurrentSelection;\r
+extern BOOLEAN mHiiPackageListUpdated;\r
+extern UINT16 mCurFakeQestId;\r
+extern BOOLEAN mFinishRetrieveCall;\r
\r
//\r
// Global Procedure Defines\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
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
);\r
\r
/**\r
Reset Questions to their initial value or default value in a Form, Formset or System.\r
\r
- GetDefaultValueScope parameter decides which questions will reset \r
+ GetDefaultValueScope parameter decides which questions will reset\r
to its default value.\r
\r
@param FormSet FormSet data structure.\r
@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
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
Initialize Question's Edit copy from Storage.\r
\r
- @param Selection Selection contains the information about \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
/**\r
Initialize Question's Edit copy from Storage for the whole Formset.\r
\r
- @param Selection Selection contains the information about \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
);\r
\r
/**\r
- Save globals used by previous call to SendForm(). SendForm() may be called from \r
+ Save globals used by previous call to SendForm(). SendForm() may be called from\r
HiiConfigAccess.Callback(), this will cause SendForm() be reentried.\r
So, save globals of previous call to SendForm() and restore them upon exit.\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 SettingLevel Input Settting level, if it is FormLevel, just exit current form. \r
+ @param SettingLevel Input Settting level, if it is FormLevel, just exit current form.\r
else, we need to exit current formset.\r
- \r
+\r
@retval TRUE Exit current form.\r
@retval FALSE User press ESC and keep in current form.\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
- @retval EFI_SUCCESS The call back function excutes successfully.\r
- @return Other value if the call back function failed to excute. \r
+ @retval EFI_SUCCESS The call back function executes successfully.\r
+ @return Other value if the call back function failed to execute.\r
**/\r
-EFI_STATUS \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
- \r
+\r
/**\r
Call the retrieve type call back function for one question to get the initialize data.\r
- \r
- This function only used when in the initialize stage, because in this stage, the \r
+\r
+ This function only used when in the initialize stage, because in this stage, the\r
Selection->Form is not ready. For other case, use the ProcessCallBackFunction instead.\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
+ @retval EFI_SUCCESS The call back function executes successfully.\r
+ @return Other value if the call back function failed to execute.\r
**/\r
-EFI_STATUS \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
Find the matched FormSet context in the backup maintain list based on HiiHandle.\r
- \r
+\r
@param Handle The Hii Handle.\r
- \r
+\r
@return the found FormSet context. If no found, NULL will return.\r
\r
**/\r
-FORM_BROWSER_FORMSET * \r
+FORM_BROWSER_FORMSET *\r
GetFormSetFromHiiHandle (\r
EFI_HII_HANDLE Handle\r
);\r
\r
/**\r
Check whether the input HII handle is the FormSet that is being used.\r
- \r
+\r
@param Handle The Hii Handle.\r
- \r
+\r
@retval TRUE HII handle is being used.\r
@retval FALSE HII handle is not being used.\r
\r
All hot keys have the same scope. The mixed hot keys with the different level are not supported.\r
If no scope is set, the default scope will be FormSet level.\r
After all registered hot keys are removed, previous Scope can reset to another level.\r
- \r
- @param[in] Scope Scope level to be set. \r
- \r
+\r
+ @param[in] Scope Scope level to be set.\r
+\r
@retval EFI_SUCCESS Scope is set correctly.\r
- @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE. \r
+ @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE.\r
@retval EFI_UNSPPORTED Scope level is different from current one that the registered hot keys have.\r
\r
**/\r
Only support hot key that is not printable character (control key, function key, etc.).\r
If the action value is zero, the hot key will be unregistered if it has been registered.\r
If the same hot key has been registered, the new action and help string will override the previous ones.\r
- \r
+\r
@param[in] KeyData A pointer to a buffer that describes the keystroke\r
- information for the hot key. Its type is EFI_INPUT_KEY to \r
+ information for the hot key. Its type is EFI_INPUT_KEY to\r
be supported by all ConsoleIn devices.\r
- @param[in] Action Action value that describes what action will be trigged when the hot key is pressed. \r
+ @param[in] Action Action value that describes what action will be trigged when the hot key is pressed.\r
@param[in] DefaultId Specifies the type of defaults to retrieve, which is only for DEFAULT action.\r
@param[in] HelpString Help string that describes the hot key information.\r
Its value may be NULL for the unregistered hot key.\r
- \r
+\r
@retval EFI_SUCCESS Hot key is registered or unregistered.\r
@retval EFI_INVALID_PARAMETER KeyData is NULL.\r
@retval EFI_NOT_FOUND KeyData is not found to be unregistered.\r
@retval EFI_UNSUPPORTED Key represents a printable character. It is conflicted with Browser.\r
+ @retval EFI_ALREADY_STARTED Key already been registered for one hot key.\r
**/\r
EFI_STATUS\r
EFIAPI\r
);\r
\r
/**\r
- Register Exit handler function. \r
- When more than one handler function is registered, the latter one will override the previous one. \r
- When NULL handler is specified, the previous Exit handler will be unregistered. \r
- \r
- @param[in] Handler Pointer to handler function. \r
+ Register Exit handler function.\r
+ When more than one handler function is registered, the latter one will override the previous one.\r
+ When NULL handler is specified, the previous Exit handler will be unregistered.\r
+\r
+ @param[in] Handler Pointer to handler function.\r
\r
**/\r
VOID\r
);\r
\r
/**\r
- \r
- Check whether the browser data has been modified. \r
+\r
+ Check whether the browser data has been modified.\r
\r
@retval TRUE Browser data is changed.\r
@retval FALSE No browser data is changed.\r
\r
**/\r
-BOOLEAN \r
+BOOLEAN\r
EFIAPI\r
IsBrowserDataModified (\r
VOID\r
);\r
\r
/**\r
- \r
- Execute the action requested by the Action parameter. \r
+\r
+ Execute the action requested by the Action parameter.\r
\r
@param[in] Action Execute the request action.\r
@param[in] DefaultId The default Id info when need to load default value.\r
@retval EFI_INVALID_PARAMETER The input action value is invalid.\r
\r
**/\r
-EFI_STATUS \r
+EFI_STATUS\r
EFIAPI\r
ExecuteAction (\r
IN UINT32 Action,\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
VOID\r
);\r
\r
+/**\r
+ Check whether the Reset Required for the browser\r
+\r
+ @retval TRUE Browser required to reset after exit.\r
+ @retval FALSE Browser not need to reset after exit.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsResetRequired (\r
+ VOID\r
+ );\r
+\r
/**\r
Find the registered HotKey based on KeyData.\r
- \r
+\r
@param[in] KeyData A pointer to a buffer that describes the keystroke\r
information for the hot key.\r
\r
GetBrowserStatement (\r
IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement\r
);\r
- \r
+\r
/**\r
Password may be stored as encrypted by Configuration Driver. When change a\r
password, user will be challenged with old password. To validate user input old\r
SetupBrowser (\r
IN OUT UI_MENU_SELECTION *Selection\r
);\r
- \r
+\r
/**\r
Free up the resource allocated for all strings required\r
by Setup Browser.\r
**/\r
FORM_ENTRY_INFO *\r
UiFindMenuList (\r
- IN EFI_HII_HANDLE HiiHandle, \r
+ IN EFI_HII_HANDLE HiiHandle,\r
IN EFI_GUID *FormSetGuid,\r
IN UINT16 FormId\r
);\r
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
+ Copy current Menu list to the new menu list.\r
+\r
+ @param NewMenuListHead New create Menu list.\r
+ @param CurrentMenuListHead Current Menu list.\r
+\r
+**/\r
+VOID\r
+UiCopyMenuList (\r
+ OUT LIST_ENTRY *NewMenuListHead,\r
+ IN LIST_ENTRY *CurrentMenuListHead\r
);\r
\r
/**\r
\r
/**\r
Compare two Hii value.\r
- \r
+\r
@param Value1 Expression value to compare on left-hand.\r
@param Value2 Expression value to compare on right-hand.\r
@param Result Return value after compare.\r
return Positive value if Value1 is greater than Value2.\r
retval Negative value if Value1 is less than Value2.\r
@param HiiHandle Only required for string compare.\r
- \r
+\r
@retval other Could not perform compare on two values.\r
@retval EFI_SUCCESS Compare the value success.\r
- \r
+\r
**/\r
EFI_STATUS\r
CompareHiiValue (\r
);\r
\r
/**\r
- Perform Password check. \r
+ Perform Password check.\r
Passwork may be encrypted by driver that requires the specific check.\r
- \r
+\r
@param Form Form where Password Statement is in.\r
@param Statement Password statement\r
@param PasswordString Password string to be checked. It may be NULL.\r
NULL means to restore password.\r
"" string can be used to checked whether old password does exist.\r
- \r
+\r
@return Status Status of Password check.\r
**/\r
EFI_STATUS\r
GetBrowserStatement (\r
IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement\r
);\r
- \r
+\r
/**\r
\r
Initialize the Display form structure data.\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
+/**\r
+ Perform question check.\r
+\r
+ If one question has more than one check, process form high priority to low.\r
+\r
+ @param FormSet FormSet data structure.\r
+ @param Form Form data structure.\r
+ @param Question The Question to be validated.\r
+\r
+ @retval EFI_SUCCESS Form validation pass.\r
+ @retval other Form validation failed.\r
+\r
+**/\r
+EFI_STATUS\r
+ValueChangedValidation (\r
+ IN FORM_BROWSER_FORMSET *FormSet,\r
+ IN FORM_BROWSER_FORM *Form,\r
+ IN FORM_BROWSER_STATEMENT *Question\r
+ );\r
+\r
+/**\r
+ Pop up the error info.\r
+\r
+ @param BrowserStatus The input browser status.\r
+ @param HiiHandle The HiiHandle for this error opcode.\r
+ @param OpCode The opcode use to get the erro info and timeout value.\r
+ @param ErrorString Error string used by BROWSER_NO_SUBMIT_IF.\r
+\r
+**/\r
+UINT32\r
+PopupErrorMessage (\r
+ IN UINT32 BrowserStatus,\r
+ IN EFI_HII_HANDLE HiiHandle,\r
+ IN EFI_IFR_OP_HEADER *OpCode, OPTIONAL\r
+ IN CHAR16 *ErrorString\r
+ );\r
+\r
+/**\r
+ Check whether the result is TRUE or FALSE.\r
+\r
+ For the EFI_HII_VALUE value type is numeric, return TRUE if the\r
+ value is not 0.\r
+\r
+ @param Result Input the result data.\r
+\r
+ @retval TRUE The result is TRUE.\r
+ @retval FALSE The result is FALSE.\r
+\r
+**/\r
+BOOLEAN\r
+IsTrue (\r
+ 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
+/**\r
+ Reconnect the controller.\r
+\r
+ @param DriverHandle The controller handle which need to be reconnect.\r
+\r
+ @retval TRUE do the reconnect behavior success.\r
+ @retval FALSE do the reconnect behavior failed.\r
+\r
+**/\r
+BOOLEAN\r
+ReconnectController (\r
+ IN EFI_HANDLE DriverHandle\r
+ );\r
+\r
+/**\r
+ Converts the unicode character of the string from uppercase to lowercase.\r
+ This is a internal function.\r
+\r
+ @param ConfigString String to be converted\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+HiiToLower (\r
+ IN EFI_STRING ConfigString\r
+ );\r
+\r
#endif\r