diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-08-21 08:23:20 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-08-21 08:23:20 +0000 |
commit | 9776099ffa70add6fdb289075a4f8054de594d19 (patch) | |
tree | 2c02195a3befc54c37eba53103e791ac25705a2f /MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | |
parent | 09c990aeb1d4def43f5f0df167f0a8b8ea659e06 (diff) | |
download | edk2-platforms-9776099ffa70add6fdb289075a4f8054de594d19.tar.xz |
Patch includes:
1.Enable Retrieve callback type for all questions before show these questions.
2.Enable retrieve callback type for all questions without storage when initial these questions.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13655 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index 6e46e0e961..b8612e8c42 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -1323,6 +1323,57 @@ ProcessCallBackFunction ( }
/**
+ Call the retrieve type call back function for one question to get the initialize data.
+
+ This function only used when in the initialize stage, because in this stage, the
+ Selection->Form is not ready. For other case, use the ProcessCallBackFunction instead.
+
+ @param ConfigAccess The config access protocol produced by the hii driver.
+ @param Statement The Question which need to call.
+
+ @retval EFI_SUCCESS The call back function excutes successfully.
+ @return Other value if the call back function failed to excute.
+**/
+EFI_STATUS
+ProcessRetrieveForQuestion (
+ IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess,
+ IN FORM_BROWSER_STATEMENT *Statement
+ )
+{
+ EFI_STATUS Status;
+ EFI_BROWSER_ACTION_REQUEST ActionRequest;
+ EFI_HII_VALUE *HiiValue;
+ EFI_IFR_TYPE_VALUE *TypeValue;
+
+ Status = EFI_SUCCESS;
+ ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
+
+ if ((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != EFI_IFR_FLAG_CALLBACK) {
+ return EFI_UNSUPPORTED;
+ }
+
+ HiiValue = &Statement->HiiValue;
+ TypeValue = &HiiValue->Value;
+ if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {
+ //
+ // For OrderedList, passing in the value buffer to Callback()
+ //
+ TypeValue = (EFI_IFR_TYPE_VALUE *) Statement->BufferValue;
+ }
+
+ ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
+ Status = ConfigAccess->Callback (
+ ConfigAccess,
+ EFI_BROWSER_ACTION_RETRIEVE,
+ Statement->QuestionId,
+ HiiValue->Type,
+ TypeValue,
+ &ActionRequest
+ );
+ return Status;
+}
+
+/**
The worker function that send the displays to the screen. On output,
the selection made by user is returned.
|