1/* 2 * Copyright (C) 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 */ 16package android.bluetooth; 17 18import android.os.ParcelUuid; 19import android.bluetooth.BluetoothGattService; 20import android.bluetooth.le.AdvertiseSettings; 21import android.bluetooth.le.ScanResult; 22 23/** 24 * Callback definitions for interacting with BLE / GATT 25 * @hide 26 */ 27oneway interface IBluetoothGattCallback { 28 void onClientRegistered(in int status, in int clientIf); 29 void onClientConnectionState(in int status, in int clientIf, 30 in boolean connected, in String address); 31 void onScanResult(in ScanResult scanResult); 32 void onBatchScanResults(in List<ScanResult> batchResults); 33 void onSearchComplete(in String address, in List<BluetoothGattService> services, in int status); 34 void onCharacteristicRead(in String address, in int status, in int handle, in byte[] value); 35 void onCharacteristicWrite(in String address, in int status, in int handle); 36 void onExecuteWrite(in String address, in int status); 37 void onDescriptorRead(in String address, in int status, in int handle, in byte[] value); 38 void onDescriptorWrite(in String address, in int status, in int handle); 39 void onNotify(in String address, in int handle, in byte[] value); 40 void onReadRemoteRssi(in String address, in int rssi, in int status); 41 void onMultiAdvertiseCallback(in int status, boolean isStart, 42 in AdvertiseSettings advertiseSettings); 43 void onScanManagerErrorCallback(in int errorCode); 44 void onConfigureMTU(in String address, in int mtu, in int status); 45 void onFoundOrLost(in boolean onFound, in ScanResult scanResult); 46} 47