Søren Rasmussen
07a23c1845
Some checks reported errors
continuous-integration/drone/push Build encountered an error
|
||
---|---|---|
.. | ||
.gitignore | ||
adv.go | ||
att.go | ||
bt.go | ||
bt.h | ||
bt.m | ||
btdlg.m | ||
cbhandlers.go | ||
central.go | ||
centralmanager.go | ||
centralmanagerdelegate.go | ||
characteristic.go | ||
cmgr.m | ||
core.go | ||
cutil.go | ||
descriptor.go | ||
LICENSE | ||
manager.go | ||
mutablecharacteristic.go | ||
mutabledescriptor.go | ||
mutableservice.go | ||
peripheral.go | ||
peripheraldelegate.go | ||
peripheralmanager.go | ||
peripheralmanagerdelegate.go | ||
pmgr.m | ||
ptrmap.go | ||
README.md | ||
service.go | ||
util.m |
cbgo
cbgo implements Go bindings for CoreBluetooth.
Documentation
For documentation, see the CoreBluetooth docs.
Examples are in the examples
directory.
Scope
cbgo aims to implement all functionality that is supported in macOS 10.13.
Naming
Function and type names in cbgo are intended to match the corresponding CoreBluetooth functionality as closely as possible. There are a few (consistent) deviations:
- All cbgo identifiers start with a capital letter to make them public.
- Named arguments in CoreBluetooth functions are eliminated.
- Properties are implemented as a pair of functions (
PropertyName
andSetPropertyName
).
Issues
There are definitely memory leaks. ARC is not compatible with cgo, so objective C memory has to be managed manually. I didn't see a set of consistent guidelines for object ownership in the CoreBluetooth documentation, so cbgo errs on the side of leaking. Hopefully this is only an issue for very long running processes! Any fixes here are much appreciated.