]>
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 |
23 | #define EFI_FORM_BROWSER_PROTOCOL_GUID \\r | |
24 | { 0xe5a1333e, 0xe1b4, 0x4e55, { 0xce, 0xeb, 0x35, 0xc3, 0xef, 0x13, 0x34, 0x43 } }\r | |
25 | \r | |
26 | \r | |
27 | typedef struct _EFI_FORM_BROWSER_PROTOCOL EFI_FORM_BROWSER_PROTOCOL;\r | |
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 | |
55 | /**\r | |
56 | \r | |
57 | This function is the primary interface to the internal\r | |
58 | forms-based browser. By calling this routine, one is directing\r | |
59 | the browser to use a variety of passed-in information or\r | |
60 | primarily use the HII database as the source of information.\r | |
61 | \r | |
62 | @param This A pointer to the EFI_FORM_BROWSER_PROTOCOL\r | |
63 | instance.\r | |
64 | \r | |
65 | @param Handle A pointer to an array of HII handles to\r | |
66 | display. This value should correspond to the\r | |
67 | value of the HII form package that is required\r | |
68 | to be displayed.\r | |
69 | \r | |
70 | @param HandleCount The number of handles in the array\r | |
71 | specified by Handle.\r | |
72 | \r | |
73 | @param SingleUse If FALSE, the browser operates as a standard\r | |
74 | forms processor and exits only when\r | |
75 | explicitly requested by the user. If TRUE,\r | |
76 | the browser will return immediately after\r | |
77 | processing the first user-generated\r | |
78 | selection.\r | |
79 | \r | |
80 | @param ScreenDimensions Allows the browser to be called so\r | |
81 | that it occupies a portion of the\r | |
82 | physical screen instead of\r | |
83 | dynamically determining the screen\r | |
84 | dimensions. If the input values\r | |
85 | violate the platform policy then the\r | |
86 | dimensions will be dynamically\r | |
87 | adjusted to comply.\r | |
88 | \r | |
89 | @param ResetRequired This BOOLEAN value will tell the caller\r | |
90 | if a reset is required based on the data\r | |
91 | that might have been changed. The\r | |
92 | ResetRequired parameter is primarily\r | |
93 | applicable for configuration\r | |
94 | applications, and is an optional\r | |
95 | parameter.\r | |
96 | \r | |
97 | @retval EFI_SUCCESS The function completed successfully\r | |
98 | \r | |
99 | @retval EFI_NOT_FOUND The variable was not found.\r | |
100 | \r | |
101 | @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for\r | |
102 | the result. DataSize has been\r | |
103 | updated with the size needed to\r | |
104 | complete the request.\r | |
105 | \r | |
106 | @retval EFI_INVALID_PARAMETER One of the parameters has an\r | |
107 | invalid value.\r | |
108 | \r | |
109 | @retval EFI_DEVICE_ERROR The variable could not be saved due\r | |
110 | to a hardware failure.\r | |
111 | \r | |
112 | **/\r | |
113 | typedef\r | |
114 | EFI_STATUS\r | |
115 | (EFIAPI *EFI_SEND_FORM) (\r | |
116 | IN CONST EFI_FORM_BROWSER_PROTOCOL *This,\r | |
117 | IN CONST EFI_HII_HANDLE *Handle,\r | |
118 | IN CONST UINTN HandleCount,\r | |
119 | IN CONST BOOLEAN SingleUse,\r | |
120 | IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r | |
121 | OUT BOOLEAN *ResetRequired OPTIONAL\r | |
122 | );\r | |
123 | \r | |
124 | \r | |
125 | /**\r | |
126 | \r | |
127 | This routine is called by a routine which was called by the\r | |
128 | browser. This routine called this service in the browser to\r | |
129 | retrieve or set certain uncommitted state information.\r | |
130 | \r | |
131 | @param This A pointer to the EFI_FORM_BROWSER_PROTOCOL\r | |
132 | instance.\r | |
133 | \r | |
134 | @param ResultsDataSize A pointer to the size of the buffer\r | |
135 | associated with ResultsData. \r | |
136 | \r | |
137 | @param ResultsData A string returned from an IFR browser or\r | |
138 | equivalent. The results string will have\r | |
139 | no routing information in them.\r | |
140 | \r | |
141 | @param RetrieveData A BOOLEAN field which allows an agent to\r | |
142 | retrieve (if RetrieveData = TRUE) data\r | |
143 | from the uncommitted browser state\r | |
144 | information or set (if RetrieveData =\r | |
145 | FALSE) data in the uncommitted browser\r | |
146 | state information.\r | |
147 | \r | |
148 | @param VariableGuid An optional field to indicate the target\r | |
149 | variable GUID name to use.\r | |
150 | \r | |
151 | @param VariableName An optional field to indicate the target\r | |
152 | human-readable variable name.\r | |
153 | \r | |
154 | \r | |
155 | @retval EFI_SUCCESS The results have been distributed or are\r | |
156 | awaiting distribution.\r | |
157 | \r | |
158 | @retval EFI_OUT_OF_RESOURCES The ResultsDataSize specified\r | |
159 | was too small to contain the\r | |
160 | results data.\r | |
161 | \r | |
162 | **/\r | |
163 | typedef\r | |
164 | EFI_STATUS\r | |
165 | (EFIAPI *EFI_BROWSER_CALLBACK ) (\r | |
166 | IN CONST EFI_FORM_BROWSER_PROTOCOL *This,\r | |
167 | IN OUT UINTN *ResultsDataSize,\r | |
168 | IN OUT EFI_STRING ResultsData,\r | |
169 | IN CONST BOOLEAN RetrieveData,\r | |
170 | IN CONST EFI_GUID *VariableGuid, OPTIONAL\r | |
171 | IN CONST CHAR16 *VariableName OPTIONAL\r | |
172 | );\r | |
173 | \r | |
174 | /**\r | |
175 | \r | |
176 | This protocol is the interface to call for drivers to leverage\r | |
177 | the EFI configuration driver interface.\r | |
178 | \r | |
179 | @param SendForm Provides direction to the configuration\r | |
180 | driver whether to use the HII database or to\r | |
181 | use a passed-in set of data. This functions\r | |
182 | also establishes a pointer to the calling\r | |
183 | driver's callback interface. See the\r | |
184 | SendForm() function description.\r | |
185 | \r | |
186 | @param BrowserCallback Routine used to expose internal\r | |
187 | configuration state of the browser.\r | |
188 | This is primarily used by callback\r | |
189 | handler routines which were called by\r | |
190 | the browser and in-turn need to get\r | |
191 | additional information from the\r | |
192 | browser itself. See the\r | |
193 | BrowserCallback() function\r | |
194 | description.\r | |
195 | \r | |
196 | **/\r | |
197 | struct _EFI_FORM_BROWSER_PROTOCOL {\r | |
198 | EFI_SEND_FORM SendForm;\r | |
199 | EFI_BROWSER_CALLBACK BrowserCallback;\r | |
200 | } ;\r | |
201 | \r | |
202 | \r | |
203 | extern EFI_GUID gEfiFormBrowserProtocolGuid;\r | |
204 | \r | |
205 | #endif\r | |
206 | \r | |
207 | \r |