Debian Codegraph @

bluez/profile/gatt/gen_GattDescriptor1.go

raw symbols SCIP
1 // Code generated by go-bluetooth generator DO NOT EDIT.
2
3 package gattscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/
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 GattDescriptor1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Interface. = "org.bluez.GattDescriptor1"
15
16 // NewGattDescriptor1 create a new instance of GattDescriptor1
17 //
18 // Args:
19 // - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/serviceXX/charYYYY/descriptorZZZ
20 func NewGattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/NewGattDescriptor1().(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#) (*GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#, error) {
21 a := new(GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#)
22 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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.: GattDescriptor1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Interface.,
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/gatt`/GattDescriptor1#Properties. = new(GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#)
31
32 _, err := a.GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetProperties().()
33 if err != nil {
34 return nil, err
35 }
36 return a, nil
37 }
38
39 /*
40 GattDescriptor1 Characteristic Descriptors hierarchy
41
42 Local or remote GATT characteristic descriptors hierarchy.
43
44 */
45 type GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1# struct {
46 clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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#
47 propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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#
48 objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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#
49 objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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#
50 Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#Properties. *GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#
51 watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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#
52 }
53
54 // GattDescriptor1Properties contains the exposed properties of an interface
55 type GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties# struct {
56 lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#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"`
57
58 /*
59 Characteristic Object path of the GATT characteristic the descriptor
60 belongs to.
61 */
62 Characteristicscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#Characteristic. 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#
63
64 /*
65 Flags Defines how the descriptor value can be used.
66
67 Possible values:
68
69 "read"
70 "write"
71 "encrypt-read"
72 "encrypt-write"
73 "encrypt-authenticated-read"
74 "encrypt-authenticated-write"
75 "secure-read" (Server Only)
76 "secure-write" (Server Only)
77 "authorize"
78 */
79 Flagsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#Flags. []string
80
81 /*
82 Handle Characteristic handle. When available in the server it
83 would attempt to use to allocate into the database
84 which may fail, to auto allocate the value 0x0000
85 shall be used which will cause the allocated handle to
86 be set once registered.
87 */
88 Handlescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#Handle. uint16
89
90 /*
91 UUID 128-bit descriptor UUID.
92 */
93 UUIDscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#UUID. string
94
95 /*
96 Value The cached value of the descriptor. This property
97 gets updated only after a successful read request, upon
98 which a PropertiesChanged signal will be emitted.
99 */
100 Valuescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#Value. []byte `dbus:"emit"`
101 }
102
103 //Lock access to properties
104 func (p *GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#) Lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#Lock().() {
105 p.lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#lock..Lockscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex#Lock().()
106 }
107
108 //Unlock access to properties
109 func (p *GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#) Unlockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#Unlock().() {
110 p.lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#lock..Unlockscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex#Unlock().()
111 }
112
113 // GetCharacteristic get Characteristic value
114 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) GetCharacteristicscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetCharacteristic().() (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) {
115 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetProperty().("Characteristic")
116 if err != nil {
117 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
118 }
119 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
120 }
121
122 // GetFlags get Flags value
123 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) GetFlagsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetFlags().() ([]string, error) {
124 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetProperty().("Flags")
125 if err != nil {
126 return []string{}, err
127 }
128 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().([]string), nil
129 }
130
131 // SetHandle set Handle value
132 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) SetHandlescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#SetHandle().(v uint16) error {
133 return a.SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#SetProperty().("Handle", v)
134 }
135
136 // GetHandle get Handle value
137 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) GetHandlescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetHandle().() (uint16, error) {
138 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetProperty().("Handle")
139 if err != nil {
140 return uint16(0), err
141 }
142 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().(uint16), nil
143 }
144
145 // GetUUID get UUID value
146 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) GetUUIDscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetUUID().() (string, error) {
147 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetProperty().("UUID")
148 if err != nil {
149 return "", err
150 }
151 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().(string), nil
152 }
153
154 // GetValue get Value value
155 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) GetValuescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetValue().() ([]byte, error) {
156 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetProperty().("Value")
157 if err != nil {
158 return []byte{}, err
159 }
160 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().([]byte), nil
161 }
162
163 // Close the connection
164 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) Closescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#Close().() {
165 a.unregisterPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#unregisterPropertiesSignal().()
166 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#client..Disconnectscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Disconnect().()
167 }
168
169 // Path return GattDescriptor1 object path
170 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) Pathscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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# {
171 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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.
172 }
173
174 // Client return GattDescriptor1 dbus client
175 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) Clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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# {
176 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#client.
177 }
178
179 // Interface return GattDescriptor1 interface
180 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#Interface().() string {
181 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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.
182 }
183
184 // GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
185 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) GetObjectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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) {
186
187 if a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#objectManagerSignal. == nil {
188 if a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#objectManager. == nil {
189 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().()
190 if err != nil {
191 return nil, nil, err
192 }
193 a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#objectManager. = om
194 }
195
196 s, err := a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#objectManager..Registerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/ObjectManager#Register().()
197 if err != nil {
198 return nil, nil, err
199 }
200 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#objectManagerSignal. = s
201 }
202
203 cancel := func() {
204 if a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#objectManagerSignal. == nil {
205 return
206 }
207 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#objectManagerSignal. <- nil
208 a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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/gatt`/GattDescriptor1#objectManagerSignal.)
209 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#objectManagerSignal. = nil
210 }
211
212 return a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#objectManagerSignal., cancel, nil
213 }
214
215 // ToMap convert a GattDescriptor1Properties to map
216 func (a *GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#) ToMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#ToMap().() (map[string]interface{}, error) {
217 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
218 }
219
220 // FromMap convert a map to an GattDescriptor1Properties
221 func (a *GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#) FromMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#FromMap().(props map[string]interface{}) (*GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#, error) {
222 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#{}
223 for k, val := range props {
224 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)
225 }
226 return a.FromDBusMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#FromDBusMap().(props1)
227 }
228
229 // FromDBusMap convert a map to an GattDescriptor1Properties
230 func (a *GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#) FromDBusMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#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#) (*GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#, error) {
231 s := new(GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#)
232 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)
233 return s, err
234 }
235
236 // ToProps return the properties interface
237 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) ToPropsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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# {
238 return a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#Properties.
239 }
240
241 // GetWatchPropertiesChannel return the dbus channel to receive properties interface
242 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) GetWatchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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# {
243 return a.watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#watchPropertiesChannel.
244 }
245
246 // SetWatchPropertiesChannel set the dbus channel to receive properties interface
247 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) SetWatchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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#) {
248 a.watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#watchPropertiesChannel. = c
249 }
250
251 // GetProperties load all available properties
252 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#GetProperties().() (*GattDescriptor1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#, error) {
253 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#Properties..Lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#Lock().()
254 err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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/gatt`/GattDescriptor1#Properties.)
255 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#Properties..Unlockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1Properties#Unlock().()
256 return a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#Properties., err
257 }
258
259 // SetProperty set a property
260 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#SetProperty().(name string, value interface{}) error {
261 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#client..SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#SetProperty().(name, value)
262 }
263
264 // GetProperty get a property
265 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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) {
266 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#client..GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#GetProperty().(name)
267 }
268
269 // GetPropertiesSignal return a channel for receiving udpdates on property changes
270 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) GetPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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) {
271
272 if a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#propertiesSignal. == nil {
273 s, err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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/gatt`/GattDescriptor1#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.)
274 if err != nil {
275 return nil, err
276 }
277 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#propertiesSignal. = s
278 }
279
280 return a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#propertiesSignal., nil
281 }
282
283 // Unregister for changes signalling
284 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) unregisterPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#unregisterPropertiesSignal().() {
285 if a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#propertiesSignal. != nil {
286 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#propertiesSignal. <- nil
287 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#propertiesSignal. = nil
288 }
289 }
290
291 // WatchProperties updates on property changes
292 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) WatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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) {
293 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)
294 }
295
296 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) UnwatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#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 {
297 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)
298 }
299
300 /*
301 ReadValue Issues a request to read the value of the
302 characteristic and returns the value if the
303 operation was successful.
304 Possible options: "offset": Start offset
305 "device": Device path (Server only)
306 "link": Link type (Server only)
307 Possible Errors: org.bluez.Error.Failed
308 org.bluez.Error.InProgress
309 org.bluez.Error.NotPermitted
310 org.bluez.Error.NotAuthorized
311 org.bluez.Error.NotSupported
312
313 */
314 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) ReadValuescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#ReadValue().(flags map[string]interface{}) ([]byte, error) {
315 val0 := []byte{}
316 err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#client..Callscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Call().("ReadValue", 0, flags).Storescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Call#Store().(&val0)
317 return val0, err
318 }
319
320 /*
321 WriteValue Issues a request to write the value of the
322 characteristic.
323 Possible options: "offset": Start offset
324 "device": Device path (Server only)
325 "link": Link type (Server only)
326 "prepare-authorize": boolean Is prepare
327 authorization
328 request
329 Possible Errors: org.bluez.Error.Failed
330 org.bluez.Error.InProgress
331 org.bluez.Error.NotPermitted
332 org.bluez.Error.InvalidValueLength
333 org.bluez.Error.NotAuthorized
334 org.bluez.Error.NotSupported
335
336 */
337 func (a *GattDescriptor1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#) WriteValuescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#WriteValue().(value []byte, flags map[string]interface{}) error {
338 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattDescriptor1#client..Callscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Call().("WriteValue", 0, value, flags).Storescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Call#Store().()
339 }