blob: 7867379ca382607c70446c73d854ce7afcf52817 [file] [log] [blame]
Arman Ugurayf6fc0c42015-10-06 18:10:15 -07001/*
Jakub Pawlowski5b790fe2017-09-18 09:00:20 -07002 * Copyright 2015, The Android Open Source Project
Arman Ugurayf6fc0c42015-10-06 18:10:15 -07003 *
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 */
21oneway interface IBluetoothLowEnergyCallback {
22 /**
23 * Called to report the result of a call to
Arman Ugurayff1469f2015-10-13 09:04:44 -070024 * 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 Ugurayf6fc0c42015-10-06 18:10:15 -070027 * to perform further operations on the IBluetoothLowEnergy interface.
28 */
29 void onClientRegistered(in int status, in int client_if);
30
Jakub Pawlowski455dc8f2016-01-19 17:00:16 -080031 /* 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 Pawlowskia6551072016-01-26 12:58:47 -080036 /* 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 Ugurayf6fc0c42015-10-06 18:10:15 -070041 /**
Arman Uguray45480a02015-12-02 17:39:14 -080042 * 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 Ugurayf6fc0c42015-10-06 18:10:15 -070049 * 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}