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.bluetooth; 18 19 import android.bluetooth.IBluetoothCallback; 20 import android.bluetooth.IBluetoothLowEnergy; 21 import android.bluetooth.IBluetoothLeAdvertiser; 22 import android.bluetooth.IBluetoothLeScanner; 23 import android.bluetooth.IBluetoothGattClient; 24 import android.bluetooth.IBluetoothGattServer; 25 26 import android.bluetooth.UUID; 27 28 interface IBluetooth { IsEnabled()29 boolean IsEnabled(); GetState()30 int GetState(); Enable(boolean startRestricted)31 boolean Enable(boolean startRestricted); EnableNoAutoConnect()32 boolean EnableNoAutoConnect(); Disable()33 boolean Disable(); 34 GetAddress()35 String GetAddress(); GetUUIDs()36 UUID[] GetUUIDs(); SetName(String name)37 boolean SetName(String name); GetName()38 String GetName(); 39 RegisterCallback(IBluetoothCallback callback)40 void RegisterCallback(IBluetoothCallback callback); UnregisterCallback(IBluetoothCallback callback)41 void UnregisterCallback(IBluetoothCallback callback); 42 IsMultiAdvertisementSupported()43 boolean IsMultiAdvertisementSupported(); 44 GetLowEnergyInterface()45 IBluetoothLowEnergy GetLowEnergyInterface(); GetLeAdvertiserInterface()46 IBluetoothLeAdvertiser GetLeAdvertiserInterface(); GetLeScannerInterface()47 IBluetoothLeScanner GetLeScannerInterface(); GetGattClientInterface()48 IBluetoothGattClient GetGattClientInterface(); GetGattServerInterface()49 IBluetoothGattServer GetGattServerInterface(); 50 } 51