Documentation ¶
Index ¶
- Constants
- func HasPrefix(path1 dbus.ObjectPath, path2 dbus.ObjectPath) bool
- func MakeFailedError(err error) *dbus.Error
- type Agent
- type AgentCapability
- type BlueZ
- 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
- 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
- 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
- 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
- type BlueZGattCharacteristic
- 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
- type BlueZGattService
- type BlueZObject
- type BlueZService
- 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
- type GattCharacteristic
- type GattService
- type LEAdvertisement1
- 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)
Constants ¶
View Source
const ( DBusIntrospectableInterface = "org.freedesktop.DBus.Introspectable" DBusPropertiesInterface = "org.freedesktop.DBus.Properties" DBusPropertiesIntro = `` /* 865-byte string literal not displayed */ GattService1Interface = "org.bluez.GattService1" GattService1Intro = `<node> <interface name="org.bluez.GattService1"> <property name="UUID" type="s" access="read" /> <property name="Primary" type="b" access="read" /> </interface>` + DBusPropertiesIntro + introspect.IntrospectDataString + `</node>` GattCharacteristic1Interface = "org.bluez.GattCharacteristic1" GattCharacteristic1Intro = `<node> <interface name="org.bluez.GattCharacteristic1"> <property name="UUID" type="s" access="read" /> </interface>` + DBusPropertiesIntro + introspect.IntrospectDataString + `</node>` ObjectManagerInterface = "org.freedesktop.DBus.ObjectManager" ObjectManagerIntro = `<node> <interface name="org.freedesktop.DBus.ObjectManager"> <method name="GetManagedObjects"> <arg name="objects" type="a{oa{sa{sv}}}" direction="out"/> </method> <signal name="InterfacesAdded"> <arg name="Object" type="o"/> <arg name="interfaces" type="a{sa{sv}}"/> </signal> <signal name="InterfacesRemoved"> <arg name="Object" type="o"/> <arg name="interfaces" type="as"/> </signal> </interface>` + DBusPropertiesIntro + introspect.IntrospectDataString + `</node>` LEAdvertisement1Interface = "org.bluez.LEAdvertisement1" LEAdvertisement1Intro = `` /* 1508-byte string literal not displayed */ Agent1Interface = "org.bluez.Agent1" Agent1Intro = ` <node> <interface name="org.bluez.Agent1"> <method name="Release" /> <method name="RequestPinCode"> <arg direction="in" type="o" /> <arg direction="out" type="s" /> </method> <method name="DisplayPinCode"> <arg direction="in" type="o" /> <arg direction="in" type="s" /> </method> <method name="RequestPasskey"> <arg direction="in" type="o" /> <arg direction="out" type="u" /> </method> <method name="DisplayPasskey"> <arg direction="in" type="o" /> <arg direction="in" type="u" /> <arg direction="in" type="q" /> </method> <method name="RequestConfirmation"> <arg direction="in" type="o" /> <arg direction="in" type="u" /> </method> <method name="RequestAuthorization"> <arg direction="in" type="o" /> </method> <method name="AuthorizeService"> <arg direction="in" type="o" /> <arg direction="in" type="s" /> </method> <method name="Cancel" /> </interface>` + DBusPropertiesIntro + introspect.IntrospectDataString + `</node>` )
Variables ¶
This section is empty.
Functions ¶
func HasPrefix ¶
func HasPrefix(path1 dbus.ObjectPath, path2 dbus.ObjectPath) bool
func MakeFailedError ¶
Types ¶
type Agent ¶
type Agent interface { Release() (e *dbus.Error) RequestPinCode(device dbus.Object) (pincode string, e *dbus.Error) DisplayPinCode(device dbus.Object, pincode string) (e *dbus.Error) RequestPasskey(device dbus.Object) (passkey uint32, e *dbus.Error) DisplayPasskey(device dbus.Object, passkey uint32, entered int16) (e *dbus.Error) RequestConfirmation(device dbus.Object, passkey uint32) (e *dbus.Error) RequestAuthorization(device dbus.Object) (e *dbus.Error) AuthorizeService(device dbus.Object, uuid string) (e *dbus.Error) Cancel() (e *dbus.Error) Capability() (capability AgentCapability) }
type AgentCapability ¶
type AgentCapability string
const ( DisplayOnly AgentCapability = "DisplayOnly" DisplayYesNo AgentCapability = "DisplayYesNo" KeyboardOnly AgentCapability = "KeyboardOnly" NoInputNoOutput AgentCapability = "NoInputNoOutput" KeyboardDisplay AgentCapability = "KeyboardDisplay" )
type BlueZ ¶
type BlueZ struct { *BlueZObject SignalChannel chan *dbus.Signal }
func (*BlueZ) AddInterfacesObserver ¶
func (*BlueZ) GetAdapter ¶
func (self *BlueZ) GetAdapter(hostId string) (a *BlueZAdapter, e error)
func (*BlueZ) GetAdapters ¶
func (self *BlueZ) GetAdapters() (adapters []*BlueZAdapter, e error)
func (*BlueZ) RegisterAgent ¶
func (*BlueZ) RemoveInterfacesObserver ¶
func (*BlueZ) UnregisterAgent ¶
func (*BlueZ) WaitForSignals ¶
type BlueZAdapter ¶
type BlueZAdapter struct { BlueZObject // contains filtered or unexported fields }
func (*BlueZAdapter) FindPeripheral ¶
func (self *BlueZAdapter) FindPeripheral(nameOrAddress string) (foundDevice *BlueZDevice)
func (*BlueZAdapter) GetDevices ¶
func (self *BlueZAdapter) GetDevices() (devices []*BlueZDevice, e error)
func (*BlueZAdapter) GetGattManager ¶
func (self *BlueZAdapter) GetGattManager() (gattManager *BlueZGattManager, e error)
func (*BlueZAdapter) StartAdvertise ¶
func (self *BlueZAdapter) StartAdvertise(path string, localName string, serviceUUIDs []string) (e error)
func (*BlueZAdapter) StartDiscovery ¶
func (self *BlueZAdapter) StartDiscovery() (e error)
func (*BlueZAdapter) StopAdvertise ¶
func (self *BlueZAdapter) StopAdvertise(path string) (e error)
func (*BlueZAdapter) StopDiscovery ¶
func (self *BlueZAdapter) StopDiscovery() (e error)
type BlueZCharacteristic ¶
type BlueZCharacteristic struct { BlueZObject // contains filtered or unexported fields }
func (*BlueZCharacteristic) ReadValue ¶
func (self *BlueZCharacteristic) ReadValue() (data []byte, e error)
func (*BlueZCharacteristic) StartNotify ¶
func (self *BlueZCharacteristic) StartNotify() (e error)
func (*BlueZCharacteristic) StopNotify ¶
func (self *BlueZCharacteristic) StopNotify() (e error)
func (*BlueZCharacteristic) ToDisplayString ¶
func (self *BlueZCharacteristic) ToDisplayString() (text string)
func (*BlueZCharacteristic) UUID ¶
func (self *BlueZCharacteristic) UUID() (value string)
func (*BlueZCharacteristic) WriteValue ¶
func (self *BlueZCharacteristic) WriteValue(value []byte) (e error)
type BlueZDevice ¶
type BlueZDevice struct { BlueZObject // contains filtered or unexported fields }
func (*BlueZDevice) Address ¶
func (self *BlueZDevice) Address() (value string)
func (*BlueZDevice) Connect ¶
func (self *BlueZDevice) Connect() (e error)
func (*BlueZDevice) Connected ¶
func (self *BlueZDevice) Connected() (value bool)
func (*BlueZDevice) Disconnect ¶
func (self *BlueZDevice) Disconnect() (e error)
func (*BlueZDevice) GetCharacteristic ¶
func (self *BlueZDevice) GetCharacteristic(uuid string, serviceUuid string) (foundCharacteristic *BlueZCharacteristic, foundService *BlueZService, e error)
func (*BlueZDevice) GetServices ¶
func (self *BlueZDevice) GetServices() (services []BlueZService, e error)
func (*BlueZDevice) Name ¶
func (self *BlueZDevice) Name() (value string)
func (*BlueZDevice) Refresh ¶
func (self *BlueZDevice) Refresh() (e error)
func (*BlueZDevice) ServicesResolved ¶
func (self *BlueZDevice) ServicesResolved() (value bool)
func (*BlueZDevice) ToDisplayString ¶
func (self *BlueZDevice) ToDisplayString() (text string)
func (*BlueZDevice) UUIDs ¶
func (self *BlueZDevice) UUIDs() (value []string)
type BlueZGattApplication ¶
type BlueZGattApplication struct {
// contains filtered or unexported fields
}
func (*BlueZGattApplication) GetManagedObjects ¶
func (self *BlueZGattApplication) GetManagedObjects() (managedObjects map[dbus.ObjectPath]map[string]map[string]dbus.Variant, e *dbus.Error)
type BlueZGattCharacteristic ¶
type BlueZGattCharacteristic struct {
// contains filtered or unexported fields
}
func (*BlueZGattCharacteristic) Confirm ¶
func (self *BlueZGattCharacteristic) Confirm() (e *dbus.Error)
func (*BlueZGattCharacteristic) ReadValue ¶
func (self *BlueZGattCharacteristic) ReadValue(options map[string]interface{}) (value []byte, e *dbus.Error)
func (*BlueZGattCharacteristic) StartNotify ¶
func (self *BlueZGattCharacteristic) StartNotify() (e *dbus.Error)
func (*BlueZGattCharacteristic) StopNotify ¶
func (self *BlueZGattCharacteristic) StopNotify() (e *dbus.Error)
func (*BlueZGattCharacteristic) WriteValue ¶
func (self *BlueZGattCharacteristic) WriteValue(value []byte, options map[string]interface{}) (e *dbus.Error)
type BlueZGattManager ¶
type BlueZGattManager struct { BlueZObject // contains filtered or unexported fields }
func (*BlueZGattManager) AddApplication ¶
func (self *BlueZGattManager) AddApplication(gattApplication *GattApplication) (e error)
type BlueZGattService ¶
type BlueZGattService struct {
// contains filtered or unexported fields
}
type BlueZObject ¶
func (*BlueZObject) AddPropertiesObserver ¶
func (self *BlueZObject) AddPropertiesObserver() (e error)
func (*BlueZObject) RemovePropertiesObserver ¶
func (self *BlueZObject) RemovePropertiesObserver() (e error)
type BlueZService ¶
type BlueZService struct { BlueZObject // contains filtered or unexported fields }
func (*BlueZService) GetCharacteristicByUUID ¶
func (self *BlueZService) GetCharacteristicByUUID(uuid string) (foundCharacteristic *BlueZCharacteristic, e error)
func (*BlueZService) GetCharacteristics ¶
func (self *BlueZService) GetCharacteristics() (characteristics []BlueZCharacteristic, e error)
func (*BlueZService) ToDisplayString ¶
func (self *BlueZService) ToDisplayString() (text string)
func (*BlueZService) UUID ¶
func (self *BlueZService) UUID() (value string)
type GattApplication ¶
type GattApplication struct { Path string Services map[string]*GattService }
func NewGattApplication ¶
func NewGattApplication(path string) (gattApplication *GattApplication)
func (*GattApplication) AddService ¶
func (self *GattApplication) AddService(gattService *GattService)
func (*GattApplication) RemoveService ¶
func (self *GattApplication) RemoveService(gattService *GattService)
type GattCharacteristic ¶
type GattCharacteristic struct { UUID string Flags []string OnReadFunc func() ([]byte, error) OnWriteFunc func([]byte) error }
func NewGattCharacteristic ¶
func NewGattCharacteristic(uuid string, flags []string) (gattCharacteristic *GattCharacteristic)
type GattService ¶
type GattService struct { UUID string Characteristics map[string]*GattCharacteristic }
func NewGattService ¶
func NewGattService(uuid string) (gattService *GattService)
func (*GattService) AddCharacteristic ¶
func (self *GattService) AddCharacteristic(gattCharacteristic *GattCharacteristic)
func (*GattService) RemoveCharacteristic ¶
func (self *GattService) RemoveCharacteristic(gattCharacteristic *GattCharacteristic)
type LEAdvertisement1 ¶
type LEAdvertisement1 struct {
// contains filtered or unexported fields
}
func (*LEAdvertisement1) Includes ¶
func (self *LEAdvertisement1) Includes() ([]string, *dbus.Error)
func (*LEAdvertisement1) LocalName ¶
func (self *LEAdvertisement1) LocalName() (string, *dbus.Error)
func (*LEAdvertisement1) Release ¶
func (self *LEAdvertisement1) Release() (dbusError *dbus.Error)
func (*LEAdvertisement1) ServiceUUIDs ¶
func (self *LEAdvertisement1) ServiceUUIDs() ([]string, *dbus.Error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.