Loading contexthub/1.0/IContexthub.hal +18 −4 Original line number Diff line number Diff line Loading @@ -60,9 +60,11 @@ interface IContexthub { * After the init method for nanoApp returns success, this must be indicated * to the service by an asynchronous call to handleTxnResult. * * Loading a nanoapp must not take more than 30 seconds. * * @param hubId identifer of the contextHub * appBinary binary for the nanoApp * msg message to be sent * appBinary serialized NanoApppBinary for the nanoApp * transactionId transactionId for this call * * @return result OK if transation started * BAD_VALUE if parameters are not sane Loading @@ -71,7 +73,9 @@ interface IContexthub { * TRANSACTION_FAILED if load failed synchronously * */ loadNanoApp(uint32_t hubId, NanoAppBinary appBinary, uint32_t transactionId) loadNanoApp(uint32_t hubId, vec<uint8_t> appBinary, uint32_t transactionId) generates (Result result); /** Loading @@ -79,6 +83,8 @@ interface IContexthub { * After this, success must be indicated to the service through an * asynchronous call to handleTxnResult. * * Unloading a nanoapp must not take more than 5 seconds. * * @param hubId identifer of the contextHub * appId appIdentifier returned by the HAL * msg message to be sent Loading @@ -98,6 +104,8 @@ interface IContexthub { * After this, success must be indicated to the service through an * asynchronous message. * * Enabling a nanoapp must not take more than 5 seconds. * * @param hubId identifer of the contextHub * appId appIdentifier returned by the HAL * msg message to be sent Loading @@ -117,6 +125,8 @@ interface IContexthub { * After this, success must be indicated to the service through an * asynchronous message. * * Disabling a nanoapp must not take more than 5 seconds. * * @param hubId identifer of the contextHub * appId appIdentifier returned by the HAL * msg message to be sent Loading @@ -136,7 +146,11 @@ interface IContexthub { * * @param hubId identifer of the contextHub * * @return apps all nanoApps on the hub * @return apps all nanoApps on the hub. * All nanoApps that can be modified by the service must * be returned. A non-modifiable nanoapps must not be * returned. A modifiable nanoApp is one that can be * unloaded/disabled/enabled by the service. * */ queryApps(uint32_t hubId) generates (Result result); Loading contexthub/1.0/IContexthubCallback.hal +14 −11 Original line number Diff line number Diff line Loading @@ -22,41 +22,44 @@ interface IContexthubCallback { * implementation to allow the HAL to send asynchronous messages back * to the service and registered clients of the ContextHub service. * * @params hubId : identifier of the hub calling callback * msg : message * @params msg : message * */ handleClientMsg(uint32_t hubId, ContextHubMsg msg); handleClientMsg(ContextHubMsg msg); /* * This callback is passed by the Contexthub service to the HAL * implementation to allow the HAL to send the response for a * transaction. * * @params hubId : identifier of the hub calling callback * txnId : transaction id whose result is being sent * @params txnId : transaction id whose result is being sent * passed in by the service at start of transacation. * result: result of transaction. * */ handleTxnResult(uint32_t hubId, uint32_t txnId, TransactionResult result); handleTxnResult(uint32_t txnId, TransactionResult result); /* * 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 hubId : identifier of the hub calling callback * msg : message * @params msg : message * */ handleHubEvent(uint32_t hubId, AsyncEventType evt); handleHubEvent(AsyncEventType evt); /* * 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. */ handleAppsInfo(uint32_t hubId, vec<HubAppInfo> appInfo); handleAppsInfo(vec<HubAppInfo> appInfo); }; contexthub/1.0/types.hal +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.hardware.contexthub@1.0; enum Result : uint32_t { OK, // Success UNKNOWN_FAILURE, // Failure, unknown reason BAD_PARAMS, // Parameters not sane NOT_INIT, // not initialized TRANSACTION_FAILED, // transaction failed Loading Loading
contexthub/1.0/IContexthub.hal +18 −4 Original line number Diff line number Diff line Loading @@ -60,9 +60,11 @@ interface IContexthub { * After the init method for nanoApp returns success, this must be indicated * to the service by an asynchronous call to handleTxnResult. * * Loading a nanoapp must not take more than 30 seconds. * * @param hubId identifer of the contextHub * appBinary binary for the nanoApp * msg message to be sent * appBinary serialized NanoApppBinary for the nanoApp * transactionId transactionId for this call * * @return result OK if transation started * BAD_VALUE if parameters are not sane Loading @@ -71,7 +73,9 @@ interface IContexthub { * TRANSACTION_FAILED if load failed synchronously * */ loadNanoApp(uint32_t hubId, NanoAppBinary appBinary, uint32_t transactionId) loadNanoApp(uint32_t hubId, vec<uint8_t> appBinary, uint32_t transactionId) generates (Result result); /** Loading @@ -79,6 +83,8 @@ interface IContexthub { * After this, success must be indicated to the service through an * asynchronous call to handleTxnResult. * * Unloading a nanoapp must not take more than 5 seconds. * * @param hubId identifer of the contextHub * appId appIdentifier returned by the HAL * msg message to be sent Loading @@ -98,6 +104,8 @@ interface IContexthub { * After this, success must be indicated to the service through an * asynchronous message. * * Enabling a nanoapp must not take more than 5 seconds. * * @param hubId identifer of the contextHub * appId appIdentifier returned by the HAL * msg message to be sent Loading @@ -117,6 +125,8 @@ interface IContexthub { * After this, success must be indicated to the service through an * asynchronous message. * * Disabling a nanoapp must not take more than 5 seconds. * * @param hubId identifer of the contextHub * appId appIdentifier returned by the HAL * msg message to be sent Loading @@ -136,7 +146,11 @@ interface IContexthub { * * @param hubId identifer of the contextHub * * @return apps all nanoApps on the hub * @return apps all nanoApps on the hub. * All nanoApps that can be modified by the service must * be returned. A non-modifiable nanoapps must not be * returned. A modifiable nanoApp is one that can be * unloaded/disabled/enabled by the service. * */ queryApps(uint32_t hubId) generates (Result result); Loading
contexthub/1.0/IContexthubCallback.hal +14 −11 Original line number Diff line number Diff line Loading @@ -22,41 +22,44 @@ interface IContexthubCallback { * implementation to allow the HAL to send asynchronous messages back * to the service and registered clients of the ContextHub service. * * @params hubId : identifier of the hub calling callback * msg : message * @params msg : message * */ handleClientMsg(uint32_t hubId, ContextHubMsg msg); handleClientMsg(ContextHubMsg msg); /* * This callback is passed by the Contexthub service to the HAL * implementation to allow the HAL to send the response for a * transaction. * * @params hubId : identifier of the hub calling callback * txnId : transaction id whose result is being sent * @params txnId : transaction id whose result is being sent * passed in by the service at start of transacation. * result: result of transaction. * */ handleTxnResult(uint32_t hubId, uint32_t txnId, TransactionResult result); handleTxnResult(uint32_t txnId, TransactionResult result); /* * 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 hubId : identifier of the hub calling callback * msg : message * @params msg : message * */ handleHubEvent(uint32_t hubId, AsyncEventType evt); handleHubEvent(AsyncEventType evt); /* * 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. */ handleAppsInfo(uint32_t hubId, vec<HubAppInfo> appInfo); handleAppsInfo(vec<HubAppInfo> appInfo); };
contexthub/1.0/types.hal +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.hardware.contexthub@1.0; enum Result : uint32_t { OK, // Success UNKNOWN_FAILURE, // Failure, unknown reason BAD_PARAMS, // Parameters not sane NOT_INIT, // not initialized TRANSACTION_FAILED, // transaction failed Loading