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 | |
Jakub Pawlowski | d75f512 | 2016-04-01 07:51:45 -0700 | [diff] [blame] | 18 | import android.bluetooth.BluetoothGattService; |
Ganesh Ganapathi Batta | 9908112 | 2013-02-05 15:28:33 -0800 | [diff] [blame] | 19 | |
| 20 | /** |
| 21 | * Callback definitions for interacting with BLE / GATT |
| 22 | * @hide |
| 23 | */ |
Andre Eisenbach | dadefda | 2014-03-28 14:54:53 -0700 | [diff] [blame] | 24 | oneway interface IBluetoothGattServerCallback { |
Ganesh Ganapathi Batta | 9908112 | 2013-02-05 15:28:33 -0800 | [diff] [blame] | 25 | void onServerRegistered(in int status, in int serverIf); |
Ganesh Ganapathi Batta | 9908112 | 2013-02-05 15:28:33 -0800 | [diff] [blame] | 26 | void onServerConnectionState(in int status, in int serverIf, |
| 27 | in boolean connected, in String address); |
Jakub Pawlowski | d75f512 | 2016-04-01 07:51:45 -0700 | [diff] [blame] | 28 | void onServiceAdded(in int status, in BluetoothGattService service); |
| 29 | void onCharacteristicReadRequest(in String address, in int transId, in int offset, |
| 30 | in boolean isLong, in int handle); |
Ganesh Ganapathi Batta | 9908112 | 2013-02-05 15:28:33 -0800 | [diff] [blame] | 31 | void onDescriptorReadRequest(in String address, in int transId, |
| 32 | in int offset, in boolean isLong, |
Jakub Pawlowski | d75f512 | 2016-04-01 07:51:45 -0700 | [diff] [blame] | 33 | in int handle); |
| 34 | void onCharacteristicWriteRequest(in String address, in int transId, in int offset, |
| 35 | in int length, in boolean isPrep, in boolean needRsp, |
| 36 | in int handle, in byte[] value); |
| 37 | void onDescriptorWriteRequest(in String address, in int transId, in int offset, |
| 38 | in int length, in boolean isPrep, in boolean needRsp, |
| 39 | in int handle, in byte[] value); |
Ganesh Ganapathi Batta | 9908112 | 2013-02-05 15:28:33 -0800 | [diff] [blame] | 40 | void onExecuteWrite(in String address, in int transId, in boolean execWrite); |
Andre Eisenbach | dadefda | 2014-03-28 14:54:53 -0700 | [diff] [blame] | 41 | void onNotificationSent(in String address, in int status); |
Andre Eisenbach | 16bf846 | 2014-11-18 11:34:26 -0800 | [diff] [blame] | 42 | void onMtuChanged(in String address, in int mtu); |
Ganesh Ganapathi Batta | 9908112 | 2013-02-05 15:28:33 -0800 | [diff] [blame] | 43 | } |