Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.hardware.wifi.supplicant@1.0; |
| 18 | |
| 19 | import ISupplicantIface; |
| 20 | import ISupplicantP2pIfaceCallback; |
| 21 | |
| 22 | /** |
Roshan Pius | 8c6a877 | 2016-11-03 09:37:57 -0700 | [diff] [blame] | 23 | * Interface exposed by the supplicant for each P2P mode network |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 24 | * interface (e.g p2p0) it controls. |
| 25 | */ |
| 26 | interface ISupplicantP2pIface extends ISupplicantIface { |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 27 | enum WpsProvisionMethod : uint32_t { |
| 28 | /** |
| 29 | * Push button method. |
| 30 | */ |
| 31 | PBC, |
| 32 | /** |
| 33 | * Display pin method configuration - pin is generated and displayed on |
| 34 | * device. |
| 35 | */ |
| 36 | DISPLAY, |
| 37 | /** |
| 38 | * Keypad pin method configuration - pin is entered on device. |
| 39 | */ |
Roshan Pius | 282a0b3 | 2016-12-08 11:08:14 -0800 | [diff] [blame] | 40 | KEYPAD |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 41 | }; |
| 42 | |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 43 | /** |
Roshan Pius | 282a0b3 | 2016-12-08 11:08:14 -0800 | [diff] [blame] | 44 | * Use to specify a range of frequencies. |
| 45 | * For example: 2412-2432,2462,5000-6000, etc. |
| 46 | */ |
| 47 | struct FreqRange { |
| 48 | uint32_t min; |
| 49 | uint32_t max; |
| 50 | }; |
| 51 | |
| 52 | /** |
Roshan Pius | 3f050c1 | 2016-12-14 08:06:58 -0800 | [diff] [blame] | 53 | * Enum describing the modes of Miracast supported |
| 54 | * via driver commands. |
| 55 | */ |
| 56 | enum MiracastMode : uint8_t { |
| 57 | DISABLED = 0, |
| 58 | /** |
| 59 | * Operating as source. |
| 60 | */ |
| 61 | SOURCE = 1, |
| 62 | /** |
| 63 | * Operating as sink. |
| 64 | */ |
| 65 | SINK = 2 |
| 66 | }; |
| 67 | |
| 68 | /** |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 69 | * Register for callbacks from this interface. |
| 70 | * |
| 71 | * These callbacks are invoked for events that are specific to this interface. |
| 72 | * Registration of multiple callback objects is supported. These objects must |
| 73 | * be automatically deleted when the corresponding client process is dead or |
| 74 | * if this interface is removed. |
| 75 | * |
| 76 | * @param callback An instance of the |ISupplicantP2pIfaceCallback| HIDL |
| 77 | * interface object. |
| 78 | * @return status Status of the operation. |
| 79 | * Possible status codes: |
| 80 | * |SupplicantStatusCode.SUCCESS|, |
| 81 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 82 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 83 | */ |
| 84 | registerCallback(ISupplicantP2pIfaceCallback callback) |
| 85 | generates (SupplicantStatus status); |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 86 | |
| 87 | /** |
| 88 | * Gets the MAC address of the device. |
| 89 | * |
| 90 | * @return status Status of the operation. |
| 91 | * Possible status codes: |
| 92 | * |SupplicantStatusCode.SUCCESS|, |
| 93 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 94 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 95 | * @return deviceAddress MAC address of the device. |
| 96 | */ |
| 97 | getDeviceAddress() |
| 98 | generates (SupplicantStatus status, MacAddress deviceAddress); |
| 99 | |
| 100 | /** |
| 101 | * Set the postfix to be used for P2P SSID's. |
| 102 | * |
| 103 | * @param postfix String to be appended to SSID. |
| 104 | * @return status Status of the operation. |
| 105 | * Possible status codes: |
| 106 | * |SupplicantStatusCode.SUCCESS|, |
| 107 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 108 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 109 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 110 | */ |
Roshan Pius | 282a0b3 | 2016-12-08 11:08:14 -0800 | [diff] [blame] | 111 | setSsidPostfix(vec<uint8_t> postfix) generates (SupplicantStatus status); |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 112 | |
| 113 | /** |
| 114 | * Set the Maximum idle time in seconds for P2P groups. |
| 115 | * This value controls how long a P2P group is maintained after there |
| 116 | * is no other members in the group. As a group owner, this means no |
| 117 | * associated stations in the group. As a P2P client, this means no |
| 118 | * group owner seen in scan results. |
| 119 | * |
Roshan Pius | 282a0b3 | 2016-12-08 11:08:14 -0800 | [diff] [blame] | 120 | * @param groupIfName Group interface name to use. |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 121 | * @param timeoutInSec Timeout value in seconds. |
| 122 | * @return status Status of the operation. |
| 123 | * Possible status codes: |
| 124 | * |SupplicantStatusCode.SUCCESS|, |
| 125 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 126 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 127 | */ |
Roshan Pius | 282a0b3 | 2016-12-08 11:08:14 -0800 | [diff] [blame] | 128 | setGroupIdle(string groupIfName, uint32_t timeoutInSec) |
| 129 | generates (SupplicantStatus status); |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 130 | |
| 131 | /** |
| 132 | * Turn on/off power save mode for the interface. |
| 133 | * |
Roshan Pius | 282a0b3 | 2016-12-08 11:08:14 -0800 | [diff] [blame] | 134 | * @param groupIfName Group interface name to use. |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 135 | * @param enable Indicate if power save is to be turned on/off. |
| 136 | * @return status Status of the operation. |
| 137 | * Possible status codes: |
| 138 | * |SupplicantStatusCode.SUCCESS|, |
| 139 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 140 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |
| 141 | * |SupplicantStatusCode.FAILURE_IFACE_DISABLED| |
| 142 | */ |
Roshan Pius | 282a0b3 | 2016-12-08 11:08:14 -0800 | [diff] [blame] | 143 | setPowerSave(string groupIfName, bool enable) |
| 144 | generates (SupplicantStatus status); |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 145 | |
| 146 | /** |
| 147 | * Initiate a P2P service discovery with an optional timeout. |
| 148 | * |
| 149 | * @param timeoutInSec Max time to be spent is peforming discovery. |
| 150 | * Set to 0 to indefinely continue discovery untill and explicit |
| 151 | * |stopFind| is sent. |
| 152 | * @return status Status of the operation. |
| 153 | * Possible status codes: |
| 154 | * |SupplicantStatusCode.SUCCESS|, |
| 155 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 156 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 157 | */ |
| 158 | find(uint32_t timeoutInSec) generates (SupplicantStatus status); |
| 159 | |
| 160 | /** |
| 161 | * Stop an ongoing P2P service discovery. |
| 162 | * |
| 163 | * @return status Status of the operation. |
| 164 | * Possible status codes: |
| 165 | * |SupplicantStatusCode.SUCCESS|, |
| 166 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 167 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 168 | */ |
| 169 | stopFind() generates (SupplicantStatus status); |
| 170 | |
| 171 | /** |
| 172 | * Flush P2P peer table and state. |
| 173 | * |
| 174 | * @return status Status of the operation. |
| 175 | * Possible status codes: |
| 176 | * |SupplicantStatusCode.SUCCESS|, |
| 177 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 178 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 179 | */ |
| 180 | flush() generates (SupplicantStatus status); |
| 181 | |
| 182 | /** |
| 183 | * Start P2P group formation with a discovered P2P peer. This includes |
| 184 | * optional group owner negotiation, group interface setup, provisioning, |
| 185 | * and establishing data connection. |
| 186 | * |
| 187 | * @param peerAddress MAC address of the device to connect to. |
| 188 | * @method provisionMethod Provisioning method to use. |
| 189 | * @param preSelectedPin Pin to be used, if |provisionMethod| uses one of the |
| 190 | * preselected |PIN*| methods. |
| 191 | * @param joinExistingGroup Indicates that this is a command to join an |
| 192 | * existing group as a client. It skips the group owner negotiation |
| 193 | * part. This must send a Provision Discovery Request message to the |
| 194 | * target group owner before associating for WPS provisioning. |
| 195 | * @param persistent Used to request a persistent group to be formed. |
| 196 | * @param goIntent Used to override the default Intent for this group owner |
| 197 | * negotiation (Values from 1-15). Refer to section 4.1.6 in |
| 198 | * Wi-Fi Peer-to-Peer (P2P) Technical Specification Version 1.7. |
| 199 | * @return status Status of the operation. |
| 200 | * Possible status codes: |
| 201 | * |SupplicantStatusCode.SUCCESS|, |
| 202 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 203 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 204 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 205 | * @return generatedPin Pin generated, if |provisionMethod| uses one of the |
| 206 | * generated |PIN*| methods. |
| 207 | */ |
| 208 | connect(MacAddress peerAddress, |
| 209 | WpsProvisionMethod provisionMethod, |
Roshan Pius | 282a0b3 | 2016-12-08 11:08:14 -0800 | [diff] [blame] | 210 | string preSelectedPin, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 211 | bool joinExistingGroup, |
| 212 | bool persistent, |
| 213 | uint32_t goIntent) |
Roshan Pius | 282a0b3 | 2016-12-08 11:08:14 -0800 | [diff] [blame] | 214 | generates (SupplicantStatus status, string generatedPin); |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 215 | |
| 216 | /** |
| 217 | * Cancel an ongoing P2P group formation and joining-a-group related |
| 218 | * operation. This operation unauthorizes the specific peer device (if any |
| 219 | * had been authorized to start group formation), stops P2P find (if in |
| 220 | * progress), stops pending operations for join-a-group, and removes the |
| 221 | * P2P group interface (if one was used) that is in the WPS provisioning |
| 222 | * step. If the WPS provisioning step has been completed, the group is not |
| 223 | * terminated. |
| 224 | * |
| 225 | * @return status Status of the operation. |
| 226 | * Possible status codes: |
| 227 | * |SupplicantStatusCode.SUCCESS|, |
| 228 | * |SupplicantStatusCode.FAILURE_NOT_STARTED|, |
| 229 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 230 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 231 | */ |
| 232 | cancelConnect() generates (SupplicantStatus status); |
| 233 | |
| 234 | /** |
| 235 | * Send P2P provision discovery request to the specified peer. The |
| 236 | * parameters for this command are the P2P device address of the peer and the |
| 237 | * desired configuration method. |
| 238 | * |
| 239 | * @param peerAddress MAC address of the device to send discovery. |
| 240 | * @method provisionMethod Provisioning method to use. |
| 241 | * @return status Status of the operation. |
| 242 | * Possible status codes: |
| 243 | * |SupplicantStatusCode.SUCCESS|, |
| 244 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 245 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 246 | */ |
| 247 | provisionDiscovery(MacAddress peerAddress, |
| 248 | WpsProvisionMethod provisionMethod) |
| 249 | generates (SupplicantStatus status); |
| 250 | |
| 251 | /** |
| 252 | * Set up a P2P group owner manually (i.e., without group owner |
| 253 | * negotiation with a specific peer). This is also known as autonomous |
Roshan Pius | 43a4e12 | 2017-01-11 08:17:59 -0800 | [diff] [blame] | 254 | * group owner. Optional |persistentNetworkId| may be used to specify |
| 255 | * restart of a persistent group. |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 256 | * |
| 257 | * @param persistent Used to request a persistent group to be formed. |
| 258 | * @param persistentNetworkId Used to specify the restart of a persistent |
Roshan Pius | 43a4e12 | 2017-01-11 08:17:59 -0800 | [diff] [blame] | 259 | * group. Set to UINT32_MAX for a non-persistent group. |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 260 | * @return status Status of the operation. |
| 261 | * Possible status codes: |
| 262 | * |SupplicantStatusCode.SUCCESS|, |
| 263 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 264 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 265 | */ |
| 266 | addGroup(bool persistent, SupplicantNetworkId persistentNetworkId) |
| 267 | generates (SupplicantStatus status); |
| 268 | |
| 269 | /** |
| 270 | * Terminate a P2P group. If a new virtual network interface was used for |
| 271 | * the group, it must also be removed. The network interface name of the |
| 272 | * group interface is used as a parameter for this command. |
| 273 | * |
| 274 | * @param groupIfName Group interface name to use. |
| 275 | * @return status Status of the operation. |
| 276 | * Possible status codes: |
| 277 | * |SupplicantStatusCode.SUCCESS|, |
| 278 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 279 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 280 | */ |
| 281 | removeGroup(string groupIfName) generates (SupplicantStatus status); |
| 282 | |
| 283 | /** |
| 284 | * Reject connection attempt from a peer (specified with a device |
| 285 | * address). This is a mechanism to reject a pending group owner negotiation |
| 286 | * with a peer and request to automatically block any further connection or |
| 287 | * discovery of the peer. |
| 288 | * |
| 289 | * @param peerAddress MAC address of the device to reject. |
| 290 | * @return status Status of the operation. |
| 291 | * Possible status codes: |
| 292 | * |SupplicantStatusCode.SUCCESS|, |
| 293 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 294 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 295 | */ |
| 296 | reject(MacAddress peerAddress) generates (SupplicantStatus status); |
| 297 | |
| 298 | /** |
| 299 | * Invite a device to a persistent group. |
| 300 | * If the peer device is the group owner of the persistent group, the peer |
| 301 | * parameter is not needed. Otherwise it is used to specify which |
| 302 | * device to invite. |goDeviceAddress| parameter may be used to override |
| 303 | * the group owner device address for Invitation Request should it not be |
| 304 | * known for some reason (this should not be needed in most cases). |
| 305 | * |
| 306 | * @param groupIfName Group interface name to use. |
| 307 | * @param goDeviceAddress MAC address of the group owner device. |
| 308 | * @param peerAddress MAC address of the device to invite. |
| 309 | * @return status Status of the operation. |
| 310 | * Possible status codes: |
| 311 | * |SupplicantStatusCode.SUCCESS|, |
| 312 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 313 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 314 | */ |
| 315 | invite(string groupIfName, MacAddress goDeviceAddress, MacAddress peerAddress) |
| 316 | generates (SupplicantStatus status); |
| 317 | |
| 318 | /** |
| 319 | * Reinvoke a device from a persistent group. |
| 320 | * |
| 321 | * @param persistentNetworkId Used to specify the persistent group. |
| 322 | * @param peerAddress MAC address of the device to reinvoke. |
| 323 | * @return status Status of the operation. |
| 324 | * Possible status codes: |
| 325 | * |SupplicantStatusCode.SUCCESS|, |
| 326 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 327 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 328 | */ |
| 329 | reinvoke(SupplicantNetworkId persistentNetworkId, MacAddress peerAddress) |
| 330 | generates (SupplicantStatus status); |
| 331 | |
| 332 | /** |
| 333 | * Configure Extended Listen Timing. |
| 334 | * |
| 335 | * If enabled, listen state must be entered every |intervalInMillis| for at |
| 336 | * least |periodInMillis|. Both values have acceptable range of 1-65535 |
| 337 | * (with interval obviously having to be larger than or equal to duration). |
| 338 | * If the P2P module is not idle at the time the Extended Listen Timing |
| 339 | * timeout occurs, the Listen State operation must be skipped. |
| 340 | * |
| 341 | * @param periodInMillis Period in milliseconds. |
| 342 | * @param intervalInMillis Interval in milliseconds. |
| 343 | * @return status Status of the operation. |
| 344 | * Possible status codes: |
| 345 | * |SupplicantStatusCode.SUCCESS|, |
| 346 | * |SupplicantStatusCode.FAILURE_ARGS_INVALID|, |
| 347 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 348 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 349 | */ |
Roshan Pius | e663f83 | 2016-12-16 15:32:27 -0800 | [diff] [blame] | 350 | configureExtListen(uint32_t periodInMillis, |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 351 | uint32_t intervalInMillis) |
| 352 | generates (SupplicantStatus status); |
| 353 | |
| 354 | /** |
| 355 | * Set P2P Listen channel. |
| 356 | * |
| 357 | * When specifying a social channel on the 2.4 GHz band (1/6/11) there is no |
| 358 | * need to specify the operating class since it defaults to 81. When |
| 359 | * specifying a social channel on the 60 GHz band (2), specify the 60 GHz |
| 360 | * operating class (180). |
| 361 | * |
| 362 | * @param channel Wifi channel. eg, 1, 6, 11. |
| 363 | * @param operatingClass Operating Class indicates the channel set of the AP |
| 364 | * indicated by this BSSID |
| 365 | * @return status Status of the operation. |
| 366 | * Possible status codes: |
| 367 | * |SupplicantStatusCode.SUCCESS|, |
| 368 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 369 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 370 | */ |
| 371 | setListenChannel(uint32_t channel, uint32_t operatingClass) |
| 372 | generates (SupplicantStatus status); |
| 373 | |
| 374 | /** |
Roshan Pius | 282a0b3 | 2016-12-08 11:08:14 -0800 | [diff] [blame] | 375 | * Set P2P disallowed frequency ranges. |
| 376 | * |
| 377 | * Specify ranges of frequencies that are disallowed for any p2p operations. |
| 378 | |
| 379 | * @param ranges List of ranges which needs to be disallowed. |
| 380 | * @return status Status of the operation. |
| 381 | * Possible status codes: |
| 382 | * |SupplicantStatusCode.SUCCESS|, |
| 383 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 384 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 385 | */ |
| 386 | setDisallowedFrequencies(vec<FreqRange> ranges) |
| 387 | generates (SupplicantStatus status); |
| 388 | |
| 389 | /** |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 390 | * Gets the operational SSID of the device. |
| 391 | * |
| 392 | * @param peerAddress MAC address of the peer. |
| 393 | * @return status Status of the operation. |
| 394 | * Possible status codes: |
| 395 | * |SupplicantStatusCode.SUCCESS|, |
| 396 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 397 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 398 | * @return ssid SSID of the device |
| 399 | */ |
| 400 | getSsid(MacAddress peerAddress) |
| 401 | generates (SupplicantStatus status, Ssid ssid); |
| 402 | |
| 403 | /** |
| 404 | * Gets the capability of the group which the device is a |
| 405 | * member of. |
| 406 | * |
| 407 | * @param peerAddress MAC address of the peer. |
| 408 | * @return status Status of the operation. |
| 409 | * Possible status codes: |
| 410 | * |SupplicantStatusCode.SUCCESS|, |
| 411 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 412 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
Roshan Pius | 5c3a0d9 | 2017-01-18 09:23:18 -0800 | [diff] [blame^] | 413 | * @return capabilityMask Combination of |P2pGroupCapabilityMask| values. |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 414 | */ |
| 415 | getGroupCapability(MacAddress peerAddress) |
Roshan Pius | 5c3a0d9 | 2017-01-18 09:23:18 -0800 | [diff] [blame^] | 416 | generates (SupplicantStatus status, |
| 417 | bitfield<P2pGroupCapabilityMask> capabilities); |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 418 | |
| 419 | /** |
| 420 | * This command can be used to add a bonjour service. |
| 421 | * |
| 422 | * @param query Hex dump of the query data. |
| 423 | * @param return Hex dump of the response data. |
| 424 | * @return status Status of the operation. |
| 425 | * Possible status codes: |
| 426 | * |SupplicantStatusCode.SUCCESS|, |
| 427 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 428 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 429 | */ |
| 430 | addBonjourService(vec<uint8_t> query, vec<uint8_t> response) |
| 431 | generates (SupplicantStatus status); |
| 432 | |
| 433 | /** |
| 434 | * This command can be used to remove a bonjour service. |
| 435 | * |
| 436 | * @param query Hex dump of the query data. |
| 437 | * @return status Status of the operation. |
| 438 | * Possible status codes: |
| 439 | * |SupplicantStatusCode.SUCCESS|, |
| 440 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 441 | * |SupplicantStatusCode.FAILURE_NOT_STARTED|, |
| 442 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 443 | */ |
| 444 | removeBonjourService(vec<uint8_t> query) generates (SupplicantStatus status); |
| 445 | |
| 446 | /** |
| 447 | * This command can be used to add a UPNP service. |
| 448 | * |
| 449 | * @param version Version to be used. |
| 450 | * @package serviceName Service name to be used. |
| 451 | * @return status Status of the operation. |
| 452 | * Possible status codes: |
| 453 | * |SupplicantStatusCode.SUCCESS|, |
| 454 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 455 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 456 | */ |
| 457 | addUpnpService(uint32_t version, string serviceName) |
| 458 | generates (SupplicantStatus status); |
| 459 | |
| 460 | /** |
| 461 | * This command can be used to remove a UPNP service. |
| 462 | * |
| 463 | * @param version Version to be used. |
| 464 | * @package serviceName Service name to be used. |
| 465 | * @return status Status of the operation. |
| 466 | * Possible status codes: |
| 467 | * |SupplicantStatusCode.SUCCESS|, |
| 468 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 469 | * |SupplicantStatusCode.FAILURE_NOT_STARTED|, |
| 470 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 471 | */ |
| 472 | removeUpnpService(uint32_t version, string serviceName) |
| 473 | generates (SupplicantStatus status); |
| 474 | |
| 475 | /** |
| 476 | * This command can be used to flush all services from the |
| 477 | * device. |
| 478 | * |
| 479 | * @return status Status of the operation. |
| 480 | * Possible status codes: |
| 481 | * |SupplicantStatusCode.SUCCESS|, |
| 482 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 483 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 484 | */ |
Roshan Pius | e663f83 | 2016-12-16 15:32:27 -0800 | [diff] [blame] | 485 | flushServices() generates (SupplicantStatus status); |
Roshan Pius | 756ad99 | 2016-11-07 10:29:48 -0800 | [diff] [blame] | 486 | |
| 487 | /** |
| 488 | * Schedule a P2P service discovery request. The parameters for this command |
| 489 | * are the device address of the peer device (or 00:00:00:00:00:00 for |
| 490 | * wildcard query that is sent to every discovered P2P peer that supports |
| 491 | * service discovery) and P2P Service Query TLV(s) as hexdump. |
| 492 | * |
| 493 | * @param peerAddress MAC address of the device to discover. |
| 494 | * @param query Hex dump of the query data. |
| 495 | * @return status Status of the operation. |
| 496 | * Possible status codes: |
| 497 | * |SupplicantStatusCode.SUCCESS|, |
| 498 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 499 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 500 | * @return identifier Identifier for the request. Can be used to cancel the |
| 501 | * request. |
| 502 | */ |
| 503 | requestServiceDiscovery(MacAddress peerAddress, vec<uint8_t> query) |
| 504 | generates (SupplicantStatus status, uint64_t identifier); |
| 505 | |
| 506 | /** |
| 507 | * Cancel a previous service discovery request. |
| 508 | * |
| 509 | * @return identifier Identifier for the request to cancel. |
| 510 | * @return status Status of the operation. |
| 511 | * Possible status codes: |
| 512 | * |SupplicantStatusCode.SUCCESS|, |
| 513 | * |SupplicantStatusCode.FAILURE_NOT_STARTED|, |
| 514 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 515 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 516 | */ |
| 517 | cancelServiceDiscovery(uint64_t identifier) |
| 518 | generates (SupplicantStatus status); |
Roshan Pius | 3f050c1 | 2016-12-14 08:06:58 -0800 | [diff] [blame] | 519 | |
| 520 | /** |
| 521 | * Send driver command to set Miracast mode. |
| 522 | * |
| 523 | * @param mode Mode of Miracast. |
| 524 | * @return status Status of the operation. |
| 525 | * Possible status codes: |
| 526 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 09f2ce3 | 2017-01-11 14:05:17 -0800 | [diff] [blame] | 527 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 528 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
Roshan Pius | 3f050c1 | 2016-12-14 08:06:58 -0800 | [diff] [blame] | 529 | */ |
| 530 | setMiracastMode(MiracastMode mode) |
| 531 | generates (SupplicantStatus status); |
Roshan Pius | 08e6bba | 2017-01-10 14:10:19 -0800 | [diff] [blame] | 532 | |
| 533 | /** |
| 534 | * Initiate WPS Push Button setup. |
| 535 | * The PBC operation requires that a button is also pressed at the |
| 536 | * AP/Registrar at about the same time (2 minute window). |
| 537 | * |
| 538 | * @param groupIfName Group interface name to use. |
| 539 | * @param bssid BSSID of the AP. Use zero'ed bssid to indicate wildcard. |
| 540 | * @return status Status of the operation. |
| 541 | * Possible status codes: |
| 542 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 09f2ce3 | 2017-01-11 14:05:17 -0800 | [diff] [blame] | 543 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 544 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
Roshan Pius | 08e6bba | 2017-01-10 14:10:19 -0800 | [diff] [blame] | 545 | */ |
| 546 | startWpsPbc(string groupIfName, Bssid bssid) |
| 547 | generates (SupplicantStatus status); |
| 548 | |
| 549 | /** |
| 550 | * Initiate WPS Pin Keypad setup. |
| 551 | * |
| 552 | * @param groupIfName Group interface name to use. |
| 553 | * @param pin 8 digit pin to be used. |
| 554 | * @return status Status of the operation. |
| 555 | * Possible status codes: |
| 556 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 09f2ce3 | 2017-01-11 14:05:17 -0800 | [diff] [blame] | 557 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 558 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
Roshan Pius | 08e6bba | 2017-01-10 14:10:19 -0800 | [diff] [blame] | 559 | */ |
| 560 | startWpsPinKeypad(string groupIfName, string pin) |
| 561 | generates (SupplicantStatus status); |
| 562 | |
| 563 | /** |
| 564 | * Initiate WPS Pin Display setup. |
| 565 | * |
| 566 | * @param groupIfName Group interface name to use. |
| 567 | * @param bssid BSSID of the AP. Use zero'ed bssid to indicate wildcard. |
| 568 | * @return status Status of the operation. |
| 569 | * Possible status codes: |
| 570 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 09f2ce3 | 2017-01-11 14:05:17 -0800 | [diff] [blame] | 571 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 572 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
Roshan Pius | 08e6bba | 2017-01-10 14:10:19 -0800 | [diff] [blame] | 573 | * @return generatedPin 8 digit pin generated. |
| 574 | */ |
| 575 | startWpsPinDisplay(string groupIfName, Bssid bssid) |
| 576 | generates (SupplicantStatus status, string generatedPin); |
| 577 | |
| 578 | /** |
| 579 | * Cancel any ongoing WPS operations. |
| 580 | * |
| 581 | * @param groupIfName Group interface name to use. |
| 582 | * @return status Status of the operation. |
| 583 | * Possible status codes: |
| 584 | * |SupplicantStatusCode.SUCCESS|, |
Roshan Pius | 09f2ce3 | 2017-01-11 14:05:17 -0800 | [diff] [blame] | 585 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 586 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 587 | |
Roshan Pius | 08e6bba | 2017-01-10 14:10:19 -0800 | [diff] [blame] | 588 | */ |
| 589 | cancelWps(string groupIfName) generates (SupplicantStatus status); |
Roshan Pius | 09f2ce3 | 2017-01-11 14:05:17 -0800 | [diff] [blame] | 590 | |
| 591 | /** |
| 592 | * Enable/Disable Wifi Display. |
| 593 | * |
| 594 | * @param enable true to enable, false to disable. |
| 595 | * @return status Status of the operation. |
| 596 | * Possible status codes: |
| 597 | * |SupplicantStatusCode.SUCCESS|, |
| 598 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 599 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 600 | */ |
| 601 | enableWfd(bool enable) generates (SupplicantStatus status); |
| 602 | |
| 603 | /** |
| 604 | * Set Wifi Display device info. |
| 605 | * |
| 606 | * @param info WFD device info as described in section 5.1.2 of WFD technical |
| 607 | * specification v1.0.0. |
| 608 | * @return status Status of the operation. |
| 609 | * Possible status codes: |
| 610 | * |SupplicantStatusCode.SUCCESS|, |
| 611 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 612 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 613 | */ |
| 614 | setWfdDeviceInfo(uint8_t[8] info) generates (SupplicantStatus status); |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 615 | }; |