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