aboutsummaryrefslogtreecommitdiff
path: root/bt/src/main/java/io/trygvis/android/bt/BtCallback.java
diff options
context:
space:
mode:
Diffstat (limited to 'bt/src/main/java/io/trygvis/android/bt/BtCallback.java')
-rw-r--r--bt/src/main/java/io/trygvis/android/bt/BtCallback.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/bt/src/main/java/io/trygvis/android/bt/BtCallback.java b/bt/src/main/java/io/trygvis/android/bt/BtCallback.java
new file mode 100644
index 0000000..4aa8529
--- /dev/null
+++ b/bt/src/main/java/io/trygvis/android/bt/BtCallback.java
@@ -0,0 +1,74 @@
+package io.trygvis.android.bt;
+
+import android.bluetooth.BluetoothGatt;
+import android.bluetooth.BluetoothGattCharacteristic;
+import android.bluetooth.BluetoothGattDescriptor;
+
+import static io.trygvis.android.bt.BtSequence.SequenceResult;
+import static io.trygvis.android.bt.BtSequencer.EventType;
+
+public class BtCallback {
+ public final boolean stopOnFailure;
+ public final EventType type;
+
+ public BtCallback(boolean stopOnFailure, EventType type) {
+ this.stopOnFailure = stopOnFailure;
+ this.type = type;
+ }
+
+ public SequenceResult onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
+ throw new NotOverriddenException();
+ }
+
+ public SequenceResult onServicesDiscovered(BluetoothGatt gatt) {
+ throw new NotOverriddenException();
+ }
+
+ public SequenceResult onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
+ throw new NotOverriddenException();
+ }
+
+ public SequenceResult onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
+ throw new NotOverriddenException();
+ }
+
+ public SequenceResult onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
+ throw new NotOverriddenException();
+ }
+
+ public SequenceResult onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor) {
+ throw new NotOverriddenException();
+ }
+
+ public SequenceResult onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor) {
+ throw new NotOverriddenException();
+ }
+
+ public SequenceResult onReliableWriteCompleted(BluetoothGatt gatt) {
+ throw new NotOverriddenException();
+ }
+
+ public SequenceResult onReadRemoteRssi(BluetoothGatt gatt, int rssi) {
+ throw new NotOverriddenException();
+ }
+
+ public SequenceResult onDirect(BluetoothGatt value) {
+ throw new NotOverriddenException();
+ }
+
+ public void onFailure() {
+ throw new NotOverriddenException();
+ }
+
+ public void onFinally(boolean success) {
+ throw new NotOverriddenException();
+ }
+
+ @Override
+ public String toString() {
+ return "BtCallback{" +
+ "type='" + type + '\'' +
+ ", stopOnFailure=" + stopOnFailure +
+ '}';
+ }
+}