]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
2 | \r | |
3 | The file provides services to forward results to PCOL-based\r | |
4 | handler if EFI HII results processing protocol invokes this\r | |
5 | protocol.\r | |
6 | \r | |
7 | Copyright (c) 2006 - 2007, Intel Corporation\r | |
8 | All rights reserved. This program and the accompanying materials \r | |
9 | are licensed and made available under the terms and conditions of the BSD License \r | |
10 | which accompanies this distribution. The full text of the license may be found at \r | |
11 | http://opensource.org/licenses/bsd-license.php \r | |
12 | \r | |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
15 | \r | |
d1f95000 | 16 | **/\r |
17 | \r | |
18 | \r | |
19 | #ifndef __EFI_HII_CONFIG_ACCESS_H__\r | |
20 | #define __EFI_HII_CONFIG_ACCESS_H__\r | |
21 | \r | |
1528fae8 | 22 | #error "UEFI 2.1 HII is not fully implemented for now, Please don't include this file now."\r |
23 | \r | |
d1f95000 | 24 | #define EFI_HII_CONFIGURATION_ACCESS_PROTOCOL_GUID \\r |
25 | { 0x330d4706, 0xf2a0, 0x4e4f, { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } }\r | |
26 | \r | |
27 | typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL;\r | |
28 | \r | |
29 | /**\r | |
30 | \r | |
31 | This function allows the caller to request the current\r | |
32 | configuration for one or more named elements. The resulting\r | |
33 | string is in <ConfigAltResp> format. Any and all alternative\r | |
34 | configuration strings shall also be appended to the end of the\r | |
35 | current configuration string. If they are, they must appear\r | |
36 | after the current configuration. They must contain the same\r | |
37 | routing (GUID, NAME, PATH) as the current configuration string.\r | |
38 | They must have an additional description indicating the type of\r | |
39 | alternative configuration the string represents,\r | |
40 | "ALTCFG=<StringToken>". That <StringToken> (when\r | |
41 | converted from Hex UNICODE to binary) is a reference to a\r | |
42 | string in the associated string pack.\r | |
43 | \r | |
44 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
45 | \r | |
46 | @param Request A null-terminated Unicode string in\r | |
47 | <ConfigRequest> format. Note that this\r | |
48 | includes the routing information as well as\r | |
49 | the configurable name / value pairs. It is\r | |
50 | invalid for this string to be in\r | |
51 | <MultiConfigRequest> format.\r | |
52 | \r | |
53 | @param Progress On return, points to a character in the\r | |
54 | Request string. Points to the string's null\r | |
55 | terminator if request was successful. Points\r | |
56 | to the most recent "&" before the first\r | |
57 | failing name / value pair (or the beginning\r | |
58 | of the string if the failure is in the first\r | |
59 | name / value pair) if the request was not\r | |
60 | successful\r | |
61 | \r | |
62 | @param Results A null-terminated Unicode string in\r | |
63 | <ConfigAltResp> format which has all values\r | |
64 | filled in for the names in the Request string.\r | |
65 | String to be allocated by the called function.\r | |
66 | \r | |
67 | @retval EFI_SUCCESS The Results string is filled with the\r | |
68 | values corresponding to all requested\r | |
69 | names.\r | |
70 | \r | |
71 | @retval EFI_OUT_OF_MEMORY Not enough memory to store the\r | |
72 | parts of the results that must be\r | |
73 | stored awaiting possible future\r | |
74 | protocols.\r | |
75 | \r | |
76 | @retval EFI_INVALID_PARAMETER For example, passing in a NULL\r | |
77 | for the Request parameter\r | |
78 | would result in this type of\r | |
79 | error. In this case, the\r | |
80 | Progress parameter would be\r | |
81 | set to NULL. \r | |
82 | \r | |
83 | @retval EFI_NOT_FOUND Routing data doesn't match any\r | |
84 | known driver. Progress set to the\r | |
85 | first character in the routing header.\r | |
86 | Note: There is no requirement that the\r | |
87 | driver validate the routing data. It\r | |
88 | must skip the <ConfigHdr> in order to\r | |
89 | process the names.\r | |
90 | \r | |
91 | @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set\r | |
92 | to most recent & before the\r | |
93 | error or the beginning of the\r | |
94 | string.\r | |
95 | \r | |
96 | @retval EFI_INVALID_PARAMETER Unknown name. Progress points\r | |
97 | to the & before the name in\r | |
98 | question.\r | |
99 | \r | |
100 | **/\r | |
101 | typedef\r | |
102 | EFI_STATUS\r | |
103 | (EFIAPI * EFI_HII_ACCESS_EXTRACT_CONFIG ) (\r | |
104 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
105 | IN CONST EFI_STRING Request,\r | |
106 | OUT EFI_STRING *Progress,\r | |
107 | OUT EFI_STRING *Results\r | |
108 | );\r | |
109 | \r | |
110 | \r | |
111 | /**\r | |
112 | \r | |
113 | This function applies changes in a driver's configuration.\r | |
114 | Input is a Configuration, which has the routing data for this\r | |
115 | driver followed by name / value configuration pairs. The driver\r | |
116 | must apply those pairs to its configurable storage. If the\r | |
117 | driver's configuration is stored in a linear block of data\r | |
118 | and the driver????s name / value pairs are in <BlockConfig>\r | |
119 | format, it may use the ConfigToBlock helper function (above) to\r | |
120 | simplify the job.\r | |
121 | \r | |
122 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
123 | \r | |
124 | @param Configuration A null-terminated Unicode string in\r | |
125 | <ConfigString> format. Progress a\r | |
126 | pointer to a string filled in with the\r | |
127 | offset of the most recent '&' before the\r | |
128 | first failing name / value pair (or the\r | |
129 | beginn ing of the string if the failure\r | |
130 | is in the first name / value pair) or\r | |
131 | the terminating NULL if all was\r | |
132 | successful.\r | |
133 | \r | |
134 | @retval EFI_SUCCESS The results have been distributed or are\r | |
135 | awaiting distribution.\r | |
136 | \r | |
137 | @retval EFI_OUT_OF_MEMORY Not enough memory to store the\r | |
138 | parts of the results that must be\r | |
139 | stored awaiting possible future\r | |
140 | protocols.\r | |
141 | \r | |
142 | @retval EFI_INVALID_PARAMETERS Passing in a NULL for the\r | |
143 | Results parameter would result\r | |
144 | in this type of error.\r | |
145 | \r | |
146 | @retval EFI_NOT_FOUND Target for the specified routing data\r | |
147 | was not found\r | |
148 | \r | |
149 | **/\r | |
150 | typedef\r | |
151 | EFI_STATUS\r | |
152 | (EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG ) (\r | |
153 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
154 | IN CONST EFI_STRING Configuration,\r | |
155 | OUT EFI_STRING *Progress\r | |
156 | );\r | |
157 | \r | |
158 | /**\r | |
159 | \r | |
160 | This function is called to provide results data to the driver.\r | |
161 | This data consists of a unique key that is used to identify\r | |
162 | which data is either being passed back or being asked for.\r | |
163 | \r | |
164 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
165 | \r | |
166 | @param KeyValue A unique value which is sent to the original\r | |
167 | exporting driver so that it can identify the\r | |
168 | type of data to expect. The format of the\r | |
169 | data tends to vary based on the opcode that\r | |
170 | generated the callback.\r | |
171 | \r | |
172 | @param Data A pointer to the data being sent to the original\r | |
173 | exporting driver. The format of the data should\r | |
174 | be the same as that of the question invoking the\r | |
175 | callback and will be known to the recipient.\r | |
176 | \r | |
177 | @retval EFI_SUCCESS The firmware has successfully stored the\r | |
178 | variable and its data as defined by the\r | |
179 | Attributes.\r | |
180 | \r | |
181 | @retval EFI_INVALID_PARAMETER An invalid combination of\r | |
182 | Attributes bits was supplied,\r | |
183 | or the DataSize exceeds the\r | |
184 | maximum allowed.\r | |
185 | \r | |
186 | @retval EFI_OUT_OF_RESOURCES Not enough storage is available\r | |
187 | to hold the variable and its\r | |
188 | data.\r | |
189 | \r | |
190 | @retval EFI_DEVICE_ERROR The variable could not be saved due\r | |
191 | to a hardware failure.\r | |
192 | \r | |
193 | \r | |
194 | **/\r | |
195 | typedef\r | |
196 | EFI_STATUS\r | |
197 | (EFIAPI *EFI_FORM_CALLBACK) (\r | |
198 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
199 | IN CONST UINT16 KeyValue,\r | |
200 | IN CONST VOID *Data\r | |
201 | );\r | |
202 | /**\r | |
203 | \r | |
204 | This protocol provides a callable interface between the HII and\r | |
205 | drivers. Only drivers which provide IFR data to HII are required\r | |
206 | to publish this protocol.\r | |
207 | \r | |
208 | @param ExtractConfig This function breaks apart the UNICODE\r | |
209 | request strings routing them to the\r | |
210 | appropriate drivers. This function is\r | |
211 | analogous to the similarly named\r | |
212 | function in the HII Routing Protocol.\r | |
213 | \r | |
214 | @param RouteConfig This function breaks apart the UNICODE\r | |
215 | results strings and returns configuration\r | |
216 | information as specified by the request.\r | |
217 | \r | |
218 | @param Callback This function is called from the\r | |
219 | configuration browser to communicate certain\r | |
220 | activities that were initiated by a user.\r | |
221 | \r | |
222 | \r | |
223 | **/\r | |
224 | struct _EFI_HII_CONFIG_ACCESS_PROTOCOL {\r | |
225 | EFI_HII_ACCESS_ROUTE_CONFIG ExtractConfig;\r | |
226 | EFI_HII_ACCESS_EXTRACT_CONFIG RouteConfig;\r | |
227 | EFI_FORM_CALLBACK Callback;\r | |
228 | } ;\r | |
229 | \r | |
230 | extern EFI_GUID gEfiHiiConfigAccessProtocolGuid;\r | |
231 | \r | |
232 | #endif\r | |
233 | \r |