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