]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
2 | \r | |
3 | The file provides services to call for drivers to leverage the\r | |
4 | EFI configuration driver interface.\r | |
5 | \r | |
6 | Copyright (c) 2006 - 2007, Intel Corporation\r | |
7 | All rights reserved. This program and the accompanying materials \r | |
8 | are licensed and made available under the terms and conditions of the BSD License \r | |
9 | which accompanies this distribution. The full text of the license may be found at \r | |
10 | http://opensource.org/licenses/bsd-license.php \r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
14 | \r | |
d1f95000 | 15 | **/\r |
16 | \r | |
17 | #ifndef __EFI_FORM_BROWSER_H__\r | |
18 | #define __EFI_FORM_BROWSER_H__\r | |
19 | \r | |
5f40670e | 20 | #error "UEFI 2.1 HII is not fully implemented for now, Please don't include this file now."\r |
21 | \r | |
d1f95000 | 22 | \r |
5a1fc221 | 23 | #define EFI_FORM_BROWSER2_PROTOCOL_GUID \\r |
d1f95000 | 24 | { 0xe5a1333e, 0xe1b4, 0x4e55, { 0xce, 0xeb, 0x35, 0xc3, 0xef, 0x13, 0x34, 0x43 } }\r |
25 | \r | |
26 | \r | |
5a1fc221 | 27 | typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL;\r |
d1f95000 | 28 | \r |
29 | \r | |
30 | \r | |
31 | /**\r | |
32 | \r | |
33 | @param LeftColumn Value that designates the text column\r | |
34 | where the browser window will begin from\r | |
35 | the left-hand side of the screen\r | |
36 | RightColumn Value that designates the text\r | |
37 | column where the browser window will end\r | |
38 | on the right-hand side of the screen.\r | |
39 | \r | |
40 | @param TopRow Value that designates the text row from the\r | |
41 | top of the screen where the browser window\r | |
42 | will start.\r | |
43 | \r | |
44 | @param BottomRow Value that designates the text row from the\r | |
45 | bottom of the screen where the browser\r | |
46 | window will end. \r | |
47 | **/\r | |
48 | typedef struct {\r | |
49 | UINTN LeftColumn;\r | |
50 | UINTN RightColumn;\r | |
51 | UINTN TopRow;\r | |
52 | UINTN BottomRow;\r | |
53 | } EFI_SCREEN_DESCRIPTOR;\r | |
54 | \r | |
5a1fc221 | 55 | typedef UINTN EFI_BROWSER_ACTION_REQUEST;\r |
56 | \r | |
57 | #define EFI_BROWSER_ACTION_NONE 0\r | |
58 | #define EFI_BROWSER_ACTION_RESET 1\r | |
59 | #define EFI_BROWSER_ACTION_SUMBIT 2\r | |
60 | #define EFI_BROWSER_ACTION_EXIT 3\r | |
61 | \r | |
62 | \r | |
d1f95000 | 63 | /**\r |
64 | \r | |
65 | This function is the primary interface to the internal\r | |
66 | forms-based browser. By calling this routine, one is directing\r | |
67 | the browser to use a variety of passed-in information or\r | |
68 | primarily use the HII database as the source of information.\r | |
69 | \r | |
70 | @param This A pointer to the EFI_FORM_BROWSER_PROTOCOL\r | |
71 | instance.\r | |
72 | \r | |
73 | @param Handle A pointer to an array of HII handles to\r | |
74 | display. This value should correspond to the\r | |
75 | value of the HII form package that is required\r | |
76 | to be displayed.\r | |
77 | \r | |
78 | @param HandleCount The number of handles in the array\r | |
79 | specified by Handle.\r | |
80 | \r | |
81 | @param SingleUse If FALSE, the browser operates as a standard\r | |
82 | forms processor and exits only when\r | |
83 | explicitly requested by the user. If TRUE,\r | |
84 | the browser will return immediately after\r | |
85 | processing the first user-generated\r | |
86 | selection.\r | |
87 | \r | |
88 | @param ScreenDimensions Allows the browser to be called so\r | |
89 | that it occupies a portion of the\r | |
90 | physical screen instead of\r | |
91 | dynamically determining the screen\r | |
92 | dimensions. If the input values\r | |
93 | violate the platform policy then the\r | |
94 | dimensions will be dynamically\r | |
95 | adjusted to comply.\r | |
96 | \r | |
97 | @param ResetRequired This BOOLEAN value will tell the caller\r | |
98 | if a reset is required based on the data\r | |
99 | that might have been changed. The\r | |
100 | ResetRequired parameter is primarily\r | |
101 | applicable for configuration\r | |
102 | applications, and is an optional\r | |
103 | parameter.\r | |
104 | \r | |
105 | @retval EFI_SUCCESS The function completed successfully\r | |
106 | \r | |
107 | @retval EFI_NOT_FOUND The variable was not found.\r | |
108 | \r | |
109 | @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for\r | |
110 | the result. DataSize has been\r | |
111 | updated with the size needed to\r | |
112 | complete the request.\r | |
113 | \r | |
114 | @retval EFI_INVALID_PARAMETER One of the parameters has an\r | |
115 | invalid value.\r | |
116 | \r | |
117 | @retval EFI_DEVICE_ERROR The variable could not be saved due\r | |
118 | to a hardware failure.\r | |
119 | \r | |
120 | **/\r | |
121 | typedef\r | |
122 | EFI_STATUS\r | |
5a1fc221 | 123 | (EFIAPI *EFI_SEND_FORM2) (\r |
124 | IN CONST EFI_FORM_BROWSER_PROTOCOL *This,\r | |
125 | IN CONST EFI_HII_HANDLE *Handle,\r | |
126 | IN CONST UINTN HandleCount,\r | |
127 | IN CONST BOOLEAN SingleUse,\r | |
128 | IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r | |
129 | OUT BOOLEAN *ResetRequired OPTIONAL\r | |
130 | OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL\r | |
d1f95000 | 131 | );\r |
132 | \r | |
133 | \r | |
134 | /**\r | |
135 | \r | |
136 | This routine is called by a routine which was called by the\r | |
137 | browser. This routine called this service in the browser to\r | |
138 | retrieve or set certain uncommitted state information.\r | |
139 | \r | |
140 | @param This A pointer to the EFI_FORM_BROWSER_PROTOCOL\r | |
141 | instance.\r | |
142 | \r | |
143 | @param ResultsDataSize A pointer to the size of the buffer\r | |
144 | associated with ResultsData. \r | |
145 | \r | |
146 | @param ResultsData A string returned from an IFR browser or\r | |
147 | equivalent. The results string will have\r | |
148 | no routing information in them.\r | |
149 | \r | |
150 | @param RetrieveData A BOOLEAN field which allows an agent to\r | |
151 | retrieve (if RetrieveData = TRUE) data\r | |
152 | from the uncommitted browser state\r | |
153 | information or set (if RetrieveData =\r | |
154 | FALSE) data in the uncommitted browser\r | |
155 | state information.\r | |
156 | \r | |
157 | @param VariableGuid An optional field to indicate the target\r | |
158 | variable GUID name to use.\r | |
159 | \r | |
160 | @param VariableName An optional field to indicate the target\r | |
161 | human-readable variable name.\r | |
162 | \r | |
163 | \r | |
164 | @retval EFI_SUCCESS The results have been distributed or are\r | |
165 | awaiting distribution.\r | |
166 | \r | |
167 | @retval EFI_OUT_OF_RESOURCES The ResultsDataSize specified\r | |
168 | was too small to contain the\r | |
169 | results data.\r | |
170 | \r | |
171 | **/\r | |
172 | typedef\r | |
173 | EFI_STATUS\r | |
5a1fc221 | 174 | (EFIAPI *EFI_BROWSER_CALLBACK2 ) (\r |
d1f95000 | 175 | IN CONST EFI_FORM_BROWSER_PROTOCOL *This,\r |
176 | IN OUT UINTN *ResultsDataSize,\r | |
177 | IN OUT EFI_STRING ResultsData,\r | |
178 | IN CONST BOOLEAN RetrieveData,\r | |
179 | IN CONST EFI_GUID *VariableGuid, OPTIONAL\r | |
180 | IN CONST CHAR16 *VariableName OPTIONAL\r | |
181 | );\r | |
182 | \r | |
183 | /**\r | |
184 | \r | |
185 | This protocol is the interface to call for drivers to leverage\r | |
186 | the EFI configuration driver interface.\r | |
187 | \r | |
188 | @param SendForm Provides direction to the configuration\r | |
189 | driver whether to use the HII database or to\r | |
190 | use a passed-in set of data. This functions\r | |
191 | also establishes a pointer to the calling\r | |
192 | driver's callback interface. See the\r | |
193 | SendForm() function description.\r | |
194 | \r | |
195 | @param BrowserCallback Routine used to expose internal\r | |
196 | configuration state of the browser.\r | |
197 | This is primarily used by callback\r | |
198 | handler routines which were called by\r | |
199 | the browser and in-turn need to get\r | |
200 | additional information from the\r | |
201 | browser itself. See the\r | |
202 | BrowserCallback() function\r | |
203 | description.\r | |
204 | \r | |
205 | **/\r | |
5a1fc221 | 206 | struct _EFI_FORM_BROWSER2_PROTOCOL {\r |
207 | EFI_SEND_FORM2 SendForm;\r | |
208 | EFI_BROWSER_CALLBACK2 BrowserCallback;\r | |
d1f95000 | 209 | } ;\r |
210 | \r | |
211 | \r | |
5a1fc221 | 212 | extern EFI_GUID gEfiFormBrowser2ProtocolGuid;\r |
d1f95000 | 213 | \r |
214 | #endif\r | |
215 | \r | |
216 | \r |