blob: 29c41ce420d48b37342c80a876e7f28493ac5f6e [file] [log] [blame]
Ashutosh Joshi6104b272016-10-27 11:06:23 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.contexthub@1.0;
18
19interface IContexthubCallback {
20 /*
21 * This callback is passed by the Contexthub service to the HAL
22 * implementation to allow the HAL to send asynchronous messages back
23 * to the service and registered clients of the ContextHub service.
24 *
25 * @params hubId : identifier of the hub calling callback
26 * msg : message
27 *
28 */
29 handleClientMsg(uint32_t hubId, ContextHubMsg msg);
30
31 /*
32 * This callback is passed by the Contexthub service to the HAL
33 * implementation to allow the HAL to send the response for a
34 * transaction.
35 *
36 * @params hubId : identifier of the hub calling callback
37 * txnId : transaction id whose result is being sent
38 * passed in by the service at start of transacation.
39 * result: result of transaction.
40 *
41 */
42 handleTxnResult(uint32_t hubId, uint32_t txnId,
43 TransactionResult result);
44
45 /*
46 * This callback is passed by the Contexthub service to the HAL
47 * implementation to allow the HAL to send an asynchronous event
48 * to the ContextHub service.
49 *
50 * @params hubId : identifier of the hub calling callback
51 * msg : message
52 *
53 */
54 handleHubEvent(uint32_t hubId, AsyncEventType evt);
55
56 /*
57 * This callback is passed by the Contexthub service to the HAL
58 * implementation to allow the HAL to send information about the
59 * currently loaded and active nanoapps on the hub.
60 */
61 handleAppsInfo(uint32_t hubId, vec<HubAppInfo> appInfo);
62};