1 /*
2  * Copyright 2013 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package android.bluetooth;
17 
18 import android.os.ParcelUuid;
19 import android.bluetooth.BluetoothGattService;
20 
21 /**
22  * Callback definitions for interacting with BLE / GATT
23  * @hide
24  */
25 oneway interface IBluetoothGattCallback {
onClientRegistered(in int status, in int clientIf)26     void onClientRegistered(in int status, in int clientIf);
onClientConnectionState(in int status, in int clientIf, in boolean connected, in String address)27     void onClientConnectionState(in int status, in int clientIf,
28                                  in boolean connected, in String address);
onPhyUpdate(in String address, in int txPhy, in int rxPhy, in int status)29     void onPhyUpdate(in String address, in int txPhy, in int rxPhy, in int status);
onPhyRead(in String address, in int txPhy, in int rxPhy, in int status)30     void onPhyRead(in String address, in int txPhy, in int rxPhy, in int status);
onSearchComplete(in String address, in List<BluetoothGattService> services, in int status)31     void onSearchComplete(in String address, in List<BluetoothGattService> services, in int status);
onCharacteristicRead(in String address, in int status, in int handle, in byte[] value)32     void onCharacteristicRead(in String address, in int status, in int handle, in byte[] value);
onCharacteristicWrite(in String address, in int status, in int handle)33     void onCharacteristicWrite(in String address, in int status, in int handle);
onExecuteWrite(in String address, in int status)34     void onExecuteWrite(in String address, in int status);
onDescriptorRead(in String address, in int status, in int handle, in byte[] value)35     void onDescriptorRead(in String address, in int status, in int handle, in byte[] value);
onDescriptorWrite(in String address, in int status, in int handle)36     void onDescriptorWrite(in String address, in int status, in int handle);
onNotify(in String address, in int handle, in byte[] value)37     void onNotify(in String address, in int handle, in byte[] value);
onReadRemoteRssi(in String address, in int rssi, in int status)38     void onReadRemoteRssi(in String address, in int rssi, in int status);
onConfigureMTU(in String address, in int mtu, in int status)39     void onConfigureMTU(in String address, in int mtu, in int status);
onConnectionUpdated(in String address, in int interval, in int latency, in int timeout, in int status)40     void onConnectionUpdated(in String address, in int interval, in int latency,
41                              in int timeout, in int status);
42 }
43