blob: a11ceac0983f828b9d9e210e709600fca4d19243 [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
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080019/**
20 * System private API for talking with the Bluetooth service.
21 *
22 * {@hide}
23 */
Nick Pellybd022f42009-08-14 18:33:38 -070024interface IBluetooth
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080025{
26 boolean isEnabled();
The Android Open Source Project10592532009-03-18 17:39:46 -070027 int getBluetoothState();
28 boolean enable();
29 boolean disable(boolean persistSetting);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080030
31 String getAddress();
32 String getName();
33 boolean setName(in String name);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080034
35 int getScanMode();
36 boolean setScanMode(int mode);
37
38 int getDiscoverableTimeout();
39 boolean setDiscoverableTimeout(int timeout);
40
Jaikumar Ganeshd5ac1ae2009-05-05 22:26:12 -070041 boolean startDiscovery();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080042 boolean cancelDiscovery();
43 boolean isDiscovering();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080044
45 boolean createBond(in String address);
46 boolean cancelBondProcess(in String address);
47 boolean removeBond(in String address);
48 String[] listBonds();
49 int getBondState(in String address);
50
51 String getRemoteName(in String address);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080052 int getRemoteClass(in String address);
Jaikumar Ganeshd5ac1ae2009-05-05 22:26:12 -070053 String[] getRemoteUuids(in String address);
54 int getRemoteServiceChannel(in String address, String uuid);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080055
56 boolean setPin(in String address, in byte[] pin);
Jaikumar Ganeshb0eca412009-07-16 18:26:28 -070057 boolean setPasskey(in String address, int passkey);
58 boolean setPairingConfirmation(in String address, boolean confirm);
59 boolean cancelPairingUserInput(in String address);
60
Lixin Yueefa1dd72009-08-31 15:55:13 +080061 boolean setTrust(in String address, in boolean value);
62 boolean getTrustState(in String address);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080063}