VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/SetupBrowserDxe/Expression.h@ 58466

Last change on this file since 58466 was 58466, checked in by vboxsync, 9 years ago

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

  • Property svn:eol-style set to native
File size: 6.8 KB
Line 
1/** @file
2Private structure, MACRO and function definitions for User Interface related functionalities.
3
4Copyright (c) 2004 - 2013, 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 _EXPRESSION_H_
16#define _EXPRESSION_H_
17
18/**
19 Get the expression list count.
20
21 @param Level Which type this expression belong to. Form,
22 statement or option?
23
24 @retval >=0 The expression count
25 @retval -1 Input parameter error.
26
27**/
28INTN
29GetConditionalExpressionCount (
30 IN EXPRESS_LEVEL Level
31 );
32
33/**
34 Reset stack pointer to begin of the stack.
35
36**/
37VOID
38ResetCurrentExpressionStack (
39 VOID
40 );
41
42/**
43 Reset stack pointer to begin of the stack.
44
45**/
46VOID
47ResetMapExpressionListStack (
48 VOID
49 );
50
51/**
52 Reset stack pointer to begin of the stack.
53
54**/
55VOID
56ResetScopeStack (
57 VOID
58 );
59
60/**
61 Push an Operand onto the Stack
62
63 @param Operand Operand to push.
64
65 @retval EFI_SUCCESS The value was pushed onto the stack.
66 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
67 stack.
68
69**/
70EFI_STATUS
71PushScope (
72 IN UINT8 Operand
73 );
74
75/**
76 Get the expression Buffer pointer.
77
78 @param Level Which type this expression belong to. Form,
79 statement or option?
80
81 @retval The start pointer of the expression buffer or NULL.
82
83**/
84FORM_EXPRESSION **
85GetConditionalExpressionList (
86 IN EXPRESS_LEVEL Level
87 );
88
89/**
90 Pop an Operand from the Stack
91
92 @param Operand Operand to pop.
93
94 @retval EFI_SUCCESS The value was pushed onto the stack.
95 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
96 stack.
97
98**/
99EFI_STATUS
100PopScope (
101 OUT UINT8 *Operand
102 );
103
104/**
105 Push the list of map expression onto the Stack
106
107 @param Pointer Pointer to the list of map expression to be pushed.
108
109 @retval EFI_SUCCESS The value was pushed onto the stack.
110 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
111
112**/
113EFI_STATUS
114PushMapExpressionList (
115 IN VOID *Pointer
116 );
117
118/**
119 Push current expression onto the Stack
120
121 @param Pointer Pointer to current expression.
122
123 @retval EFI_SUCCESS The value was pushed onto the stack.
124 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
125
126**/
127EFI_STATUS
128PushCurrentExpression (
129 IN VOID *Pointer
130 );
131
132/**
133 Zero extend integer/boolean/date/time to UINT64 for comparing.
134
135 @param Value HII Value to be converted.
136
137**/
138VOID
139ExtendValueToU64 (
140 IN EFI_HII_VALUE *Value
141 );
142
143/**
144 Push the expression options onto the Stack.
145
146 @param Pointer Pointer to the current expression.
147 @param Level Which type this expression belong to. Form,
148 statement or option?
149
150 @retval EFI_SUCCESS The value was pushed onto the stack.
151 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
152
153**/
154EFI_STATUS
155PushConditionalExpression (
156 IN FORM_EXPRESSION *Pointer,
157 IN EXPRESS_LEVEL Level
158 );
159
160/**
161 Pop the expression options from the Stack
162
163 @param Level Which type this expression belong to. Form,
164 statement or option?
165
166 @retval EFI_SUCCESS The value was pushed onto the stack.
167 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
168
169**/
170EFI_STATUS
171PopConditionalExpression (
172 IN EXPRESS_LEVEL Level
173 );
174
175/**
176 Pop the list of map expression from the Stack
177
178 @param Pointer Pointer to the list of map expression to be pop.
179
180 @retval EFI_SUCCESS The value was pushed onto the stack.
181 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
182
183**/
184EFI_STATUS
185PopMapExpressionList (
186 OUT VOID **Pointer
187 );
188
189/**
190 Pop current expression from the Stack
191
192 @param Pointer Pointer to current expression to be pop.
193
194 @retval EFI_SUCCESS The value was pushed onto the stack.
195 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
196
197**/
198EFI_STATUS
199PopCurrentExpression (
200 OUT VOID **Pointer
201 );
202
203/**
204 Evaluate the result of a HII expression.
205
206 If Expression is NULL, then ASSERT.
207
208 @param FormSet FormSet associated with this expression.
209 @param Form Form associated with this expression.
210 @param Expression Expression to be evaluated.
211
212 @retval EFI_SUCCESS The expression evaluated successfuly
213 @retval EFI_NOT_FOUND The Question which referenced by a QuestionId
214 could not be found.
215 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
216 stack.
217 @retval EFI_ACCESS_DENIED The pop operation underflowed the stack
218 @retval EFI_INVALID_PARAMETER Syntax error with the Expression
219
220**/
221EFI_STATUS
222EvaluateExpression (
223 IN FORM_BROWSER_FORMSET *FormSet,
224 IN FORM_BROWSER_FORM *Form,
225 IN OUT FORM_EXPRESSION *Expression
226 );
227/**
228 Return the result of the expression list. Check the expression list and
229 return the highest priority express result.
230 Priority: DisableIf > SuppressIf > GrayOutIf > FALSE
231
232 @param ExpList The input expression list.
233 @param Evaluate Whether need to evaluate the expression first.
234 @param FormSet FormSet associated with this expression.
235 @param Form Form associated with this expression.
236
237 @retval EXPRESS_RESULT Return the higher priority express result.
238 DisableIf > SuppressIf > GrayOutIf > FALSE
239
240**/
241EXPRESS_RESULT
242EvaluateExpressionList (
243 IN FORM_EXPRESSION_LIST *ExpList,
244 IN BOOLEAN Evaluate,
245 IN FORM_BROWSER_FORMSET *FormSet, OPTIONAL
246 IN FORM_BROWSER_FORM *Form OPTIONAL
247 );
248
249/**
250 Get Form given its FormId.
251
252 @param FormSet The formset which contains this form.
253 @param FormId Id of this form.
254
255 @retval Pointer The form.
256 @retval NULL Specified Form is not found in the formset.
257
258**/
259FORM_BROWSER_FORM *
260IdToForm (
261 IN FORM_BROWSER_FORMSET *FormSet,
262 IN UINT16 FormId
263 );
264
265#endif // _EXPRESSION_H
Note: See TracBrowser for help on using the repository browser.

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