Added checking for agent reply state before cancelling agent in
session_free(..). This check is needed to ensure that memory for
agent request will be freed only once (In that case, free on this
request is called later in the end of agent_reply func)
Previously changed BT fiendly name was not reflected until BT adapter reboot.
This patch fix this problem. Now changed name is reflected without need of
rebooting adapter.
Headsets for proper disconnecting need to disconnect profiles in specified
order(by ex. disconnect a2dp, then sink and hfp at the end). Instead of
adding separate callbacks for disconnecting each profile, now adding only
one callback in audio/device.c for calling audio disconnect functions in
correct order. New disconnect callback works similarly to dev_disconnect
from audio/device.c
Array of object paths representing the remote characteristics based
services. This method will be used by D-Bus clients to discover the
paths for the services provided under the interface
org.bluez.Characteristic.
GAttrib ref counter shall be used to control when the remote shall be
disconnected. Ref counter is incremented when the watcher is registered
and decremented when it leaves the bus.
When multiples requests are queued, GAttrib ref count shall be
incremented to control disconnection. Allowing to disconnect from the
remote only the last response is received. This approach allow to
address errors and continue to process queued requests.
In the client, after local or remote initiated disconnection the GAttrib
reference shall be set to NULL to allow a proper control of references
and further connections.
Add a new function to notify the GAttrib "users" when the GAttrib has
beed destroyed. The disconnect function is called only for remote initiated
disconnections or external events(not unref).
Thermometer Humidity Service contains <<Include>> attributes that it is
not supported at the momment. For this service, Characteristics D-Bus
paths are not being registered properly. This patch allows watchers
testing registered for Battery State changes.
Each registered watcher instance is associated with a characteristic
path. Value() method shall not be sent to all watchers, characteristic
path shall match.
This adds support for calling the ValueChanged() method on the registered
watcher, when a characteristic on the associated service gets updated.
For now this method will be called when we get a Notification or an
Indication from the server.
When receiving a Indication from the server, the Characteristic Value
associated with that indication is updated.
There's still no support for updating Characteristic Descriptors in
case they arrive, primarily because we don't know if it makes sense.
Now gatttol is able to receive indication events and repond to them.
For now, this response is just sending the confirmation response back
to the server and printing the received update.
This makes simpler to application which are handling many endpoints
without a context data. It also may be useful in future in case we
allow multiple transports per endpoint.
Local endpoints can only be used by when clients are connect via unix
socket since clients using D-Bus can only access the endpoint registered
via Media API.