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