• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 interface IBluetoothGattCallback {
onClientRegistered(in int status, in int clientIf)26     void onClientRegistered(in int status, in int clientIf);
onClientConnectionState(in int status, in int clientIf, in boolean connected, in String address)27     void onClientConnectionState(in int status, in int clientIf,
28                                  in boolean connected, in String address);
onScanResult(in String address, in int rssi, in byte[] advData)29     void onScanResult(in String address, in int rssi, in byte[] advData);
onGetService(in String address, in int srvcType, in int srvcInstId, in ParcelUuid srvcUuid)30     void onGetService(in String address, in int srvcType, in int srvcInstId,
31                       in ParcelUuid srvcUuid);
onGetIncludedService(in String address, in int srvcType, in int srvcInstId, in ParcelUuid srvcUuid, in int inclSrvcType, in int inclSrvcInstId, in ParcelUuid inclSrvcUuid)32     void onGetIncludedService(in String address, in int srvcType, in int srvcInstId,
33                               in ParcelUuid srvcUuid, in int inclSrvcType,
34                               in int inclSrvcInstId, in ParcelUuid inclSrvcUuid);
onGetCharacteristic(in String address, in int srvcType, in int srvcInstId, in ParcelUuid srvcUuid, in int charInstId, in ParcelUuid charUuid, in int charProps)35     void onGetCharacteristic(in String address, in int srvcType,
36                              in int srvcInstId, in ParcelUuid srvcUuid,
37                              in int charInstId, in ParcelUuid charUuid,
38                              in int charProps);
onGetDescriptor(in String address, in int srvcType, in int srvcInstId, in ParcelUuid srvcUuid, in int charInstId, in ParcelUuid charUuid, in ParcelUuid descrUuid)39     void onGetDescriptor(in String address, in int srvcType,
40                              in int srvcInstId, in ParcelUuid srvcUuid,
41                              in int charInstId, in ParcelUuid charUuid,
42                              in ParcelUuid descrUuid);
onSearchComplete(in String address, in int status)43     void onSearchComplete(in String address, in int status);
onCharacteristicRead(in String address, in int status, in int srvcType, in int srvcInstId, in ParcelUuid srvcUuid, in int charInstId, in ParcelUuid charUuid, in byte[] value)44     void onCharacteristicRead(in String address, in int status, in int srvcType,
45                              in int srvcInstId, in ParcelUuid srvcUuid,
46                              in int charInstId, in ParcelUuid charUuid,
47                              in byte[] value);
onCharacteristicWrite(in String address, in int status, in int srvcType, in int srvcInstId, in ParcelUuid srvcUuid, in int charInstId, in ParcelUuid charUuid)48     void onCharacteristicWrite(in String address, in int status, in int srvcType,
49                              in int srvcInstId, in ParcelUuid srvcUuid,
50                              in int charInstId, in ParcelUuid charUuid);
onExecuteWrite(in String address, in int status)51     void onExecuteWrite(in String address, in int status);
onDescriptorRead(in String address, in int status, in int srvcType, in int srvcInstId, in ParcelUuid srvcUuid, in int charInstId, in ParcelUuid charUuid, in ParcelUuid descrUuid, in byte[] value)52     void onDescriptorRead(in String address, in int status, in int srvcType,
53                              in int srvcInstId, in ParcelUuid srvcUuid,
54                              in int charInstId, in ParcelUuid charUuid,
55                              in ParcelUuid descrUuid, in byte[] value);
onDescriptorWrite(in String address, in int status, in int srvcType, in int srvcInstId, in ParcelUuid srvcUuid, in int charInstId, in ParcelUuid charUuid, in ParcelUuid descrUuid)56     void onDescriptorWrite(in String address, in int status, in int srvcType,
57                              in int srvcInstId, in ParcelUuid srvcUuid,
58                              in int charInstId, in ParcelUuid charUuid,
59                              in ParcelUuid descrUuid);
onNotify(in String address, in int srvcType, in int srvcInstId, in ParcelUuid srvcUuid, in int charInstId, in ParcelUuid charUuid, in byte[] value)60     void onNotify(in String address, in int srvcType,
61                              in int srvcInstId, in ParcelUuid srvcUuid,
62                              in int charInstId, in ParcelUuid charUuid,
63                              in byte[] value);
onReadRemoteRssi(in String address, in int rssi, in int status)64     void onReadRemoteRssi(in String address, in int rssi, in int status);
65 }
66