]>
Commit | Line | Data |
---|---|---|
90b24889 WF |
1 | /** @file\r |
2 | The Hii functions for WiFi Connection Manager.\r | |
3 | \r | |
4 | Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r | |
5 | \r | |
ecf98fbc | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
90b24889 WF |
7 | \r |
8 | **/\r | |
9 | \r | |
10 | #ifndef __EFI_WIFI_MGR_HII_CONFIG_ACCESS__\r | |
11 | #define __EFI_WIFI_MGR_HII_CONFIG_ACCESS__\r | |
12 | \r | |
13 | /**\r | |
14 | Update connection message on connect configuration page, and trigger related form refresh.\r | |
15 | \r | |
16 | @param[in] Nic The related Nic for updating message.\r | |
17 | @param[in] ConnectStateChanged The tag to tell if the connection state has been changed, only\r | |
18 | when the connection changes from "Connected" or "Disconnecting"\r | |
19 | to "Disconnected", or from "Disconnected" or "Connecting" to\r | |
20 | "Connected", this tag can be set as TRUE.\r | |
21 | @param[in] ConnectStatusMessage The message to show on connected status bar, if NULL, will\r | |
22 | use default message.\r | |
23 | \r | |
24 | **/\r | |
25 | VOID\r | |
26 | WifiMgrUpdateConnectMessage (\r | |
27 | IN WIFI_MGR_DEVICE_DATA *Nic,\r | |
28 | IN BOOLEAN ConnectStateChanged,\r | |
29 | IN EFI_STRING ConnectStatusMessage\r | |
30 | );\r | |
31 | \r | |
32 | /**\r | |
33 | This function allows the caller to request the current\r | |
34 | configuration for one or more named elements. The resulting\r | |
35 | string is in <ConfigAltResp> format. Any and all alternative\r | |
36 | configuration strings shall also be appended to the end of the\r | |
37 | current configuration string. If they are, they must appear\r | |
38 | after the current configuration. They must contain the same\r | |
39 | routing (GUID, NAME, PATH) as the current configuration string.\r | |
40 | They must have an additional description indicating the type of\r | |
41 | alternative configuration the string represents,\r | |
42 | "ALTCFG=<StringToken>". That <StringToken> (when\r | |
43 | converted from Hex UNICODE to binary) is a reference to a\r | |
44 | string in the associated string pack.\r | |
45 | \r | |
46 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
47 | \r | |
48 | @param Request A null-terminated Unicode string in\r | |
49 | <ConfigRequest> format. Note that this\r | |
50 | includes the routing information as well as\r | |
51 | the configurable name / value pairs. It is\r | |
52 | invalid for this string to be in\r | |
53 | <MultiConfigRequest> format.\r | |
54 | If a NULL is passed in for the Request field,\r | |
55 | all of the settings being abstracted by this function\r | |
56 | will be returned in the Results field. In addition,\r | |
57 | if a ConfigHdr is passed in with no request elements,\r | |
58 | all of the settings being abstracted for that particular\r | |
59 | ConfigHdr reference will be returned in the Results Field.\r | |
60 | \r | |
61 | @param Progress On return, points to a character in the\r | |
62 | Request string. Points to the string's null\r | |
63 | terminator if request was successful. Points\r | |
64 | to the most recent "&" before the first\r | |
65 | failing name / value pair (or the beginning\r | |
66 | of the string if the failure is in the first\r | |
67 | name / value pair) if the request was not\r | |
68 | successful.\r | |
69 | \r | |
70 | @param Results A null-terminated Unicode string in\r | |
71 | <MultiConfigAltResp> format which has all values\r | |
72 | filled in for the names in the Request string.\r | |
73 | String to be allocated by the called function.\r | |
74 | \r | |
75 | @retval EFI_SUCCESS The Results string is filled with the\r | |
76 | values corresponding to all requested\r | |
77 | names.\r | |
78 | \r | |
79 | @retval EFI_OUT_OF_RESOURCES Not enough memory to store the\r | |
80 | parts of the results that must be\r | |
81 | stored awaiting possible future\r | |
82 | protocols.\r | |
83 | \r | |
84 | @retval EFI_NOT_FOUND Routing data doesn't match any\r | |
85 | known driver. Progress set to the\r | |
86 | first character in the routing header.\r | |
87 | Note: There is no requirement that the\r | |
88 | driver validate the routing data. It\r | |
89 | must skip the <ConfigHdr> in order to\r | |
90 | process the names.\r | |
91 | \r | |
92 | @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set\r | |
93 | to most recent "&" before the\r | |
94 | error or the beginning of the\r | |
95 | string.\r | |
96 | \r | |
97 | @retval EFI_INVALID_PARAMETER Unknown name. Progress points\r | |
98 | to the & before the name in\r | |
99 | question.\r | |
100 | \r | |
101 | **/\r | |
102 | EFI_STATUS\r | |
103 | EFIAPI\r | |
104 | WifiMgrDxeHiiConfigAccessExtractConfig (\r | |
105 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
106 | IN CONST EFI_STRING Request,\r | |
107 | OUT EFI_STRING *Progress,\r | |
108 | OUT EFI_STRING *Results\r | |
109 | );\r | |
110 | \r | |
111 | /**\r | |
112 | This function applies changes in a driver's configuration.\r | |
113 | Input is a Configuration, which has the routing data for this\r | |
114 | driver followed by name / value configuration pairs. The driver\r | |
115 | must apply those pairs to its configurable storage. If the\r | |
116 | driver's configuration is stored in a linear block of data\r | |
117 | and the driver's name / value pairs are in <BlockConfig>\r | |
118 | format, it may use the ConfigToBlock helper function (above) to\r | |
119 | simplify the job.\r | |
120 | \r | |
121 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
122 | \r | |
123 | @param Configuration A null-terminated Unicode string in\r | |
124 | <ConfigString> format.\r | |
125 | \r | |
126 | @param Progress A 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_RESOURCES 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 | EFI_STATUS\r | |
151 | EFIAPI\r | |
152 | WifiMgrDxeHiiConfigAccessRouteConfig (\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 | This function is called to provide results data to the driver.\r | |
160 | This data consists of a unique key that is used to identify\r | |
161 | which data is either being passed back or being asked for.\r | |
162 | \r | |
163 | @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r | |
164 | @param Action Specifies the type of action taken by the browser.\r | |
165 | @param QuestionId A unique value which is sent to the original\r | |
166 | exporting driver so that it can identify the type\r | |
167 | of data to expect. The format of the data tends to\r | |
168 | vary based on the opcode that generated the callback.\r | |
169 | @param Type The type of value for the question.\r | |
170 | @param Value A pointer to the data being sent to the original\r | |
171 | exporting driver.\r | |
172 | @param ActionRequest On return, points to the action requested by the\r | |
173 | callback function.\r | |
174 | \r | |
175 | @retval EFI_SUCCESS The callback successfully handled the action.\r | |
176 | @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the\r | |
177 | variable and its data.\r | |
178 | @retval EFI_DEVICE_ERROR The variable could not be saved.\r | |
179 | @retval EFI_UNSUPPORTED The specified Action is not supported by the\r | |
180 | callback.\r | |
181 | \r | |
182 | **/\r | |
183 | EFI_STATUS\r | |
184 | EFIAPI\r | |
185 | WifiMgrDxeHiiConfigAccessCallback (\r | |
186 | IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r | |
187 | IN EFI_BROWSER_ACTION Action,\r | |
188 | IN EFI_QUESTION_ID QuestionId,\r | |
189 | IN UINT8 Type,\r | |
190 | IN OUT EFI_IFR_TYPE_VALUE *Value,\r | |
191 | OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r | |
192 | );\r | |
193 | \r | |
194 | /**\r | |
195 | Initialize the WiFi configuration form.\r | |
196 | \r | |
197 | @param[in] Private The pointer to the global private data structure.\r | |
198 | \r | |
199 | @retval EFI_SUCCESS The configuration form is initialized.\r | |
200 | @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r | |
201 | @retval Other Erros Returned errors when installing protocols.\r | |
202 | \r | |
203 | **/\r | |
204 | EFI_STATUS\r | |
205 | WifiMgrDxeConfigFormInit (\r | |
206 | WIFI_MGR_PRIVATE_DATA *Private\r | |
207 | );\r | |
208 | \r | |
209 | /**\r | |
210 | Unload the WiFi configuration form.\r | |
211 | \r | |
212 | @param[in] Private The pointer to the global private data structure.\r | |
213 | \r | |
214 | @retval EFI_SUCCESS The configuration form is unloaded successfully.\r | |
215 | @retval Other Errors Returned Erros when uninstalling protocols.\r | |
216 | \r | |
217 | **/\r | |
218 | EFI_STATUS\r | |
219 | WifiMgrDxeConfigFormUnload (\r | |
220 | WIFI_MGR_PRIVATE_DATA *Private\r | |
221 | );\r | |
222 | \r | |
223 | /**\r | |
224 | Refresh the network list display of the current Nic.\r | |
225 | \r | |
226 | @param[in] Private The pointer to the global private data structure.\r | |
227 | @param[out] IfrNvData The IFR NV data.\r | |
228 | \r | |
229 | @retval EFI_SUCCESS The operation is completed successfully.\r | |
230 | @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.\r | |
231 | @retval Other Errors Returned errors when creating Opcodes or updating the\r | |
232 | Hii form.\r | |
233 | \r | |
234 | **/\r | |
235 | EFI_STATUS\r | |
236 | WifiMgrRefreshNetworkList (\r | |
237 | IN WIFI_MGR_PRIVATE_DATA *Private,\r | |
238 | OUT WIFI_MANAGER_IFR_NVDATA *IfrNvData\r | |
239 | );\r | |
240 | \r | |
241 | #endif\r |