blob: ff8c1d07ce2c10b2d783c32d5fd0e80269a7018b [file] [log] [blame]
Ashutosh Joshi1d1ac542016-01-18 17:19:27 -08001/*
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.location;
18
19// Declare any non-default types here with import statements
20import android.hardware.location.ContextHubMessage;
21import android.hardware.location.ContextHubInfo;
22import android.hardware.location.NanoApp;
23import android.hardware.location.NanoAppInstanceInfo;
24import android.hardware.location.NanoAppFilter;
25import android.hardware.location.IContextHubCallback;
26
Peng Xu9ff7d222016-02-11 13:02:05 -080027/**
28 * @hide
29 */
Ashutosh Joshi1d1ac542016-01-18 17:19:27 -080030interface IContextHubService {
31
32 // register a callback to receive messages
Peng Xu9ff7d222016-02-11 13:02:05 -080033 int registerCallback(in IContextHubCallback callback);
Ashutosh Joshi1d1ac542016-01-18 17:19:27 -080034
35 // Gets a list of available context hub handles
36 int[] getContextHubHandles();
37
38 // Get the properties of a hub
39 ContextHubInfo getContextHubInfo(int contextHubHandle);
40
41 // Load a nanoapp on a specified context hub
42 int loadNanoApp(int hubHandle, in NanoApp app);
43
44 // Unload a nanoapp instance
45 int unloadNanoApp(int nanoAppInstanceHandle);
46
47 // get information about a nanoAppInstance
48 NanoAppInstanceInfo getNanoAppInstanceInfo(int nanoAppInstanceHandle);
49
50 // find all nanoApp instances matching some filter
51 int[] findNanoAppOnHub(int hubHandle, in NanoAppFilter filter);
52
53 // send a message to a nanoApp
54 int sendMessage(int hubHandle, int nanoAppHandle, in ContextHubMessage msg);
55}