ServerGattEvent

sealed interface ServerGattEvent

An event class which maps BluetoothGattServerCallback callbacks into data classes.

See also

(https://developer.android.com/reference/android/bluetooth/BluetoothGattServerCallback)

Inheritors

Types

Link copied to clipboard

Interface grouping events related to characteristics.

Link copied to clipboard
data class CharacteristicReadRequest(val device: ClientDevice, val requestId: Int, val offset: Int, val characteristic: IBluetoothGattCharacteristic) : ServerGattEvent.CharacteristicEvent

A remote client has requested to read a local characteristic.

Link copied to clipboard
data class CharacteristicWriteRequest(val device: ClientDevice, val requestId: Int, val characteristic: IBluetoothGattCharacteristic, val preparedWrite: Boolean, val responseNeeded: Boolean, val offset: Int, val value: DataByteArray) : ServerGattEvent.CharacteristicEvent

A remote client has requested to write to a local characteristic.

Link copied to clipboard

Event indicating when a remote device has been connected or disconnected.

Link copied to clipboard

Interface grouping events related to descriptors.

Link copied to clipboard
data class DescriptorReadRequest(val device: ClientDevice, val requestId: Int, val offset: Int, val descriptor: IBluetoothGattDescriptor) : ServerGattEvent.DescriptorEvent

A remote client has requested to read a local descriptor.

Link copied to clipboard
data class DescriptorWriteRequest(val device: ClientDevice, val requestId: Int, val descriptor: IBluetoothGattDescriptor, val preparedWrite: Boolean, val responseNeeded: Boolean, val offset: Int, val value: DataByteArray) : ServerGattEvent.DescriptorEvent

A remote client has requested to write to a local descriptor.

Link copied to clipboard
data class ExecuteWrite(val device: ClientDevice, val requestId: Int, val execute: Boolean) : ServerGattEvent.ServiceEvent

Execute all pending write operations for this device.

Link copied to clipboard

Interface grouping events related to a specific client device.

Link copied to clipboard

Event emitted when a notification or indication has been sent to a remote device.

Link copied to clipboard

Event indicating the MTU for a given device connection has changed. This callback will be invoked if a remote client has requested to change the MTU for a given connection.

Link copied to clipboard

Event triggered as result of GattServerAPI.readPhy.

Link copied to clipboard

Event triggered as result of BluetoothGattServer#setPreferredPhy, or as a result of remote device changing the PHY.

Link copied to clipboard

Indicates whether a local service has been added successfully.

Link copied to clipboard

Interface grouping events related to services.