blob: 1a405128b7efa82d8cdc0d6d4d01147495555192 [file] [log] [blame]
Anthony Stangee351e3b2020-12-15 11:06:14 -05001/*
2 * Copyright (C) 2020 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.2;
18
19import @1.0::IContexthubCallback;
20
21interface IContexthubCallback extends @1.0::IContexthubCallback {
22 /**
23 * This callback is passed by the Contexthub service to the HAL
24 * implementation to allow the HAL to send asynchronous messages back
25 * to the service and registered clients of the ContextHub service.
26 *
Anthony Stange2bdef6a2021-02-10 15:11:38 +000027 * @param msg message that should be delivered to host app
28 * clients
29 * @param msgContentPerms list of Android permissions that cover the
30 * contents of the message being sent from the app.
31 * This is different from the permissions stored
32 * inside of ContextHubMsg in that these must be a
33 * subset of those permissions and are meant to
34 * assist in properly attributing the message
35 * contents when delivering to a ContextHub service
36 * client.
Anthony Stangee351e3b2020-12-15 11:06:14 -050037 */
Anthony Stange2bdef6a2021-02-10 15:11:38 +000038 handleClientMsg_1_2(ContextHubMsg msg, vec<string> msgContentPerms);
Anthony Stangee351e3b2020-12-15 11:06:14 -050039
40 /**
41 * This callback is passed by the Contexthub service to the HAL
42 * implementation to allow the HAL to send information about the
43 * currently loaded and active nanoapps on the hub.
44 *
45 * @param appInfo vector of HubAppinfo structure for each nanoApp
46 * on the hub that can be enabled, disabled and
47 * unloaded by the service. Any nanoApps that cannot
48 * be controlled by the service must not be reported.
49 * All nanoApps that can be controlled by the service
50 * must be reported.
51 */
52 handleAppsInfo_1_2(vec<HubAppInfo> appInfo);
53};