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