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 ISupplicantStaIfaceCallback; |
| 21 | |
| 22 | /** |
| 23 | * Interface exposed by wpa_supplicant for each station mode network |
| 24 | * interface (e.g wlan0) it controls. |
| 25 | */ |
| 26 | interface ISupplicantStaIface extends ISupplicantIface { |
| 27 | /** |
| 28 | * Register for callbacks from this interface. |
| 29 | * |
| 30 | * These callbacks are invoked for events that are specific to this interface. |
| 31 | * Registration of multiple callback objects is supported. These objects must |
| 32 | * be automatically deleted when the corresponding client process is dead or |
| 33 | * if this interface is removed. |
| 34 | * |
| 35 | * @param callback An instance of the |ISupplicantStaIfaceCallback| HIDL |
| 36 | * interface object. |
| 37 | * @return status Status of the operation. |
| 38 | * Possible status codes: |
| 39 | * |SupplicantStatusCode.SUCCESS|, |
| 40 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 41 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 42 | */ |
| 43 | registerCallback(ISupplicantStaIfaceCallback callback) |
| 44 | generates (SupplicantStatus status); |
| 45 | |
| 46 | /** |
| 47 | * Reconnect to the currently active network, even if we are already |
| 48 | * connected. |
| 49 | * |
| 50 | * @return status Status of the operation. |
| 51 | * Possible status codes: |
| 52 | * |SupplicantStatusCode.SUCCESS|, |
| 53 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 54 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |
| 55 | * |SupplicantStatusCode.FAILURE_IFACE_DISABLED| |
| 56 | */ |
| 57 | reassociate() generates (SupplicantStatus status); |
| 58 | |
| 59 | /** |
| 60 | * Reconnect to the currently active network, if we are currently |
| 61 | * disconnected. |
| 62 | * |
| 63 | * @return status Status of the operation. |
| 64 | * Possible status codes: |
| 65 | * |SupplicantStatusCode.SUCCESS|, |
| 66 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 67 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |
| 68 | * |SupplicantStatusCode.FAILURE_IFACE_DISABLED|, |
| 69 | * |SupplicantStatusCode.FAILURE_IFACE_NOT_DISCONNECTED| |
| 70 | */ |
| 71 | reconnect() generates (SupplicantStatus status); |
| 72 | |
| 73 | /** |
| 74 | * Disconnect from the current active network. |
| 75 | * |
| 76 | * @return status Status of the operation. |
| 77 | * Possible status codes: |
| 78 | * |SupplicantStatusCode.SUCCESS|, |
| 79 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 80 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |
| 81 | * |SupplicantStatusCode.FAILURE_IFACE_DISABLED| |
| 82 | */ |
| 83 | disconnect() generates (SupplicantStatus status); |
| 84 | |
| 85 | /** |
| 86 | * Turn on/off power save mode for the interface. |
| 87 | * |
| 88 | * @param enable Indicate if power save is to be turned on/off. |
| 89 | * @return status Status of the operation. |
| 90 | * Possible status codes: |
| 91 | * |SupplicantStatusCode.SUCCESS|, |
| 92 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 93 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |
| 94 | * |SupplicantStatusCode.FAILURE_IFACE_DISABLED| |
| 95 | */ |
| 96 | setPowerSave(bool enable) generates (SupplicantStatus status); |
| 97 | |
| 98 | /** |
| 99 | * Initiate TDLS discover with the provided peer mac address. |
| 100 | * |
| 101 | * @param macAddress MAC address of the peer. |
| 102 | * @return status Status of the operation. |
| 103 | * Possible status codes: |
| 104 | * |SupplicantStatusCode.SUCCESS|, |
| 105 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 106 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 107 | */ |
| 108 | initiateTdlsDiscover(MacAddress macAddress) |
| 109 | generates (SupplicantStatus status); |
| 110 | |
| 111 | /** |
| 112 | * Initiate TDLS setup with the provided peer mac address. |
| 113 | * |
| 114 | * @param macAddress MAC address of the peer. |
| 115 | * @return status Status of the operation. |
| 116 | * Possible status codes: |
| 117 | * |SupplicantStatusCode.SUCCESS|, |
| 118 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 119 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 120 | */ |
| 121 | initiateTdlsSetup(MacAddress macAddress) |
| 122 | generates (SupplicantStatus status); |
| 123 | |
| 124 | /** |
| 125 | * Initiate TDLS teardown with the provided peer mac address. |
| 126 | * |
| 127 | * @param macAddress MAC address of the peer. |
| 128 | * @return status Status of the operation. |
| 129 | * Possible status codes: |
| 130 | * |SupplicantStatusCode.SUCCESS|, |
| 131 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 132 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 133 | */ |
| 134 | initiateTdlsTeardown(MacAddress macAddress) |
| 135 | generates (SupplicantStatus status); |
| 136 | }; |