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 */ 16 package android.bluetooth; 17 18 import android.os.ParcelUuid; 19 20 21 /** 22 * Callback definitions for interacting with BLE / GATT 23 * @hide 24 */ 25 oneway interface IBluetoothGattServerCallback { onServerRegistered(in int status, in int serverIf)26 void onServerRegistered(in int status, in int serverIf); onScanResult(in String address, in int rssi, in byte[] advData)27 void onScanResult(in String address, in int rssi, in byte[] advData); onServerConnectionState(in int status, in int serverIf, in boolean connected, in String address)28 void onServerConnectionState(in int status, in int serverIf, 29 in boolean connected, in String address); onServiceAdded(in int status, in int srvcType, in int srvcInstId, in ParcelUuid srvcId)30 void onServiceAdded(in int status, in int srvcType, 31 in int srvcInstId, in ParcelUuid srvcId); onCharacteristicReadRequest(in String address, in int transId, in int offset, in boolean isLong, in int srvcType, in int srvcInstId, in ParcelUuid srvcId, in int charInstId, in ParcelUuid charId)32 void onCharacteristicReadRequest(in String address, in int transId, 33 in int offset, in boolean isLong, 34 in int srvcType, 35 in int srvcInstId, in ParcelUuid srvcId, 36 in int charInstId, in ParcelUuid charId); onDescriptorReadRequest(in String address, in int transId, in int offset, in boolean isLong, in int srvcType, in int srvcInstId, in ParcelUuid srvcId, in int charInstId, in ParcelUuid charId, in ParcelUuid descrId)37 void onDescriptorReadRequest(in String address, in int transId, 38 in int offset, in boolean isLong, 39 in int srvcType, 40 in int srvcInstId, in ParcelUuid srvcId, 41 in int charInstId, in ParcelUuid charId, 42 in ParcelUuid descrId); onCharacteristicWriteRequest(in String address, in int transId, in int offset, in int length, in boolean isPrep, in boolean needRsp, in int srvcType, in int srvcInstId, in ParcelUuid srvcId, in int charInstId, in ParcelUuid charId, in byte[] value)43 void onCharacteristicWriteRequest(in String address, in int transId, 44 in int offset, in int length, 45 in boolean isPrep, 46 in boolean needRsp, 47 in int srvcType, 48 in int srvcInstId, in ParcelUuid srvcId, 49 in int charInstId, in ParcelUuid charId, 50 in byte[] value); onDescriptorWriteRequest(in String address, in int transId, in int offset, in int length, in boolean isPrep, in boolean needRsp, in int srvcType, in int srvcInstId, in ParcelUuid srvcId, in int charInstId, in ParcelUuid charId, in ParcelUuid descrId, in byte[] value)51 void onDescriptorWriteRequest(in String address, in int transId, 52 in int offset, in int length, 53 in boolean isPrep, 54 in boolean needRsp, 55 in int srvcType, 56 in int srvcInstId, in ParcelUuid srvcId, 57 in int charInstId, in ParcelUuid charId, 58 in ParcelUuid descrId, 59 in byte[] value); onExecuteWrite(in String address, in int transId, in boolean execWrite)60 void onExecuteWrite(in String address, in int transId, in boolean execWrite); onNotificationSent(in String address, in int status)61 void onNotificationSent(in String address, in int status); onMtuChanged(in String address, in int mtu)62 void onMtuChanged(in String address, in int mtu); 63 } 64