blob: 1a924fb4e315836d7e5cf48a4e0973acf0a52251 [file] [log] [blame]
Ganesh Ganapathi Batta99081122013-02-05 15:28:33 -08001/*
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
Jakub Pawlowskid75f5122016-04-01 07:51:45 -070018import android.bluetooth.BluetoothGattService;
Ganesh Ganapathi Batta99081122013-02-05 15:28:33 -080019
20/**
21 * Callback definitions for interacting with BLE / GATT
22 * @hide
23 */
Andre Eisenbachdadefda2014-03-28 14:54:53 -070024oneway interface IBluetoothGattServerCallback {
Ganesh Ganapathi Batta99081122013-02-05 15:28:33 -080025 void onServerRegistered(in int status, in int serverIf);
Ganesh Ganapathi Batta99081122013-02-05 15:28:33 -080026 void onServerConnectionState(in int status, in int serverIf,
27 in boolean connected, in String address);
Jakub Pawlowskid75f5122016-04-01 07:51:45 -070028 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 Batta99081122013-02-05 15:28:33 -080031 void onDescriptorReadRequest(in String address, in int transId,
32 in int offset, in boolean isLong,
Jakub Pawlowskid75f5122016-04-01 07:51:45 -070033 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 Batta99081122013-02-05 15:28:33 -080040 void onExecuteWrite(in String address, in int transId, in boolean execWrite);
Andre Eisenbachdadefda2014-03-28 14:54:53 -070041 void onNotificationSent(in String address, in int status);
Andre Eisenbach16bf8462014-11-18 11:34:26 -080042 void onMtuChanged(in String address, in int mtu);
Ganesh Ganapathi Batta99081122013-02-05 15:28:33 -080043}