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 * NAN Response and Asynchronous Event Callbacks.
22 * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
23 * Networking (NAN) Technical Specification".
25 interface IWifiNanIfaceEventCallback {
27 * Notify callbacks are asynchronous callbacks - but in response to |IWifiNanIface| method calls.
28 * Each method will receive a notify callback to return results (on success) or failure status.
32 * Asynchronous callback invoked in response to a capability request
33 * |IWifiNanIface.getCapabilitiesRequest|.
35 * @param cmdId command Id corresponding to the original request.
36 * @param status WifiNanStatus of the operation. Possible status codes are:
37 * |NanStatusType.SUCCESS|
38 * @param capabilities Capability data.
40 oneway notifyCapabilitiesResponse(CommandIdShort id, WifiNanStatus status,
41 NanCapabilities capabilities);
44 * Asynchronous callback invoked in response to an enable request |IWifiNanIface.enableRequest|.
46 * @param cmdId command Id corresponding to the original request.
47 * @param status WifiNanStatus of the operation. Possible status codes are:
48 * |NanStatusType.SUCCESS|
49 * |NanStatusType.ALREADY_ENABLED|
50 * |NanStatusType.INVALID_ARGS|
51 * |NanStatusType.INTERNAL_FAILURE|
52 * |NanStatusType.PROTOCOL_FAILURE|
53 * |NanStatusType.NAN_NOT_ALLOWED|
55 oneway notifyEnableResponse(CommandIdShort id, WifiNanStatus status);
58 * Asynchronous callback invoked in response to a config request |IWifiNanIface.configRequest|.
60 * @param cmdId command Id corresponding to the original request.
61 * @param status WifiNanStatus of the operation. Possible status codes are:
62 * |NanStatusType.SUCCESS|
63 * |NanStatusType.INVALID_ARGS|
64 * |NanStatusType.INTERNAL_FAILURE|
65 * |NanStatusType.PROTOCOL_FAILURE|
67 oneway notifyConfigResponse(CommandIdShort id, WifiNanStatus status);
70 * Asynchronous callback invoked in response to a disable request |IWifiNanIface.disableRequest|.
72 * @param cmdId command Id corresponding to the original request.
73 * @param status WifiNanStatus of the operation. Possible status codes are:
74 * |NanStatusType.SUCCESS|
75 * |NanStatusType.PROTOCOL_FAILURE|
77 oneway notifyDisableResponse(CommandIdShort id, WifiNanStatus status);
80 * Asynchronous callback invoked to notify the status of the start publish request
81 * |IWifiNanIface.startPublishRequest|.
83 * @param cmdId command Id corresponding to the original request.
84 * @param status WifiNanStatus of the operation. Possible status codes are:
85 * |NanStatusType.SUCCESS|
86 * |NanStatusType.INVALID_ARGS|
87 * |NanStatusType.PROTOCOL_FAILURE|
88 * |NanStatusType.NO_RESOURCES_AVAILABLE|
89 * |NanStatusType.INVALID_SESSION_ID|
90 * @param sessionId ID of the new publish session (if successfully created).
92 oneway notifyStartPublishResponse(CommandIdShort id, WifiNanStatus status, uint8_t sessionId);
95 * Asynchronous callback invoked in response to a stop publish request
96 * |IWifiNanIface.stopPublishRequest|.
98 * @param cmdId command Id corresponding to the original request.
99 * @param status WifiNanStatus of the operation. Possible status codes are:
100 * |NanStatusType.SUCCESS|
101 * |NanStatusType.INVALID_SESSION_ID|
102 * |NanStatusType.INTERNAL_FAILURE|
104 oneway notifyStopPublishResponse(CommandIdShort id, WifiNanStatus status);
107 * Asynchronous callback invoked to notify the status of the start subscribe request
108 * |IWifiNanIface.startSubscribeRequest|.
110 * @param cmdId command Id corresponding to the original request.
111 * @param status WifiNanStatus of the operation. Possible status codes are:
112 * |NanStatusType.SUCCESS|
113 * |NanStatusType.INVALID_ARGS|
114 * |NanStatusType.PROTOCOL_FAILURE|
115 * |NanStatusType.NO_RESOURCES_AVAILABLE|
116 * |NanStatusType.INVALID_SESSION_ID|
117 * @param sessionId ID of the new subscribe session (if successfully created).
119 oneway notifyStartSubscribeResponse(CommandIdShort id, WifiNanStatus status, uint8_t sessionId);
122 * Asynchronous callback invoked in response to a stop subscribe request
123 * |IWifiNanIface.stopSubscribeRequest|.
125 * @param cmdId command Id corresponding to the original request.
126 * @param status WifiNanStatus of the operation. Possible status codes are:
127 * |NanStatusType.SUCCESS|
128 * |NanStatusType.INVALID_SESSION_ID|
129 * |NanStatusType.INTERNAL_FAILURE|
131 oneway notifyStopSubscribeResponse(CommandIdShort id, WifiNanStatus status);
134 * Asynchronous callback invoked in response to a transmit followup request
135 * |IWifiNanIface.transmitFollowupRequest|.
137 * @param cmdId command Id corresponding to the original request.
138 * @param status WifiNanStatus of the operation. Possible status codes are:
139 * |NanStatusType.SUCCESS|
140 * |NanStatusType.INVALID_ARGS|
141 * |NanStatusType.INTERNAL_FAILURE|
142 * |NanStatusType.INVALID_SESSION_ID|
143 * |NanStatusType.INVALID_PEER_ID|
144 * |NanStatusType.FOLLOWUP_TX_QUEUE_FULL|
146 oneway notifyTransmitFollowupResponse(CommandIdShort id, WifiNanStatus status);
149 * Asynchronous callback invoked in response to a create data interface request
150 * |IWifiNanIface.createDataInterfaceRequest|.
152 * @param cmdId command Id corresponding to the original request.
153 * @param status WifiNanStatus of the operation. Possible status codes are:
154 * |NanStatusType.SUCCESS|
155 * |NanStatusType.INVALID_ARGS|
156 * |NanStatusType.INTERNAL_FAILURE|
158 oneway notifyCreateDataInterfaceResponse(CommandIdShort id, WifiNanStatus status);
161 * Asynchronous callback invoked in response to a delete data interface request
162 * |IWifiNanIface.deleteDataInterfaceRequest|.
164 * @param cmdId command Id corresponding to the original request.
165 * @param status WifiNanStatus of the operation. Possible status codes are:
166 * |NanStatusType.SUCCESS|
167 * |NanStatusType.INVALID_ARGS|
168 * |NanStatusType.INTERNAL_FAILURE|
170 oneway notifyDeleteDataInterfaceResponse(CommandIdShort id, WifiNanStatus status);
173 * Asynchronous callback invoked in response to an initiate data path request
174 * |IWifiNanIface.initiateDataPathRequest|.
176 * @param cmdId command Id corresponding to the original request.
177 * @param status WifiNanStatus of the operation. Possible status codes are:
178 * |NanStatusType.SUCCESS|
179 * |NanStatusType.INVALID_ARGS|
180 * |NanStatusType.INTERNAL_FAILURE|
181 * |NanStatusType.PROTOCOL_FAILURE|
182 * |NanStatusType.INVALID_PEER_ID|
183 * @param ndpInstanceId ID of the new data path being negotiated (on successful status).
185 oneway notifyInitiateDataPathResponse(CommandIdShort id, WifiNanStatus status,
186 uint32_t ndpInstanceId );
189 * Asynchronous callback invoked in response to a respond to data path indication request
190 * |IWifiNanIface.respondToDataPathIndicationRequest|.
192 * @param cmdId command Id corresponding to the original request.
193 * @param status WifiNanStatus of the operation. Possible status codes are:
194 * |NanStatusType.SUCCESS|
195 * |NanStatusType.INVALID_ARGS|
196 * |NanStatusType.INTERNAL_FAILURE|
197 * |NanStatusType.PROTOCOL_FAILURE|
198 * |NanStatusType.INVALID_NDP_ID|
200 oneway notifyRespondToDataPathIndicationResponse(CommandIdShort id, WifiNanStatus status);
203 * Asynchronous callback invoked in response to a terminate data path request
204 * |IWifiNanIface.terminateDataPathRequest|.
206 * @param cmdId command Id corresponding to the original request.
207 * @param status WifiNanStatus of the operation. Possible status codes are:
208 * |NanStatusType.SUCCESS|
209 * |NanStatusType.INVALID_ARGS|
210 * |NanStatusType.INTERNAL_FAILURE|
211 * |NanStatusType.PROTOCOL_FAILURE|
212 * |NanStatusType.INVALID_NDP_ID|
214 oneway notifyTerminateDataPathResponse(CommandIdShort id, WifiNanStatus status);
217 * Callbacks for the various asynchornous NAN Events.
221 * Asynchronous callback indicating that a cluster event has been received.
223 * @param event: NanClusterEventInd containing event details.
225 oneway eventClusterEvent(NanClusterEventInd event);
228 * Asynchronous callback indicating that a NAN has been disabled.
230 * @param status: WifiNanStatus describing the reason for the disable event.
231 * Possible status codes are:
232 * |NanStatusType.SUCCESS|
233 * |NanStatusType.UNSUPPORTED_CONCURRENCY_NAN_DISABLED|
235 oneway eventDisabled(WifiNanStatus status);
238 * Asynchronous callback indicating that an active publish session has terminated.
240 * @param sessionId: The discovery session ID of the terminated session.
241 * @param status: WifiNanStatus describing the reason for the session termination.
242 * Possible status codes are:
243 * |NanStatusType.SUCCESS|
245 oneway eventPublishTerminated(uint8_t sessionId, WifiNanStatus status);
248 * Asynchronous callback indicating that an active subscribe session has terminated.
250 * @param sessionId: The discovery session ID of the terminated session.
251 * @param status: WifiNanStatus describing the reason for the session termination.
252 * Possible status codes are:
253 * |NanStatusType.SUCCESS|
255 oneway eventSubscribeTerminated(uint8_t sessionId, WifiNanStatus status);
258 * Asynchronous callback indicating that a match has occurred: i.e. a service has been
261 * @param event: NanMatchInd containing event details.
263 oneway eventMatch(NanMatchInd event);
266 * Asynchronous callback indicating that a previously discovered match (service) has expired.
268 * @param discoverySessionId: The discovery session ID of the expired match.
269 * @param peerId: The peer ID of the expired match.
271 oneway eventMatchExpired(uint8_t discoverySessionId, uint32_t peerId);
274 * Asynchronous callback indicating that a followup message has been received from a peer.
276 * @param event: NanFollowupReceivedInd containing event details.
278 oneway eventFollowupReceived(NanFollowupReceivedInd event);
281 * Asynchronous callback providing status on a completed followup message transmit operation.
283 * @param cmdId command Id corresponding to the original |transmitFollowupRequest| request.
284 * @param status WifiNanStatus of the operation. Possible status codes are:
285 * |NanStatusType.SUCCESS|
286 * |NanStatusType.NO_OTA_ACK|
287 * |NanStatusType.PROTOCOL_FAILURE|
289 oneway eventTransmitFollowup(CommandIdShort id, WifiNanStatus status);
292 * Asynchronous callback indicating a data-path (NDP) setup has been requested by an Initiator
293 * peer (received by the intended Respodner).
295 * @param event: NanDataPathRequestInd containing event details.
297 oneway eventDataPathRequest(NanDataPathRequestInd event);
300 * Asynchronous callback indicating a data-path (NDP) setup has been completed: received by
301 * both Initiator and Responder.
303 * @param event: NanDataPathConfirmInd containing event details.
305 oneway eventDataPathConfirm(NanDataPathConfirmInd event);
308 * Asynchronous callback indicating a list of data-paths (NDP) have been terminated: received by
309 * both Initiator and Responder.
311 * @param ndpInstanceId: data-path ID of the terminated data-path.
313 oneway eventDataPathTerminated(uint32_t ndpInstanceId);