Debian Codegraph @

bluez/profile/battery/gen_BatteryProvider1.go

raw symbols SCIP
1 // Code generated by go-bluetooth generator DO NOT EDIT.
2
3 package batteryscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/
4
5 import (
6 "syncscip-go gomod github.com/golang/go/src go1.14 sync/"
7
8 "github.com/godbus/dbus/v5scip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/"
9 "github.com/muka/go-bluetooth/bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/"
10 "github.com/muka/go-bluetooth/propsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/props`/"
11 "github.com/muka/go-bluetooth/utilscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/util`/"
12 )
13
14 var BatteryProvider1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Interface. = "org.bluez.BatteryProvider1"
15
16 // NewBatteryProvider1 create a new instance of BatteryProvider1
17 //
18 // Args:
19 // - servicePath: <client D-Bus address>
20 // - objectPath: {provider_root}/{unique battery object path}
21 func NewBatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/NewBatteryProvider1().(servicePath string, objectPath dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath#) (*BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#, error) {
22 a := new(BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#)
23 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client. = bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.NewClientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/NewClient().(
24 &bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.Configscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#{
25 Namescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Name.: servicePath,
26 Ifacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Iface.: BatteryProvider1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Interface.,
27 Pathscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Path.: dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath#(objectPath),
28 Busscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Bus.: bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.SystemBusscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/SystemBus.,
29 },
30 )
31 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Properties. = new(BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#)
32
33 _, err := a.GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#GetProperties().()
34 if err != nil {
35 return nil, err
36 }
37 return a, nil
38 }
39
40 /*
41 BatteryProvider1 Battery Provider hierarchy
42
43 */
44 type BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1# struct {
45 clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client. *bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.Clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#
46 propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#propertiesSignal. chan *dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.Signalscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Signal#
47 objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManagerSignal. chan *dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.Signalscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Signal#
48 objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManager. *bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.ObjectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/ObjectManager#
49 Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Properties. *BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#
50 watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#watchPropertiesChannel. chan *dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.Signalscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Signal#
51 }
52
53 // BatteryProvider1Properties contains the exposed properties of an interface
54 type BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties# struct {
55 lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#lock. syncscip-go gomod github.com/golang/go/src go1.14 sync/.RWMutexscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex# `dbus:"ignore"`
56
57 /*
58 Device The object path of the device that has this battery.
59 */
60 Devicescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#Device. dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath#
61 }
62
63 //Lock access to properties
64 func (p *BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#) Lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#Lock().() {
65 p.lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#lock..Lockscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex#Lock().()
66 }
67
68 //Unlock access to properties
69 func (p *BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#) Unlockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#Unlock().() {
70 p.lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#lock..Unlockscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex#Unlock().()
71 }
72
73 // SetDevice set Device value
74 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) SetDevicescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#SetDevice().(v dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath#) error {
75 return a.SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#SetProperty().("Device", v)
76 }
77
78 // GetDevice get Device value
79 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) GetDevicescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#GetDevice().() (dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath#, error) {
80 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#GetProperty().("Device")
81 if err != nil {
82 return dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath#(""), err
83 }
84 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().(dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath#), nil
85 }
86
87 // Close the connection
88 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) Closescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Close().() {
89 a.unregisterPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#unregisterPropertiesSignal().()
90 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client..Disconnectscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Disconnect().()
91 }
92
93 // Path return BatteryProvider1 object path
94 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) Pathscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Path().() dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath# {
95 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client..Configscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Config..Pathscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Path.
96 }
97
98 // Client return BatteryProvider1 dbus client
99 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) Clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Client().() *bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.Clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client# {
100 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client.
101 }
102
103 // Interface return BatteryProvider1 interface
104 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Interface().() string {
105 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client..Configscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Config..Ifacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Iface.
106 }
107
108 // GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
109 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) GetObjectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#GetObjectManagerSignal().() (chan *dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.Signalscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Signal#, func(), error) {
110
111 if a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManagerSignal. == nil {
112 if a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManager. == nil {
113 om, err := bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.GetObjectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/GetObjectManager().()
114 if err != nil {
115 return nil, nil, err
116 }
117 a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManager. = om
118 }
119
120 s, err := a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManager..Registerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/ObjectManager#Register().()
121 if err != nil {
122 return nil, nil, err
123 }
124 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManagerSignal. = s
125 }
126
127 cancel := func() {
128 if a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManagerSignal. == nil {
129 return
130 }
131 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManagerSignal. <- nil
132 a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManager..Unregisterscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/ObjectManager#Unregister().(a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManagerSignal.)
133 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManagerSignal. = nil
134 }
135
136 return a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#objectManagerSignal., cancel, nil
137 }
138
139 // ToMap convert a BatteryProvider1Properties to map
140 func (a *BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#) ToMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#ToMap().() (map[string]interface{}, error) {
141 return propsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/props`/.ToMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/props`/ToMap().(a), nil
142 }
143
144 // FromMap convert a map to an BatteryProvider1Properties
145 func (a *BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#) FromMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#FromMap().(props map[string]interface{}) (*BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#, error) {
146 props1 := map[string]dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.Variantscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#{}
147 for k, val := range props {
148 props1[k] = dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.MakeVariantscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/MakeVariant().(val)
149 }
150 return a.FromDBusMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#FromDBusMap().(props1)
151 }
152
153 // FromDBusMap convert a map to an BatteryProvider1Properties
154 func (a *BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#) FromDBusMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#FromDBusMap().(props map[string]dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.Variantscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#) (*BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#, error) {
155 s := new(BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#)
156 err := utilscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/util`/.MapToStructscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/util`/MapToStruct().(s, props)
157 return s, err
158 }
159
160 // ToProps return the properties interface
161 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) ToPropsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#ToProps().() bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Properties# {
162 return a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Properties.
163 }
164
165 // GetWatchPropertiesChannel return the dbus channel to receive properties interface
166 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) GetWatchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#GetWatchPropertiesChannel().() chan *dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.Signalscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Signal# {
167 return a.watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#watchPropertiesChannel.
168 }
169
170 // SetWatchPropertiesChannel set the dbus channel to receive properties interface
171 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) SetWatchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#SetWatchPropertiesChannel().(c chan *dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.Signalscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Signal#) {
172 a.watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#watchPropertiesChannel. = c
173 }
174
175 // GetProperties load all available properties
176 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#GetProperties().() (*BatteryProvider1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#, error) {
177 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Properties..Lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#Lock().()
178 err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client..GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#GetProperties().(a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Properties.)
179 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Properties..Unlockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1Properties#Unlock().()
180 return a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#Properties., err
181 }
182
183 // SetProperty set a property
184 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#SetProperty().(name string, value interface{}) error {
185 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client..SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#SetProperty().(name, value)
186 }
187
188 // GetProperty get a property
189 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#GetProperty().(name string) (dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.Variantscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#, error) {
190 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client..GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#GetProperty().(name)
191 }
192
193 // GetPropertiesSignal return a channel for receiving udpdates on property changes
194 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) GetPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#GetPropertiesSignal().() (chan *dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.Signalscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Signal#, error) {
195
196 if a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#propertiesSignal. == nil {
197 s, err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client..Registerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Register().(a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#client..Configscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Config..Pathscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Path., bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.PropertiesInterfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/PropertiesInterface.)
198 if err != nil {
199 return nil, err
200 }
201 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#propertiesSignal. = s
202 }
203
204 return a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#propertiesSignal., nil
205 }
206
207 // Unregister for changes signalling
208 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) unregisterPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#unregisterPropertiesSignal().() {
209 if a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#propertiesSignal. != nil {
210 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#propertiesSignal. <- nil
211 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#propertiesSignal. = nil
212 }
213 }
214
215 // WatchProperties updates on property changes
216 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) WatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#WatchProperties().() (chan *bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.PropertyChangedscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/PropertyChanged#, error) {
217 return bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.WatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/WatchProperties().(a)
218 }
219
220 func (a *BatteryProvider1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#) UnwatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/BatteryProvider1#UnwatchProperties().(ch chan *bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.PropertyChangedscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/PropertyChanged#) error {
221 return bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/.UnwatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/UnwatchProperties().(a, ch)
222 }