public class DfuControllerImpl extends java.lang.Object implements DfuController
WriteListener.WriteResponse
NOOP_LISTENER
NOOP_LISTENER
NOOP_LISTENER
Modifier and Type | Method and Description |
---|---|
void |
close() |
static DfuControllerImpl |
create(byte[] firmwareFile,
Firmware firmware,
GattController gattController,
KontaktDeviceServiceStore serviceStore,
IFirmwareFilesManager firmwareFilesManager,
DfuAuthorizationService authorizationService) |
void |
initialize() |
void |
onCharacteristicChanged(android.bluetooth.BluetoothGattCharacteristic characteristic) |
void |
onDescriptorWriteFailure(android.bluetooth.BluetoothGattDescriptor descriptor) |
void |
onDescriptorWriteSuccess(android.bluetooth.BluetoothGattDescriptor descriptor) |
void |
onWriteFailure(ErrorCause cause)
Invoked when characteristics manipulation failed.
|
void |
onWriteSuccess(WriteListener.WriteResponse response)
Invoked when characteristic manipulation succeed.
|
void |
setFirmwareUpdateListener(FirmwareUpdateListener listener) |
public static DfuControllerImpl create(byte[] firmwareFile, Firmware firmware, GattController gattController, KontaktDeviceServiceStore serviceStore, IFirmwareFilesManager firmwareFilesManager, DfuAuthorizationService authorizationService)
public void setFirmwareUpdateListener(FirmwareUpdateListener listener)
setFirmwareUpdateListener
in interface DfuController
public void initialize()
initialize
in interface DfuController
public void onCharacteristicChanged(android.bluetooth.BluetoothGattCharacteristic characteristic)
onCharacteristicChanged
in interface ChangeCharacteristicListener
public void onWriteSuccess(WriteListener.WriteResponse response)
WriteListener
WriteListener.WriteResponse
responseonWriteSuccess
in interface WriteListener
response
- from device, might be nullpublic void onWriteFailure(ErrorCause cause)
WriteListener
onWriteFailure
in interface WriteListener
cause
- ErrorCause
public void onDescriptorWriteSuccess(android.bluetooth.BluetoothGattDescriptor descriptor)
onDescriptorWriteSuccess
in interface WriteDescriptorListener
public void onDescriptorWriteFailure(android.bluetooth.BluetoothGattDescriptor descriptor)
onDescriptorWriteFailure
in interface WriteDescriptorListener
public void close()
close
in interface DfuController