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