2016-10-05 19:19:06 +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;
|
|
|
|
|
|
|
|
import IWifiIface;
|
2016-10-13 20:48:42 +02:00
|
|
|
import IWifiNanIfaceEventCallback;
|
2016-10-05 19:19:06 +02:00
|
|
|
|
|
|
|
/**
|
2016-10-13 20:48:42 +02:00
|
|
|
* Interface used to represent a single NAN(Neighbour Aware Network) iface.
|
2017-02-09 18:16:25 +01:00
|
|
|
*
|
|
|
|
* References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
|
|
|
|
* Networking (NAN) Technical Specification".
|
2016-10-05 19:19:06 +02:00
|
|
|
*/
|
|
|
|
interface IWifiNanIface extends IWifiIface {
|
2016-10-13 20:48:42 +02:00
|
|
|
/**
|
|
|
|
* Requests notifications of significant events on this iface. Multiple calls
|
|
|
|
* to this must register multiple callbacks each of which must receive all
|
|
|
|
* events.
|
|
|
|
*
|
|
|
|
* @param callback An instance of the |IWifiNanIfaceEventCallback| HIDL interface
|
|
|
|
* object.
|
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
|
|
|
|
*/
|
|
|
|
registerEventCallback(IWifiNanIfaceEventCallback callback)
|
|
|
|
generates (WifiStatus status);
|
|
|
|
|
|
|
|
/**
|
2017-02-09 18:16:25 +01:00
|
|
|
* Get NAN capabilities. Asynchronous response is with
|
|
|
|
* |IWifiNanIfaceEventCallback.notifyCapabilitiesResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
getCapabilitiesRequest(CommandIdShort cmdId) generates (WifiStatus status);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Enable NAN: configures and activates NAN clustering (does not start
|
|
|
|
* a discovery session or set up data-interfaces or data-paths). Use the
|
2017-02-09 18:16:25 +01:00
|
|
|
* |IWifiNanIface.configureRequest| method to change the configuration of an already enabled
|
2016-12-25 18:42:21 +01:00
|
|
|
* NAN interface.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyEnableResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param msg Instance of |NanEnableRequest|.
|
2016-10-13 20:48:42 +02:00
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_INVALID_ARGS|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
enableRequest(CommandIdShort cmdId, NanEnableRequest msg)
|
2016-10-13 20:48:42 +02:00
|
|
|
generates (WifiStatus status);
|
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Configure NAN: configures an existing NAN functionality (i.e. assumes
|
2017-02-09 18:16:25 +01:00
|
|
|
* |IWifiNanIface.enableRequest| already submitted and succeeded).
|
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyConfigResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param msg Instance of |NanConfigRequest|.
|
2016-10-13 20:48:42 +02:00
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_INVALID_ARGS|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
configRequest(CommandIdShort cmdId, NanConfigRequest msg)
|
2016-10-13 20:48:42 +02:00
|
|
|
generates (WifiStatus status);
|
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Disable NAN functionality.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDisableResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
disableRequest(CommandIdShort cmdId) generates (WifiStatus status);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Publish request to start advertising a discovery service.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartPublishResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param msg Instance of |NanPublishRequest|.
|
2016-10-13 20:48:42 +02:00
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_INVALID_ARGS|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
startPublishRequest(CommandIdShort cmdId, NanPublishRequest msg)
|
2016-10-13 20:48:42 +02:00
|
|
|
generates (WifiStatus status);
|
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Stop publishing a discovery service.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStopPublishResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param sessionId ID of the publish discovery session to be stopped.
|
2016-10-13 20:48:42 +02:00
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2017-02-09 19:05:59 +01:00
|
|
|
stopPublishRequest(CommandIdShort cmdId, uint8_t sessionId)
|
2016-10-13 20:48:42 +02:00
|
|
|
generates (WifiStatus status);
|
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Subscribe request to start searching for a discovery service.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartSubscribeResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param msg Instance of |NanSubscribeRequest|.
|
2016-10-13 20:48:42 +02:00
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_INVALID_ARGS|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
startSubscribeRequest(CommandIdShort cmdId, NanSubscribeRequest msg)
|
2016-10-13 20:48:42 +02:00
|
|
|
generates (WifiStatus status);
|
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Stop subscribing to a discovery service.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStopSubscribeResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param sessionId ID of the subscribe discovery session to be stopped.
|
2016-10-13 20:48:42 +02:00
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2017-02-09 19:05:59 +01:00
|
|
|
stopSubscribeRequest(CommandIdShort cmdId, uint8_t sessionId)
|
2016-10-13 20:48:42 +02:00
|
|
|
generates (WifiStatus status);
|
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* NAN transmit follow up message request.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyTransmitFollowupResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param msg Instance of |NanTransmitFollowupRequest|.
|
2016-10-13 20:48:42 +02:00
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_INVALID_ARGS|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
transmitFollowupRequest(CommandIdShort cmdId, NanTransmitFollowupRequest msg)
|
|
|
|
generates (WifiStatus status);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Create a NAN Data Interface.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyCreateDataInterfaceResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
createDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
|
|
|
|
generates (WifiStatus status);
|
2016-10-13 20:48:42 +02:00
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Delete a NAN Data Interface.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDeleteDataInterfaceResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
deleteDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
|
2016-10-13 20:48:42 +02:00
|
|
|
generates (WifiStatus status);
|
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Initiate a data-path (NDP) setup operation: Initiator.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyInitiateDataPathResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param msg Instance of |NanInitiateDataPathRequest|.
|
2016-10-13 20:48:42 +02:00
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_INVALID_ARGS|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
initiateDataPathRequest(CommandIdShort cmdId, NanInitiateDataPathRequest msg)
|
2016-10-13 20:48:42 +02:00
|
|
|
generates (WifiStatus status);
|
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Respond to a received data indication as part of a data-path (NDP) setup operation. An
|
|
|
|
* indication is received by the Responder from the Initiator.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with
|
|
|
|
* |IWifiNanIfaceEventCallback.notifyRespondToDataPathIndicationResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param msg Instance of |NanRespondToDataPathIndicationRequest|.
|
2016-10-13 20:48:42 +02:00
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_INVALID_ARGS|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
respondToDataPathIndicationRequest(CommandIdShort cmdId,
|
|
|
|
NanRespondToDataPathIndicationRequest msg)
|
2016-10-13 20:48:42 +02:00
|
|
|
generates (WifiStatus status);
|
|
|
|
|
|
|
|
/**
|
2016-12-25 18:42:21 +01:00
|
|
|
* Data-path (NDP) termination request: executed by either Initiator or Responder.
|
2017-02-09 18:16:25 +01:00
|
|
|
* Asynchronous response is with |IWifiNanIfaceEventCallback.notifyTerminateDataPathResponse|.
|
2016-10-13 20:48:42 +02:00
|
|
|
*
|
|
|
|
* @param cmdId command Id to use for this invocation.
|
2016-12-25 18:42:21 +01:00
|
|
|
* @param ndpInstanceId Data-path instance ID to be terminated.
|
2016-10-13 20:48:42 +02:00
|
|
|
* @return status WifiStatus of the operation.
|
|
|
|
* Possible status codes:
|
|
|
|
* |WifiStatusCode.SUCCESS|,
|
|
|
|
* |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
|
|
|
|
* |WifiStatusCode.ERROR_UNKNOWN|
|
|
|
|
*/
|
2016-12-25 18:42:21 +01:00
|
|
|
terminateDataPathRequest(CommandIdShort cmdId, uint32_t ndpInstanceId)
|
2016-10-13 20:48:42 +02:00
|
|
|
generates (WifiStatus status);
|
2016-10-05 19:19:06 +02:00
|
|
|
};
|