• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
17 package android.hardware.location;
18 
19 // Declare any non-default types here with import statements
20 import android.hardware.location.ContextHubMessage;
21 import android.hardware.location.ContextHubInfo;
22 import android.hardware.location.NanoApp;
23 import android.hardware.location.NanoAppInstanceInfo;
24 import android.hardware.location.NanoAppFilter;
25 import android.hardware.location.IContextHubCallback;
26 
27 /**
28  * @hide
29  */
30 interface IContextHubService {
31 
32     // register a callback to receive messages
registerCallback(in IContextHubCallback callback)33     int registerCallback(in IContextHubCallback callback);
34 
35     // Gets a list of available context hub handles
getContextHubHandles()36     int[] getContextHubHandles();
37 
38     // Get the properties of a hub
getContextHubInfo(int contextHubHandle)39     ContextHubInfo getContextHubInfo(int contextHubHandle);
40 
41     // Load a nanoapp on a specified context hub
loadNanoApp(int hubHandle, in NanoApp app)42     int loadNanoApp(int hubHandle, in NanoApp app);
43 
44     // Unload a nanoapp instance
unloadNanoApp(int nanoAppInstanceHandle)45     int unloadNanoApp(int nanoAppInstanceHandle);
46 
47     // get information about a nanoAppInstance
getNanoAppInstanceInfo(int nanoAppInstanceHandle)48     NanoAppInstanceInfo getNanoAppInstanceInfo(int nanoAppInstanceHandle);
49 
50     // find all nanoApp instances matching some filter
findNanoAppOnHub(int hubHandle, in NanoAppFilter filter)51     int[] findNanoAppOnHub(int hubHandle, in NanoAppFilter filter);
52 
53     // send a message to a nanoApp
sendMessage(int hubHandle, int nanoAppHandle, in ContextHubMessage msg)54     int sendMessage(int hubHandle, int nanoAppHandle, in ContextHubMessage msg);
55 }
56