Home | History | Annotate | Download | only in bluetooth
      1 /*
      2  * Copyright (C) 2017 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.bluetooth.BluetoothGattService;
     19 
     20 /**
     21  * Callback definitions for interacting with BLE / GATT
     22  * @hide
     23  */
     24 oneway interface IBluetoothGattServerCallback {
     25     void onServerRegistered(in int status, in int serverIf);
     26     void onServerConnectionState(in int status, in int serverIf,
     27                                  in boolean connected, in String address);
     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);
     31     void onDescriptorReadRequest(in String address, in int transId,
     32                                      in int offset, in boolean isLong,
     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);
     40     void onExecuteWrite(in String address, in int transId, in boolean execWrite);
     41     void onNotificationSent(in String address, in int status);
     42     void onMtuChanged(in String address, in int mtu);
     43     void onPhyUpdate(in String address, in int txPhy, in int rxPhy, in int status);
     44     void onPhyRead(in String address, in int txPhy, in int rxPhy, in int status);
     45     void onConnectionUpdated(in String address, in int interval, in int latency,
     46                              in int timeout, in int status);
     47 }
     48