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