Debian Codegraph @

bluez/profile/battery/gen_Battery1.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 Battery1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Interface. = "org.bluez.Battery1"
15
16 // NewBattery1 create a new instance of Battery1
17 //
18 // Args:
19 // - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
20 func NewBattery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/NewBattery1().(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#) (*Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#, error) {
21 a := new(Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#)
22 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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().(
23 &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#{
24 Namescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Name.: "org.bluez",
25 Ifacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Iface.: Battery1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Interface.,
26 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),
27 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.,
28 },
29 )
30 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#Properties. = new(Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#)
31
32 _, err := a.GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#GetProperties().()
33 if err != nil {
34 return nil, err
35 }
36 return a, nil
37 }
38
39 /*
40 Battery1 Battery hierarchy
41
42 */
43 type Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1# struct {
44 clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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#
45 propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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#
46 objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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#
47 objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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#
48 Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#Properties. *Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#
49 watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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#
50 }
51
52 // Battery1Properties contains the exposed properties of an interface
53 type Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties# struct {
54 lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#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"`
55
56 /*
57 Percentage The percentage of battery left as an unsigned 8-bit integer.
58 */
59 Percentagescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#Percentage. byte
60
61 /*
62 Source Describes where the battery information comes from
63 This property is informational only and may be useful
64 for debugging purposes.
65 Providers from BatteryProvider1 may make use of this
66 property to indicate where the battery report comes from
67 (e.g. "HFP 1.7", "HID", or the profile UUID).
68 */
69 Sourcescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#Source. string
70 }
71
72 //Lock access to properties
73 func (p *Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#) Lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#Lock().() {
74 p.lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#lock..Lockscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex#Lock().()
75 }
76
77 //Unlock access to properties
78 func (p *Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#) Unlockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#Unlock().() {
79 p.lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#lock..Unlockscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex#Unlock().()
80 }
81
82 // SetPercentage set Percentage value
83 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) SetPercentagescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#SetPercentage().(v byte) error {
84 return a.SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#SetProperty().("Percentage", v)
85 }
86
87 // GetPercentage get Percentage value
88 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) GetPercentagescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#GetPercentage().() (byte, error) {
89 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#GetProperty().("Percentage")
90 if err != nil {
91 return byte(0), err
92 }
93 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().(byte), nil
94 }
95
96 // SetSource set Source value
97 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) SetSourcescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#SetSource().(v string) error {
98 return a.SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#SetProperty().("Source", v)
99 }
100
101 // GetSource get Source value
102 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) GetSourcescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#GetSource().() (string, error) {
103 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#GetProperty().("Source")
104 if err != nil {
105 return "", err
106 }
107 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().(string), nil
108 }
109
110 // Close the connection
111 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) Closescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#Close().() {
112 a.unregisterPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#unregisterPropertiesSignal().()
113 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#client..Disconnectscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Disconnect().()
114 }
115
116 // Path return Battery1 object path
117 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) Pathscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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# {
118 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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.
119 }
120
121 // Client return Battery1 dbus client
122 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) Clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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# {
123 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#client.
124 }
125
126 // Interface return Battery1 interface
127 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#Interface().() string {
128 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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.
129 }
130
131 // GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
132 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) GetObjectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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) {
133
134 if a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#objectManagerSignal. == nil {
135 if a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#objectManager. == nil {
136 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().()
137 if err != nil {
138 return nil, nil, err
139 }
140 a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#objectManager. = om
141 }
142
143 s, err := a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#objectManager..Registerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/ObjectManager#Register().()
144 if err != nil {
145 return nil, nil, err
146 }
147 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#objectManagerSignal. = s
148 }
149
150 cancel := func() {
151 if a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#objectManagerSignal. == nil {
152 return
153 }
154 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#objectManagerSignal. <- nil
155 a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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`/Battery1#objectManagerSignal.)
156 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#objectManagerSignal. = nil
157 }
158
159 return a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#objectManagerSignal., cancel, nil
160 }
161
162 // ToMap convert a Battery1Properties to map
163 func (a *Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#) ToMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#ToMap().() (map[string]interface{}, error) {
164 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
165 }
166
167 // FromMap convert a map to an Battery1Properties
168 func (a *Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#) FromMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#FromMap().(props map[string]interface{}) (*Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#, error) {
169 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#{}
170 for k, val := range props {
171 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)
172 }
173 return a.FromDBusMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#FromDBusMap().(props1)
174 }
175
176 // FromDBusMap convert a map to an Battery1Properties
177 func (a *Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#) FromDBusMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#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#) (*Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#, error) {
178 s := new(Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#)
179 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)
180 return s, err
181 }
182
183 // ToProps return the properties interface
184 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) ToPropsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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# {
185 return a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#Properties.
186 }
187
188 // GetWatchPropertiesChannel return the dbus channel to receive properties interface
189 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) GetWatchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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# {
190 return a.watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#watchPropertiesChannel.
191 }
192
193 // SetWatchPropertiesChannel set the dbus channel to receive properties interface
194 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) SetWatchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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#) {
195 a.watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#watchPropertiesChannel. = c
196 }
197
198 // GetProperties load all available properties
199 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#GetProperties().() (*Battery1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#, error) {
200 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#Properties..Lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#Lock().()
201 err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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`/Battery1#Properties.)
202 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#Properties..Unlockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1Properties#Unlock().()
203 return a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#Properties., err
204 }
205
206 // SetProperty set a property
207 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#SetProperty().(name string, value interface{}) error {
208 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#client..SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#SetProperty().(name, value)
209 }
210
211 // GetProperty get a property
212 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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) {
213 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#client..GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#GetProperty().(name)
214 }
215
216 // GetPropertiesSignal return a channel for receiving udpdates on property changes
217 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) GetPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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) {
218
219 if a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#propertiesSignal. == nil {
220 s, err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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`/Battery1#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.)
221 if err != nil {
222 return nil, err
223 }
224 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#propertiesSignal. = s
225 }
226
227 return a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#propertiesSignal., nil
228 }
229
230 // Unregister for changes signalling
231 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) unregisterPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#unregisterPropertiesSignal().() {
232 if a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#propertiesSignal. != nil {
233 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#propertiesSignal. <- nil
234 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#propertiesSignal. = nil
235 }
236 }
237
238 // WatchProperties updates on property changes
239 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) WatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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) {
240 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)
241 }
242
243 func (a *Battery1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#) UnwatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/battery`/Battery1#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 {
244 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)
245 }