2 * Copyright 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package android.hardware.wifi@1.0;
20 import IWifiNanIfaceEventCallback;
23 * Interface used to represent a single NAN(Neighbour Aware Network) iface.
25 * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
26 * Networking (NAN) Technical Specification".
28 interface IWifiNanIface extends IWifiIface {
30 * Requests notifications of significant events on this iface. Multiple calls
31 * to this must register multiple callbacks each of which must receive all
34 * @param callback An instance of the |IWifiNanIfaceEventCallback| HIDL interface
36 * @return status WifiStatus of the operation.
37 * Possible status codes:
38 * |WifiStatusCode.SUCCESS|,
39 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
41 registerEventCallback(IWifiNanIfaceEventCallback callback)
42 generates (WifiStatus status);
45 * Get NAN capabilities. Asynchronous response is with
46 * |IWifiNanIfaceEventCallback.notifyCapabilitiesResponse|.
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|
55 getCapabilitiesRequest(CommandIdShort cmdId) generates (WifiStatus status);
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
60 * |IWifiNanIface.configureRequest| method to change the configuration of an already enabled
62 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyEnableResponse|.
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|
73 enableRequest(CommandIdShort cmdId, NanEnableRequest msg)
74 generates (WifiStatus status);
77 * Configure NAN: configures an existing NAN functionality (i.e. assumes
78 * |IWifiNanIface.enableRequest| already submitted and succeeded).
79 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyConfigResponse|.
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|
90 configRequest(CommandIdShort cmdId, NanConfigRequest msg)
91 generates (WifiStatus status);
94 * Disable NAN functionality.
95 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDisableResponse|.
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|
104 disableRequest(CommandIdShort cmdId) generates (WifiStatus status);
107 * Publish request to start advertising a discovery service.
108 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartPublishResponse|.
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|
119 startPublishRequest(CommandIdShort cmdId, NanPublishRequest msg)
120 generates (WifiStatus status);
123 * Stop publishing a discovery service.
124 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStopPublishResponse|.
126 * @param cmdId command Id to use for this invocation.
127 * @param sessionId ID of the publish discovery session to be stopped.
128 * @return status WifiStatus of the operation.
129 * Possible status codes:
130 * |WifiStatusCode.SUCCESS|,
131 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
132 * |WifiStatusCode.ERROR_UNKNOWN|
134 stopPublishRequest(CommandIdShort cmdId, uint8_t sessionId)
135 generates (WifiStatus status);
138 * Subscribe request to start searching for a discovery service.
139 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartSubscribeResponse|.
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|
150 startSubscribeRequest(CommandIdShort cmdId, NanSubscribeRequest msg)
151 generates (WifiStatus status);
154 * Stop subscribing to a discovery service.
155 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStopSubscribeResponse|.
157 * @param cmdId command Id to use for this invocation.
158 * @param sessionId ID of the subscribe discovery session to be stopped.
159 * @return status WifiStatus of the operation.
160 * Possible status codes:
161 * |WifiStatusCode.SUCCESS|,
162 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
163 * |WifiStatusCode.ERROR_UNKNOWN|
165 stopSubscribeRequest(CommandIdShort cmdId, uint8_t sessionId)
166 generates (WifiStatus status);
169 * NAN transmit follow up message request.
170 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyTransmitFollowupResponse|.
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|
181 transmitFollowupRequest(CommandIdShort cmdId, NanTransmitFollowupRequest msg)
182 generates (WifiStatus status);
185 * Create a NAN Data Interface.
186 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyCreateDataInterfaceResponse|.
188 * @param cmdId command Id to use for this invocation.
189 * @return status WifiStatus of the operation.
190 * Possible status codes:
191 * |WifiStatusCode.SUCCESS|,
192 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
193 * |WifiStatusCode.ERROR_UNKNOWN|
195 createDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
196 generates (WifiStatus status);
199 * Delete a NAN Data Interface.
200 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDeleteDataInterfaceResponse|.
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|
209 deleteDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
210 generates (WifiStatus status);
213 * Initiate a data-path (NDP) setup operation: Initiator.
214 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyInitiateDataPathResponse|.
216 * @param cmdId command Id to use for this invocation.
217 * @param msg Instance of |NanInitiateDataPathRequest|.
218 * @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|
225 initiateDataPathRequest(CommandIdShort cmdId, NanInitiateDataPathRequest msg)
226 generates (WifiStatus status);
229 * 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.
231 * Asynchronous response is with
232 * |IWifiNanIfaceEventCallback.notifyRespondToDataPathIndicationResponse|.
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|
243 respondToDataPathIndicationRequest(CommandIdShort cmdId,
244 NanRespondToDataPathIndicationRequest msg)
245 generates (WifiStatus status);
248 * Data-path (NDP) termination request: executed by either Initiator or Responder.
249 * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyTerminateDataPathResponse|.
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|
259 terminateDataPathRequest(CommandIdShort cmdId, uint32_t ndpInstanceId)
260 generates (WifiStatus status);