-
Notifications
You must be signed in to change notification settings - Fork 11
/
centralmanagerdelegate.go
41 lines (33 loc) · 2.31 KB
/
centralmanagerdelegate.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package cbgo
// CentralManagerDelegate: https://developer.apple.com/documentation/corebluetooth/cbcentralmanagerdelegate
type CentralManagerDelegate interface {
// DidConnectPeripheral: https://developer.apple.com/documentation/corebluetooth/cbcentralmanagerdelegate/1518969-centralmanager
DidConnectPeripheral(cmgr CentralManager, prph Peripheral)
// DidDisconnectPeripheral: https://developer.apple.com/documentation/corebluetooth/cbcentralmanagerdelegate/1518791-centralmanager
DidDisconnectPeripheral(cmgr CentralManager, prph Peripheral, err error)
// DidFailToConnectPeripheral: https://developer.apple.com/documentation/corebluetooth/cbcentralmanagerdelegate/1518988-centralmanager
DidFailToConnectPeripheral(cmgr CentralManager, prph Peripheral, err error)
// DidDiscoverPeripheral: https://developer.apple.com/documentation/corebluetooth/cbcentralmanagerdelegate/1518937-centralmanager
DidDiscoverPeripheral(cmgr CentralManager, prph Peripheral, advFields AdvFields, rssi int)
// CentralManagerDidUpdateState: https://developer.apple.com/documentation/corebluetooth/cbcentralmanagerdelegate/1518888-centralmanagerdidupdatestate
CentralManagerDidUpdateState(cmgr CentralManager)
// CentralManagerWillRestoreState: https://developer.apple.com/documentation/corebluetooth/cbcentralmanagerdelegate/1518819-centralmanager
CentralManagerWillRestoreState(cmgr CentralManager, opts CentralManagerRestoreOpts)
}
// CentralManagerDelegateBase implements the CentralManagerDelegate interface
// with stub functions. Embed this in your delegate type if you only want to
// define a subset of the CentralManagerDelegate interface.
type CentralManagerDelegateBase struct {
}
func (b *CentralManagerDelegateBase) DidConnectPeripheral(cmgr CentralManager, prph Peripheral) {
}
func (b *CentralManagerDelegateBase) DidFailToConnectPeripheral(cmgr CentralManager, prph Peripheral, err error) {
}
func (b *CentralManagerDelegateBase) DidDisconnectPeripheral(cmgr CentralManager, prph Peripheral, err error) {
}
func (b *CentralManagerDelegateBase) CentralManagerDidUpdateState(cmgr CentralManager) {
}
func (b *CentralManagerDelegateBase) CentralManagerWillRestoreState(cmgr CentralManager, opts CentralManagerRestoreOpts) {
}
func (b *CentralManagerDelegateBase) DidDiscoverPeripheral(cmgr CentralManager, prph Peripheral, advFields AdvFields, rssi int) {
}