blob: 04c8ec9545b1c9710566d07f4fc2a5b67c2e509d [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
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
Jaikumar Ganeshdd0463a2009-09-16 12:30:02 -070019import android.bluetooth.ParcelUuid;
20
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080021/**
22 * System private API for talking with the Bluetooth service.
23 *
24 * {@hide}
25 */
Nick Pellybd022f42009-08-14 18:33:38 -070026interface IBluetooth
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080027{
28 boolean isEnabled();
The Android Open Source Project10592532009-03-18 17:39:46 -070029 int getBluetoothState();
30 boolean enable();
31 boolean disable(boolean persistSetting);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080032
33 String getAddress();
34 String getName();
35 boolean setName(in String name);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080036
37 int getScanMode();
38 boolean setScanMode(int mode);
39
40 int getDiscoverableTimeout();
41 boolean setDiscoverableTimeout(int timeout);
42
Jaikumar Ganeshd5ac1ae2009-05-05 22:26:12 -070043 boolean startDiscovery();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080044 boolean cancelDiscovery();
45 boolean isDiscovering();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080046
47 boolean createBond(in String address);
48 boolean cancelBondProcess(in String address);
49 boolean removeBond(in String address);
50 String[] listBonds();
51 int getBondState(in String address);
52
53 String getRemoteName(in String address);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080054 int getRemoteClass(in String address);
Jaikumar Ganeshdd0463a2009-09-16 12:30:02 -070055 ParcelUuid[] getRemoteUuids(in String address);
56 int getRemoteServiceChannel(in String address,in ParcelUuid uuid);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080057
58 boolean setPin(in String address, in byte[] pin);
Jaikumar Ganeshb0eca412009-07-16 18:26:28 -070059 boolean setPasskey(in String address, int passkey);
60 boolean setPairingConfirmation(in String address, boolean confirm);
61 boolean cancelPairingUserInput(in String address);
62
Lixin Yueefa1dd72009-08-31 15:55:13 +080063 boolean setTrust(in String address, in boolean value);
64 boolean getTrustState(in String address);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080065}