IBluetooth.aidl revision e4caddbb7a3b39fd6a1ccf107c7dbf09bc8978e8
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.IBluetoothStateChangeCallback; 21import android.bluetooth.IBluetoothHealthCallback; 22import android.bluetooth.BluetoothDevice; 23import android.bluetooth.BluetoothHealthAppConfiguration; 24import android.os.ParcelUuid; 25import android.os.ParcelFileDescriptor; 26 27/** 28 * System private API for talking with the Bluetooth service. 29 * 30 * {@hide} 31 */ 32interface IBluetooth 33{ 34 boolean isEnabled(); 35 int getState(); 36 boolean enable(); 37 boolean disable(); 38 39 String getAddress(); 40 ParcelUuid[] getUuids(); 41 boolean setName(in String name); 42 String getName(); 43 44 int getScanMode(); 45 boolean setScanMode(int mode, int duration); 46 47 int getDiscoverableTimeout(); 48 boolean setDiscoverableTimeout(int timeout); 49 50 boolean startDiscovery(); 51 boolean cancelDiscovery(); 52 boolean isDiscovering(); 53 54 int getAdapterConnectionState(); 55 int getProfileConnectionState(int profile); 56 57 BluetoothDevice[] getBondedDevices(); 58 boolean createBond(in BluetoothDevice device); 59 boolean cancelBondProcess(in BluetoothDevice device); 60 boolean removeBond(in BluetoothDevice device); 61 int getBondState(in BluetoothDevice device); 62 63 String getRemoteName(in BluetoothDevice device); 64 String getRemoteAlias(in BluetoothDevice device); 65 boolean setRemoteAlias(in BluetoothDevice device, in String name); 66 int getRemoteClass(in BluetoothDevice device); 67 ParcelUuid[] getRemoteUuids(in BluetoothDevice device); 68 //TODO(BT) 69 //boolean fetchRemoteUuids(in BluetoothDevice device, in ParcelUuid uuid, 70 // in IBluetoothCallback callback); 71 72 boolean setPin(in BluetoothDevice device, boolean accept, int len, in byte[] pinCode); 73 boolean setPasskey(in BluetoothDevice device, boolean accept, int len, in byte[] 74 passkey); 75 boolean setPairingConfirmation(in BluetoothDevice device, boolean accept); 76 77 void sendConnectionStateChange(in BluetoothDevice device, int profile, int state, int prevState); 78} 79