From 0a5d9ebb0b15976b47eaff77bb66a257b8b114bb Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Tue, 8 Aug 2017 04:00:13 -0700 Subject: [PATCH] Bluetooth: move AIDL files related to Bluetooth into system/bt (2/3) This patch moves *.aidl files from frameworks/base/core/java/android/bluetooth into system/bt/binder. This is in preparation to convert the Bluetooth deamon into native implementation piece by piece. In order to do that, one must have C++ header files, and paths to them with AIDL files, and */java/* folder didn't seem as proper place for that. Additionally, keeping AIDL files out of framework/base will not require creating dependency on this huge project, which should help keeping the compilation fast. Test: compilation test Change-Id: I4c992e6ee16eea3173a49b1d37e961af3d3c9ac6 Merged-In: I4c992e6ee16eea3173a49b1d37e961af3d3c9ac6 (cherry picked from commit 8a12de49177a341a118c95435177fba4f12fe412) --- Android.bp | 1 + binder/Android.bp | 64 +++++++++++ .../bluetooth/BluetoothActivityEnergyInfo.aidl | 19 ++++ binder/android/bluetooth/BluetoothAudioConfig.aidl | 19 ++++ .../bluetooth/BluetoothAvrcpPlayerSettings.aidl | 19 ++++ binder/android/bluetooth/BluetoothCodecConfig.aidl | 19 ++++ binder/android/bluetooth/BluetoothCodecStatus.aidl | 19 ++++ binder/android/bluetooth/BluetoothDevice.aidl | 19 ++++ .../bluetooth/BluetoothGattCharacteristic.aidl | 19 ++++ .../android/bluetooth/BluetoothGattDescriptor.aidl | 19 ++++ .../bluetooth/BluetoothGattIncludedService.aidl | 19 ++++ binder/android/bluetooth/BluetoothGattService.aidl | 19 ++++ .../bluetooth/BluetoothHeadsetClientCall.aidl | 18 +++ .../bluetooth/BluetoothHealthAppConfiguration.aidl | 19 ++++ .../BluetoothHidDeviceAppConfiguration.aidl | 19 ++++ .../BluetoothHidDeviceAppQosSettings.aidl | 19 ++++ .../BluetoothHidDeviceAppSdpSettings.aidl | 19 ++++ binder/android/bluetooth/IBluetooth.aidl | 125 +++++++++++++++++++++ binder/android/bluetooth/IBluetoothA2dp.aidl | 45 ++++++++ binder/android/bluetooth/IBluetoothA2dpSink.aidl | 37 ++++++ .../bluetooth/IBluetoothAvrcpController.aidl | 36 ++++++ binder/android/bluetooth/IBluetoothCallback.aidl | 28 +++++ binder/android/bluetooth/IBluetoothGatt.aidl | 111 ++++++++++++++++++ .../android/bluetooth/IBluetoothGattCallback.aidl | 42 +++++++ .../bluetooth/IBluetoothGattServerCallback.aidl | 47 ++++++++ binder/android/bluetooth/IBluetoothHeadset.aidl | 64 +++++++++++ .../android/bluetooth/IBluetoothHeadsetClient.aidl | 64 +++++++++++ .../android/bluetooth/IBluetoothHeadsetPhone.aidl | 39 +++++++ binder/android/bluetooth/IBluetoothHealth.aidl | 42 +++++++ .../bluetooth/IBluetoothHealthCallback.aidl | 32 ++++++ .../bluetooth/IBluetoothHidDeviceCallback.aidl | 31 +++++ .../android/bluetooth/IBluetoothInputDevice.aidl | 67 +++++++++++ binder/android/bluetooth/IBluetoothInputHost.aidl | 40 +++++++ binder/android/bluetooth/IBluetoothManager.aidl | 52 +++++++++ .../bluetooth/IBluetoothManagerCallback.aidl | 30 +++++ binder/android/bluetooth/IBluetoothMap.aidl | 37 ++++++ binder/android/bluetooth/IBluetoothMapClient.aidl | 40 +++++++ binder/android/bluetooth/IBluetoothPan.aidl | 35 ++++++ binder/android/bluetooth/IBluetoothPbap.aidl | 32 ++++++ binder/android/bluetooth/IBluetoothPbapClient.aidl | 34 ++++++ .../IBluetoothProfileServiceConnection.aidl | 30 +++++ binder/android/bluetooth/IBluetoothSap.aidl | 37 ++++++ .../bluetooth/IBluetoothStateChangeCallback.aidl | 27 +++++ binder/android/bluetooth/OobData.aidl | 19 ++++ binder/android/bluetooth/le/AdvertiseData.aidl | 19 ++++ binder/android/bluetooth/le/AdvertiseSettings.aidl | 19 ++++ .../bluetooth/le/AdvertisingSetParameters.aidl | 19 ++++ .../bluetooth/le/IAdvertisingSetCallback.aidl | 33 ++++++ .../bluetooth/le/IPeriodicAdvertisingCallback.aidl | 31 +++++ binder/android/bluetooth/le/IScannerCallback.aidl | 31 +++++ .../le/PeriodicAdvertisingParameters.aidl | 19 ++++ .../bluetooth/le/PeriodicAdvertisingReport.aidl | 19 ++++ .../bluetooth/le/ResultStorageDescriptor.aidl | 23 ++++ binder/android/bluetooth/le/ScanFilter.aidl | 19 ++++ binder/android/bluetooth/le/ScanResult.aidl | 19 ++++ binder/android/bluetooth/le/ScanSettings.aidl | 19 ++++ 56 files changed, 1842 insertions(+) create mode 100644 binder/Android.bp create mode 100644 binder/android/bluetooth/BluetoothActivityEnergyInfo.aidl create mode 100644 binder/android/bluetooth/BluetoothAudioConfig.aidl create mode 100644 binder/android/bluetooth/BluetoothAvrcpPlayerSettings.aidl create mode 100644 binder/android/bluetooth/BluetoothCodecConfig.aidl create mode 100644 binder/android/bluetooth/BluetoothCodecStatus.aidl create mode 100644 binder/android/bluetooth/BluetoothDevice.aidl create mode 100644 binder/android/bluetooth/BluetoothGattCharacteristic.aidl create mode 100644 binder/android/bluetooth/BluetoothGattDescriptor.aidl create mode 100644 binder/android/bluetooth/BluetoothGattIncludedService.aidl create mode 100644 binder/android/bluetooth/BluetoothGattService.aidl create mode 100644 binder/android/bluetooth/BluetoothHeadsetClientCall.aidl create mode 100644 binder/android/bluetooth/BluetoothHealthAppConfiguration.aidl create mode 100644 binder/android/bluetooth/BluetoothHidDeviceAppConfiguration.aidl create mode 100644 binder/android/bluetooth/BluetoothHidDeviceAppQosSettings.aidl create mode 100644 binder/android/bluetooth/BluetoothHidDeviceAppSdpSettings.aidl create mode 100644 binder/android/bluetooth/IBluetooth.aidl create mode 100644 binder/android/bluetooth/IBluetoothA2dp.aidl create mode 100755 binder/android/bluetooth/IBluetoothA2dpSink.aidl create mode 100644 binder/android/bluetooth/IBluetoothAvrcpController.aidl create mode 100644 binder/android/bluetooth/IBluetoothCallback.aidl create mode 100644 binder/android/bluetooth/IBluetoothGatt.aidl create mode 100644 binder/android/bluetooth/IBluetoothGattCallback.aidl create mode 100644 binder/android/bluetooth/IBluetoothGattServerCallback.aidl create mode 100755 binder/android/bluetooth/IBluetoothHeadset.aidl create mode 100644 binder/android/bluetooth/IBluetoothHeadsetClient.aidl create mode 100644 binder/android/bluetooth/IBluetoothHeadsetPhone.aidl create mode 100644 binder/android/bluetooth/IBluetoothHealth.aidl create mode 100644 binder/android/bluetooth/IBluetoothHealthCallback.aidl create mode 100644 binder/android/bluetooth/IBluetoothHidDeviceCallback.aidl create mode 100644 binder/android/bluetooth/IBluetoothInputDevice.aidl create mode 100644 binder/android/bluetooth/IBluetoothInputHost.aidl create mode 100644 binder/android/bluetooth/IBluetoothManager.aidl create mode 100644 binder/android/bluetooth/IBluetoothManagerCallback.aidl create mode 100644 binder/android/bluetooth/IBluetoothMap.aidl create mode 100644 binder/android/bluetooth/IBluetoothMapClient.aidl create mode 100644 binder/android/bluetooth/IBluetoothPan.aidl create mode 100644 binder/android/bluetooth/IBluetoothPbap.aidl create mode 100644 binder/android/bluetooth/IBluetoothPbapClient.aidl create mode 100755 binder/android/bluetooth/IBluetoothProfileServiceConnection.aidl create mode 100644 binder/android/bluetooth/IBluetoothSap.aidl create mode 100644 binder/android/bluetooth/IBluetoothStateChangeCallback.aidl create mode 100644 binder/android/bluetooth/OobData.aidl create mode 100644 binder/android/bluetooth/le/AdvertiseData.aidl create mode 100644 binder/android/bluetooth/le/AdvertiseSettings.aidl create mode 100644 binder/android/bluetooth/le/AdvertisingSetParameters.aidl create mode 100644 binder/android/bluetooth/le/IAdvertisingSetCallback.aidl create mode 100644 binder/android/bluetooth/le/IPeriodicAdvertisingCallback.aidl create mode 100644 binder/android/bluetooth/le/IScannerCallback.aidl create mode 100644 binder/android/bluetooth/le/PeriodicAdvertisingParameters.aidl create mode 100644 binder/android/bluetooth/le/PeriodicAdvertisingReport.aidl create mode 100644 binder/android/bluetooth/le/ResultStorageDescriptor.aidl create mode 100644 binder/android/bluetooth/le/ScanFilter.aidl create mode 100644 binder/android/bluetooth/le/ScanResult.aidl create mode 100644 binder/android/bluetooth/le/ScanSettings.aidl diff --git a/Android.bp b/Android.bp index 462b8bef4..91ee23256 100644 --- a/Android.bp +++ b/Android.bp @@ -1,4 +1,5 @@ subdirs = [ + "binder", "build", "btif", "btcore", diff --git a/binder/Android.bp b/binder/Android.bp new file mode 100644 index 000000000..dfdac6cf6 --- /dev/null +++ b/binder/Android.bp @@ -0,0 +1,64 @@ +cc_library_shared { + name: "bluetooth_binder_interface", + srcs: [ +/* TODO: Uncomment this files as they get converted one-by-one into native implementation + "android/bluetooth/IBluetooth.aidl", + "android/bluetooth/IBluetoothA2dp.aidl", + "android/bluetooth/IBluetoothA2dpSink.aidl", + "android/bluetooth/IBluetoothAvrcpController.aidl", + "android/bluetooth/IBluetoothCallback.aidl", + "android/bluetooth/IBluetoothProfileServiceConnection.aidl", + "android/bluetooth/IBluetoothHeadset.aidl", + "android/bluetooth/IBluetoothHeadsetPhone.aidl", + "android/bluetooth/IBluetoothHealth.aidl", + "android/bluetooth/IBluetoothHealthCallback.aidl", + "android/bluetooth/IBluetoothInputDevice.aidl", + "android/bluetooth/IBluetoothPan.aidl", + "android/bluetooth/IBluetoothManager.aidl", + "android/bluetooth/IBluetoothManagerCallback.aidl", + "android/bluetooth/IBluetoothMap.aidl", + "android/bluetooth/IBluetoothMapClient.aidl", + "android/bluetooth/IBluetoothPbap.aidl", + "android/bluetooth/IBluetoothPbapClient.aidl", + "android/bluetooth/IBluetoothSap.aidl", + "android/bluetooth/IBluetoothStateChangeCallback.aidl", + "android/bluetooth/IBluetoothHeadsetClient.aidl", + "android/bluetooth/IBluetoothInputHost.aidl", + "android/bluetooth/IBluetoothHidDeviceCallback.aidl", + "android/bluetooth/IBluetoothGatt.aidl", + "android/bluetooth/IBluetoothGattCallback.aidl", + "android/bluetooth/IBluetoothGattServerCallback.aidl", + "android/bluetooth/le/IAdvertisingSetCallback.aidl", + "android/bluetooth/le/IPeriodicAdvertisingCallback.aidl", + "android/bluetooth/le/IScannerCallback.aidl" +*/ + ], + aidl: { + export_aidl_headers: true, + include_dirs: [ + "frameworks/native/aidl/binder", + ], + }, + include_dirs: [ + "libnativehelper/include/nativehelper", + "system/bt/types", + ], + shared_libs: [ + "libandroid_runtime", + "libbinder", + "libchrome", + "libnativehelper", + "libcutils", + "libutils", + "liblog", + ], + + static_libs: [ + "libbluetooth-types", + ], + cflags: [ + "-Wall", + "-Wextra", + "-Wno-unused-parameter", + ], +} diff --git a/binder/android/bluetooth/BluetoothActivityEnergyInfo.aidl b/binder/android/bluetooth/BluetoothActivityEnergyInfo.aidl new file mode 100644 index 000000000..60cbf9f31 --- /dev/null +++ b/binder/android/bluetooth/BluetoothActivityEnergyInfo.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable BluetoothActivityEnergyInfo; diff --git a/binder/android/bluetooth/BluetoothAudioConfig.aidl b/binder/android/bluetooth/BluetoothAudioConfig.aidl new file mode 100644 index 000000000..63be5cff8 --- /dev/null +++ b/binder/android/bluetooth/BluetoothAudioConfig.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable BluetoothAudioConfig; diff --git a/binder/android/bluetooth/BluetoothAvrcpPlayerSettings.aidl b/binder/android/bluetooth/BluetoothAvrcpPlayerSettings.aidl new file mode 100644 index 000000000..590fd63ed --- /dev/null +++ b/binder/android/bluetooth/BluetoothAvrcpPlayerSettings.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable BluetoothAvrcpPlayerSettings; diff --git a/binder/android/bluetooth/BluetoothCodecConfig.aidl b/binder/android/bluetooth/BluetoothCodecConfig.aidl new file mode 100644 index 000000000..553e66e1d --- /dev/null +++ b/binder/android/bluetooth/BluetoothCodecConfig.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable BluetoothCodecConfig; diff --git a/binder/android/bluetooth/BluetoothCodecStatus.aidl b/binder/android/bluetooth/BluetoothCodecStatus.aidl new file mode 100644 index 000000000..f9c3a3de2 --- /dev/null +++ b/binder/android/bluetooth/BluetoothCodecStatus.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable BluetoothCodecStatus; diff --git a/binder/android/bluetooth/BluetoothDevice.aidl b/binder/android/bluetooth/BluetoothDevice.aidl new file mode 100644 index 000000000..daae74d52 --- /dev/null +++ b/binder/android/bluetooth/BluetoothDevice.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable BluetoothDevice; diff --git a/binder/android/bluetooth/BluetoothGattCharacteristic.aidl b/binder/android/bluetooth/BluetoothGattCharacteristic.aidl new file mode 100644 index 000000000..bbb8623e2 --- /dev/null +++ b/binder/android/bluetooth/BluetoothGattCharacteristic.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable BluetoothGattCharacteristic; diff --git a/binder/android/bluetooth/BluetoothGattDescriptor.aidl b/binder/android/bluetooth/BluetoothGattDescriptor.aidl new file mode 100644 index 000000000..439327331 --- /dev/null +++ b/binder/android/bluetooth/BluetoothGattDescriptor.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable BluetoothGattDescriptor; diff --git a/binder/android/bluetooth/BluetoothGattIncludedService.aidl b/binder/android/bluetooth/BluetoothGattIncludedService.aidl new file mode 100644 index 000000000..1ef427edc --- /dev/null +++ b/binder/android/bluetooth/BluetoothGattIncludedService.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable BluetoothGattIncludedService; diff --git a/binder/android/bluetooth/BluetoothGattService.aidl b/binder/android/bluetooth/BluetoothGattService.aidl new file mode 100644 index 000000000..84314d207 --- /dev/null +++ b/binder/android/bluetooth/BluetoothGattService.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable BluetoothGattService; diff --git a/binder/android/bluetooth/BluetoothHeadsetClientCall.aidl b/binder/android/bluetooth/BluetoothHeadsetClientCall.aidl new file mode 100644 index 000000000..35f792387 --- /dev/null +++ b/binder/android/bluetooth/BluetoothHeadsetClientCall.aidl @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.bluetooth; + +parcelable BluetoothHeadsetClientCall; diff --git a/binder/android/bluetooth/BluetoothHealthAppConfiguration.aidl b/binder/android/bluetooth/BluetoothHealthAppConfiguration.aidl new file mode 100644 index 000000000..bc9e54f57 --- /dev/null +++ b/binder/android/bluetooth/BluetoothHealthAppConfiguration.aidl @@ -0,0 +1,19 @@ +/* +** Copyright 2011, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +package android.bluetooth; + +parcelable BluetoothHealthAppConfiguration; diff --git a/binder/android/bluetooth/BluetoothHidDeviceAppConfiguration.aidl b/binder/android/bluetooth/BluetoothHidDeviceAppConfiguration.aidl new file mode 100644 index 000000000..283a71790 --- /dev/null +++ b/binder/android/bluetooth/BluetoothHidDeviceAppConfiguration.aidl @@ -0,0 +1,19 @@ +/* +** Copyright 2016, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +package android.bluetooth; + +parcelable BluetoothHidDeviceAppConfiguration; diff --git a/binder/android/bluetooth/BluetoothHidDeviceAppQosSettings.aidl b/binder/android/bluetooth/BluetoothHidDeviceAppQosSettings.aidl new file mode 100644 index 000000000..14f91140a --- /dev/null +++ b/binder/android/bluetooth/BluetoothHidDeviceAppQosSettings.aidl @@ -0,0 +1,19 @@ +/* +** Copyright 2016, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +package android.bluetooth; + +parcelable BluetoothHidDeviceAppQosSettings; diff --git a/binder/android/bluetooth/BluetoothHidDeviceAppSdpSettings.aidl b/binder/android/bluetooth/BluetoothHidDeviceAppSdpSettings.aidl new file mode 100644 index 000000000..87dd10ee1 --- /dev/null +++ b/binder/android/bluetooth/BluetoothHidDeviceAppSdpSettings.aidl @@ -0,0 +1,19 @@ +/* +** Copyright 2016, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +package android.bluetooth; + +parcelable BluetoothHidDeviceAppSdpSettings; diff --git a/binder/android/bluetooth/IBluetooth.aidl b/binder/android/bluetooth/IBluetooth.aidl new file mode 100644 index 000000000..1d7cfc900 --- /dev/null +++ b/binder/android/bluetooth/IBluetooth.aidl @@ -0,0 +1,125 @@ +/* + * Copyright (C) 2008, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.IBluetoothCallback; +import android.bluetooth.IBluetoothStateChangeCallback; +import android.bluetooth.BluetoothActivityEnergyInfo; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.OobData; +import android.os.ParcelUuid; +import android.os.ParcelFileDescriptor; +import android.os.ResultReceiver; + +/** + * System private API for talking with the Bluetooth service. + * + * {@hide} + */ +interface IBluetooth +{ + boolean isEnabled(); + int getState(); + boolean enable(); + boolean enableNoAutoConnect(); + boolean disable(); + + String getAddress(); + ParcelUuid[] getUuids(); + boolean setName(in String name); + String getName(); + + int getScanMode(); + boolean setScanMode(int mode, int duration); + + int getDiscoverableTimeout(); + boolean setDiscoverableTimeout(int timeout); + + boolean startDiscovery(); + boolean cancelDiscovery(); + boolean isDiscovering(); + long getDiscoveryEndMillis(); + + int getAdapterConnectionState(); + int getProfileConnectionState(int profile); + + BluetoothDevice[] getBondedDevices(); + boolean createBond(in BluetoothDevice device, in int transport); + boolean createBondOutOfBand(in BluetoothDevice device, in int transport, in OobData oobData); + boolean cancelBondProcess(in BluetoothDevice device); + boolean removeBond(in BluetoothDevice device); + int getBondState(in BluetoothDevice device); + boolean isBondingInitiatedLocally(in BluetoothDevice device); + long getSupportedProfiles(); + int getConnectionState(in BluetoothDevice device); + + String getRemoteName(in BluetoothDevice device); + int getRemoteType(in BluetoothDevice device); + String getRemoteAlias(in BluetoothDevice device); + boolean setRemoteAlias(in BluetoothDevice device, in String name); + int getRemoteClass(in BluetoothDevice device); + ParcelUuid[] getRemoteUuids(in BluetoothDevice device); + boolean fetchRemoteUuids(in BluetoothDevice device); + boolean sdpSearch(in BluetoothDevice device, in ParcelUuid uuid); + int getBatteryLevel(in BluetoothDevice device); + + boolean setPin(in BluetoothDevice device, boolean accept, int len, in byte[] pinCode); + boolean setPasskey(in BluetoothDevice device, boolean accept, int len, in byte[] + passkey); + boolean setPairingConfirmation(in BluetoothDevice device, boolean accept); + + int getPhonebookAccessPermission(in BluetoothDevice device); + boolean setPhonebookAccessPermission(in BluetoothDevice device, int value); + int getMessageAccessPermission(in BluetoothDevice device); + boolean setMessageAccessPermission(in BluetoothDevice device, int value); + int getSimAccessPermission(in BluetoothDevice device); + boolean setSimAccessPermission(in BluetoothDevice device, int value); + + void sendConnectionStateChange(in BluetoothDevice device, int profile, int state, int prevState); + + void registerCallback(in IBluetoothCallback callback); + void unregisterCallback(in IBluetoothCallback callback); + + // For Socket + ParcelFileDescriptor connectSocket(in BluetoothDevice device, int type, in ParcelUuid uuid, int port, int flag); + ParcelFileDescriptor createSocketChannel(int type, in String serviceName, in ParcelUuid uuid, int port, int flag); + + boolean factoryReset(); + + boolean isMultiAdvertisementSupported(); + boolean isOffloadedFilteringSupported(); + boolean isOffloadedScanBatchingSupported(); + boolean isActivityAndEnergyReportingSupported(); + boolean isLe2MPhySupported(); + boolean isLeCodedPhySupported(); + boolean isLeExtendedAdvertisingSupported(); + boolean isLePeriodicAdvertisingSupported(); + int getLeMaximumAdvertisingDataLength(); + BluetoothActivityEnergyInfo reportActivityInfo(); + + /** + * Requests the controller activity info asynchronously. + * The implementor is expected to reply with the + * {@link android.bluetooth.BluetoothActivityEnergyInfo} object placed into the Bundle with the + * key {@link android.os.BatteryStats#RESULT_RECEIVER_CONTROLLER_KEY}. + * The result code is ignored. + */ + oneway void requestActivityInfo(in ResultReceiver result); + + void onLeServiceUp(); + void onBrEdrDown(); +} diff --git a/binder/android/bluetooth/IBluetoothA2dp.aidl b/binder/android/bluetooth/IBluetoothA2dp.aidl new file mode 100644 index 000000000..a775a1f90 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothA2dp.aidl @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothCodecConfig; +import android.bluetooth.BluetoothCodecStatus; +import android.bluetooth.BluetoothDevice; + +/** + * APIs for Bluetooth A2DP service + * + * @hide + */ +interface IBluetoothA2dp { + // Public API + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); + boolean setPriority(in BluetoothDevice device, int priority); + int getPriority(in BluetoothDevice device); + boolean isAvrcpAbsoluteVolumeSupported(); + oneway void adjustAvrcpAbsoluteVolume(int direction); + oneway void setAvrcpAbsoluteVolume(int volume); + boolean isA2dpPlaying(in BluetoothDevice device); + BluetoothCodecStatus getCodecStatus(); + oneway void setCodecConfigPreference(in BluetoothCodecConfig codecConfig); + oneway void enableOptionalCodecs(); + oneway void disableOptionalCodecs(); +} diff --git a/binder/android/bluetooth/IBluetoothA2dpSink.aidl b/binder/android/bluetooth/IBluetoothA2dpSink.aidl new file mode 100755 index 000000000..d1458246d --- /dev/null +++ b/binder/android/bluetooth/IBluetoothA2dpSink.aidl @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothAudioConfig; +import android.bluetooth.BluetoothDevice; + +/** + * APIs for Bluetooth A2DP sink service + * + * @hide + */ +interface IBluetoothA2dpSink { + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); + BluetoothAudioConfig getAudioConfig(in BluetoothDevice device); + boolean setPriority(in BluetoothDevice device, int priority); + int getPriority(in BluetoothDevice device); + boolean isA2dpPlaying(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothAvrcpController.aidl b/binder/android/bluetooth/IBluetoothAvrcpController.aidl new file mode 100644 index 000000000..cfa11cac4 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothAvrcpController.aidl @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothAvrcpPlayerSettings; +import android.bluetooth.BluetoothDevice; +import android.media.MediaMetadata; +import android.media.session.PlaybackState; + +/** + * APIs for Bluetooth AVRCP controller service + * + * @hide + */ +interface IBluetoothAvrcpController { + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); + BluetoothAvrcpPlayerSettings getPlayerSettings(in BluetoothDevice device); + boolean setPlayerApplicationSetting(in BluetoothAvrcpPlayerSettings plAppSetting); + void sendGroupNavigationCmd(in BluetoothDevice device, int keyCode, int keyState); +} diff --git a/binder/android/bluetooth/IBluetoothCallback.aidl b/binder/android/bluetooth/IBluetoothCallback.aidl new file mode 100644 index 000000000..e2809788d --- /dev/null +++ b/binder/android/bluetooth/IBluetoothCallback.aidl @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2009, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +/** + * System private API for Bluetooth service callbacks. + * + * {@hide} + */ +interface IBluetoothCallback +{ + //void onRfcommChannelFound(int channel); + void onBluetoothStateChange(int prevState, int newState); +} diff --git a/binder/android/bluetooth/IBluetoothGatt.aidl b/binder/android/bluetooth/IBluetoothGatt.aidl new file mode 100644 index 000000000..05cef600c --- /dev/null +++ b/binder/android/bluetooth/IBluetoothGatt.aidl @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothGattService; +import android.bluetooth.le.AdvertiseSettings; +import android.bluetooth.le.AdvertiseData; +import android.bluetooth.le.AdvertisingSetParameters; +import android.bluetooth.le.PeriodicAdvertisingParameters; +import android.bluetooth.le.ScanFilter; +import android.bluetooth.le.ScanResult; +import android.bluetooth.le.ScanSettings; +import android.bluetooth.le.ResultStorageDescriptor; +import android.os.ParcelUuid; +import android.os.WorkSource; + +import android.bluetooth.IBluetoothGattCallback; +import android.bluetooth.IBluetoothGattServerCallback; +import android.bluetooth.le.IAdvertisingSetCallback; +import android.bluetooth.le.IPeriodicAdvertisingCallback; +import android.bluetooth.le.IScannerCallback; + +/** + * API for interacting with BLE / GATT + * @hide + */ +interface IBluetoothGatt { + List getDevicesMatchingConnectionStates(in int[] states); + + void registerScanner(in IScannerCallback callback, in WorkSource workSource); + void unregisterScanner(in int scannerId); + void startScan(in int scannerId, in ScanSettings settings, in List filters, + in List scanStorages, in String callingPackage); + void stopScan(in int scannerId); + void flushPendingBatchResults(in int scannerId); + + void startAdvertisingSet(in AdvertisingSetParameters parameters, in AdvertiseData advertiseData, + in AdvertiseData scanResponse, in PeriodicAdvertisingParameters periodicParameters, + in AdvertiseData periodicData, in int duration, in int maxExtAdvEvents, + in IAdvertisingSetCallback callback); + void stopAdvertisingSet(in IAdvertisingSetCallback callback); + + void getOwnAddress(in int advertiserId); + void enableAdvertisingSet(in int advertiserId, in boolean enable, in int duration, in int maxExtAdvEvents); + void setAdvertisingData(in int advertiserId, in AdvertiseData data); + void setScanResponseData(in int advertiserId, in AdvertiseData data); + void setAdvertisingParameters(in int advertiserId, in AdvertisingSetParameters parameters); + void setPeriodicAdvertisingParameters(in int advertiserId, in PeriodicAdvertisingParameters parameters); + void setPeriodicAdvertisingData(in int advertiserId, in AdvertiseData data); + void setPeriodicAdvertisingEnable(in int advertiserId, in boolean enable); + + void registerSync(in ScanResult scanResult, in int skip, in int timeout, in IPeriodicAdvertisingCallback callback); + void unregisterSync(in IPeriodicAdvertisingCallback callback); + + void registerClient(in ParcelUuid appId, in IBluetoothGattCallback callback); + + void unregisterClient(in int clientIf); + void clientConnect(in int clientIf, in String address, in boolean isDirect, in int transport, in boolean opportunistic, in int phy); + void clientDisconnect(in int clientIf, in String address); + void clientSetPreferredPhy(in int clientIf, in String address, in int txPhy, in int rxPhy, in int phyOptions); + void clientReadPhy(in int clientIf, in String address); + void refreshDevice(in int clientIf, in String address); + void discoverServices(in int clientIf, in String address); + void discoverServiceByUuid(in int clientIf, in String address, in ParcelUuid uuid); + void readCharacteristic(in int clientIf, in String address, in int handle, in int authReq); + void readUsingCharacteristicUuid(in int clientIf, in String address, in ParcelUuid uuid, + in int startHandle, in int endHandle, in int authReq); + void writeCharacteristic(in int clientIf, in String address, in int handle, + in int writeType, in int authReq, in byte[] value); + void readDescriptor(in int clientIf, in String address, in int handle, in int authReq); + void writeDescriptor(in int clientIf, in String address, in int handle, + in int authReq, in byte[] value); + void registerForNotification(in int clientIf, in String address, in int handle, in boolean enable); + void beginReliableWrite(in int clientIf, in String address); + void endReliableWrite(in int clientIf, in String address, in boolean execute); + void readRemoteRssi(in int clientIf, in String address); + void configureMTU(in int clientIf, in String address, in int mtu); + void connectionParameterUpdate(in int clientIf, in String address, in int connectionPriority); + + void registerServer(in ParcelUuid appId, in IBluetoothGattServerCallback callback); + void unregisterServer(in int serverIf); + void serverConnect(in int serverIf, in String address, in boolean isDirect, in int transport); + void serverDisconnect(in int serverIf, in String address); + void serverSetPreferredPhy(in int clientIf, in String address, in int txPhy, in int rxPhy, in int phyOptions); + void serverReadPhy(in int clientIf, in String address); + void addService(in int serverIf, in BluetoothGattService service); + void removeService(in int serverIf, in int handle); + void clearServices(in int serverIf); + void sendResponse(in int serverIf, in String address, in int requestId, + in int status, in int offset, in byte[] value); + void sendNotification(in int serverIf, in String address, in int handle, + in boolean confirm, in byte[] value); + void disconnectAll(); + void unregAll(); + int numHwTrackFiltersAvailable(); +} diff --git a/binder/android/bluetooth/IBluetoothGattCallback.aidl b/binder/android/bluetooth/IBluetoothGattCallback.aidl new file mode 100644 index 000000000..4f85cdda8 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothGattCallback.aidl @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.bluetooth; + +import android.os.ParcelUuid; +import android.bluetooth.BluetoothGattService; + +/** + * Callback definitions for interacting with BLE / GATT + * @hide + */ +oneway interface IBluetoothGattCallback { + void onClientRegistered(in int status, in int clientIf); + void onClientConnectionState(in int status, in int clientIf, + in boolean connected, in String address); + void onPhyUpdate(in String address, in int txPhy, in int rxPhy, in int status); + void onPhyRead(in String address, in int txPhy, in int rxPhy, in int status); + void onSearchComplete(in String address, in List services, in int status); + void onCharacteristicRead(in String address, in int status, in int handle, in byte[] value); + void onCharacteristicWrite(in String address, in int status, in int handle); + void onExecuteWrite(in String address, in int status); + void onDescriptorRead(in String address, in int status, in int handle, in byte[] value); + void onDescriptorWrite(in String address, in int status, in int handle); + void onNotify(in String address, in int handle, in byte[] value); + void onReadRemoteRssi(in String address, in int rssi, in int status); + void onConfigureMTU(in String address, in int mtu, in int status); + void onConnectionUpdated(in String address, in int interval, in int latency, + in int timeout, in int status); +} diff --git a/binder/android/bluetooth/IBluetoothGattServerCallback.aidl b/binder/android/bluetooth/IBluetoothGattServerCallback.aidl new file mode 100644 index 000000000..74ee11fbd --- /dev/null +++ b/binder/android/bluetooth/IBluetoothGattServerCallback.aidl @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.bluetooth; + +import android.bluetooth.BluetoothGattService; + +/** + * Callback definitions for interacting with BLE / GATT + * @hide + */ +oneway interface IBluetoothGattServerCallback { + void onServerRegistered(in int status, in int serverIf); + void onServerConnectionState(in int status, in int serverIf, + in boolean connected, in String address); + void onServiceAdded(in int status, in BluetoothGattService service); + void onCharacteristicReadRequest(in String address, in int transId, in int offset, + in boolean isLong, in int handle); + void onDescriptorReadRequest(in String address, in int transId, + in int offset, in boolean isLong, + in int handle); + void onCharacteristicWriteRequest(in String address, in int transId, in int offset, + in int length, in boolean isPrep, in boolean needRsp, + in int handle, in byte[] value); + void onDescriptorWriteRequest(in String address, in int transId, in int offset, + in int length, in boolean isPrep, in boolean needRsp, + in int handle, in byte[] value); + void onExecuteWrite(in String address, in int transId, in boolean execWrite); + void onNotificationSent(in String address, in int status); + void onMtuChanged(in String address, in int mtu); + void onPhyUpdate(in String address, in int txPhy, in int rxPhy, in int status); + void onPhyRead(in String address, in int txPhy, in int rxPhy, in int status); + void onConnectionUpdated(in String address, in int interval, in int latency, + in int timeout, in int status); +} diff --git a/binder/android/bluetooth/IBluetoothHeadset.aidl b/binder/android/bluetooth/IBluetoothHeadset.aidl new file mode 100755 index 000000000..6bd0d7fb4 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothHeadset.aidl @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; + +/** + * API for Bluetooth Headset service + * + * {@hide} + */ +interface IBluetoothHeadset { + // Public API + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); + boolean setPriority(in BluetoothDevice device, int priority); + int getPriority(in BluetoothDevice device); + boolean startVoiceRecognition(in BluetoothDevice device); + boolean stopVoiceRecognition(in BluetoothDevice device); + boolean isAudioConnected(in BluetoothDevice device); + boolean sendVendorSpecificResultCode(in BluetoothDevice device, + in String command, + in String arg); + + // APIs that can be made public in future + int getBatteryUsageHint(in BluetoothDevice device); + + // Internal functions, not be made public + boolean acceptIncomingConnect(in BluetoothDevice device); + boolean rejectIncomingConnect(in BluetoothDevice device); + int getAudioState(in BluetoothDevice device); + + boolean isAudioOn(); + boolean connectAudio(); + boolean disconnectAudio(); + void setAudioRouteAllowed(boolean allowed); + boolean getAudioRouteAllowed(); + void setForceScoAudio(boolean forced); + boolean startScoUsingVirtualVoiceCall(in BluetoothDevice device); + boolean stopScoUsingVirtualVoiceCall(in BluetoothDevice device); + void phoneStateChanged(int numActive, int numHeld, int callState, String number, int type); + void clccResponse(int index, int direction, int status, int mode, boolean mpty, + String number, int type); + boolean enableWBS(); + boolean disableWBS(); + void bindResponse(int ind_id, boolean ind_status); +} diff --git a/binder/android/bluetooth/IBluetoothHeadsetClient.aidl b/binder/android/bluetooth/IBluetoothHeadsetClient.aidl new file mode 100644 index 000000000..e571b009f --- /dev/null +++ b/binder/android/bluetooth/IBluetoothHeadsetClient.aidl @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothHeadsetClientCall; +import android.os.Bundle; + +/** + * API for Bluetooth Headset Client service (HFP HF Role) + * + * {@hide} + */ +interface IBluetoothHeadsetClient { + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); + boolean setPriority(in BluetoothDevice device, int priority); + int getPriority(in BluetoothDevice device); + + boolean startVoiceRecognition(in BluetoothDevice device); + boolean stopVoiceRecognition(in BluetoothDevice device); + + List getCurrentCalls(in BluetoothDevice device); + Bundle getCurrentAgEvents(in BluetoothDevice device); + + boolean acceptCall(in BluetoothDevice device, int flag); + boolean holdCall(in BluetoothDevice device); + boolean rejectCall(in BluetoothDevice device); + boolean terminateCall(in BluetoothDevice device, in BluetoothHeadsetClientCall call); + + boolean enterPrivateMode(in BluetoothDevice device, int index); + boolean explicitCallTransfer(in BluetoothDevice device); + + BluetoothHeadsetClientCall dial(in BluetoothDevice device, String number); + + boolean sendDTMF(in BluetoothDevice device, byte code); + boolean getLastVoiceTagNumber(in BluetoothDevice device); + + int getAudioState(in BluetoothDevice device); + boolean connectAudio(in BluetoothDevice device); + boolean disconnectAudio(in BluetoothDevice device); + void setAudioRouteAllowed(in BluetoothDevice device, boolean allowed); + boolean getAudioRouteAllowed(in BluetoothDevice device); + + Bundle getCurrentAgFeatures(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothHeadsetPhone.aidl b/binder/android/bluetooth/IBluetoothHeadsetPhone.aidl new file mode 100644 index 000000000..d5e64f6fa --- /dev/null +++ b/binder/android/bluetooth/IBluetoothHeadsetPhone.aidl @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +/** + * API for Bluetooth Headset Phone Service in phone app + * + * {@hide} + */ +interface IBluetoothHeadsetPhone { + // Internal functions, not be made public + boolean answerCall(); + boolean hangupCall(); + boolean sendDtmf(int dtmf); + boolean processChld(int chld); + String getNetworkOperator(); + String getSubscriberNumber(); + boolean listCurrentCalls(); + boolean queryPhoneState(); + + // Internal for phone app to call + void updateBtHandsfreeAfterRadioTechnologyChange(); + void cdmaSwapSecondCallState(); + void cdmaSetSecondCallState(boolean state); +} diff --git a/binder/android/bluetooth/IBluetoothHealth.aidl b/binder/android/bluetooth/IBluetoothHealth.aidl new file mode 100644 index 000000000..a84a42cb9 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothHealth.aidl @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothHealthAppConfiguration; +import android.bluetooth.IBluetoothHealthCallback; +import android.os.ParcelFileDescriptor; + +/** + * API for Bluetooth Health service + * + * {@hide} + */ +interface IBluetoothHealth +{ + boolean registerAppConfiguration(in BluetoothHealthAppConfiguration config, + in IBluetoothHealthCallback callback); + boolean unregisterAppConfiguration(in BluetoothHealthAppConfiguration config); + boolean connectChannelToSource(in BluetoothDevice device, in BluetoothHealthAppConfiguration config); + boolean connectChannelToSink(in BluetoothDevice device, in BluetoothHealthAppConfiguration config, + int channelType); + boolean disconnectChannel(in BluetoothDevice device, in BluetoothHealthAppConfiguration config, int id); + ParcelFileDescriptor getMainChannelFd(in BluetoothDevice device, in BluetoothHealthAppConfiguration config); + List getConnectedHealthDevices(); + List getHealthDevicesMatchingConnectionStates(in int[] states); + int getHealthDeviceConnectionState(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothHealthCallback.aidl b/binder/android/bluetooth/IBluetoothHealthCallback.aidl new file mode 100644 index 000000000..0ace9fe12 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothHealthCallback.aidl @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2011, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothHealthAppConfiguration; +import android.os.ParcelFileDescriptor; + +/** + *@hide + */ +interface IBluetoothHealthCallback +{ + void onHealthAppConfigurationStatusChange(in BluetoothHealthAppConfiguration config, int status); + void onHealthChannelStateChange(in BluetoothHealthAppConfiguration config, + in BluetoothDevice device, int prevState, int newState, in + ParcelFileDescriptor fd, int id); +} diff --git a/binder/android/bluetooth/IBluetoothHidDeviceCallback.aidl b/binder/android/bluetooth/IBluetoothHidDeviceCallback.aidl new file mode 100644 index 000000000..a737198ad --- /dev/null +++ b/binder/android/bluetooth/IBluetoothHidDeviceCallback.aidl @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2016, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothHidDeviceAppConfiguration; + +/** @hide */ +interface IBluetoothHidDeviceCallback { + void onAppStatusChanged(in BluetoothDevice device, in BluetoothHidDeviceAppConfiguration config, boolean registered); + void onConnectionStateChanged(in BluetoothDevice device, in int state); + void onGetReport(in BluetoothDevice device, in byte type, in byte id, in int bufferSize); + void onSetReport(in BluetoothDevice device, in byte type, in byte id, in byte[] data); + void onSetProtocol(in BluetoothDevice device, in byte protocol); + void onIntrData(in BluetoothDevice device, in byte reportId, in byte[] data); + void onVirtualCableUnplug(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothInputDevice.aidl b/binder/android/bluetooth/IBluetoothInputDevice.aidl new file mode 100644 index 000000000..5bd3f7819 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothInputDevice.aidl @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; + +/** + * API for Bluetooth HID service + * + * {@hide} + */ +interface IBluetoothInputDevice { + // Public API + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); + boolean setPriority(in BluetoothDevice device, int priority); + int getPriority(in BluetoothDevice device); + /** + * @hide + */ + boolean getProtocolMode(in BluetoothDevice device); + /** + * @hide + */ + boolean virtualUnplug(in BluetoothDevice device); + /** + * @hide + */ + boolean setProtocolMode(in BluetoothDevice device, int protocolMode); + /** + * @hide + */ + boolean getReport(in BluetoothDevice device, byte reportType, byte reportId, int bufferSize); + /** + * @hide + */ + boolean setReport(in BluetoothDevice device, byte reportType, String report); + /** + * @hide + */ + boolean sendData(in BluetoothDevice device, String report); + /** + * @hide + */ + boolean getIdleTime(in BluetoothDevice device); + /** + * @hide + */ + boolean setIdleTime(in BluetoothDevice device, byte idleTime); +} diff --git a/binder/android/bluetooth/IBluetoothInputHost.aidl b/binder/android/bluetooth/IBluetoothInputHost.aidl new file mode 100644 index 000000000..6c4993f75 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothInputHost.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothHidDeviceAppConfiguration; +import android.bluetooth.IBluetoothHidDeviceCallback; +import android.bluetooth.BluetoothHidDeviceAppSdpSettings; +import android.bluetooth.BluetoothHidDeviceAppQosSettings; + +/** @hide */ +interface IBluetoothInputHost { + boolean registerApp(in BluetoothHidDeviceAppConfiguration config, + in BluetoothHidDeviceAppSdpSettings sdp, in BluetoothHidDeviceAppQosSettings inQos, + in BluetoothHidDeviceAppQosSettings outQos, in IBluetoothHidDeviceCallback callback); + boolean unregisterApp(in BluetoothHidDeviceAppConfiguration config); + boolean sendReport(in BluetoothDevice device, in int id, in byte[] data); + boolean replyReport(in BluetoothDevice device, in byte type, in byte id, in byte[] data); + boolean reportError(in BluetoothDevice device, byte error); + boolean unplug(in BluetoothDevice device); + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothManager.aidl b/binder/android/bluetooth/IBluetoothManager.aidl new file mode 100644 index 000000000..5afd77418 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothManager.aidl @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.IBluetooth; +import android.bluetooth.IBluetoothGatt; +import android.bluetooth.IBluetoothManagerCallback; +import android.bluetooth.IBluetoothProfileServiceConnection; +import android.bluetooth.IBluetoothStateChangeCallback; + +/** + * System private API for talking with the Bluetooth service. + * + * {@hide} + */ +interface IBluetoothManager +{ + IBluetooth registerAdapter(in IBluetoothManagerCallback callback); + void unregisterAdapter(in IBluetoothManagerCallback callback); + void registerStateChangeCallback(in IBluetoothStateChangeCallback callback); + void unregisterStateChangeCallback(in IBluetoothStateChangeCallback callback); + boolean isEnabled(); + boolean enable(String packageName); + boolean enableNoAutoConnect(String packageName); + boolean disable(String packageName, boolean persist); + int getState(); + IBluetoothGatt getBluetoothGatt(); + + boolean bindBluetoothProfileService(int profile, IBluetoothProfileServiceConnection proxy); + void unbindBluetoothProfileService(int profile, IBluetoothProfileServiceConnection proxy); + + String getAddress(); + String getName(); + + boolean isBleScanAlwaysAvailable(); + int updateBleAppCount(IBinder b, boolean enable, String packageName); + boolean isBleAppPresent(); +} diff --git a/binder/android/bluetooth/IBluetoothManagerCallback.aidl b/binder/android/bluetooth/IBluetoothManagerCallback.aidl new file mode 100644 index 000000000..8104d2199 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothManagerCallback.aidl @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.IBluetooth; + +/** + * API for Communication between BluetoothAdapter and BluetoothManager + * + * {@hide} + */ +oneway interface IBluetoothManagerCallback { + void onBluetoothServiceUp(in IBluetooth bluetoothService); + void onBluetoothServiceDown(); + void onBrEdrDown(); +} diff --git a/binder/android/bluetooth/IBluetoothMap.aidl b/binder/android/bluetooth/IBluetoothMap.aidl new file mode 100644 index 000000000..d4af63d1f --- /dev/null +++ b/binder/android/bluetooth/IBluetoothMap.aidl @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; + +/** + * System private API for Bluetooth MAP service + * + * {@hide} + */ +interface IBluetoothMap { + int getState(); + BluetoothDevice getClient(); + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + boolean isConnected(in BluetoothDevice device); + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); + boolean setPriority(in BluetoothDevice device, int priority); + int getPriority(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothMapClient.aidl b/binder/android/bluetooth/IBluetoothMapClient.aidl new file mode 100644 index 000000000..df45af91c --- /dev/null +++ b/binder/android/bluetooth/IBluetoothMapClient.aidl @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.app.PendingIntent; +import android.bluetooth.BluetoothDevice; +import android.net.Uri; + +/** + * System private API for Bluetooth MAP MCE service + * + * {@hide} + */ +interface IBluetoothMapClient { + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + boolean isConnected(in BluetoothDevice device); + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); + boolean setPriority(in BluetoothDevice device,in int priority); + int getPriority(in BluetoothDevice device); + boolean sendMessage(in BluetoothDevice device, in Uri[] contacts, in String message, + in PendingIntent sentIntent, in PendingIntent deliveryIntent); + boolean getUnreadMessages(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothPan.aidl b/binder/android/bluetooth/IBluetoothPan.aidl new file mode 100644 index 000000000..5a3234777 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothPan.aidl @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; + +/** + * API for Bluetooth Pan service + * + * {@hide} + */ +interface IBluetoothPan { + // Public API + boolean isTetheringOn(); + void setBluetoothTethering(boolean value); + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothPbap.aidl b/binder/android/bluetooth/IBluetoothPbap.aidl new file mode 100644 index 000000000..7cc77d110 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothPbap.aidl @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; + +/** + * System private API for Bluetooth pbap service + * + * {@hide} + */ +interface IBluetoothPbap { + int getState(); + BluetoothDevice getClient(); + boolean connect(in BluetoothDevice device); + void disconnect(); + boolean isConnected(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothPbapClient.aidl b/binder/android/bluetooth/IBluetoothPbapClient.aidl new file mode 100644 index 000000000..6d4c5a6f9 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothPbapClient.aidl @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; + +/** + * API for Bluetooth Phone Book Access Provile Client Side + * + * {@hide} + */ +interface IBluetoothPbapClient { + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); + boolean setPriority(in BluetoothDevice device, int priority); + int getPriority(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothProfileServiceConnection.aidl b/binder/android/bluetooth/IBluetoothProfileServiceConnection.aidl new file mode 100755 index 000000000..96c59e239 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothProfileServiceConnection.aidl @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.content.ComponentName; +import android.os.IBinder; + +/** + * Callback for bluetooth profile connections. + * + * {@hide} + */ +interface IBluetoothProfileServiceConnection { + void onServiceConnected(in ComponentName comp, in IBinder service); + void onServiceDisconnected(in ComponentName comp); +} diff --git a/binder/android/bluetooth/IBluetoothSap.aidl b/binder/android/bluetooth/IBluetoothSap.aidl new file mode 100644 index 000000000..897063946 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothSap.aidl @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.bluetooth.BluetoothDevice; + +/** + * System private API for Bluetooth SAP service + * + * {@hide} + */ +interface IBluetoothSap { + int getState(); + BluetoothDevice getClient(); + boolean connect(in BluetoothDevice device); + boolean disconnect(in BluetoothDevice device); + boolean isConnected(in BluetoothDevice device); + List getConnectedDevices(); + List getDevicesMatchingConnectionStates(in int[] states); + int getConnectionState(in BluetoothDevice device); + boolean setPriority(in BluetoothDevice device, int priority); + int getPriority(in BluetoothDevice device); +} diff --git a/binder/android/bluetooth/IBluetoothStateChangeCallback.aidl b/binder/android/bluetooth/IBluetoothStateChangeCallback.aidl new file mode 100644 index 000000000..0da4e8843 --- /dev/null +++ b/binder/android/bluetooth/IBluetoothStateChangeCallback.aidl @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2011, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +/** + * System private API for Bluetooth state change callback. + * + * {@hide} + */ +oneway interface IBluetoothStateChangeCallback +{ + void onBluetoothStateChange(boolean on); +} diff --git a/binder/android/bluetooth/OobData.aidl b/binder/android/bluetooth/OobData.aidl new file mode 100644 index 000000000..d831c6477 --- /dev/null +++ b/binder/android/bluetooth/OobData.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +parcelable OobData; diff --git a/binder/android/bluetooth/le/AdvertiseData.aidl b/binder/android/bluetooth/le/AdvertiseData.aidl new file mode 100644 index 000000000..bcbf2243e --- /dev/null +++ b/binder/android/bluetooth/le/AdvertiseData.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth.le; + +parcelable AdvertiseData; diff --git a/binder/android/bluetooth/le/AdvertiseSettings.aidl b/binder/android/bluetooth/le/AdvertiseSettings.aidl new file mode 100644 index 000000000..9f47d74ca --- /dev/null +++ b/binder/android/bluetooth/le/AdvertiseSettings.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth.le; + +parcelable AdvertiseSettings; \ No newline at end of file diff --git a/binder/android/bluetooth/le/AdvertisingSetParameters.aidl b/binder/android/bluetooth/le/AdvertisingSetParameters.aidl new file mode 100644 index 000000000..39034a001 --- /dev/null +++ b/binder/android/bluetooth/le/AdvertisingSetParameters.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth.le; + +parcelable AdvertisingSetParameters; diff --git a/binder/android/bluetooth/le/IAdvertisingSetCallback.aidl b/binder/android/bluetooth/le/IAdvertisingSetCallback.aidl new file mode 100644 index 000000000..3628c775b --- /dev/null +++ b/binder/android/bluetooth/le/IAdvertisingSetCallback.aidl @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.bluetooth.le; + +/** + * Callback definitions for interacting with Advertiser + * @hide + */ +oneway interface IAdvertisingSetCallback { + void onAdvertisingSetStarted(in int advertiserId, in int tx_power, in int status); + void onOwnAddressRead(in int advertiserId, in int addressType, in String address); + void onAdvertisingSetStopped(in int advertiserId); + void onAdvertisingEnabled(in int advertiserId, in boolean enable, in int status); + void onAdvertisingDataSet(in int advertiserId, in int status); + void onScanResponseDataSet(in int advertiserId, in int status); + void onAdvertisingParametersUpdated(in int advertiserId, in int tx_power, in int status); + void onPeriodicAdvertisingParametersUpdated(in int advertiserId, in int status); + void onPeriodicAdvertisingDataSet(in int advertiserId, in int status); + void onPeriodicAdvertisingEnabled(in int advertiserId, in boolean enable, in int status); +} diff --git a/binder/android/bluetooth/le/IPeriodicAdvertisingCallback.aidl b/binder/android/bluetooth/le/IPeriodicAdvertisingCallback.aidl new file mode 100644 index 000000000..a76c54d4a --- /dev/null +++ b/binder/android/bluetooth/le/IPeriodicAdvertisingCallback.aidl @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.bluetooth.le; + +import android.bluetooth.BluetoothDevice; +import android.bluetooth.le.PeriodicAdvertisingReport; + +/** + * Callback definitions for interacting with Periodic Advertising + * @hide + */ +oneway interface IPeriodicAdvertisingCallback { + + void onSyncEstablished(in int syncHandle, in BluetoothDevice device, in int advertisingSid, + in int skip, in int timeout, in int status); + void onPeriodicAdvertisingReport(in PeriodicAdvertisingReport report); + void onSyncLost(in int syncHandle); +} diff --git a/binder/android/bluetooth/le/IScannerCallback.aidl b/binder/android/bluetooth/le/IScannerCallback.aidl new file mode 100644 index 000000000..8cbbaef41 --- /dev/null +++ b/binder/android/bluetooth/le/IScannerCallback.aidl @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.bluetooth.le; + +import android.bluetooth.le.ScanResult; + +/** + * Callback definitions for interacting with Advertiser + * @hide + */ +oneway interface IScannerCallback { + void onScannerRegistered(in int status, in int scannerId); + + void onScanResult(in ScanResult scanResult); + void onBatchScanResults(in List batchResults); + void onFoundOrLost(in boolean onFound, in ScanResult scanResult); + void onScanManagerErrorCallback(in int errorCode); +} diff --git a/binder/android/bluetooth/le/PeriodicAdvertisingParameters.aidl b/binder/android/bluetooth/le/PeriodicAdvertisingParameters.aidl new file mode 100644 index 000000000..f4bea22a1 --- /dev/null +++ b/binder/android/bluetooth/le/PeriodicAdvertisingParameters.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth.le; + +parcelable PeriodicAdvertisingParameters; diff --git a/binder/android/bluetooth/le/PeriodicAdvertisingReport.aidl b/binder/android/bluetooth/le/PeriodicAdvertisingReport.aidl new file mode 100644 index 000000000..547d09611 --- /dev/null +++ b/binder/android/bluetooth/le/PeriodicAdvertisingReport.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth.le; + +parcelable PeriodicAdvertisingReport; diff --git a/binder/android/bluetooth/le/ResultStorageDescriptor.aidl b/binder/android/bluetooth/le/ResultStorageDescriptor.aidl new file mode 100644 index 000000000..f218a01a5 --- /dev/null +++ b/binder/android/bluetooth/le/ResultStorageDescriptor.aidl @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth.le; + +/** + * {@hide} + */ + +parcelable ResultStorageDescriptor; diff --git a/binder/android/bluetooth/le/ScanFilter.aidl b/binder/android/bluetooth/le/ScanFilter.aidl new file mode 100644 index 000000000..4cecfe62e --- /dev/null +++ b/binder/android/bluetooth/le/ScanFilter.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth.le; + +parcelable ScanFilter; diff --git a/binder/android/bluetooth/le/ScanResult.aidl b/binder/android/bluetooth/le/ScanResult.aidl new file mode 100644 index 000000000..39430350d --- /dev/null +++ b/binder/android/bluetooth/le/ScanResult.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth.le; + +parcelable ScanResult; \ No newline at end of file diff --git a/binder/android/bluetooth/le/ScanSettings.aidl b/binder/android/bluetooth/le/ScanSettings.aidl new file mode 100644 index 000000000..eb169c120 --- /dev/null +++ b/binder/android/bluetooth/le/ScanSettings.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth.le; + +parcelable ScanSettings; -- 2.11.0