Package ipfs.gomobile.android.bledriver
Class GattServerCallback
- java.lang.Object
-
- android.bluetooth.BluetoothGattServerCallback
-
- ipfs.gomobile.android.bledriver.GattServerCallback
-
public class GattServerCallback extends android.bluetooth.BluetoothGattServerCallback
-
-
Constructor Summary
Constructors Constructor Description GattServerCallback(android.content.Context context, BleDriver bleDriver, Logger logger, GattServer gattServer, java.util.concurrent.CountDownLatch doneSignal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonCharacteristicReadRequest(android.bluetooth.BluetoothDevice device, int requestId, int offset, android.bluetooth.BluetoothGattCharacteristic characteristic)voidonCharacteristicWriteRequest(android.bluetooth.BluetoothDevice device, int requestId, android.bluetooth.BluetoothGattCharacteristic characteristic, boolean prepareWrite, boolean responseNeeded, int offset, byte[] value)voidonConnectionStateChange(android.bluetooth.BluetoothDevice device, int status, int newState)voidonDescriptorReadRequest(android.bluetooth.BluetoothDevice device, int requestId, int offset, android.bluetooth.BluetoothGattDescriptor descriptor)voidonDescriptorWriteRequest(android.bluetooth.BluetoothDevice device, int requestId, android.bluetooth.BluetoothGattDescriptor descriptor, boolean preparedWrite, boolean responseNeeded, int offset, byte[] value)voidonExecuteWrite(android.bluetooth.BluetoothDevice device, int requestId, boolean execute)voidonMtuChanged(android.bluetooth.BluetoothDevice device, int mtu)voidonNotificationSent(android.bluetooth.BluetoothDevice device, int status)voidonServiceAdded(int status, android.bluetooth.BluetoothGattService service)voidsetLocalPID(java.lang.String peerID)
-
-
-
Constructor Detail
-
GattServerCallback
public GattServerCallback(android.content.Context context, BleDriver bleDriver, Logger logger, GattServer gattServer, java.util.concurrent.CountDownLatch doneSignal)
-
-
Method Detail
-
setLocalPID
public void setLocalPID(java.lang.String peerID)
-
onServiceAdded
public void onServiceAdded(int status, android.bluetooth.BluetoothGattService service)- Overrides:
onServiceAddedin classandroid.bluetooth.BluetoothGattServerCallback
-
onConnectionStateChange
public void onConnectionStateChange(android.bluetooth.BluetoothDevice device, int status, int newState)- Overrides:
onConnectionStateChangein classandroid.bluetooth.BluetoothGattServerCallback
-
onDescriptorReadRequest
public void onDescriptorReadRequest(android.bluetooth.BluetoothDevice device, int requestId, int offset, android.bluetooth.BluetoothGattDescriptor descriptor)- Overrides:
onDescriptorReadRequestin classandroid.bluetooth.BluetoothGattServerCallback
-
onDescriptorWriteRequest
public void onDescriptorWriteRequest(android.bluetooth.BluetoothDevice device, int requestId, android.bluetooth.BluetoothGattDescriptor descriptor, boolean preparedWrite, boolean responseNeeded, int offset, byte[] value)- Overrides:
onDescriptorWriteRequestin classandroid.bluetooth.BluetoothGattServerCallback
-
onCharacteristicReadRequest
public void onCharacteristicReadRequest(android.bluetooth.BluetoothDevice device, int requestId, int offset, android.bluetooth.BluetoothGattCharacteristic characteristic)- Overrides:
onCharacteristicReadRequestin classandroid.bluetooth.BluetoothGattServerCallback
-
onCharacteristicWriteRequest
public void onCharacteristicWriteRequest(android.bluetooth.BluetoothDevice device, int requestId, android.bluetooth.BluetoothGattCharacteristic characteristic, boolean prepareWrite, boolean responseNeeded, int offset, byte[] value)- Overrides:
onCharacteristicWriteRequestin classandroid.bluetooth.BluetoothGattServerCallback
-
onExecuteWrite
public void onExecuteWrite(android.bluetooth.BluetoothDevice device, int requestId, boolean execute)- Overrides:
onExecuteWritein classandroid.bluetooth.BluetoothGattServerCallback
-
onMtuChanged
public void onMtuChanged(android.bluetooth.BluetoothDevice device, int mtu)- Overrides:
onMtuChangedin classandroid.bluetooth.BluetoothGattServerCallback
-
onNotificationSent
public void onNotificationSent(android.bluetooth.BluetoothDevice device, int status)- Overrides:
onNotificationSentin classandroid.bluetooth.BluetoothGattServerCallback
-
-