Ganesh Ganapathi Batta | 9908112 | 2013-02-05 15:28:33 -0800 | [diff] [blame] | 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 | */ |
Andre Eisenbach | dadefda | 2014-03-28 14:54:53 -0700 | [diff] [blame] | 25 | oneway interface IBluetoothGattServerCallback { |
Ganesh Ganapathi Batta | 9908112 | 2013-02-05 15:28:33 -0800 | [diff] [blame] | 26 | void onServerRegistered(in int status, in int serverIf); |
| 27 | void onScanResult(in String address, in int rssi, in byte[] advData); |
| 28 | void onServerConnectionState(in int status, in int serverIf, |
| 29 | in boolean connected, in String address); |
| 30 | void onServiceAdded(in int status, in int srvcType, |
| 31 | in int srvcInstId, in ParcelUuid srvcId); |
| 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); |
| 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); |
| 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); |
| 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); |
| 60 | void onExecuteWrite(in String address, in int transId, in boolean execWrite); |
Andre Eisenbach | dadefda | 2014-03-28 14:54:53 -0700 | [diff] [blame] | 61 | void onNotificationSent(in String address, in int status); |
Andre Eisenbach | 16bf846 | 2014-11-18 11:34:26 -0800 | [diff] [blame] | 62 | void onMtuChanged(in String address, in int mtu); |
Ganesh Ganapathi Batta | 9908112 | 2013-02-05 15:28:33 -0800 | [diff] [blame] | 63 | } |