Improve handling of peripheral disconnections and some refactoring.

This commit is contained in:
gmp
2019-12-05 08:49:41 -05:00
parent e7f82ac9e7
commit 3bc712870d
9 changed files with 58492 additions and 59074 deletions
+12
View File
@@ -38,6 +38,18 @@ func CBDelegateCentralManagerDidConnectPeripheral(o unsafe.Pointer, central unsa
cb(a1, a2)
}
//export CBDelegateCentralManagerDidDisconnectPeripheral
func CBDelegateCentralManagerDidDisconnectPeripheral(o unsafe.Pointer, central unsafe.Pointer, peripheral unsafe.Pointer, error unsafe.Pointer) {
CBDelegateMux.RLock()
cb := CBDelegateLookup[o].CentralManagerDidDisconnectPeripheral
CBDelegateMux.RUnlock()
if cb == nil { return }
a1 := &CBCentralManager{}; a1.ptr = central
a2 := &CBPeripheral{}; a2.ptr = peripheral
a3 := &NSError{}; a3.ptr = error
cb(a1, a2, a3)
}
//export CBDelegateCentralManagerDidDiscoverPeripheral
func CBDelegateCentralManagerDidDiscoverPeripheral(o unsafe.Pointer, central unsafe.Pointer, peripheral unsafe.Pointer, advertisementData unsafe.Pointer, RSSI unsafe.Pointer) {
CBDelegateMux.RLock()
+58379 -59004
View File
File diff suppressed because it is too large Load Diff