Versions in this module Expand all Collapse all v1 v1.2.0 Mar 23, 2021 Changes in this version + const Agent1Interface + const Agent1Intro + const DBusIntrospectableInterface + const DBusPropertiesInterface + const DBusPropertiesIntro + const GattCharacteristic1Interface + const GattCharacteristic1Intro + const GattService1Interface + const GattService1Intro + const LEAdvertisement1Interface + const LEAdvertisement1Intro + const ObjectManagerInterface + const ObjectManagerIntro + func HasPrefix(path1 dbus.ObjectPath, path2 dbus.ObjectPath) bool + func MakeFailedError(err error) *dbus.Error + type Agent interface + AuthorizeService func(device dbus.Object, uuid string) (e *dbus.Error) + Cancel func() (e *dbus.Error) + Capability func() (capability AgentCapability) + DisplayPasskey func(device dbus.Object, passkey uint32, entered int16) (e *dbus.Error) + DisplayPinCode func(device dbus.Object, pincode string) (e *dbus.Error) + Release func() (e *dbus.Error) + RequestAuthorization func(device dbus.Object) (e *dbus.Error) + RequestConfirmation func(device dbus.Object, passkey uint32) (e *dbus.Error) + RequestPasskey func(device dbus.Object) (passkey uint32, e *dbus.Error) + RequestPinCode func(device dbus.Object) (pincode string, e *dbus.Error) + type AgentCapability string + const DisplayOnly + const DisplayYesNo + const KeyboardDisplay + const KeyboardOnly + const NoInputNoOutput + type BlueZ struct + SignalChannel chan *dbus.Signal + func NewBLueZ() (bluez *BlueZ, e error) + func (self *BlueZ) AddInterfacesObserver() (e error) + func (self *BlueZ) Close() (e error) + func (self *BlueZ) GetAdapter(hostId string) (a *BlueZAdapter, e error) + func (self *BlueZ) GetAdapters() (adapters []*BlueZAdapter, e error) + func (self *BlueZ) RegisterAgent(agent Agent, path string, iface string) (e error) + func (self *BlueZ) RemoveInterfacesObserver() (e error) + func (self *BlueZ) UnregisterAgent(path string) (e error) + func (self *BlueZ) WaitForSignals(callback func(signal *dbus.Signal)) + type BlueZAdapter struct + func (self *BlueZAdapter) FindPeripheral(nameOrAddress string) (foundDevice *BlueZDevice) + func (self *BlueZAdapter) GetDevices() (devices []*BlueZDevice, e error) + func (self *BlueZAdapter) GetGattManager() (gattManager *BlueZGattManager, e error) + func (self *BlueZAdapter) StartAdvertise(path string, localName string, serviceUUIDs []string) (e error) + func (self *BlueZAdapter) StartDiscovery() (e error) + func (self *BlueZAdapter) StopAdvertise(path string) (e error) + func (self *BlueZAdapter) StopDiscovery() (e error) + type BlueZCharacteristic struct + func (self *BlueZCharacteristic) ReadValue() (data []byte, e error) + func (self *BlueZCharacteristic) StartNotify() (e error) + func (self *BlueZCharacteristic) StopNotify() (e error) + func (self *BlueZCharacteristic) ToDisplayString() (text string) + func (self *BlueZCharacteristic) UUID() (value string) + func (self *BlueZCharacteristic) WriteValue(value []byte) (e error) + type BlueZDevice struct + func (self *BlueZDevice) Address() (value string) + func (self *BlueZDevice) Connect() (e error) + func (self *BlueZDevice) Connected() (value bool) + func (self *BlueZDevice) Disconnect() (e error) + func (self *BlueZDevice) GetCharacteristic(uuid string, serviceUuid string) (foundCharacteristic *BlueZCharacteristic, foundService *BlueZService, e error) + func (self *BlueZDevice) GetServices() (services []BlueZService, e error) + func (self *BlueZDevice) Name() (value string) + func (self *BlueZDevice) Refresh() (e error) + func (self *BlueZDevice) ServicesResolved() (value bool) + func (self *BlueZDevice) ToDisplayString() (text string) + func (self *BlueZDevice) UUIDs() (value []string) + type BlueZGattApplication struct + func (self *BlueZGattApplication) GetManagedObjects() (managedObjects map[dbus.ObjectPath]map[string]map[string]dbus.Variant, ...) + type BlueZGattCharacteristic struct + func (self *BlueZGattCharacteristic) Confirm() (e *dbus.Error) + func (self *BlueZGattCharacteristic) Get(iface string, name string) (variant dbus.Variant, e *dbus.Error) + func (self *BlueZGattCharacteristic) GetAll(iface string) (properties map[string]dbus.Variant, e *dbus.Error) + func (self *BlueZGattCharacteristic) ReadValue(options map[string]interface{}) (value []byte, e *dbus.Error) + func (self *BlueZGattCharacteristic) StartNotify() (e *dbus.Error) + func (self *BlueZGattCharacteristic) StopNotify() (e *dbus.Error) + func (self *BlueZGattCharacteristic) WriteValue(value []byte, options map[string]interface{}) (e *dbus.Error) + type BlueZGattManager struct + func (self *BlueZGattManager) AddApplication(gattApplication *GattApplication) (e error) + type BlueZGattService struct + func (self *BlueZGattService) Get(iface string, name string) (variant dbus.Variant, e *dbus.Error) + func (self *BlueZGattService) GetAll(iface string) (properties map[string]dbus.Variant, e *dbus.Error) + type BlueZObject struct + Conn *dbus.Conn + Object dbus.BusObject + func (self *BlueZObject) AddPropertiesObserver() (e error) + func (self *BlueZObject) RemovePropertiesObserver() (e error) + type BlueZService struct + func (self *BlueZService) GetCharacteristicByUUID(uuid string) (foundCharacteristic *BlueZCharacteristic, e error) + func (self *BlueZService) GetCharacteristics() (characteristics []BlueZCharacteristic, e error) + func (self *BlueZService) ToDisplayString() (text string) + func (self *BlueZService) UUID() (value string) + type GattApplication struct + Path string + Services map[string]*GattService + func NewGattApplication(path string) (gattApplication *GattApplication) + func (self *GattApplication) AddService(gattService *GattService) + func (self *GattApplication) RemoveService(gattService *GattService) + type GattCharacteristic struct + Flags []string + OnReadFunc func() ([]byte, error) + OnWriteFunc func([]byte) error + UUID string + func NewGattCharacteristic(uuid string, flags []string) (gattCharacteristic *GattCharacteristic) + type GattService struct + Characteristics map[string]*GattCharacteristic + UUID string + func NewGattService(uuid string) (gattService *GattService) + func (self *GattService) AddCharacteristic(gattCharacteristic *GattCharacteristic) + func (self *GattService) RemoveCharacteristic(gattCharacteristic *GattCharacteristic) + type LEAdvertisement1 struct + func (self *LEAdvertisement1) Get(iface string, name string) (variant dbus.Variant, e *dbus.Error) + func (self *LEAdvertisement1) GetAll(iface string) (properties map[string]dbus.Variant, e *dbus.Error) + func (self *LEAdvertisement1) Includes() ([]string, *dbus.Error) + func (self *LEAdvertisement1) LocalName() (string, *dbus.Error) + func (self *LEAdvertisement1) Release() (dbusError *dbus.Error) + func (self *LEAdvertisement1) ServiceUUIDs() ([]string, *dbus.Error) + func (self *LEAdvertisement1) Type() (string, *dbus.Error) Other modules containing this package github.com/mark2b/bluez-connect/v2