Debian Codegraph @

bluez/profile/gatt/gen_GattManager1.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 "fmtscip-go gomod github.com/golang/go/src go1.14 fmt/"
7 "syncscip-go gomod github.com/golang/go/src go1.14 sync/"
8
9 "github.com/godbus/dbus/v5scip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/"
10 "github.com/muka/go-bluetooth/bluezscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/"
11 "github.com/muka/go-bluetooth/propsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/props`/"
12 "github.com/muka/go-bluetooth/utilscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/util`/"
13 )
14
15 var GattManager1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Interface. = "org.bluez.GattManager1"
16
17 // NewGattManager1 create a new instance of GattManager1
18 //
19 // Args:
20 // - objectPath: [variable prefix]/{hci0,hci1,...}
21 func NewGattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/NewGattManager1().(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#) (*GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#, error) {
22 a := new(GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#)
23 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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.: "org.bluez",
26 Ifacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Iface.: GattManager1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Interface.,
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/gatt`/GattManager1#Properties. = new(GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#)
32
33 _, err := a.GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#GetProperties().()
34 if err != nil {
35 return nil, err
36 }
37 return a, nil
38 }
39
40 // NewGattManager1FromAdapterID create a new instance of GattManager1
41 // adapterID: ID of an adapter eg. hci0
42 func NewGattManager1FromAdapterIDscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/NewGattManager1FromAdapterID().(adapterID string) (*GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#, error) {
43 a := new(GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#)
44 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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().(
45 &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#{
46 Namescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Name.: "org.bluez",
47 Ifacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Config#Iface.: GattManager1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Interface.,
48 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#(fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("/org/bluez/%s", adapterID)),
49 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.,
50 },
51 )
52 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#Properties. = new(GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#)
53
54 _, err := a.GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#GetProperties().()
55 if err != nil {
56 return nil, err
57 }
58 return a, nil
59 }
60
61 /*
62 GattManager1 GATT Manager hierarchy
63
64 GATT Manager allows external applications to register GATT services and
65 profiles.
66
67 Registering a profile allows applications to subscribe to *remote* services.
68 These must implement the GattProfile1 interface defined above.
69
70 Registering a service allows applications to publish a *local* GATT service,
71 which then becomes available to remote devices. A GATT service is represented by
72 a D-Bus object hierarchy where the root node corresponds to a service and the
73 child nodes represent characteristics and descriptors that belong to that
74 service. Each node must implement one of GattService1, GattCharacteristic1,
75 or GattDescriptor1 interfaces described above, based on the attribute it
76 represents. Each node must also implement the standard D-Bus Properties
77 interface to expose their properties. These objects collectively represent a
78 GATT service definition.
79
80 To make service registration simple, BlueZ requires that all objects that belong
81 to a GATT service be grouped under a D-Bus Object Manager that solely manages
82 the objects of that service. Hence, the standard DBus.ObjectManager interface
83 must be available on the root service path. An example application hierarchy
84 containing two separate GATT services may look like this:
85
86 -> /com/example
87 | - org.freedesktop.DBus.ObjectManager
88 |
89 -> /com/example/service0
90 | | - org.freedesktop.DBus.Properties
91 | | - org.bluez.GattService1
92 | |
93 | -> /com/example/service0/char0
94 | | - org.freedesktop.DBus.Properties
95 | | - org.bluez.GattCharacteristic1
96 | |
97 | -> /com/example/service0/char1
98 | | - org.freedesktop.DBus.Properties
99 | | - org.bluez.GattCharacteristic1
100 | |
101 | -> /com/example/service0/char1/desc0
102 | - org.freedesktop.DBus.Properties
103 | - org.bluez.GattDescriptor1
104 |
105 -> /com/example/service1
106 | - org.freedesktop.DBus.Properties
107 | - org.bluez.GattService1
108 |
109 -> /com/example/service1/char0
110 - org.freedesktop.DBus.Properties
111 - org.bluez.GattCharacteristic1
112
113 When a service is registered, BlueZ will automatically obtain information about
114 all objects using the service's Object Manager. Once a service has been
115 registered, the objects of a service should not be removed. If BlueZ receives an
116 InterfacesRemoved signal from a service's Object Manager, it will immediately
117 unregister the service. Similarly, if the application disconnects from the bus,
118 all of its registered services will be automatically unregistered.
119 InterfacesAdded signals will be ignored.
120
121 Examples:
122 - Client
123 test/example-gatt-client
124 client/bluetoothctl
125 - Server
126 test/example-gatt-server
127 tools/gatt-service
128
129
130 */
131 type GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1# struct {
132 clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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#
133 propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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#
134 objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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#
135 objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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#
136 Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#Properties. *GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#
137 watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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#
138 }
139
140 // GattManager1Properties contains the exposed properties of an interface
141 type GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties# struct {
142 lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#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"`
143 }
144
145 //Lock access to properties
146 func (p *GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#) Lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#Lock().() {
147 p.lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#lock..Lockscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex#Lock().()
148 }
149
150 //Unlock access to properties
151 func (p *GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#) Unlockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#Unlock().() {
152 p.lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#lock..Unlockscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex#Unlock().()
153 }
154
155 // Close the connection
156 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) Closescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#Close().() {
157 a.unregisterPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#unregisterPropertiesSignal().()
158 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#client..Disconnectscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Disconnect().()
159 }
160
161 // Path return GattManager1 object path
162 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) Pathscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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# {
163 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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.
164 }
165
166 // Client return GattManager1 dbus client
167 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) Clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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# {
168 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#client.
169 }
170
171 // Interface return GattManager1 interface
172 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#Interface().() string {
173 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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.
174 }
175
176 // GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
177 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) GetObjectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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) {
178
179 if a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#objectManagerSignal. == nil {
180 if a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#objectManager. == nil {
181 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().()
182 if err != nil {
183 return nil, nil, err
184 }
185 a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#objectManager. = om
186 }
187
188 s, err := a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#objectManager..Registerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/ObjectManager#Register().()
189 if err != nil {
190 return nil, nil, err
191 }
192 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#objectManagerSignal. = s
193 }
194
195 cancel := func() {
196 if a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#objectManagerSignal. == nil {
197 return
198 }
199 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#objectManagerSignal. <- nil
200 a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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`/GattManager1#objectManagerSignal.)
201 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#objectManagerSignal. = nil
202 }
203
204 return a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#objectManagerSignal., cancel, nil
205 }
206
207 // ToMap convert a GattManager1Properties to map
208 func (a *GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#) ToMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#ToMap().() (map[string]interface{}, error) {
209 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
210 }
211
212 // FromMap convert a map to an GattManager1Properties
213 func (a *GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#) FromMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#FromMap().(props map[string]interface{}) (*GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#, error) {
214 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#{}
215 for k, val := range props {
216 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)
217 }
218 return a.FromDBusMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#FromDBusMap().(props1)
219 }
220
221 // FromDBusMap convert a map to an GattManager1Properties
222 func (a *GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#) FromDBusMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#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#) (*GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#, error) {
223 s := new(GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#)
224 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)
225 return s, err
226 }
227
228 // ToProps return the properties interface
229 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) ToPropsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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# {
230 return a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#Properties.
231 }
232
233 // GetWatchPropertiesChannel return the dbus channel to receive properties interface
234 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) GetWatchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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# {
235 return a.watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#watchPropertiesChannel.
236 }
237
238 // SetWatchPropertiesChannel set the dbus channel to receive properties interface
239 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) SetWatchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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#) {
240 a.watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#watchPropertiesChannel. = c
241 }
242
243 // GetProperties load all available properties
244 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#GetProperties().() (*GattManager1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#, error) {
245 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#Properties..Lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#Lock().()
246 err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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`/GattManager1#Properties.)
247 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#Properties..Unlockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1Properties#Unlock().()
248 return a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#Properties., err
249 }
250
251 // SetProperty set a property
252 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#SetProperty().(name string, value interface{}) error {
253 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#client..SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#SetProperty().(name, value)
254 }
255
256 // GetProperty get a property
257 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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) {
258 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#client..GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#GetProperty().(name)
259 }
260
261 // GetPropertiesSignal return a channel for receiving udpdates on property changes
262 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) GetPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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) {
263
264 if a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#propertiesSignal. == nil {
265 s, err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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`/GattManager1#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.)
266 if err != nil {
267 return nil, err
268 }
269 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#propertiesSignal. = s
270 }
271
272 return a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#propertiesSignal., nil
273 }
274
275 // Unregister for changes signalling
276 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) unregisterPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#unregisterPropertiesSignal().() {
277 if a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#propertiesSignal. != nil {
278 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#propertiesSignal. <- nil
279 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#propertiesSignal. = nil
280 }
281 }
282
283 // WatchProperties updates on property changes
284 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) WatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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) {
285 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)
286 }
287
288 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) UnwatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#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 {
289 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)
290 }
291
292 /*
293 RegisterApplication Registers a local GATT services hierarchy as described
294 above (GATT Server) and/or GATT profiles (GATT Client).
295 The application object path together with the D-Bus
296 system bus connection ID define the identification of
297 the application registering a GATT based
298 service or profile.
299 Possible errors: org.bluez.Error.InvalidArguments
300 org.bluez.Error.AlreadyExists
301
302 */
303 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) RegisterApplicationscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#RegisterApplication().(application 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#, options map[string]interface{}) error {
304 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#client..Callscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Call().("RegisterApplication", 0, application, options).Storescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Call#Store().()
305 }
306
307 /*
308 UnregisterApplication This unregisters the services that has been
309 previously registered. The object path parameter
310 must match the same value that has been used
311 on registration.
312 Possible errors: org.bluez.Error.InvalidArguments
313 org.bluez.Error.DoesNotExist
314
315 */
316 func (a *GattManager1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#) UnregisterApplicationscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#UnregisterApplication().(application 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 {
317 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattManager1#client..Callscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Call().("UnregisterApplication", 0, application).Storescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Call#Store().()
318 }