blob: d1d4ca5a80a9f9385d2c396b51f9fc4003b4207e [file] [log] [blame]
Roshan Piusadcfba42016-10-05 10:19:06 -07001/*
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
17package android.hardware.wifi@1.0;
18
19import IWifiIface;
Roshan Pius120f94c2016-10-13 11:48:42 -070020import IWifiNanIfaceEventCallback;
Roshan Piusadcfba42016-10-05 10:19:06 -070021
22/**
Roshan Pius120f94c2016-10-13 11:48:42 -070023 * Interface used to represent a single NAN(Neighbour Aware Network) iface.
Etan Cohen44983ae2017-02-09 09:16:25 -080024 *
25 * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
26 * Networking (NAN) Technical Specification".
Roshan Piusadcfba42016-10-05 10:19:06 -070027 */
28interface IWifiNanIface extends IWifiIface {
Roshan Pius120f94c2016-10-13 11:48:42 -070029 /**
30 * Requests notifications of significant events on this iface. Multiple calls
31 * to this must register multiple callbacks each of which must receive all
32 * events.
33 *
34 * @param callback An instance of the |IWifiNanIfaceEventCallback| HIDL interface
35 * object.
36 * @return status WifiStatus of the operation.
37 * Possible status codes:
38 * |WifiStatusCode.SUCCESS|,
39 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
40 */
41 registerEventCallback(IWifiNanIfaceEventCallback callback)
42 generates (WifiStatus status);
43
44 /**
Etan Cohen44983ae2017-02-09 09:16:25 -080045 * Get NAN capabilities. Asynchronous response is with
46 * |IWifiNanIfaceEventCallback.notifyCapabilitiesResponse|.
Etan Cohenf01bcaa2016-12-25 09:42:21 -080047 *
48 * @param cmdId command Id to use for this invocation.
49 * @return status WifiStatus of the operation.
50 * Possible status codes:
51 * |WifiStatusCode.SUCCESS|,
52 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
53 * |WifiStatusCode.ERROR_UNKNOWN|
54 */
55 getCapabilitiesRequest(CommandIdShort cmdId) generates (WifiStatus status);
56
57 /**
58 * Enable NAN: configures and activates NAN clustering (does not start
59 * a discovery session or set up data-interfaces or data-paths). Use the
Etan Cohen44983ae2017-02-09 09:16:25 -080060 * |IWifiNanIface.configureRequest| method to change the configuration of an already enabled
Etan Cohenf01bcaa2016-12-25 09:42:21 -080061 * NAN interface.
Etan Cohen44983ae2017-02-09 09:16:25 -080062 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyEnableResponse|.
Roshan Pius120f94c2016-10-13 11:48:42 -070063 *
64 * @param cmdId command Id to use for this invocation.
65 * @param msg Instance of |NanEnableRequest|.
66 * @return status WifiStatus of the operation.
67 * Possible status codes:
68 * |WifiStatusCode.SUCCESS|,
69 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
70 * |WifiStatusCode.ERROR_INVALID_ARGS|,
71 * |WifiStatusCode.ERROR_UNKNOWN|
72 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -080073 enableRequest(CommandIdShort cmdId, NanEnableRequest msg)
74 generates (WifiStatus status);
75
76 /**
77 * Configure NAN: configures an existing NAN functionality (i.e. assumes
Etan Cohen44983ae2017-02-09 09:16:25 -080078 * |IWifiNanIface.enableRequest| already submitted and succeeded).
79 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyConfigResponse|.
Etan Cohenf01bcaa2016-12-25 09:42:21 -080080 *
81 * @param cmdId command Id to use for this invocation.
82 * @param msg Instance of |NanConfigRequest|.
83 * @return status WifiStatus of the operation.
84 * Possible status codes:
85 * |WifiStatusCode.SUCCESS|,
86 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
87 * |WifiStatusCode.ERROR_INVALID_ARGS|,
88 * |WifiStatusCode.ERROR_UNKNOWN|
89 */
90 configRequest(CommandIdShort cmdId, NanConfigRequest msg)
Roshan Pius120f94c2016-10-13 11:48:42 -070091 generates (WifiStatus status);
92
93 /**
94 * Disable NAN functionality.
Etan Cohen44983ae2017-02-09 09:16:25 -080095 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDisableResponse|.
Roshan Pius120f94c2016-10-13 11:48:42 -070096 *
97 * @param cmdId command Id to use for this invocation.
98 * @return status WifiStatus of the operation.
99 * Possible status codes:
100 * |WifiStatusCode.SUCCESS|,
101 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
102 * |WifiStatusCode.ERROR_UNKNOWN|
103 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800104 disableRequest(CommandIdShort cmdId) generates (WifiStatus status);
Roshan Pius120f94c2016-10-13 11:48:42 -0700105
106 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800107 * Publish request to start advertising a discovery service.
Etan Cohen44983ae2017-02-09 09:16:25 -0800108 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartPublishResponse|.
Roshan Pius120f94c2016-10-13 11:48:42 -0700109 *
110 * @param cmdId command Id to use for this invocation.
111 * @param msg Instance of |NanPublishRequest|.
112 * @return status WifiStatus of the operation.
113 * Possible status codes:
114 * |WifiStatusCode.SUCCESS|,
115 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
116 * |WifiStatusCode.ERROR_INVALID_ARGS|,
117 * |WifiStatusCode.ERROR_UNKNOWN|
118 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800119 startPublishRequest(CommandIdShort cmdId, NanPublishRequest msg)
Roshan Pius120f94c2016-10-13 11:48:42 -0700120 generates (WifiStatus status);
121
122 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800123 * Stop publishing a discovery service.
Etan Cohen44983ae2017-02-09 09:16:25 -0800124 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStopPublishResponse|.
Roshan Pius120f94c2016-10-13 11:48:42 -0700125 *
126 * @param cmdId command Id to use for this invocation.
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800127 * @param sessionId ID of the publish discovery session to be stopped.
Roshan Pius120f94c2016-10-13 11:48:42 -0700128 * @return status WifiStatus of the operation.
129 * Possible status codes:
130 * |WifiStatusCode.SUCCESS|,
131 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
Roshan Pius120f94c2016-10-13 11:48:42 -0700132 * |WifiStatusCode.ERROR_UNKNOWN|
133 */
Etan Cohen073bb992017-02-09 10:05:59 -0800134 stopPublishRequest(CommandIdShort cmdId, uint8_t sessionId)
Roshan Pius120f94c2016-10-13 11:48:42 -0700135 generates (WifiStatus status);
136
137 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800138 * Subscribe request to start searching for a discovery service.
Etan Cohen44983ae2017-02-09 09:16:25 -0800139 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartSubscribeResponse|.
Roshan Pius120f94c2016-10-13 11:48:42 -0700140 *
141 * @param cmdId command Id to use for this invocation.
142 * @param msg Instance of |NanSubscribeRequest|.
143 * @return status WifiStatus of the operation.
144 * Possible status codes:
145 * |WifiStatusCode.SUCCESS|,
146 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
147 * |WifiStatusCode.ERROR_INVALID_ARGS|,
148 * |WifiStatusCode.ERROR_UNKNOWN|
149 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800150 startSubscribeRequest(CommandIdShort cmdId, NanSubscribeRequest msg)
Roshan Pius120f94c2016-10-13 11:48:42 -0700151 generates (WifiStatus status);
152
153 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800154 * Stop subscribing to a discovery service.
Etan Cohen44983ae2017-02-09 09:16:25 -0800155 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStopSubscribeResponse|.
Roshan Pius120f94c2016-10-13 11:48:42 -0700156 *
157 * @param cmdId command Id to use for this invocation.
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800158 * @param sessionId ID of the subscribe discovery session to be stopped.
Roshan Pius120f94c2016-10-13 11:48:42 -0700159 * @return status WifiStatus of the operation.
160 * Possible status codes:
161 * |WifiStatusCode.SUCCESS|,
162 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
Roshan Pius120f94c2016-10-13 11:48:42 -0700163 * |WifiStatusCode.ERROR_UNKNOWN|
164 */
Etan Cohen073bb992017-02-09 10:05:59 -0800165 stopSubscribeRequest(CommandIdShort cmdId, uint8_t sessionId)
Roshan Pius120f94c2016-10-13 11:48:42 -0700166 generates (WifiStatus status);
167
168 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800169 * NAN transmit follow up message request.
Etan Cohen44983ae2017-02-09 09:16:25 -0800170 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyTransmitFollowupResponse|.
Roshan Pius120f94c2016-10-13 11:48:42 -0700171 *
172 * @param cmdId command Id to use for this invocation.
173 * @param msg Instance of |NanTransmitFollowupRequest|.
174 * @return status WifiStatus of the operation.
175 * Possible status codes:
176 * |WifiStatusCode.SUCCESS|,
177 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
178 * |WifiStatusCode.ERROR_INVALID_ARGS|,
179 * |WifiStatusCode.ERROR_UNKNOWN|
180 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800181 transmitFollowupRequest(CommandIdShort cmdId, NanTransmitFollowupRequest msg)
Roshan Pius120f94c2016-10-13 11:48:42 -0700182 generates (WifiStatus status);
183
184 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800185 * Create a NAN Data Interface.
Etan Cohen44983ae2017-02-09 09:16:25 -0800186 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyCreateDataInterfaceResponse|.
Roshan Pius120f94c2016-10-13 11:48:42 -0700187 *
188 * @param cmdId command Id to use for this invocation.
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800189 * @return status WifiStatus of the operation.
190 * Possible status codes:
191 * |WifiStatusCode.SUCCESS|,
192 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
193 * |WifiStatusCode.ERROR_UNKNOWN|
194 */
195 createDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
196 generates (WifiStatus status);
197
198 /**
199 * Delete a NAN Data Interface.
Etan Cohen44983ae2017-02-09 09:16:25 -0800200 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDeleteDataInterfaceResponse|.
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800201 *
202 * @param cmdId command Id to use for this invocation.
203 * @return status WifiStatus of the operation.
204 * Possible status codes:
205 * |WifiStatusCode.SUCCESS|,
206 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
207 * |WifiStatusCode.ERROR_UNKNOWN|
208 */
209 deleteDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
210 generates (WifiStatus status);
211
212 /**
213 * Initiate a data-path (NDP) setup operation: Initiator.
Etan Cohen44983ae2017-02-09 09:16:25 -0800214 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyInitiateDataPathResponse|.
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800215 *
216 * @param cmdId command Id to use for this invocation.
217 * @param msg Instance of |NanInitiateDataPathRequest|.
Roshan Pius120f94c2016-10-13 11:48:42 -0700218 * @return status WifiStatus of the operation.
219 * Possible status codes:
220 * |WifiStatusCode.SUCCESS|,
221 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
222 * |WifiStatusCode.ERROR_INVALID_ARGS|,
223 * |WifiStatusCode.ERROR_UNKNOWN|
224 */
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800225 initiateDataPathRequest(CommandIdShort cmdId, NanInitiateDataPathRequest msg)
Roshan Pius120f94c2016-10-13 11:48:42 -0700226 generates (WifiStatus status);
227
228 /**
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800229 * Respond to a received data indication as part of a data-path (NDP) setup operation. An
230 * indication is received by the Responder from the Initiator.
Etan Cohen44983ae2017-02-09 09:16:25 -0800231 * Asynchronous response is with
232 * |IWifiNanIfaceEventCallback.notifyRespondToDataPathIndicationResponse|.
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800233 *
234 * @param cmdId command Id to use for this invocation.
235 * @param msg Instance of |NanRespondToDataPathIndicationRequest|.
236 * @return status WifiStatus of the operation.
237 * Possible status codes:
238 * |WifiStatusCode.SUCCESS|,
239 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
240 * |WifiStatusCode.ERROR_INVALID_ARGS|,
241 * |WifiStatusCode.ERROR_UNKNOWN|
242 */
243 respondToDataPathIndicationRequest(CommandIdShort cmdId,
244 NanRespondToDataPathIndicationRequest msg)
245 generates (WifiStatus status);
246
247 /**
248 * Data-path (NDP) termination request: executed by either Initiator or Responder.
Etan Cohen44983ae2017-02-09 09:16:25 -0800249 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyTerminateDataPathResponse|.
Etan Cohenf01bcaa2016-12-25 09:42:21 -0800250 *
251 * @param cmdId command Id to use for this invocation.
252 * @param ndpInstanceId Data-path instance ID to be terminated.
253 * @return status WifiStatus of the operation.
254 * Possible status codes:
255 * |WifiStatusCode.SUCCESS|,
256 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
257 * |WifiStatusCode.ERROR_UNKNOWN|
258 */
259 terminateDataPathRequest(CommandIdShort cmdId, uint32_t ndpInstanceId)
260 generates (WifiStatus status);
Roshan Piusadcfba42016-10-05 10:19:06 -0700261};