Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -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@1.0; |
| 18 | |
| 19 | import IWifiIface; |
Roshan Pius | 120f94c | 2016-10-13 11:48:42 -0700 | [diff] [blame] | 20 | import IWifiNanIfaceEventCallback; |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 21 | |
| 22 | /** |
Roshan Pius | 120f94c | 2016-10-13 11:48:42 -0700 | [diff] [blame] | 23 | * Interface used to represent a single NAN(Neighbour Aware Network) iface. |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 24 | */ |
| 25 | interface IWifiNanIface extends IWifiIface { |
Roshan Pius | 120f94c | 2016-10-13 11:48:42 -0700 | [diff] [blame] | 26 | /** |
| 27 | * Requests notifications of significant events on this iface. Multiple calls |
| 28 | * to this must register multiple callbacks each of which must receive all |
| 29 | * events. |
| 30 | * |
| 31 | * @param callback An instance of the |IWifiNanIfaceEventCallback| HIDL interface |
| 32 | * object. |
| 33 | * @return status WifiStatus of the operation. |
| 34 | * Possible status codes: |
| 35 | * |WifiStatusCode.SUCCESS|, |
| 36 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID| |
| 37 | */ |
| 38 | registerEventCallback(IWifiNanIfaceEventCallback callback) |
| 39 | generates (WifiStatus status); |
| 40 | |
| 41 | /** |
| 42 | * Enable NAN functionality. |
| 43 | * |
| 44 | * @param cmdId command Id to use for this invocation. |
| 45 | * @param msg Instance of |NanEnableRequest|. |
| 46 | * @return status WifiStatus of the operation. |
| 47 | * Possible status codes: |
| 48 | * |WifiStatusCode.SUCCESS|, |
| 49 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 50 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 51 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 52 | */ |
| 53 | enableRequest(CommandId cmdId, NanEnableRequest msg) |
| 54 | generates (WifiStatus status); |
| 55 | |
| 56 | /** |
| 57 | * Disable NAN functionality. |
| 58 | * |
| 59 | * @param cmdId command Id to use for this invocation. |
| 60 | * @return status WifiStatus of the operation. |
| 61 | * Possible status codes: |
| 62 | * |WifiStatusCode.SUCCESS|, |
| 63 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 64 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 65 | */ |
| 66 | disableRequest(CommandId cmdId) generates (WifiStatus status); |
| 67 | |
| 68 | /** |
| 69 | * Publish request to advertize a service. |
| 70 | * |
| 71 | * @param cmdId command Id to use for this invocation. |
| 72 | * @param msg Instance of |NanPublishRequest|. |
| 73 | * @return status WifiStatus of the operation. |
| 74 | * Possible status codes: |
| 75 | * |WifiStatusCode.SUCCESS|, |
| 76 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 77 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 78 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 79 | */ |
| 80 | publishRequest(CommandId cmdId, NanPublishRequest msg) |
| 81 | generates (WifiStatus status); |
| 82 | |
| 83 | /** |
| 84 | * Cancel previous publish requests. |
| 85 | * |
| 86 | * @param cmdId command Id to use for this invocation. |
| 87 | * @param msg Instance of |NanPublishCancelRequest|. |
| 88 | * @return status WifiStatus of the operation. |
| 89 | * Possible status codes: |
| 90 | * |WifiStatusCode.SUCCESS|, |
| 91 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 92 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 93 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 94 | */ |
| 95 | publishCancelRequest(CommandId cmdId, NanPublishCancelRequest msg) |
| 96 | generates (WifiStatus status); |
| 97 | |
| 98 | /** |
| 99 | * Subscribe request to search for a service. |
| 100 | * |
| 101 | * @param cmdId command Id to use for this invocation. |
| 102 | * @param msg Instance of |NanSubscribeRequest|. |
| 103 | * @return status WifiStatus of the operation. |
| 104 | * Possible status codes: |
| 105 | * |WifiStatusCode.SUCCESS|, |
| 106 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 107 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 108 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 109 | */ |
| 110 | subscribeRequest(CommandId cmdId, NanSubscribeRequest msg) |
| 111 | generates (WifiStatus status); |
| 112 | |
| 113 | /** |
| 114 | * Cancel previous subscribe requests. |
| 115 | * |
| 116 | * @param cmdId command Id to use for this invocation. |
| 117 | * @param msg Instance of |NanSubscribeCancelRequest|. |
| 118 | * @return status WifiStatus of the operation. |
| 119 | * Possible status codes: |
| 120 | * |WifiStatusCode.SUCCESS|, |
| 121 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 122 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 123 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 124 | */ |
| 125 | subscribeCancelRequest(CommandId cmdId, NanSubscribeCancelRequest msg) |
| 126 | generates (WifiStatus status); |
| 127 | |
| 128 | /** |
| 129 | * NAN transmit follow up request. |
| 130 | * |
| 131 | * @param cmdId command Id to use for this invocation. |
| 132 | * @param msg Instance of |NanTransmitFollowupRequest|. |
| 133 | * @return status WifiStatus of the operation. |
| 134 | * Possible status codes: |
| 135 | * |WifiStatusCode.SUCCESS|, |
| 136 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 137 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 138 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 139 | */ |
| 140 | transmitFollowupRequest(CommandId cmdId, NanTransmitFollowupRequest msg) |
| 141 | generates (WifiStatus status); |
| 142 | |
| 143 | /** |
| 144 | * NAN configuration request. |
| 145 | * |
| 146 | * @param cmdId command Id to use for this invocation. |
| 147 | * @param msg Instance of |NanConfigRequest|. |
| 148 | * @return status WifiStatus of the operation. |
| 149 | * Possible status codes: |
| 150 | * |WifiStatusCode.SUCCESS|, |
| 151 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 152 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 153 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 154 | */ |
| 155 | configRequest(CommandId cmdId, NanConfigRequest msg) |
| 156 | generates (WifiStatus status); |
| 157 | |
| 158 | /** |
| 159 | * Set NAN Beacon or sdf payload to discovery engine. |
| 160 | * This instructs the Discovery Engine to begin publishing the |
| 161 | * received payload in any Beacon or Service Discovery Frame transmitted |
| 162 | * |
| 163 | * @param cmdId command Id to use for this invocation. |
| 164 | * @param msg Instance of |NanBeaconSdfPayloadRequest|. |
| 165 | * @return status WifiStatus of the operation. |
| 166 | * Possible status codes: |
| 167 | * |WifiStatusCode.SUCCESS|, |
| 168 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 169 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 170 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 171 | */ |
| 172 | beaconSdfPayloadRequest(CommandId cmdId, NanBeaconSdfPayloadRequest msg) |
| 173 | generates (WifiStatus status); |
| 174 | |
| 175 | /** |
| 176 | * Get NAN HAL version. |
| 177 | * |
| 178 | * @param cmdId command Id to use for this invocation. |
| 179 | * @return version Instance of |NanVersion|. |
| 180 | * @return status WifiStatus of the operation. |
| 181 | * Possible status codes: |
| 182 | * |WifiStatusCode.SUCCESS|, |
| 183 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 184 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 185 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 186 | */ |
| 187 | getVersion() generates (WifiStatus status, NanVersion version); |
| 188 | |
| 189 | /** |
| 190 | * Get NAN capabilities. |
| 191 | * |
| 192 | * @param cmdId command Id to use for this invocation. |
| 193 | * @return status WifiStatus of the operation. |
| 194 | * Possible status codes: |
| 195 | * |WifiStatusCode.SUCCESS|, |
| 196 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 197 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 198 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 199 | */ |
| 200 | getCapabilities(CommandId cmdId) generates (WifiStatus status); |
| 201 | |
| 202 | /** |
| 203 | * Create NAN Data Interface |
| 204 | * |
| 205 | * @param cmdId command Id to use for this invocation. |
| 206 | * @return status WifiStatus of the operation. |
| 207 | * Possible status codes: |
| 208 | * |WifiStatusCode.SUCCESS|, |
| 209 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 210 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 211 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 212 | */ |
| 213 | dataInterfaceCreate(CommandId cmdId, string ifaceName) |
| 214 | generates (WifiStatus status); |
| 215 | |
| 216 | /** |
| 217 | * Delete NAN Data Interface. |
| 218 | * |
| 219 | * @param cmdId command Id to use for this invocation. |
| 220 | * @return status WifiStatus of the operation. |
| 221 | * Possible status codes: |
| 222 | * |WifiStatusCode.SUCCESS|, |
| 223 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 224 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 225 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 226 | */ |
| 227 | dataInterfaceDelete(CommandId cmdId, string ifaceName) |
| 228 | generates (WifiStatus status); |
| 229 | |
| 230 | /** |
| 231 | * Initiate a NDP session: Initiator |
| 232 | * |
| 233 | * @param cmdId command Id to use for this invocation. |
| 234 | * @param msg Instance of |NanDataPathInitiatorRequest|. |
| 235 | * @return status WifiStatus of the operation. |
| 236 | * Possible status codes: |
| 237 | * |WifiStatusCode.SUCCESS|, |
| 238 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 239 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 240 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 241 | */ |
| 242 | dataRequestInitiator(CommandId cmdId, NanDataPathInitiatorRequest msg) |
| 243 | generates (WifiStatus status); |
| 244 | |
| 245 | /** |
| 246 | * Response to a data indication received corresponding to a NDP session. An indication |
| 247 | * is received with a data request and the responder will send a data response. |
| 248 | * |
| 249 | * @param cmdId command Id to use for this invocation. |
| 250 | * @param msg Instance of |NanDataPathIndicationResponse|. |
| 251 | * @return status WifiStatus of the operation. |
| 252 | * Possible status codes: |
| 253 | * |WifiStatusCode.SUCCESS|, |
| 254 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 255 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 256 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 257 | */ |
| 258 | dataIndicationResponse(CommandId cmdId, NanDataPathIndicationResponse msg) |
| 259 | generates (WifiStatus status); |
| 260 | |
| 261 | /** |
| 262 | * NDL termination request: from either Initiator/Responder. |
| 263 | * |
| 264 | * @param cmdId command Id to use for this invocation. |
| 265 | * @param msg Instance of |NanDataPathEndRequest|. |
| 266 | * @return status WifiStatus of the operation. |
| 267 | * Possible status codes: |
| 268 | * |WifiStatusCode.SUCCESS|, |
| 269 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 270 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 271 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 272 | */ |
| 273 | dataEnd(CommandId cmdId, NanDataPathEndRequest msg) |
| 274 | generates (WifiStatus status); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 275 | }; |