VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Application/UiApp/FrontPage.h@ 77662

Last change on this file since 77662 was 77662, checked in by vboxsync, 6 years ago

EFI: First step in UDK2018 merge. Does not build yet.

  • Property svn:eol-style set to native
File size: 7.1 KB
Line 
1/** @file
2Head file for front page.
3
4Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
5This program and the accompanying materials
6are licensed and made available under the terms and conditions of the BSD License
7which accompanies this distribution. The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
15#ifndef _FRONT_PAGE_H_
16#define _FRONT_PAGE_H_
17
18#include "String.h"
19#include "Ui.h"
20
21#include <Protocol/BootLogo.h>
22//
23// These is the VFR compiler generated data representing our VFR data.
24//
25extern UINT8 FrontPageVfrBin[];
26
27extern EFI_FORM_BROWSER2_PROTOCOL *gFormBrowser2;
28
29
30#define SMBIOS_TYPE4_CPU_SOCKET_POPULATED BIT6
31
32//
33// This is the VFR compiler generated header file which defines the
34// string identifiers.
35//
36#define PRINTABLE_LANGUAGE_NAME_STRING_ID 0x0001
37
38//
39// These are defined as the same with vfr file
40//
41#define FRONT_PAGE_FORM_ID 0x1000
42
43#define LABEL_FRANTPAGE_INFORMATION 0x1000
44#define LABEL_END 0xffff
45
46#define FRONT_PAGE_FORMSET_GUID \
47 { \
48 0x9e0c30bc, 0x3f06, 0x4ba6, {0x82, 0x88, 0x9, 0x17, 0x9b, 0x85, 0x5d, 0xbe} \
49 }
50
51#define FRONT_PAGE_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('F', 'P', 'C', 'B')
52
53typedef struct {
54 UINTN Signature;
55
56 //
57 // HII relative handles
58 //
59 EFI_HII_HANDLE HiiHandle;
60 EFI_HANDLE DriverHandle;
61 EFI_STRING_ID *LanguageToken;
62
63 //
64 // Produced protocols
65 //
66 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;
67} FRONT_PAGE_CALLBACK_DATA;
68
69
70#define EFI_FP_CALLBACK_DATA_FROM_THIS(a) \
71 CR (a, \
72 FRONT_PAGE_CALLBACK_DATA, \
73 ConfigAccess, \
74 FRONT_PAGE_CALLBACK_DATA_SIGNATURE \
75 )
76
77/**
78 This function allows a caller to extract the current configuration for one
79 or more named elements from the target driver.
80
81
82 @param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
83 @param Request - A null-terminated Unicode string in <ConfigRequest> format.
84 @param Progress - On return, points to a character in the Request string.
85 Points to the string's null terminator if request was successful.
86 Points to the most recent '&' before the first failing name/value
87 pair (or the beginning of the string if the failure is in the
88 first name/value pair) if the request was not successful.
89 @param Results - A null-terminated Unicode string in <ConfigAltResp> format which
90 has all values filled in for the names in the Request string.
91 String to be allocated by the called function.
92
93 @retval EFI_SUCCESS The Results is filled with the requested values.
94 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.
95 @retval EFI_INVALID_PARAMETER Request is NULL, illegal syntax, or unknown name.
96 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
97
98**/
99EFI_STATUS
100EFIAPI
101FakeExtractConfig (
102 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
103 IN CONST EFI_STRING Request,
104 OUT EFI_STRING *Progress,
105 OUT EFI_STRING *Results
106 );
107
108/**
109 This function processes the results of changes in configuration.
110
111
112 @param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
113 @param Configuration - A null-terminated Unicode string in <ConfigResp> format.
114 @param Progress - A pointer to a string filled in with the offset of the most
115 recent '&' before the first failing name/value pair (or the
116 beginning of the string if the failure is in the first
117 name/value pair) or the terminating NULL if all was successful.
118
119 @retval EFI_SUCCESS The Results is processed successfully.
120 @retval EFI_INVALID_PARAMETER Configuration is NULL.
121 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
122
123**/
124EFI_STATUS
125EFIAPI
126FakeRouteConfig (
127 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
128 IN CONST EFI_STRING Configuration,
129 OUT EFI_STRING *Progress
130 );
131
132/**
133 This function processes the results of changes in configuration.
134
135
136 @param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
137 @param Action - Specifies the type of action taken by the browser.
138 @param QuestionId - A unique value which is sent to the original exporting driver
139 so that it can identify the type of data to expect.
140 @param Type - The type of value for the question.
141 @param Value - A pointer to the data being sent to the original exporting driver.
142 @param ActionRequest - On return, points to the action requested by the callback function.
143
144 @retval EFI_SUCCESS The callback successfully handled the action.
145 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
146 @retval EFI_DEVICE_ERROR The variable could not be saved.
147 @retval EFI_UNSUPPORTED The specified Action is not supported by the callback.
148
149**/
150EFI_STATUS
151EFIAPI
152FrontPageCallback (
153 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
154 IN EFI_BROWSER_ACTION Action,
155 IN EFI_QUESTION_ID QuestionId,
156 IN UINT8 Type,
157 IN EFI_IFR_TYPE_VALUE *Value,
158 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
159 );
160
161/**
162 Initialize HII information for the FrontPage
163
164 @retval EFI_SUCCESS The operation is successful.
165 @retval EFI_DEVICE_ERROR If the dynamic opcode creation failed.
166
167**/
168EFI_STATUS
169InitializeFrontPage (
170 VOID
171 );
172
173/**
174 Acquire the string associated with the ProducerGuid and return it.
175
176
177 @param ProducerGuid - The Guid to search the HII database for
178 @param Token - The token value of the string to extract
179 @param String - The string that is extracted
180
181 @retval EFI_SUCCESS The function returns EFI_SUCCESS always.
182
183**/
184EFI_STATUS
185GetProducerString (
186 IN EFI_GUID *ProducerGuid,
187 IN EFI_STRING_ID Token,
188 OUT CHAR16 **String
189 );
190
191/**
192 This function is the main entry of the UI entry.
193 The function will present the main menu of the system UI.
194
195 @param ConnectAllHappened Caller passes the value to UI to avoid unnecessary connect-all.
196
197**/
198VOID
199EFIAPI
200UiEntry (
201 IN BOOLEAN ConnectAllHappened
202 );
203
204/**
205 Extract device path for given HII handle and class guid.
206
207 @param Handle The HII handle.
208
209 @retval NULL Fail to get the device path string.
210 @return PathString Get the device path string.
211
212**/
213CHAR16 *
214ExtractDevicePathFromHiiHandle (
215 IN EFI_HII_HANDLE Handle
216 );
217
218#endif // _FRONT_PAGE_H_
219
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette