IBluetooth.aidl revision 9b637e5985f9a86f39d70335c0390ade3716592a
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.os.ParcelUuid;
21
22/**
23 * System private API for talking with the Bluetooth service.
24 *
25 * {@hide}
26 */
27interface IBluetooth
28{
29    boolean isEnabled();
30    int getBluetoothState();
31    boolean enable();
32    boolean disable(boolean persistSetting);
33
34    String getAddress();
35    String getName();
36    boolean setName(in String name);
37
38    int getScanMode();
39    boolean setScanMode(int mode, int duration);
40
41    int getDiscoverableTimeout();
42    boolean setDiscoverableTimeout(int timeout);
43
44    boolean startDiscovery();
45    boolean cancelDiscovery();
46    boolean isDiscovering();
47
48    boolean createBond(in String address);
49    boolean cancelBondProcess(in String address);
50    boolean removeBond(in String address);
51    String[] listBonds();
52    int getBondState(in String address);
53
54    String getRemoteName(in String address);
55    int getRemoteClass(in String address);
56    ParcelUuid[] getRemoteUuids(in String address);
57    boolean fetchRemoteUuids(in String address, in ParcelUuid uuid, in IBluetoothCallback callback);
58    int getRemoteServiceChannel(in String address, in ParcelUuid uuid);
59
60    boolean setPin(in String address, in byte[] pin);
61    boolean setPasskey(in String address, int passkey);
62    boolean setPairingConfirmation(in String address, boolean confirm);
63    boolean cancelPairingUserInput(in String address);
64
65    boolean setTrust(in String address, in boolean value);
66    boolean getTrustState(in String address);
67    boolean isBluetoothDock(in String address);
68
69    int addRfcommServiceRecord(in String serviceName, in ParcelUuid uuid, int channel, IBinder b);
70    void removeServiceRecord(int handle);
71
72    boolean connectHeadset(String address);
73    boolean disconnectHeadset(String address);
74    boolean notifyIncomingConnection(String address);
75}
76