Debian Codegraph @

bluez/profile/gatt/gen_GattService1.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 GattService1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Interface. = "org.bluez.GattService1"
15
16 // NewGattService1 create a new instance of GattService1
17 //
18 // Args:
19 // - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/serviceXX
20 func NewGattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/NewGattService1().(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#) (*GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#, error) {
21 a := new(GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#)
22 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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.: GattService1Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Interface.,
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`/GattService1#Properties. = new(GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#)
31
32 _, err := a.GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetProperties().()
33 if err != nil {
34 return nil, err
35 }
36 return a, nil
37 }
38
39 /*
40 GattService1 Service hierarchy
41
42 GATT remote and local service representation. Object path for local services
43 is freely definable.
44
45 External applications implementing local services must register the services
46 using GattManager1 registration method and must implement the methods and
47 properties defined in GattService1 interface.
48
49 */
50 type GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1# struct {
51 clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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#
52 propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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#
53 objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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#
54 objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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#
55 Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#Properties. *GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#
56 watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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#
57 }
58
59 // GattService1Properties contains the exposed properties of an interface
60 type GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties# struct {
61 lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#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"`
62
63 /*
64 Characteristics
65 */
66 Characteristicsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#Characteristics. []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# `dbus:"emit"`
67
68 /*
69 Device Object path of the Bluetooth device the service
70 belongs to. Only present on services from remote
71 devices.
72 */
73 Devicescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#Device. dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath# `dbus:"ignore=IsService"`
74
75 /*
76 Handle Service handle. When available in the server it
77 would attempt to use to allocate into the database
78 which may fail, to auto allocate the value 0x0000
79 shall be used which will cause the allocated handle to
80 be set once registered.
81 */
82 Handlescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#Handle. uint16
83
84 /*
85 Includes Array of object paths representing the included
86 services of this service.
87 */
88 Includesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#Includes. []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# `dbus:"omitEmpty"`
89
90 /*
91 IsService
92 */
93 IsServicescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#IsService. bool `dbus:"ignore"`
94
95 /*
96 Primary Indicates whether or not this GATT service is a
97 primary service. If false, the service is secondary.
98 */
99 Primaryscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#Primary. bool
100
101 /*
102 UUID 128-bit service UUID.
103 */
104 UUIDscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#UUID. string
105 }
106
107 //Lock access to properties
108 func (p *GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#) Lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#Lock().() {
109 p.lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#lock..Lockscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex#Lock().()
110 }
111
112 //Unlock access to properties
113 func (p *GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#) Unlockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#Unlock().() {
114 p.lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#lock..Unlockscip-go gomod github.com/golang/go/src go1.14 sync/RWMutex#Unlock().()
115 }
116
117 // SetCharacteristics set Characteristics value
118 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) SetCharacteristicsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#SetCharacteristics().(v []dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath#) error {
119 return a.SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#SetProperty().("Characteristics", v)
120 }
121
122 // GetCharacteristics get Characteristics value
123 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetCharacteristicsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetCharacteristics().() ([]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) {
124 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetProperty().("Characteristics")
125 if err != nil {
126 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
127 }
128 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
129 }
130
131 // GetDevice get Device value
132 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetDevicescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetDevice().() (dbusscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/.ObjectPathscip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/ObjectPath#, error) {
133 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetProperty().("Device")
134 if err != nil {
135 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
136 }
137 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
138 }
139
140 // SetHandle set Handle value
141 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) SetHandlescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#SetHandle().(v uint16) error {
142 return a.SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#SetProperty().("Handle", v)
143 }
144
145 // GetHandle get Handle value
146 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetHandlescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetHandle().() (uint16, error) {
147 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetProperty().("Handle")
148 if err != nil {
149 return uint16(0), err
150 }
151 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().(uint16), nil
152 }
153
154 // GetIncludes get Includes value
155 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetIncludesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetIncludes().() ([]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) {
156 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetProperty().("Includes")
157 if err != nil {
158 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
159 }
160 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
161 }
162
163 // SetIsService set IsService value
164 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) SetIsServicescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#SetIsService().(v bool) error {
165 return a.SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#SetProperty().("IsService", v)
166 }
167
168 // GetIsService get IsService value
169 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetIsServicescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetIsService().() (bool, error) {
170 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetProperty().("IsService")
171 if err != nil {
172 return false, err
173 }
174 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().(bool), nil
175 }
176
177 // GetPrimary get Primary value
178 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetPrimaryscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetPrimary().() (bool, error) {
179 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetProperty().("Primary")
180 if err != nil {
181 return false, err
182 }
183 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().(bool), nil
184 }
185
186 // GetUUID get UUID value
187 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetUUIDscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetUUID().() (string, error) {
188 v, err := a.GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetProperty().("UUID")
189 if err != nil {
190 return "", err
191 }
192 return v.Valuescip-go gomod github.com/godbus/dbus/v5 v5.0.3 `github.com/godbus/dbus/v5`/Variant#Value().().(string), nil
193 }
194
195 // Close the connection
196 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) Closescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#Close().() {
197 a.unregisterPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#unregisterPropertiesSignal().()
198 a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#client..Disconnectscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#Disconnect().()
199 }
200
201 // Path return GattService1 object path
202 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) Pathscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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# {
203 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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.
204 }
205
206 // Client return GattService1 dbus client
207 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) Clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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# {
208 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#client.
209 }
210
211 // Interface return GattService1 interface
212 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) Interfacescip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#Interface().() string {
213 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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.
214 }
215
216 // GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
217 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetObjectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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) {
218
219 if a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#objectManagerSignal. == nil {
220 if a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#objectManager. == nil {
221 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().()
222 if err != nil {
223 return nil, nil, err
224 }
225 a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#objectManager. = om
226 }
227
228 s, err := a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#objectManager..Registerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/ObjectManager#Register().()
229 if err != nil {
230 return nil, nil, err
231 }
232 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#objectManagerSignal. = s
233 }
234
235 cancel := func() {
236 if a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#objectManagerSignal. == nil {
237 return
238 }
239 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#objectManagerSignal. <- nil
240 a.objectManagerscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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`/GattService1#objectManagerSignal.)
241 a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#objectManagerSignal. = nil
242 }
243
244 return a.objectManagerSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#objectManagerSignal., cancel, nil
245 }
246
247 // ToMap convert a GattService1Properties to map
248 func (a *GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#) ToMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#ToMap().() (map[string]interface{}, error) {
249 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
250 }
251
252 // FromMap convert a map to an GattService1Properties
253 func (a *GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#) FromMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#FromMap().(props map[string]interface{}) (*GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#, error) {
254 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#{}
255 for k, val := range props {
256 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)
257 }
258 return a.FromDBusMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#FromDBusMap().(props1)
259 }
260
261 // FromDBusMap convert a map to an GattService1Properties
262 func (a *GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#) FromDBusMapscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#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#) (*GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#, error) {
263 s := new(GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#)
264 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)
265 return s, err
266 }
267
268 // ToProps return the properties interface
269 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) ToPropsscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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# {
270 return a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#Properties.
271 }
272
273 // GetWatchPropertiesChannel return the dbus channel to receive properties interface
274 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetWatchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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# {
275 return a.watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#watchPropertiesChannel.
276 }
277
278 // SetWatchPropertiesChannel set the dbus channel to receive properties interface
279 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) SetWatchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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#) {
280 a.watchPropertiesChannelscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#watchPropertiesChannel. = c
281 }
282
283 // GetProperties load all available properties
284 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#GetProperties().() (*GattService1Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#, error) {
285 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#Properties..Lockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#Lock().()
286 err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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`/GattService1#Properties.)
287 a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#Properties..Unlockscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1Properties#Unlock().()
288 return a.Propertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#Properties., err
289 }
290
291 // SetProperty set a property
292 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#SetProperty().(name string, value interface{}) error {
293 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#client..SetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#SetProperty().(name, value)
294 }
295
296 // GetProperty get a property
297 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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) {
298 return a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#client..GetPropertyscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez`/Client#GetProperty().(name)
299 }
300
301 // GetPropertiesSignal return a channel for receiving udpdates on property changes
302 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) GetPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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) {
303
304 if a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#propertiesSignal. == nil {
305 s, err := a.clientscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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`/GattService1#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.)
306 if err != nil {
307 return nil, err
308 }
309 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#propertiesSignal. = s
310 }
311
312 return a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#propertiesSignal., nil
313 }
314
315 // Unregister for changes signalling
316 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) unregisterPropertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#unregisterPropertiesSignal().() {
317 if a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#propertiesSignal. != nil {
318 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#propertiesSignal. <- nil
319 a.propertiesSignalscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#propertiesSignal. = nil
320 }
321 }
322
323 // WatchProperties updates on property changes
324 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) WatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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) {
325 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)
326 }
327
328 func (a *GattService1scip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#) UnwatchPropertiesscip-go gomod github.com/muka/go-bluetooth . `github.com/muka/go-bluetooth/bluez/profile/gatt`/GattService1#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 {
329 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)
330 }