IBluetooth.aidl revision fb658c72a3a76dac334c39070d1501a2575c1069
1/* 2 * Copyright (C) 2008, 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.bluetooth; 18 19import android.bluetooth.IBluetoothCallback; 20import android.bluetooth.IBluetoothHealthCallback; 21import android.bluetooth.BluetoothDevice; 22import android.bluetooth.BluetoothHealthAppConfiguration; 23import android.os.ParcelUuid; 24import android.os.ParcelFileDescriptor; 25 26/** 27 * System private API for talking with the Bluetooth service. 28 * 29 * {@hide} 30 */ 31interface IBluetooth 32{ 33 boolean isEnabled(); 34 int getBluetoothState(); 35 boolean enable(); 36 boolean disable(boolean persistSetting); 37 38 String getAddress(); 39 String getName(); 40 boolean setName(in String name); 41 ParcelUuid[] getUuids(); 42 43 int getScanMode(); 44 boolean setScanMode(int mode, int duration); 45 46 int getDiscoverableTimeout(); 47 boolean setDiscoverableTimeout(int timeout); 48 49 boolean startDiscovery(); 50 boolean cancelDiscovery(); 51 boolean isDiscovering(); 52 byte[] readOutOfBandData(); 53 54 int getAdapterConnectionState(); 55 56 boolean createBond(in String address); 57 boolean createBondOutOfBand(in String address, in byte[] hash, in byte[] randomizer); 58 boolean cancelBondProcess(in String address); 59 boolean removeBond(in String address); 60 String[] listBonds(); 61 int getBondState(in String address); 62 boolean setDeviceOutOfBandData(in String address, in byte[] hash, in byte[] randomizer); 63 64 String getRemoteName(in String address); 65 int getRemoteClass(in String address); 66 ParcelUuid[] getRemoteUuids(in String address); 67 boolean fetchRemoteUuids(in String address, in ParcelUuid uuid, in IBluetoothCallback callback); 68 int getRemoteServiceChannel(in String address, in ParcelUuid uuid); 69 70 boolean setPin(in String address, in byte[] pin); 71 boolean setPasskey(in String address, int passkey); 72 boolean setPairingConfirmation(in String address, boolean confirm); 73 boolean setRemoteOutOfBandData(in String addres); 74 boolean cancelPairingUserInput(in String address); 75 76 boolean setTrust(in String address, in boolean value); 77 boolean getTrustState(in String address); 78 boolean isBluetoothDock(in String address); 79 80 int addRfcommServiceRecord(in String serviceName, in ParcelUuid uuid, int channel, IBinder b); 81 void removeServiceRecord(int handle); 82 83 boolean connectHeadset(String address); 84 boolean disconnectHeadset(String address); 85 boolean notifyIncomingConnection(String address); 86 87 // HID profile APIs 88 boolean connectInputDevice(in BluetoothDevice device); 89 boolean disconnectInputDevice(in BluetoothDevice device); 90 List<BluetoothDevice> getConnectedInputDevices(); 91 List<BluetoothDevice> getInputDevicesMatchingConnectionStates(in int[] states); 92 int getInputDeviceConnectionState(in BluetoothDevice device); 93 boolean setInputDevicePriority(in BluetoothDevice device, int priority); 94 int getInputDevicePriority(in BluetoothDevice device); 95 96 boolean isTetheringOn(); 97 void setBluetoothTethering(boolean value); 98 int getPanDeviceConnectionState(in BluetoothDevice device); 99 List<BluetoothDevice> getConnectedPanDevices(); 100 List<BluetoothDevice> getPanDevicesMatchingConnectionStates(in int[] states); 101 boolean connectPanDevice(in BluetoothDevice device); 102 boolean disconnectPanDevice(in BluetoothDevice device); 103 104 // HDP profile APIs 105 boolean registerAppConfiguration(in BluetoothHealthAppConfiguration config, 106 in IBluetoothHealthCallback callback); 107 boolean unregisterAppConfiguration(in BluetoothHealthAppConfiguration config); 108 boolean connectChannelToSource(in BluetoothDevice device, in BluetoothHealthAppConfiguration config); 109 boolean connectChannelToSink(in BluetoothDevice device, in BluetoothHealthAppConfiguration config, 110 int channelType); 111 boolean disconnectChannel(in BluetoothDevice device, in BluetoothHealthAppConfiguration config, in ParcelFileDescriptor fd); 112 ParcelFileDescriptor getMainChannelFd(in BluetoothDevice device, in BluetoothHealthAppConfiguration config); 113 List<BluetoothDevice> getConnectedHealthDevices(); 114 List<BluetoothDevice> getHealthDevicesMatchingConnectionStates(in int[] states); 115 int getHealthDeviceConnectionState(in BluetoothDevice device); 116 117 void sendConnectionStateChange(in BluetoothDevice device, int state, int prevState); 118} 119