]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
MdeModulePkg: Add submitted callback test case in DriverSample
[mirror_edk2.git] / MdeModulePkg / Universal / DriverSampleDxe / DriverSample.c
index 8ec1d4e6e81c57fe422f33c4738094cbf5b9dfe3..efb78bf6be1c5b0eab6f4dba946f992c5e74375d 100644 (file)
@@ -2,7 +2,7 @@
 This is an example of how a driver might export data to the HII protocol to be\r
 later utilized by the Setup Protocol\r
 \r
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2016, 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
@@ -1834,6 +1834,28 @@ DriverCallback (
     }\r
   break;\r
 \r
+  case EFI_BROWSER_ACTION_SUBMITTED:\r
+    {\r
+      if (QuestionId == 0x1250) {\r
+        //\r
+        // Sample CallBack for EFI_BROWSER_ACTION_SUBMITTED action:\r
+        // Show up a pop-up to show SUBMITTED callback has been triggered.\r
+        //\r
+        do {\r
+          CreatePopUp (\r
+            EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,\r
+            &Key,\r
+            L"",\r
+            L"EfiVarstore value has been submitted!",\r
+            L"Press ESC or ENTER to continue ...",\r
+            L"",\r
+            NULL\r
+            );\r
+        } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN));\r
+      }\r
+    }\r
+    break;\r
+\r
   default:\r
     Status = EFI_UNSUPPORTED;\r
     break;\r