Package: android.hardware.contexthub@1.0

IContexthubCallback

interface IContexthubCallback

Methods

handleClientMsg

handleClientMsg (ContextHubMsg msg)

This callback is passed by the Contexthub service to the HAL implementation to allow the HAL to send asynchronous messages back to the service and registered clients of the ContextHub service.

@params msg:message

Details
Parameters
msg

handleTxnResult

handleTxnResult (uint32_t txnId, TransactionResult result)

This callback is passed by the Contexthub service to the HAL implementation to allow the HAL to send the response for a transaction.

@params txnId:transaction id whose result is being sent passed in by the service at start of transacation.result:result of transaction.

Details
Parameters
txnId
result

handleHubEvent

handleHubEvent (AsyncEventType evt)

This callback is passed by the Contexthub service to the HAL implementation to allow the HAL to send an asynchronous event to the ContextHub service.

@params msg:message

Details
Parameters
evt

handleAppAbort

handleAppAbort (uint64_t appId, uint32_t abortCode)

This callback is passed by the Contexthub service to the HAL implementation to allow the HAL to send a notification to the service that a nanp-app has aborted.This method must be called when a nanoapp invokes chreAbort(...)).

@params appId:app identifier:abortCode code passed by the nanoApp.

Also see chreAbort(...)

Details
Parameters
appId
abortCode

handleAppsInfo

handleAppsInfo (vec<HubAppInfo> appInfo)

This callback is passed by the Contexthub service to the HAL implementation to allow the HAL to send information about the currently loaded and active nanoapps on the hub.

@params appInfo:vector of HubAppinfo structure for each nanoApp on the hub that can be enabled, disabled and unloaded by the service.Any nanoApps that cannot be controlled by the service must not be reported.All nanoApps that can be controlled by the service must be reported.

Details
Parameters
appInfo