]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.h
Update the copyright notice format
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / FrontPage.h
CommitLineData
5c08e117 1/** @file\r
2 FrontPage routines to handle the callbacks and browser calls\r
3\r
180a5a35
HT
4Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
5c08e117 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _FRONT_PAGE_H_\r
16#define _FRONT_PAGE_H_\r
17\r
18#include "DeviceMngr/DeviceManager.h"\r
19#include "BootMaint/BootMaint.h"\r
20#include "BootMngr/BootManager.h"\r
21#include "String.h"\r
22\r
9f6531d1 23\r
24//\r
25// These are the VFR compiler generated data representing our VFR data.\r
26//\r
27extern UINT8 FrontPageVfrBin[];\r
28\r
9f6531d1 29extern EFI_FORM_BROWSER2_PROTOCOL *gFormBrowser2;\r
9f6531d1 30\r
31extern UINTN gCallbackKey;\r
32extern BOOLEAN gConnectAllHappened;\r
33\r
34\r
5c08e117 35#define ONE_SECOND 10000000\r
36\r
da96258f 37///\r
38/// The size of a 3 character ISO639 language code.\r
39///\r
40#define ISO_639_2_ENTRY_SIZE 3\r
41\r
5c08e117 42//\r
43// This is the VFR compiler generated header file which defines the\r
44// string identifiers.\r
45//\r
46#define PRINTABLE_LANGUAGE_NAME_STRING_ID 0x0001\r
47\r
48//\r
49// These are defined as the same with vfr file\r
50//\r
51#define FRONT_PAGE_FORM_ID 0x1000\r
52\r
53#define FRONT_PAGE_KEY_CONTINUE 0x1000\r
54#define FRONT_PAGE_KEY_LANGUAGE 0x1234\r
55#define FRONT_PAGE_KEY_BOOT_MANAGER 0x1064\r
56#define FRONT_PAGE_KEY_DEVICE_MANAGER 0x8567\r
57#define FRONT_PAGE_KEY_BOOT_MAINTAIN 0x9876\r
58\r
59#define LABEL_SELECT_LANGUAGE 0x1000\r
75bf9d0e 60#define LABEL_END 0xffff\r
5c08e117 61\r
62#define FRONT_PAGE_FORMSET_GUID \\r
63 { \\r
64 0x9e0c30bc, 0x3f06, 0x4ba6, {0x82, 0x88, 0x9, 0x17, 0x9b, 0x85, 0x5d, 0xbe} \\r
65 }\r
66\r
67#define FRONT_PAGE_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('F', 'P', 'C', 'B')\r
68\r
69typedef struct {\r
70 UINTN Signature;\r
71\r
72 //\r
73 // HII relative handles\r
74 //\r
75 EFI_HII_HANDLE HiiHandle;\r
76 EFI_HANDLE DriverHandle;\r
77 EFI_STRING_ID *LanguageToken;\r
78\r
79 //\r
80 // Produced protocols\r
81 //\r
82 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r
83} FRONT_PAGE_CALLBACK_DATA;\r
84\r
85#define EFI_FP_CALLBACK_DATA_FROM_THIS(a) \\r
86 CR (a, \\r
87 FRONT_PAGE_CALLBACK_DATA, \\r
88 ConfigAccess, \\r
89 FRONT_PAGE_CALLBACK_DATA_SIGNATURE \\r
90 )\r
91\r
5c08e117 92/**\r
93 This function allows a caller to extract the current configuration for one\r
94 or more named elements from the target driver.\r
95\r
96\r
97 @param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
98 @param Request - A null-terminated Unicode string in <ConfigRequest> format.\r
99 @param Progress - On return, points to a character in the Request string.\r
100 Points to the string's null terminator if request was successful.\r
101 Points to the most recent '&' before the first failing name/value\r
102 pair (or the beginning of the string if the failure is in the\r
103 first name/value pair) if the request was not successful.\r
104 @param Results - A null-terminated Unicode string in <ConfigAltResp> format which\r
105 has all values filled in for the names in the Request string.\r
106 String to be allocated by the called function.\r
107\r
108 @retval EFI_SUCCESS The Results is filled with the requested values.\r
109 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.\r
110 @retval EFI_INVALID_PARAMETER Request is NULL, illegal syntax, or unknown name.\r
111 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.\r
112\r
113**/\r
114EFI_STATUS\r
115EFIAPI\r
116FakeExtractConfig (\r
117 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
118 IN CONST EFI_STRING Request,\r
119 OUT EFI_STRING *Progress,\r
120 OUT EFI_STRING *Results\r
121 );\r
122\r
123/**\r
124 This function processes the results of changes in configuration.\r
125\r
126\r
127 @param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
128 @param Configuration - A null-terminated Unicode string in <ConfigResp> format.\r
129 @param Progress - A pointer to a string filled in with the offset of the most\r
130 recent '&' before the first failing name/value pair (or the\r
131 beginning of the string if the failure is in the first\r
132 name/value pair) or the terminating NULL if all was successful.\r
133\r
134 @retval EFI_SUCCESS The Results is processed successfully.\r
135 @retval EFI_INVALID_PARAMETER Configuration is NULL.\r
136 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.\r
137\r
138**/\r
139EFI_STATUS\r
140EFIAPI\r
141FakeRouteConfig (\r
142 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
143 IN CONST EFI_STRING Configuration,\r
144 OUT EFI_STRING *Progress\r
145 );\r
146\r
147/**\r
148 This function processes the results of changes in configuration.\r
149\r
150\r
151 @param This - Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
152 @param Action - Specifies the type of action taken by the browser.\r
153 @param QuestionId - A unique value which is sent to the original exporting driver\r
154 so that it can identify the type of data to expect.\r
155 @param Type - The type of value for the question.\r
156 @param Value - A pointer to the data being sent to the original exporting driver.\r
157 @param ActionRequest - On return, points to the action requested by the callback function.\r
158\r
159 @retval EFI_SUCCESS The callback successfully handled the action.\r
160 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.\r
161 @retval EFI_DEVICE_ERROR The variable could not be saved.\r
162 @retval EFI_UNSUPPORTED The specified Action is not supported by the callback.\r
163\r
164**/\r
165EFI_STATUS\r
166EFIAPI\r
167FrontPageCallback (\r
168 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
169 IN EFI_BROWSER_ACTION Action,\r
170 IN EFI_QUESTION_ID QuestionId,\r
171 IN UINT8 Type,\r
172 IN EFI_IFR_TYPE_VALUE *Value,\r
173 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
174 );\r
175\r
176/**\r
177 Initialize HII information for the FrontPage\r
178\r
179\r
180 @param InitializeHiiData TRUE if HII elements need to be initialized.\r
181\r
182 @retval EFI_SUCCESS The operation is successful.\r
183 @retval EFI_DEVICE_ERROR If the dynamic opcode creation failed.\r
184\r
185**/\r
186EFI_STATUS\r
187InitializeFrontPage (\r
188 IN BOOLEAN InitializeHiiData\r
189 );\r
190\r
191/**\r
192 Acquire the string associated with the ProducerGuid and return it.\r
193\r
194\r
195 @param ProducerGuid - The Guid to search the HII database for\r
196 @param Token - The token value of the string to extract\r
197 @param String - The string that is extracted\r
198\r
199 @retval EFI_SUCCESS The function returns EFI_SUCCESS always.\r
200\r
201**/\r
202EFI_STATUS\r
203GetProducerString (\r
204 IN EFI_GUID *ProducerGuid,\r
205 IN EFI_STRING_ID Token,\r
206 OUT CHAR16 **String\r
207 );\r
208\r
209/**\r
210 Compare two EFI_TIME data.\r
211\r
212\r
213 @param FirstTime - A pointer to the first EFI_TIME data.\r
214 @param SecondTime - A pointer to the second EFI_TIME data.\r
215\r
216 @retval TRUE The FirstTime is not later than the SecondTime.\r
217 @retval FALSE The FirstTime is later than the SecondTime.\r
218\r
219**/\r
220BOOLEAN\r
221TimeCompare (\r
222 IN EFI_TIME *FirstTime,\r
223 IN EFI_TIME *SecondTime\r
224 );\r
225\r
226/**\r
227 This function is the main entry of the platform setup entry.\r
228 The function will present the main menu of the system setup,\r
229 this is the platform reference part and can be customize.\r
230\r
231\r
232 @param TimeoutDefault - The fault time out value before the system\r
233 continue to boot.\r
234 @param ConnectAllHappened - The indicater to check if the connect all have\r
baf46e70 235 already happened.\r
5c08e117 236\r
237**/\r
238VOID\r
239PlatformBdsEnterFrontPage (\r
240 IN UINT16 TimeoutDefault,\r
241 IN BOOLEAN ConnectAllHappened\r
242 );\r
243\r
244#endif // _FRONT_PAGE_H_\r
245\r