Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8251330 authored by Etan Cohen's avatar Etan Cohen Committed by Gerrit Code Review
Browse files

Merge "[AWARE] Update HIDL interface and link to legacy HAL"

parents 04e53a1c f01bcaa9
Loading
Loading
Loading
Loading
+480 −1506

File changed.

Preview size limit exceeded, changes collapsed.

+49 −66
Original line number Diff line number Diff line
@@ -39,22 +39,7 @@ interface IWifiNanIface extends IWifiIface {
      generates (WifiStatus status);

  /**
   * Enable NAN functionality.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanEnableRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  enableRequest(CommandId cmdId, NanEnableRequest msg)
      generates (WifiStatus status);

  /**
   * Disable NAN functionality.
   * Get NAN capabilities.
   *
   * @param cmdId command Id to use for this invocation.
   * @return status WifiStatus of the operation.
@@ -63,13 +48,16 @@ interface IWifiNanIface extends IWifiIface {
   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  disableRequest(CommandId cmdId) generates (WifiStatus status);
  getCapabilitiesRequest(CommandIdShort cmdId) generates (WifiStatus status);

  /**
   * Publish request to advertize a service.
   * Enable NAN: configures and activates NAN clustering (does not start
   * a discovery session or set up data-interfaces or data-paths). Use the
   * |configureRequest| method to change the configuration of an already enabled
   * NAN interface.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanPublishRequest|.
   * @param msg Instance of |NanEnableRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
@@ -77,14 +65,15 @@ interface IWifiNanIface extends IWifiIface {
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  publishRequest(CommandId cmdId, NanPublishRequest msg)
  enableRequest(CommandIdShort cmdId, NanEnableRequest msg)
      generates (WifiStatus status);

  /**
   * Cancel previous publish requests.
   * Configure NAN: configures an existing NAN functionality (i.e. assumes
   * |enableRequest| already submitted and succeeded).
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanPublishCancelRequest|.
   * @param msg Instance of |NanConfigRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
@@ -92,29 +81,26 @@ interface IWifiNanIface extends IWifiIface {
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  publishCancelRequest(CommandId cmdId, NanPublishCancelRequest msg)
  configRequest(CommandIdShort cmdId, NanConfigRequest msg)
      generates (WifiStatus status);

  /**
   * Subscribe request to search for a service.
   * Disable NAN functionality.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanSubscribeRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  subscribeRequest(CommandId cmdId, NanSubscribeRequest msg)
      generates (WifiStatus status);
  disableRequest(CommandIdShort cmdId) generates (WifiStatus status);

  /**
   * Cancel previous subscribe requests.
   * Publish request to start advertising a discovery service.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanSubscribeCancelRequest|.
   * @param msg Instance of |NanPublishRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
@@ -122,29 +108,28 @@ interface IWifiNanIface extends IWifiIface {
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  subscribeCancelRequest(CommandId cmdId, NanSubscribeCancelRequest msg)
  startPublishRequest(CommandIdShort cmdId, NanPublishRequest msg)
      generates (WifiStatus status);

  /**
   * NAN transmit follow up request.
   * Stop publishing a discovery service.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanTransmitFollowupRequest|.
   * @param sessionId ID of the publish discovery session to be stopped.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  transmitFollowupRequest(CommandId cmdId, NanTransmitFollowupRequest msg)
  stopPublishRequest(CommandIdShort cmdId, uint16_t sessionId)
      generates (WifiStatus status);

  /**
   * NAN configuration request.
   * Subscribe request to start searching for a discovery service.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanConfigRequest|.
   * @param msg Instance of |NanSubscribeRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
@@ -152,31 +137,28 @@ interface IWifiNanIface extends IWifiIface {
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  configRequest(CommandId cmdId, NanConfigRequest msg)
  startSubscribeRequest(CommandIdShort cmdId, NanSubscribeRequest msg)
      generates (WifiStatus status);

  /**
   * Set NAN Beacon or sdf payload to discovery engine.
   * This instructs the Discovery Engine to begin publishing the
   * received payload in any Beacon or Service Discovery Frame transmitted
   * Stop subscribing to a discovery service.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanBeaconSdfPayloadRequest|.
   * @param sessionId ID of the subscribe discovery session to be stopped.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  beaconSdfPayloadRequest(CommandId cmdId, NanBeaconSdfPayloadRequest msg)
  stopSubscribeRequest(CommandIdShort cmdId, uint16_t sessionId)
      generates (WifiStatus status);

  /**
   * Get NAN HAL version.
   * NAN transmit follow up message request.
   *
   * @param cmdId command Id to use for this invocation.
   * @return version Instance of |NanVersion|.
   * @param msg Instance of |NanTransmitFollowupRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
@@ -184,39 +166,40 @@ interface IWifiNanIface extends IWifiIface {
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  getVersion() generates (WifiStatus status, NanVersion version);
  transmitFollowupRequest(CommandIdShort cmdId, NanTransmitFollowupRequest msg)
      generates (WifiStatus status);

  /**
   * Get NAN capabilities.
   * Create a NAN Data Interface.
   *
   * @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_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  getCapabilities(CommandId cmdId) generates (WifiStatus status);
  createDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
      generates (WifiStatus status);

  /**
   * Create NAN Data Interface
   * Delete a NAN Data Interface.
   *
   * @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_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  dataInterfaceCreate(CommandId cmdId, string ifaceName)
  deleteDataInterfaceRequest(CommandIdShort cmdId, string ifaceName)
      generates (WifiStatus status);

  /**
   * Delete NAN Data Interface.
   * Initiate a data-path (NDP) setup operation: Initiator.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanInitiateDataPathRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
@@ -224,14 +207,15 @@ interface IWifiNanIface extends IWifiIface {
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  dataInterfaceDelete(CommandId cmdId, string ifaceName)
  initiateDataPathRequest(CommandIdShort cmdId, NanInitiateDataPathRequest msg)
      generates (WifiStatus status);

  /**
   * Initiate a NDP session: Initiator
   * 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.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanDataPathInitiatorRequest|.
   * @param msg Instance of |NanRespondToDataPathIndicationRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
@@ -239,30 +223,29 @@ interface IWifiNanIface extends IWifiIface {
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  dataRequestInitiator(CommandId cmdId, NanDataPathInitiatorRequest msg)
  respondToDataPathIndicationRequest(CommandIdShort cmdId,
                                     NanRespondToDataPathIndicationRequest msg)
      generates (WifiStatus status);

  /**
   * Response to a data indication received corresponding to a NDP session. An indication
   * is received with a data request and the responder will send a data response.
   * Data-path (NDP) termination request: executed by either Initiator or Responder.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanDataPathIndicationResponse|.
   * @param ndpInstanceId Data-path instance ID to be terminated.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  dataIndicationResponse(CommandId cmdId, NanDataPathIndicationResponse msg)
  terminateDataPathRequest(CommandIdShort cmdId, uint32_t ndpInstanceId)
      generates (WifiStatus status);

  /**
   * NDL termination request: from either Initiator/Responder.
   * Configure NAN Beacon or SDF payload to include vendor-specific payload.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanDataPathEndRequest|.
   * @param msg Instance of |NanBeaconSdfPayloadRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
@@ -270,6 +253,6 @@ interface IWifiNanIface extends IWifiIface {
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  dataEnd(CommandId cmdId, NanDataPathEndRequest msg)
  beaconSdfPayloadRequest(CommandIdShort cmdId, NanBeaconSdfPayloadRequest msg)
      generates (WifiStatus status);
};
+257 −25
Original line number Diff line number Diff line
@@ -17,65 +17,297 @@
package android.hardware.wifi@1.0;

/**
 * NAN Response and Event Callbacks.
 * NAN Response and Asynchronous Event Callbacks.
 */
interface IWifiNanIfaceEventCallback {
  /**
   * Callback invoked to notify the status of the Publish Request.
   * Callback invoked in response to a capability request |getCapabilitiesRequest|.
   *
   * @param cmdId command Id corresponding to the original request.
   * @param rspData Message Data.
   * @param status WifiNanStatus of the operation. Possible status codes are:
   *        |NanStatusType.SUCCESS|
   * @param capabilities Capability data.
   */
  oneway notifyPublishResponse(CommandId id, NanPublishResponseMsg rspData);
  oneway notifyCapabilitiesResponse(CommandIdShort id, WifiNanStatus status,
                                    NanCapabilities capabilities);

  /**
   * Callback invoked to notify the status of the Subscribe Request.
   * Callback invoked in response to an enable request |enableRequest|.
   *
   * @param cmdId command Id corresponding to the original request.
   * @param rspData Message Data.
   * @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|
   */
  oneway notifySubscribeResponse(CommandId id, NanSubscribeResponseMsg rspData);
  oneway notifyEnableResponse(CommandIdShort id, WifiNanStatus status);

  /**
   * Callback invoked to notify the status of the Data Path Request.
   * Callback invoked in response to a config request |configRequest|.
   *
   * @param cmdId command Id corresponding to the original request.
   * @param rspData Message Data.
   * @param status WifiNanStatus of the operation. Possible status codes are:
   *        |NanStatusType.SUCCESS|
   *        |NanStatusType.INVALID_ARGS|
   *        |NanStatusType.INTERNAL_FAILURE|
   *        |NanStatusType.PROTOCOL_FAILURE|
   */
  oneway notifyDataPathResponse(CommandId id, NanDataPathResponseMsg rspData);
  oneway notifyConfigResponse(CommandIdShort id, WifiNanStatus status);

  /**
   * Callback invoked to notify the status of the Capability Request.
   * Callback invoked in response to a disable request |disableRequest|.
   *
   * @param cmdId command Id corresponding to the original request.
   * @param rspData Message Data.
   * @param status WifiNanStatus of the operation. Possible status codes are:
   *        |NanStatusType.SUCCESS|
   *        |NanStatusType.PROTOCOL_FAILURE|
   */
  oneway notifyCapabilitiesResponse(CommandId id, NanCapabilitiesResponseMsg rspData);
  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|
   */
  oneway notifyInitiateDataPathResponse(CommandIdShort id, WifiNanStatus status);

  /**
   * 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|
   * @param ndpInstanceId ID of the new data path being negotiated (on successful status).
   */
  oneway notifyRespondToDataPathIndicationResponse(CommandIdShort id, WifiNanStatus status,
                                                   uint32_t ndpInstanceId);

  /**
   * 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);

  /**
   * Callback invoked in response to a request to include vendor-specific payload in beacon or SDF
   * frames |beaconSdfPayloadRequest|.
   *
   * @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 notifyBeaconSdfPayloadResponse(CommandIdShort id, WifiNanStatus status);

  /**
   * Callbacks for the various asynchornous NAN Events.
   */
  oneway eventPublishTerminated(NanPublishTerminatedInd event);

  oneway eventMatch(NanMatchInd event);
  /**
   * 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);

  oneway eventMatchExpired(NanMatchExpiredInd event);
  /**
   * 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);

  oneway eventSubscribeTerminated(NanSubscribeTerminatedInd event);
  /**
   * 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);

  oneway eventFollowup(NanFollowupInd event);
  /**
   * 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);

  oneway eventDiscEngEvent(NanDiscEngEventInd event);
  /**
   * 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);

  oneway eventDisabled(NanDisabledInd event);
  /**
   * Asynchronous callback indicating that a followup message has been received from a peer.
   *
   * @param event: NanFollowupReceivedInd containing event details.
   */
  oneway eventFollowupReceived(NanFollowupReceivedInd event);

  oneway eventBeaconSdfPayload(NanBeaconSdfPayloadInd event);
  /**
   * 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);

  oneway eventDataRequest(NanDataPathRequestInd event);
  /**
   * 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);

  oneway eventDataConfirm(NanDataPathConfirmInd event);
  /**
   * 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);

  oneway eventDataEnd(NanDataPathEndInd event);
  /**
   * 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);

  oneway eventTransmitFollowup(NanTransmitFollowupInd event);
  /**
   * Asynchronous callback indicating vendor-specific payload received in NAN beacon or SDF frame.
   *
   * @param event: NanBeaconSdfPayloadInd containing event details.
   */
  oneway eventBeaconSdfPayload(NanBeaconSdfPayloadInd event);
};
+519 −384

File changed.

Preview size limit exceeded, changes collapsed.

+12 −49
Original line number Diff line number Diff line
@@ -94,87 +94,50 @@ bool convertLegacyVectorOfDebugRxPacketFateToHidl(
    std::vector<WifiDebugRxPacketFateReport>* hidl_fates);

// NAN iface conversion methods.
NanStatusType convertLegacyNanStatusTypeToHidl(legacy_hal::NanStatusType type);
bool convertHidlNanEnableRequestToLegacy(
    const NanEnableRequest& hidl_request,
    legacy_hal::NanEnableRequest* legacy_request);
bool convertHidlNanConfigRequestToLegacy(
    const NanConfigRequest& hidl_request,
    legacy_hal::NanConfigRequest* legacy_request);
bool convertHidlNanPublishRequestToLegacy(
    const NanPublishRequest& hidl_request,
    legacy_hal::NanPublishRequest* legacy_request);
bool convertHidlNanPublishCancelRequestToLegacy(
    const NanPublishCancelRequest& hidl_request,
    legacy_hal::NanPublishCancelRequest* legacy_request);
bool convertHidlNanSubscribeRequestToLegacy(
    const NanSubscribeRequest& hidl_request,
    legacy_hal::NanSubscribeRequest* legacy_request);
bool convertHidlNanSubscribeCancelRequestToLegacy(
    const NanSubscribeCancelRequest& hidl_request,
    legacy_hal::NanSubscribeCancelRequest* legacy_request);
bool convertHidlNanTransmitFollowupRequestToLegacy(
    const NanTransmitFollowupRequest& hidl_request,
    legacy_hal::NanTransmitFollowupRequest* legacy_request);
bool convertHidlNanConfigRequestToLegacy(
    const NanConfigRequest& hidl_request,
    legacy_hal::NanConfigRequest* legacy_request);
bool convertHidlNanBeaconSdfPayloadRequestToLegacy(
    const NanBeaconSdfPayloadRequest& hidl_request,
    legacy_hal::NanBeaconSdfPayloadRequest* legacy_request);
bool convertHidlNanDataPathInitiatorRequestToLegacy(
    const NanDataPathInitiatorRequest& hidl_request,
    const NanInitiateDataPathRequest& hidl_request,
    legacy_hal::NanDataPathInitiatorRequest* legacy_request);
bool convertHidlNanDataPathIndicationResponseToLegacy(
    const NanDataPathIndicationResponse& hidl_response,
    const NanRespondToDataPathIndicationRequest& hidl_response,
    legacy_hal::NanDataPathIndicationResponse* legacy_response);
bool convertHidlNanDataPathEndRequestToLegacy(
    const NanDataPathEndRequest& hidl_request,
    legacy_hal::NanDataPathEndRequest* legacy_request);
bool convertLegacyNanResponseHeaderToHidl(
    const legacy_hal::NanResponseMsg& legacy_response,
    NanResponseMsgHeader* hidl_response);
bool convertLegacyNanPublishResponseToHidl(
    const legacy_hal::NanPublishResponse& legacy_response,
    NanPublishResponse* hidl_response);
bool convertLegacyNanSubscribeResponseToHidl(
    const legacy_hal::NanSubscribeResponse& legacy_response,
    NanSubscribeResponse* hidl_response);
bool convertLegacyNanDataPathResponseToHidl(
    const legacy_hal::NanDataPathRequestResponse& legacy_response,
    NanDataPathResponse* hidl_response);
    WifiNanStatus* wifiNanStatus);
