1bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie/*
2fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu * Copyright (C) 2012 The Android Open Source Project
3fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu *
4fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu * Licensed under the Apache License, Version 2.0 (the "License");
5fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu * you may not use this file except in compliance with the License.
6fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu * You may obtain a copy of the License at
7fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu *
8fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu *      http://www.apache.org/licenses/LICENSE-2.0
9fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu *
10fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu * Unless required by applicable law or agreed to in writing, software
11fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu * distributed under the License is distributed on an "AS IS" BASIS,
12fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu * See the License for the specific language governing permissions and
14fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu * limitations under the License.
15bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie */
16fa0fd39a4bf296d254aa398c1b19ec960efa641dZhihai Xu
17bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xiepackage android.bluetooth;
18bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie
19bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xieimport android.bluetooth.BluetoothDevice;
20bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie
21bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie/**
22bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie * API for Bluetooth HID service
23bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie *
24bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie * {@hide}
25bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie */
26bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xieinterface IBluetoothInputDevice {
27bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie    // Public API
28bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie    boolean connect(in BluetoothDevice device);
29bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie    boolean disconnect(in BluetoothDevice device);
30bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie    List<BluetoothDevice> getConnectedDevices();
31bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie    List<BluetoothDevice> getDevicesMatchingConnectionStates(in int[] states);
32bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie    int getConnectionState(in BluetoothDevice device);
33bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie    boolean setPriority(in BluetoothDevice device, int priority);
34bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie    int getPriority(in BluetoothDevice device);
35349e62f329bbb8edab89356973773a5648f26751Priti Aghera    /**
36349e62f329bbb8edab89356973773a5648f26751Priti Aghera    * @hide
37349e62f329bbb8edab89356973773a5648f26751Priti Aghera    */
38349e62f329bbb8edab89356973773a5648f26751Priti Aghera    boolean getProtocolMode(in BluetoothDevice device);
39349e62f329bbb8edab89356973773a5648f26751Priti Aghera    /**
40349e62f329bbb8edab89356973773a5648f26751Priti Aghera    * @hide
41349e62f329bbb8edab89356973773a5648f26751Priti Aghera    */
42349e62f329bbb8edab89356973773a5648f26751Priti Aghera    boolean virtualUnplug(in BluetoothDevice device);
43349e62f329bbb8edab89356973773a5648f26751Priti Aghera    /**
44349e62f329bbb8edab89356973773a5648f26751Priti Aghera    * @hide
45349e62f329bbb8edab89356973773a5648f26751Priti Aghera    */
46349e62f329bbb8edab89356973773a5648f26751Priti Aghera    boolean setProtocolMode(in BluetoothDevice device, int protocolMode);
47349e62f329bbb8edab89356973773a5648f26751Priti Aghera    /**
48349e62f329bbb8edab89356973773a5648f26751Priti Aghera    * @hide
49349e62f329bbb8edab89356973773a5648f26751Priti Aghera    */
50349e62f329bbb8edab89356973773a5648f26751Priti Aghera    boolean getReport(in BluetoothDevice device, byte reportType, byte reportId, int bufferSize);
51349e62f329bbb8edab89356973773a5648f26751Priti Aghera    /**
52349e62f329bbb8edab89356973773a5648f26751Priti Aghera    * @hide
53349e62f329bbb8edab89356973773a5648f26751Priti Aghera    */
54349e62f329bbb8edab89356973773a5648f26751Priti Aghera    boolean setReport(in BluetoothDevice device, byte reportType, String report);
55349e62f329bbb8edab89356973773a5648f26751Priti Aghera    /**
56349e62f329bbb8edab89356973773a5648f26751Priti Aghera    * @hide
57349e62f329bbb8edab89356973773a5648f26751Priti Aghera    */
58349e62f329bbb8edab89356973773a5648f26751Priti Aghera    boolean sendData(in BluetoothDevice device, String report);
59bf246ef0abb6ea354fe412b139dec1adb4e5791dMatthew Xie}
60