2 The Hii functions for WiFi Connection Manager.
4 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef __EFI_WIFI_MGR_HII_CONFIG_ACCESS__
11 #define __EFI_WIFI_MGR_HII_CONFIG_ACCESS__
14 Update connection message on connect configuration page, and trigger related form refresh.
16 @param[in] Nic The related Nic for updating message.
17 @param[in] ConnectStateChanged The tag to tell if the connection state has been changed, only
18 when the connection changes from "Connected" or "Disconnecting"
19 to "Disconnected", or from "Disconnected" or "Connecting" to
20 "Connected", this tag can be set as TRUE.
21 @param[in] ConnectStatusMessage The message to show on connected status bar, if NULL, will
26 WifiMgrUpdateConnectMessage (
27 IN WIFI_MGR_DEVICE_DATA
*Nic
,
28 IN BOOLEAN ConnectStateChanged
,
29 IN EFI_STRING ConnectStatusMessage
33 This function allows the caller to request the current
34 configuration for one or more named elements. The resulting
35 string is in <ConfigAltResp> format. Any and all alternative
36 configuration strings shall also be appended to the end of the
37 current configuration string. If they are, they must appear
38 after the current configuration. They must contain the same
39 routing (GUID, NAME, PATH) as the current configuration string.
40 They must have an additional description indicating the type of
41 alternative configuration the string represents,
42 "ALTCFG=<StringToken>". That <StringToken> (when
43 converted from Hex UNICODE to binary) is a reference to a
44 string in the associated string pack.
46 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
48 @param Request A null-terminated Unicode string in
49 <ConfigRequest> format. Note that this
50 includes the routing information as well as
51 the configurable name / value pairs. It is
52 invalid for this string to be in
53 <MultiConfigRequest> format.
54 If a NULL is passed in for the Request field,
55 all of the settings being abstracted by this function
56 will be returned in the Results field. In addition,
57 if a ConfigHdr is passed in with no request elements,
58 all of the settings being abstracted for that particular
59 ConfigHdr reference will be returned in the Results Field.
61 @param Progress On return, points to a character in the
62 Request string. Points to the string's null
63 terminator if request was successful. Points
64 to the most recent "&" before the first
65 failing name / value pair (or the beginning
66 of the string if the failure is in the first
67 name / value pair) if the request was not
70 @param Results A null-terminated Unicode string in
71 <MultiConfigAltResp> format which has all values
72 filled in for the names in the Request string.
73 String to be allocated by the called function.
75 @retval EFI_SUCCESS The Results string is filled with the
76 values corresponding to all requested
79 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the
80 parts of the results that must be
81 stored awaiting possible future
84 @retval EFI_NOT_FOUND Routing data doesn't match any
85 known driver. Progress set to the
86 first character in the routing header.
87 Note: There is no requirement that the
88 driver validate the routing data. It
89 must skip the <ConfigHdr> in order to
92 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set
93 to most recent "&" before the
94 error or the beginning of the
97 @retval EFI_INVALID_PARAMETER Unknown name. Progress points
98 to the & before the name in
104 WifiMgrDxeHiiConfigAccessExtractConfig (
105 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
106 IN CONST EFI_STRING Request
,
107 OUT EFI_STRING
*Progress
,
108 OUT EFI_STRING
*Results
112 This function applies changes in a driver's configuration.
113 Input is a Configuration, which has the routing data for this
114 driver followed by name / value configuration pairs. The driver
115 must apply those pairs to its configurable storage. If the
116 driver's configuration is stored in a linear block of data
117 and the driver's name / value pairs are in <BlockConfig>
118 format, it may use the ConfigToBlock helper function (above) to
121 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
123 @param Configuration A null-terminated Unicode string in
124 <ConfigString> format.
126 @param Progress A pointer to a string filled in with the
127 offset of the most recent '&' before the
128 first failing name / value pair (or the
129 beginn ing of the string if the failure
130 is in the first name / value pair) or
131 the terminating NULL if all was
134 @retval EFI_SUCCESS The results have been distributed or are
135 awaiting distribution.
137 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the
138 parts of the results that must be
139 stored awaiting possible future
142 @retval EFI_INVALID_PARAMETERS Passing in a NULL for the
143 Results parameter would result
144 in this type of error.
146 @retval EFI_NOT_FOUND Target for the specified routing data
152 WifiMgrDxeHiiConfigAccessRouteConfig (
153 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
154 IN CONST EFI_STRING Configuration
,
155 OUT EFI_STRING
*Progress
159 This function is called to provide results data to the driver.
160 This data consists of a unique key that is used to identify
161 which data is either being passed back or being asked for.
163 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
164 @param Action Specifies the type of action taken by the browser.
165 @param QuestionId A unique value which is sent to the original
166 exporting driver so that it can identify the type
167 of data to expect. The format of the data tends to
168 vary based on the opcode that generated the callback.
169 @param Type The type of value for the question.
170 @param Value A pointer to the data being sent to the original
172 @param ActionRequest On return, points to the action requested by the
175 @retval EFI_SUCCESS The callback successfully handled the action.
176 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the
177 variable and its data.
178 @retval EFI_DEVICE_ERROR The variable could not be saved.
179 @retval EFI_UNSUPPORTED The specified Action is not supported by the
185 WifiMgrDxeHiiConfigAccessCallback (
186 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL
*This
,
187 IN EFI_BROWSER_ACTION Action
,
188 IN EFI_QUESTION_ID QuestionId
,
190 IN OUT EFI_IFR_TYPE_VALUE
*Value
,
191 OUT EFI_BROWSER_ACTION_REQUEST
*ActionRequest
195 Initialize the WiFi configuration form.
197 @param[in] Private The pointer to the global private data structure.
199 @retval EFI_SUCCESS The configuration form is initialized.
200 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
201 @retval Other Erros Returned errors when installing protocols.
205 WifiMgrDxeConfigFormInit (
206 WIFI_MGR_PRIVATE_DATA
*Private
210 Unload the WiFi configuration form.
212 @param[in] Private The pointer to the global private data structure.
214 @retval EFI_SUCCESS The configuration form is unloaded successfully.
215 @retval Other Errors Returned Erros when uninstalling protocols.
219 WifiMgrDxeConfigFormUnload (
220 WIFI_MGR_PRIVATE_DATA
*Private
224 Refresh the network list display of the current Nic.
226 @param[in] Private The pointer to the global private data structure.
227 @param[out] IfrNvData The IFR NV data.
229 @retval EFI_SUCCESS The operation is completed successfully.
230 @retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
231 @retval Other Errors Returned errors when creating Opcodes or updating the
236 WifiMgrRefreshNetworkList (
237 IN WIFI_MGR_PRIVATE_DATA
*Private
,
238 OUT WIFI_MANAGER_IFR_NVDATA
*IfrNvData