bool convertLegacyNanCapabilitiesResponseToHidl(
    const legacy_hal::NanCapabilities& legacy_response,
    NanCapabilitiesResponse* hidl_response);
bool convertLegacyNanPublishTerminatedIndToHidl(
    const legacy_hal::NanPublishTerminatedInd& legacy_ind,
    NanPublishTerminatedInd* hidl_ind);
    NanCapabilities* hidl_response);
bool convertLegacyNanMatchIndToHidl(const legacy_hal::NanMatchInd& legacy_ind,
                                    NanMatchInd* hidl_ind);
bool convertLegacyNanMatchExpiredIndToHidl(
    const legacy_hal::NanMatchExpiredInd& legacy_ind,
    NanMatchExpiredInd* hidl_ind);
bool convertLegacyNanSubscribeTerminatedIndToHidl(
    const legacy_hal::NanSubscribeTerminatedInd& legacy_ind,
    NanSubscribeTerminatedInd* hidl_ind);
bool convertLegacyNanFollowupIndToHidl(
    const legacy_hal::NanFollowupInd& legacy_ind, NanFollowupInd* hidl_ind);
bool convertLegacyNanDiscEngEventIndToHidl(
    const legacy_hal::NanDiscEngEventInd& legacy_ind,
    NanDiscEngEventInd* hidl_ind);
