2016-10-13 20:48:42 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2016 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package android.hardware.wifi@1.0;
|
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* NAN Response and Asynchronous Event Callbacks.
|
2016-10-13 20:48:42 +02:00
|
|
|
*/
|
|
|
|
interface IWifiNanIfaceEventCallback {
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Callback invoked in response to a capability request |getCapabilitiesRequest|.
|
2016-10-14 23:53:43 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* @param capabilities Capability data.
|
2016-10-13 20:48:42 +02:00
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
oneway notifyCapabilitiesResponse(CommandIdShort id, WifiNanStatus status,
|
|
|
|
NanCapabilities capabilities);
|
2016-10-14 23:53:43 +02:00
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Callback invoked in response to an enable request |enableRequest|.
|
2016-10-14 23:53:43 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.ALREADY_ENABLED|
|
|
|
|
* |NanStatusType.INVALID_ARGS|
|
|
|
|
* |NanStatusType.INTERNAL_FAILURE|
|
|
|
|
* |NanStatusType.PROTOCOL_FAILURE|
|
|
|
|
* |NanStatusType.NAN_NOT_ALLOWED|
|
2016-10-14 23:53:43 +02:00
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
oneway notifyEnableResponse(CommandIdShort id, WifiNanStatus status);
|
2016-10-14 23:53:43 +02:00
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Callback invoked in response to a config request |configRequest|.
|
2016-10-14 23:53:43 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_ARGS|
|
|
|
|
* |NanStatusType.INTERNAL_FAILURE|
|
|
|
|
* |NanStatusType.PROTOCOL_FAILURE|
|
2016-10-14 23:53:43 +02:00
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
oneway notifyConfigResponse(CommandIdShort id, WifiNanStatus status);
|
2016-10-14 23:53:43 +02:00
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Callback invoked in response to a disable request |disableRequest|.
|
2016-10-14 23:53:43 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.PROTOCOL_FAILURE|
|
2016-10-14 23:53:43 +02:00
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
oneway notifyDisableResponse(CommandIdShort id, WifiNanStatus status);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked to notify the status of the start publish request |startPublishRequest|.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_ARGS|
|
|
|
|
* |NanStatusType.PROTOCOL_FAILURE|
|
|
|
|
* |NanStatusType.NO_RESOURCES_AVAILABLE|
|
|
|
|
* |NanStatusType.INVALID_SESSION_ID|
|
|
|
|
* @param sessionId ID of the new publish session (if successfully created).
|
|
|
|
*/
|
|
|
|
oneway notifyStartPublishResponse(CommandIdShort id, WifiNanStatus status, uint16_t sessionId);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked in response to a stop publish request |stopPublishRequest|.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_SESSION_ID|
|
|
|
|
* |NanStatusType.INTERNAL_FAILURE|
|
|
|
|
*/
|
|
|
|
oneway notifyStopPublishResponse(CommandIdShort id, WifiNanStatus status);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked to notify the status of the start subscribe request |startSubscribeRequest|.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_ARGS|
|
|
|
|
* |NanStatusType.PROTOCOL_FAILURE|
|
|
|
|
* |NanStatusType.NO_RESOURCES_AVAILABLE|
|
|
|
|
* |NanStatusType.INVALID_SESSION_ID|
|
|
|
|
* @param sessionId ID of the new subscribe session (if successfully created).
|
|
|
|
*/
|
|
|
|
oneway notifyStartSubscribeResponse(CommandIdShort id, WifiNanStatus status, uint16_t sessionId);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked in response to a stop subscribe request |stopSubscribeRequest|.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_SESSION_ID|
|
|
|
|
* |NanStatusType.INTERNAL_FAILURE|
|
|
|
|
*/
|
|
|
|
oneway notifyStopSubscribeResponse(CommandIdShort id, WifiNanStatus status);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked in response to a transmit followup request |transmitFollowupRequest|.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_ARGS|
|
|
|
|
* |NanStatusType.INTERNAL_FAILURE|
|
|
|
|
* |NanStatusType.INVALID_SESSION_ID|
|
|
|
|
* |NanStatusType.INVALID_PEER_ID|
|
|
|
|
*/
|
|
|
|
oneway notifyTransmitFollowupResponse(CommandIdShort id, WifiNanStatus status);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked in response to a create data interface request |createDataInterfaceRequest|.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_ARGS|
|
|
|
|
* |NanStatusType.INTERNAL_FAILURE|
|
|
|
|
*/
|
|
|
|
oneway notifyCreateDataInterfaceResponse(CommandIdShort id, WifiNanStatus status);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked in response to a delete data interface request |deleteDataInterfaceRequest|.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_ARGS|
|
|
|
|
* |NanStatusType.INTERNAL_FAILURE|
|
|
|
|
*/
|
|
|
|
oneway notifyDeleteDataInterfaceResponse(CommandIdShort id, WifiNanStatus status);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked in response to an initiate data path request |initiateDataPathRequest|.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_ARGS|
|
|
|
|
* |NanStatusType.INTERNAL_FAILURE|
|
|
|
|
* |NanStatusType.PROTOCOL_FAILURE|
|
|
|
|
* |NanStatusType.INVALID_PEER_ID|
|
2017-01-30 22:28:37 +01:00
|
|
|
* @param ndpInstanceId ID of the new data path being negotiated (on successful status).
|
2016-12-25 18:42:21 +01:00
|
|
|
*/
|
2017-01-30 22:28:37 +01:00
|
|
|
oneway notifyInitiateDataPathResponse(CommandIdShort id, WifiNanStatus status,
|
|
|
|
uint32_t ndpInstanceId );
|
2016-12-25 18:42:21 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked in response to a respond to data path indication request
|
|
|
|
* |respondToDataPathIndicationRequest|.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_ARGS|
|
|
|
|
* |NanStatusType.INTERNAL_FAILURE|
|
|
|
|
* |NanStatusType.PROTOCOL_FAILURE|
|
|
|
|
* |NanStatusType.INVALID_NDP_ID|
|
|
|
|
*/
|
2017-01-30 22:28:37 +01:00
|
|
|
oneway notifyRespondToDataPathIndicationResponse(CommandIdShort id, WifiNanStatus status);
|
2016-12-25 18:42:21 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback invoked in response to a terminate data path request |terminateDataPathRequest|.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.INVALID_ARGS|
|
|
|
|
* |NanStatusType.INTERNAL_FAILURE|
|
|
|
|
* |NanStatusType.PROTOCOL_FAILURE|
|
|
|
|
* |NanStatusType.INVALID_NDP_ID|
|
|
|
|
*/
|
|
|
|
oneway notifyTerminateDataPathResponse(CommandIdShort id, WifiNanStatus status);
|
|
|
|
|
2016-10-13 20:48:42 +02:00
|
|
|
/**
|
|
|
|
* Callbacks for the various asynchornous NAN Events.
|
|
|
|
*/
|
|
|
|
|
2016-12-25 18:42:21 +01:00
|
|
|
/**
|
|
|
|
* Asynchronous callback indicating that a cluster event has been received.
|
|
|
|
*
|
|
|
|
* @param event: NanClusterEventInd containing event details.
|
|
|
|
*/
|
|
|
|
oneway eventClusterEvent(NanClusterEventInd event);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Asynchronous callback indicating that a NAN has been disabled.
|
|
|
|
*
|
|
|
|
* @param status: WifiNanStatus describing the reason for the disable event.
|
|
|
|
* Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
* |NanStatusType.UNSUPPORTED_CONCURRENCY_NAN_DISABLED|
|
|
|
|
*/
|
|
|
|
oneway eventDisabled(WifiNanStatus status);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
2016-12-25 18:42:21 +01:00
|
|
|
/**
|
|
|
|
* Asynchronous callback indicating that an active publish session has terminated.
|
|
|
|
*
|
|
|
|
* @param sessionId: The discovery session ID of the terminated session.
|
|
|
|
* @param status: WifiNanStatus describing the reason for the session termination.
|
|
|
|
* Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
*/
|
|
|
|
oneway eventPublishTerminated(uint16_t sessionId, WifiNanStatus status);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
2016-12-25 18:42:21 +01:00
|
|
|
/**
|
|
|
|
* Asynchronous callback indicating that an active subscribe session has terminated.
|
|
|
|
*
|
|
|
|
* @param sessionId: The discovery session ID of the terminated session.
|
|
|
|
* @param status: WifiNanStatus describing the reason for the session termination.
|
|
|
|
* Possible status codes are:
|
|
|
|
* |NanStatusType.SUCCESS|
|
|
|
|
*/
|
|
|
|
oneway eventSubscribeTerminated(uint16_t sessionId, WifiNanStatus status);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
2016-12-25 18:42:21 +01:00
|
|
|
/**
|
|
|
|
* Asynchronous callback indicating that a match has occurred: i.e. a service has been
|
|
|
|
* discovered.
|
|
|
|
*
|
|
|
|
* @param event: NanMatchInd containing event details.
|
|
|
|
*/
|
|
|
|
oneway eventMatch(NanMatchInd event);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
2016-12-25 18:42:21 +01:00
|
|
|
/**
|
|
|
|
* Asynchronous callback indicating that a previously discovered match (service) has expired.
|
|
|
|
*
|
|
|
|
* @param discoverySessionId: The discovery session ID of the expired match.
|
|
|
|
* @param peerId: The peer ID of the expired match.
|
|
|
|
*/
|
|
|
|
oneway eventMatchExpired(uint16_t discoverySessionId, uint32_t peerId);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
2016-12-25 18:42:21 +01:00
|
|
|
/**
|
|
|
|
* Asynchronous callback indicating that a followup message has been received from a peer.
|
|
|
|
*
|
|
|
|
* @param event: NanFollowupReceivedInd containing event details.
|
|
|
|
*/
|
|
|
|
oneway eventFollowupReceived(NanFollowupReceivedInd event);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
2016-12-25 18:42:21 +01:00
|
|
|
/**
|
|
|
|
* Asynchronous callback providing status on a completed followup message transmit operation.
|
|
|
|
*
|
|
|
|
* @param cmdId command Id corresponding to the original |transmitFollowupRequest| request.
|
|
|
|
* @param status WifiNanStatus of the operation. Possible status codes are:
|
|
|
|
* |NanStatusType.NO_OTA_ACK|
|
|
|
|
* |NanStatusType.FOLLOWUP_TX_QUEUE_FULL|
|
|
|
|
*/
|
|
|
|
oneway eventTransmitFollowup(CommandIdShort id, WifiNanStatus status);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
2016-12-25 18:42:21 +01:00
|
|
|
/**
|
|
|
|
* Asynchronous callback indicating a data-path (NDP) setup has been requested by an Initiator
|
|
|
|
* peer (received by the intended Respodner).
|
|
|
|
*
|
|
|
|
* @param event: NanDataPathRequestInd containing event details.
|
|
|
|
*/
|
|
|
|
oneway eventDataPathRequest(NanDataPathRequestInd event);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
2016-12-25 18:42:21 +01:00
|
|
|
/**
|
|
|
|
* Asynchronous callback indicating a data-path (NDP) setup has been completed: received by
|
|
|
|
* both Initiator and Responder.
|
|
|
|
*
|
|
|
|
* @param event: NanDataPathConfirmInd containing event details.
|
|
|
|
*/
|
|
|
|
oneway eventDataPathConfirm(NanDataPathConfirmInd event);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
2016-12-25 18:42:21 +01:00
|
|
|
/**
|
|
|
|
* Asynchronous callback indicating a list of data-paths (NDP) have been terminated: received by
|
|
|
|
* both Initiator and Responder.
|
|
|
|
*
|
|
|
|
* @param ndpInstanceId: data-path ID of the terminated data-path.
|
|
|
|
*/
|
|
|
|
oneway eventDataPathTerminated(uint32_t ndpInstanceId);
|
2016-10-13 20:48:42 +02:00
|
|
|
};
|