Arman Uguray | f6fc0c4 | 2015-10-06 18:10:15 -0700 | [diff] [blame] | 1 | /* |
Jakub Pawlowski | 5b790fe | 2017-09-18 09:00:20 -0700 | [diff] [blame] | 2 | * Copyright 2015, The Android Open Source Project |
Arman Uguray | f6fc0c4 | 2015-10-06 18:10:15 -0700 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /** |
| 18 | * Binder IPC interface for receiving callbacks related to Bluetooth Low Energy |
| 19 | * operations. |
| 20 | */ |
| 21 | oneway interface IBluetoothLowEnergyCallback { |
| 22 | /** |
| 23 | * Called to report the result of a call to |
Arman Uguray | ff1469f | 2015-10-13 09:04:44 -0700 | [diff] [blame] | 24 | * IBluetoothLowEnergy.registerClient. |status| will be BLE_STATUS_SUCCESS (0) |
| 25 | * if the client was successfully registered. |client_if| is the owning |
| 26 | * application's unique Low Energy client handle and can be used |
Arman Uguray | f6fc0c4 | 2015-10-06 18:10:15 -0700 | [diff] [blame] | 27 | * to perform further operations on the IBluetoothLowEnergy interface. |
| 28 | */ |
| 29 | void onClientRegistered(in int status, in int client_if); |
| 30 | |
Jakub Pawlowski | 455dc8f | 2016-01-19 17:00:16 -0800 | [diff] [blame] | 31 | /* Called asynchronously to notify the delegate of connection state change. |
| 32 | */ |
| 33 | void OnConnectionState(in int status, in int client_id, in const char* address, |
| 34 | in bool connected); |
| 35 | |
Jakub Pawlowski | a655107 | 2016-01-26 12:58:47 -0800 | [diff] [blame] | 36 | /* Called to report current MTU value. Can be a result of calling |
| 37 | * IBluetoothLowEnergy.setMtu or remote device trying to change MTU. |
| 38 | */ |
| 39 | void OnMtuChanged(in int status, in const char* address, in int mtu); |
| 40 | |
Arman Uguray | f6fc0c4 | 2015-10-06 18:10:15 -0700 | [diff] [blame] | 41 | /** |
Arman Uguray | 45480a0 | 2015-12-02 17:39:14 -0800 | [diff] [blame] | 42 | * Called to report BLE device scan results once a scan session is started for |
| 43 | * this client using IBluetoothLowEnergy.startScan. |scan_result| contains all |
| 44 | * the data related to the discovered BLE device. |
| 45 | */ |
| 46 | void onScanResult(in ScanResult scan_result); |
| 47 | |
| 48 | /** |
Arman Uguray | f6fc0c4 | 2015-10-06 18:10:15 -0700 | [diff] [blame] | 49 | * Called to report the result of a call to |
| 50 | * IBluetoothLowEnergy.startMultiAdvertising or stopMultiAdvertising. |
| 51 | */ |
| 52 | void onMultiAdvertiseCallback(in int status, in boolean is_start, |
| 53 | in AdvertiseSettings settings); |
| 54 | } |