You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make services direct references and match properties for I/O (#238)
Previously, all I/O operations would lazily search for the first match
when looking up characteristics or descriptors. This was problematic if
duplicate UUIDs existed. Discovered GATT profile items (services,
characteristics and descriptors) as provided via `Peripheral.services`
are now direct references to underlying platform types. This means they
no longer trigger lookups for I/O operations and specific GATT profile
items can be sought after and used.
When using `characteristicOf`, the properties of the characteristic are
now taken into account when searching for the underlying platform
object. For example, when performing a read, only a characteristic with
a matching UUID **and** `read` property will be considered a match.
Copy file name to clipboardExpand all lines: core/api/core.api
+42-15Lines changed: 42 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -54,8 +54,17 @@ public abstract interface class com/juul/kable/Characteristic {
54
54
public abstract fun getServiceUuid ()Ljava/util/UUID;
55
55
}
56
56
57
-
public final class com/juul/kable/CharacteristicKt {
58
-
public static final fun characteristicOf (Ljava/lang/String;Ljava/lang/String;)Lcom/juul/kable/Characteristic;
57
+
public final class com/juul/kable/Characteristic$Properties {
58
+
public static final synthetic fun box-impl (I)Lcom/juul/kable/Characteristic$Properties;
59
+
public fun equals (Ljava/lang/Object;)Z
60
+
public static fun equals-impl (ILjava/lang/Object;)Z
61
+
public static final fun equals-impl0 (II)Z
62
+
public final fun getValue ()I
63
+
public fun hashCode ()I
64
+
public static fun hashCode-impl (I)I
65
+
public fun toString ()Ljava/lang/String;
66
+
public static fun toString-impl (I)Ljava/lang/String;
67
+
public final synthetic fun unbox-impl ()I
59
68
}
60
69
61
70
public final class com/juul/kable/ConnectionLostException : com/juul/kable/NotConnectedException {
@@ -72,31 +81,36 @@ public abstract interface class com/juul/kable/Descriptor {
72
81
public abstract fun getServiceUuid ()Ljava/util/UUID;
73
82
}
74
83
75
-
public final class com/juul/kable/DescriptorKt {
76
-
public static final fun descriptorOf (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/juul/kable/Descriptor;
77
-
}
78
-
79
84
public final class com/juul/kable/DiscoveredCharacteristic : com/juul/kable/Characteristic {
80
-
public final fun component1 ()Ljava/util/UUID;
81
-
public final fun component2 ()Ljava/util/UUID;
82
-
public final fun component3 ()Ljava/util/List;
83
-
public final fun copy (Ljava/util/UUID;Ljava/util/UUID;Ljava/util/List;)Lcom/juul/kable/DiscoveredCharacteristic;
84
-
public static synthetic fun copy$default (Lcom/juul/kable/DiscoveredCharacteristic;Ljava/util/UUID;Ljava/util/UUID;Ljava/util/List;ILjava/lang/Object;)Lcom/juul/kable/DiscoveredCharacteristic;
85
+
public final fun copy (Landroid/bluetooth/BluetoothGattCharacteristic;)Lcom/juul/kable/DiscoveredCharacteristic;
86
+
public static synthetic fun copy$default (Lcom/juul/kable/DiscoveredCharacteristic;Landroid/bluetooth/BluetoothGattCharacteristic;ILjava/lang/Object;)Lcom/juul/kable/DiscoveredCharacteristic;
85
87
public fun equals (Ljava/lang/Object;)Z
86
88
public fun getCharacteristicUuid ()Ljava/util/UUID;
87
89
public final fun getDescriptors ()Ljava/util/List;
90
+
public final fun getInstanceId ()I
91
+
public final fun getProperties-bty6q6U ()I
92
+
public fun getServiceUuid ()Ljava/util/UUID;
93
+
public fun hashCode ()I
94
+
public fun toString ()Ljava/lang/String;
95
+
}
96
+
97
+
public final class com/juul/kable/DiscoveredDescriptor : com/juul/kable/Descriptor {
98
+
public final fun copy (Landroid/bluetooth/BluetoothGattDescriptor;)Lcom/juul/kable/DiscoveredDescriptor;
99
+
public static synthetic fun copy$default (Lcom/juul/kable/DiscoveredDescriptor;Landroid/bluetooth/BluetoothGattDescriptor;ILjava/lang/Object;)Lcom/juul/kable/DiscoveredDescriptor;
100
+
public fun equals (Ljava/lang/Object;)Z
101
+
public fun getCharacteristicUuid ()Ljava/util/UUID;
102
+
public fun getDescriptorUuid ()Ljava/util/UUID;
88
103
public fun getServiceUuid ()Ljava/util/UUID;
89
104
public fun hashCode ()I
90
105
public fun toString ()Ljava/lang/String;
91
106
}
92
107
93
108
public final class com/juul/kable/DiscoveredService : com/juul/kable/Service {
94
-
public final fun component1 ()Ljava/util/UUID;
95
-
public final fun component2 ()Ljava/util/List;
96
-
public final fun copy (Ljava/util/UUID;Ljava/util/List;)Lcom/juul/kable/DiscoveredService;
97
-
public static synthetic fun copy$default (Lcom/juul/kable/DiscoveredService;Ljava/util/UUID;Ljava/util/List;ILjava/lang/Object;)Lcom/juul/kable/DiscoveredService;
109
+
public final fun copy (Landroid/bluetooth/BluetoothGattService;)Lcom/juul/kable/DiscoveredService;
110
+
public static synthetic fun copy$default (Lcom/juul/kable/DiscoveredService;Landroid/bluetooth/BluetoothGattService;ILjava/lang/Object;)Lcom/juul/kable/DiscoveredService;
98
111
public fun equals (Ljava/lang/Object;)Z
99
112
public final fun getCharacteristics ()Ljava/util/List;
113
+
public final fun getInstanceId ()I
100
114
public fun getServiceUuid ()Ljava/util/UUID;
101
115
public fun hashCode ()I
102
116
public fun toString ()Ljava/lang/String;
@@ -239,6 +253,19 @@ public final class com/juul/kable/Priority : java/lang/Enum {
239
253
public static fun values ()[Lcom/juul/kable/Priority;
240
254
}
241
255
256
+
public final class com/juul/kable/ProfileKt {
257
+
public static final fun characteristicOf (Ljava/lang/String;Ljava/lang/String;)Lcom/juul/kable/Characteristic;
258
+
public static final fun descriptorOf (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/juul/kable/Descriptor;
259
+
public static final fun getBroadcast-G25LNqA (I)Z
260
+
public static final fun getExtendedProperties-G25LNqA (I)Z
261
+
public static final fun getIndicate-G25LNqA (I)Z
262
+
public static final fun getNotify-G25LNqA (I)Z
263
+
public static final fun getRead-G25LNqA (I)Z
264
+
public static final fun getSignedWrite-G25LNqA (I)Z
265
+
public static final fun getWrite-G25LNqA (I)Z
266
+
public static final fun getWriteWithoutResponse-G25LNqA (I)Z
267
+
}
268
+
242
269
public final class com/juul/kable/ScanFailedException : java/lang/IllegalStateException {
0 commit comments