bool convertLegacyNanDisabledIndToHidl(
    const legacy_hal::NanDisabledInd& legacy_ind, NanDisabledInd* hidl_ind);
bool convertLegacyNanBeaconSdfPayloadIndToHidl(
    const legacy_hal::NanBeaconSdfPayloadInd& legacy_ind,
    NanBeaconSdfPayloadInd* hidl_ind);
    const legacy_hal::NanFollowupInd& legacy_ind, NanFollowupReceivedInd* hidl_ind);
bool convertLegacyNanDataPathRequestIndToHidl(
    const legacy_hal::NanDataPathRequestInd& legacy_ind,
    NanDataPathRequestInd* hidl_ind);
bool convertLegacyNanDataPathConfirmIndToHidl(
    const legacy_hal::NanDataPathConfirmInd& legacy_ind,
    NanDataPathConfirmInd* hidl_ind);
bool convertLegacyNanDataPathEndIndToHidl(
    const legacy_hal::NanDataPathEndInd& legacy_ind,
    NanDataPathEndInd* hidl_ind);
bool convertLegacyNanTransmitFollowupIndToHidl(
    const legacy_hal::NanTransmitFollowupInd& legacy_ind,
    NanTransmitFollowupInd* hidl_ind);
bool convertLegacyNanBeaconSdfPayloadIndToHidl(
    const legacy_hal::NanBeaconSdfPayloadInd& legacy_ind,
    NanBeaconSdfPayloadInd* hidl_ind);

// RTT controller conversion methods.
bool convertHidlVectorOfRttConfigToLegacy(
Loading