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 | /** |
Roshan Pius | 8c6a877 | 2016-11-03 09:37:57 -0700 | [diff] [blame] | 23 | * Interface exposed by the supplicant for each station mode network |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 24 | * interface (e.g wlan0) it controls. |
| 25 | */ |
| 26 | interface ISupplicantStaIface extends ISupplicantIface { |
| 27 | /** |
Roshan Pius | b76dbbe | 2016-11-09 09:55:42 -0800 | [diff] [blame^] | 28 | * Access Network Query Protocol info ID elements |
| 29 | * for IEEE Std 802.11u-2011. |
| 30 | */ |
| 31 | enum AnqpInfoId : uint32_t { |
| 32 | VENUE_NAME = 258, |
| 33 | ROAMING_CONSORTIUM = 261, |
| 34 | IP_ADDR_TYPE_AVAILABILITY = 262, |
| 35 | NAI_REALM = 263, |
| 36 | ANQP_3GPP_CELLULAR_NETWORK = 264, |
| 37 | DOMAIN_NAME = 268 |
| 38 | }; |
| 39 | |
| 40 | /** |
| 41 | * Access Network Query Protocol subtype elements |
| 42 | * for Hotspot 2.0. |
| 43 | */ |
| 44 | enum Hs20AnqpSubtypes : uint32_t { |
| 45 | OPERATOR_FRIENDLY_NAME = 2, |
| 46 | WAN_METRICS = 4, |
| 47 | CONNECTION_CAPABILITY = 5, |
| 48 | OSU_PROVIDERS_LIST = 8, |
| 49 | }; |
| 50 | |
| 51 | /** |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 52 | * Register for callbacks from this interface. |
| 53 | * |
| 54 | * These callbacks are invoked for events that are specific to this interface. |
| 55 | * Registration of multiple callback objects is supported. These objects must |
| 56 | * be automatically deleted when the corresponding client process is dead or |
| 57 | * if this interface is removed. |
| 58 | * |
| 59 | * @param callback An instance of the |ISupplicantStaIfaceCallback| HIDL |
| 60 | * interface object. |
| 61 | * @return status Status of the operation. |
| 62 | * Possible status codes: |
| 63 | * |SupplicantStatusCode.SUCCESS|, |
| 64 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 65 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 66 | */ |
| 67 | registerCallback(ISupplicantStaIfaceCallback callback) |
| 68 | generates (SupplicantStatus status); |
| 69 | |
| 70 | /** |
| 71 | * Reconnect to the currently active network, even if we are already |
| 72 | * connected. |
| 73 | * |
| 74 | * @return status Status of the operation. |
| 75 | * Possible status codes: |
| 76 | * |SupplicantStatusCode.SUCCESS|, |
| 77 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 78 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |
| 79 | * |SupplicantStatusCode.FAILURE_IFACE_DISABLED| |
| 80 | */ |
| 81 | reassociate() generates (SupplicantStatus status); |
| 82 | |
| 83 | /** |
| 84 | * Reconnect to the currently active network, if we are currently |
| 85 | * disconnected. |
| 86 | * |
| 87 | * @return status Status of the operation. |
| 88 | * Possible status codes: |
| 89 | * |SupplicantStatusCode.SUCCESS|, |
| 90 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 91 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |
| 92 | * |SupplicantStatusCode.FAILURE_IFACE_DISABLED|, |
| 93 | * |SupplicantStatusCode.FAILURE_IFACE_NOT_DISCONNECTED| |
| 94 | */ |
| 95 | reconnect() generates (SupplicantStatus status); |
| 96 | |
| 97 | /** |
| 98 | * Disconnect from the current active network. |
| 99 | * |
| 100 | * @return status Status of the operation. |
| 101 | * Possible status codes: |
| 102 | * |SupplicantStatusCode.SUCCESS|, |
| 103 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 104 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |
| 105 | * |SupplicantStatusCode.FAILURE_IFACE_DISABLED| |
| 106 | */ |
| 107 | disconnect() generates (SupplicantStatus status); |
| 108 | |
| 109 | /** |
| 110 | * Turn on/off power save mode for the interface. |
| 111 | * |
| 112 | * @param enable Indicate if power save is to be turned on/off. |
| 113 | * @return status Status of the operation. |
| 114 | * Possible status codes: |
| 115 | * |SupplicantStatusCode.SUCCESS|, |
| 116 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 117 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID|, |
| 118 | * |SupplicantStatusCode.FAILURE_IFACE_DISABLED| |
| 119 | */ |
| 120 | setPowerSave(bool enable) generates (SupplicantStatus status); |
| 121 | |
| 122 | /** |
| 123 | * Initiate TDLS discover with the provided peer mac address. |
| 124 | * |
| 125 | * @param macAddress MAC address of the peer. |
| 126 | * @return status Status of the operation. |
| 127 | * Possible status codes: |
| 128 | * |SupplicantStatusCode.SUCCESS|, |
| 129 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 130 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 131 | */ |
| 132 | initiateTdlsDiscover(MacAddress macAddress) |
| 133 | generates (SupplicantStatus status); |
| 134 | |
| 135 | /** |
| 136 | * Initiate TDLS setup with the provided peer mac address. |
| 137 | * |
| 138 | * @param macAddress MAC address of the peer. |
| 139 | * @return status Status of the operation. |
| 140 | * Possible status codes: |
| 141 | * |SupplicantStatusCode.SUCCESS|, |
| 142 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 143 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 144 | */ |
| 145 | initiateTdlsSetup(MacAddress macAddress) |
| 146 | generates (SupplicantStatus status); |
| 147 | |
| 148 | /** |
| 149 | * Initiate TDLS teardown with the provided peer mac address. |
| 150 | * |
| 151 | * @param macAddress MAC address of the peer. |
| 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 | initiateTdlsTeardown(MacAddress macAddress) |
| 159 | generates (SupplicantStatus status); |
Roshan Pius | b76dbbe | 2016-11-09 09:55:42 -0800 | [diff] [blame^] | 160 | |
| 161 | /** |
| 162 | * Initiate ANQP (for IEEE 802.11u Interworking/Hotspot 2.0) queries with the |
| 163 | * specified access point. |
| 164 | * The ANQP data fetched must be returned in the |
| 165 | * |ISupplicantStaIfaceCallback.onAnqpQueryDone| callback. |
| 166 | * |
| 167 | * @param macAddress MAC address of the access point. |
| 168 | * @param infoElements List of information elements to query for. |
| 169 | * @param subtypes List of HS20 subtypes to query for. |
| 170 | * @return status Status of the operation. |
| 171 | * Possible status codes: |
| 172 | * |SupplicantStatusCode.SUCCESS|, |
| 173 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 174 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 175 | */ |
| 176 | initiateAnqpQuery(MacAddress macAddress, |
| 177 | vec<AnqpInfoId> infoElements, |
| 178 | vec<Hs20AnqpSubtypes> subTypes) |
| 179 | generates (SupplicantStatus status); |
| 180 | |
| 181 | /** |
| 182 | * Initiate the Hotspot 2.0 icon query with the specified accesss point. |
| 183 | * The icon data fetched must be returned in the |
| 184 | * |ISupplicantStaIfaceCallback.onHs20IconQueryDone| callback. |
| 185 | * |
| 186 | * @param macAddress MAC address of the access point. |
| 187 | * @param fileName Name of the file to request from the access point. |
| 188 | * @return status Status of the operation. |
| 189 | * Possible status codes: |
| 190 | * |SupplicantStatusCode.SUCCESS|, |
| 191 | * |SupplicantStatusCode.FAILURE_UNKNOWN|, |
| 192 | * |SupplicantStatusCode.FAILURE_IFACE_INVALID| |
| 193 | */ |
| 194 | initiateHs20IconQuery(MacAddress macAddress, string fileName) |
| 195 | generates (SupplicantStatus status); |
Roshan Pius | 39f588f | 2016-10-31 14:51:27 -0700 | [diff] [blame] | 196 | }; |