]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUi.c
MdeModulePkg/FaultTolerantWriteDxe: implement standalone MM version
[mirror_edk2.git] / MdeModulePkg / Library / BootMaintenanceManagerUiLib / BootMaintenanceManagerCustomizedUi.c
CommitLineData
a85be3ae
ED
1/** @file\r
2\r
3 This library class defines a set of interfaces to customize Ui module\r
4\r
5Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
6This program and the accompanying materials are licensed and made available under\r
7the terms and conditions of the BSD License that accompanies this distribution.\r
8The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php.\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15#include <Uefi.h>\r
16#include <Protocol/HiiConfigAccess.h>\r
17#include "BootMaintenanceManagerCustomizedUiSupport.h"\r
18\r
19/**\r
20 Customize menus in the page.\r
21\r
22 @param[in] HiiHandle The HII Handle of the form to update.\r
23 @param[in] StartOpCodeHandle The context used to insert opcode.\r
24 @param[in] CustomizePageType The page type need to be customized.\r
25\r
26**/\r
27VOID\r
28UiCustomizeBMMPage (\r
29 IN EFI_HII_HANDLE HiiHandle,\r
30 IN VOID *StartOpCodeHandle\r
31 )\r
32{\r
33 //\r
34 // Create "Boot Option" menu.\r
35 //\r
36 BmmCreateBootOptionMenu(HiiHandle, StartOpCodeHandle);\r
37 //\r
38 // Create "Driver Option" menu.\r
39 //\r
40 BmmCreateDriverOptionMenu(HiiHandle, StartOpCodeHandle);\r
41 //\r
42 // Create "Com Option" menu.\r
43 //\r
44 BmmCreateComOptionMenu(HiiHandle, StartOpCodeHandle);\r
45 //\r
46 // Create "Boot From File" menu.\r
47 //\r
48 BmmCreateBootFromFileMenu(HiiHandle, StartOpCodeHandle);\r
49\r
50 //\r
51 // Find third party drivers which need to be shown in the Bmm page.\r
52 //\r
53 BmmListThirdPartyDrivers (HiiHandle, &gEfiIfrBootMaintenanceGuid, NULL, StartOpCodeHandle);\r
54\r
55 //\r
56 // Create empty line.\r
57 //\r
58 BmmCreateEmptyLine (HiiHandle, StartOpCodeHandle);\r
59\r
60 //\r
61 // Create "Boot Next" menu.\r
62 //\r
63 BmmCreateBootNextMenu (HiiHandle, StartOpCodeHandle);\r
64 //\r
65 // Create "Time Out" menu.\r
66 //\r
67 BmmCreateTimeOutMenu (HiiHandle, StartOpCodeHandle);\r
68}\r
69\r
70/**\r
71 This function processes the results of changes in configuration.\r
72\r
73\r
74 @param HiiHandle Points to the hii handle for this formset.\r
75 @param Action Specifies the type of action taken by the browser.\r
76 @param QuestionId A unique value which is sent to the original exporting driver\r
77 so that it can identify the type of data to expect.\r
78 @param Type The type of value for the question.\r
79 @param Value A pointer to the data being sent to the original exporting driver.\r
80 @param ActionRequest On return, points to the action requested by the callback function.\r
81\r
82 @retval EFI_SUCCESS The callback successfully handled the action.\r
83 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.\r
84 @retval EFI_DEVICE_ERROR The variable could not be saved.\r
85 @retval EFI_UNSUPPORTED The specified Action is not supported by the callback.\r
86\r
87**/\r
88EFI_STATUS\r
89UiBMMCallbackHandler (\r
90 IN EFI_HII_HANDLE HiiHandle,\r
91 IN EFI_BROWSER_ACTION Action,\r
92 IN EFI_QUESTION_ID QuestionId,\r
93 IN UINT8 Type,\r
94 IN EFI_IFR_TYPE_VALUE *Value,\r
95 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
96 )\r
97{\r
98 return EFI_UNSUPPORTED;\r
99}\r