Commit Graph

7356 Commits

Author SHA1 Message Date
Johan Hedberg
3e2860479c Move event mask setting to hciops 2010-09-30 15:56:26 +03:00
Rafal Michalski
ce5207cdc2 Fix handlig for gboolean mce_bt_set field
(sigvalue & MCE_RADIO_STATE_BLUETOOTH) evaluates to 8 instead of 1
(TRUE). A double negation makes sure that it's either 1 or 0.
2010-09-30 13:48:10 +03:00
Johan Hedberg
b5c556ef59 Move adapter address reading to hciops 2010-09-29 16:34:55 +03:00
Johan Hedberg
e070bc1146 Move EIR data writing to hciops 2010-09-29 16:34:37 +03:00
Radoslaw Jablonski
362f4a0d56 Add checking for agent reply state in adapter
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)
2010-09-28 14:17:12 +03:00
Lukasz Pawlik
1998ef247e Fix problem with EIR data when setting the name
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.
2010-09-28 10:48:14 +03:00
Radoslaw Jablonski
1dacc118c8 Fix headset disconnecting via device disconnect
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
2010-09-28 10:41:02 +03:00
Claudio Takahasi
e7b1d878d1 Fix coding style issues in attribute client code 2010-09-22 16:33:15 -04:00
Claudio Takahasi
db17a5390a Add a new property "Services" on the Device object
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.
2010-09-22 16:32:35 -04:00
Claudio Takahasi
580f4cf025 Fix wrong D-Bus object path for Device Service 2010-09-22 16:00:16 -04:00
Claudio Takahasi
727ae28e17 Delete all stored data related to GATT/ATT when the device is removed 2010-09-22 16:00:04 -04:00
Claudio Takahasi
d74b6fd61f Remove the timeout source function when the example server exits 2010-09-22 16:00:04 -04:00
Claudio Takahasi
a66ccf347b Fix memory leak of characteristic and primary service lists 2010-09-22 16:00:04 -04:00
Claudio Takahasi
90e1990f85 Unregister the primary and characteristic objects
Removes memory leak. When the attribute client is unregistered
primary and characteristic D-Bus objects shall be unregistered.
2010-09-22 16:00:04 -04:00
Claudio Takahasi
4435515810 Add UnregisterCharacteristicsWatcher implementation 2010-09-22 16:00:04 -04:00
Claudio Takahasi
59cc5e1fd0 Fix seg fault if the watcher exit before the connection complete 2010-09-22 16:00:04 -04:00
Claudio Takahasi
2eb3b72ac4 Fix disconnection when multiple watchers are registered
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.
2010-09-22 16:00:04 -04:00
Claudio Takahasi
6b2fea1f37 Increment GAttrib reference for each GATT/ATT request
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.
2010-09-22 15:59:52 -04:00
Claudio Takahasi
d0bfd6eaa5 Use the destroy function to reset the GAttrib reference
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.
2010-09-22 15:55:18 -04:00
Claudio Takahasi
8545bdc1ea Add g_attrib_set_destroy_function in gattrib
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).
2010-09-22 15:55:18 -04:00
Claudio Takahasi
a5e1be914b Fix uninitialised value warning 2010-09-22 22:34:27 +03:00
Claudio Takahasi
27be80c804 Remove forward declaration on gattrib source 2010-09-22 22:34:27 +03:00
Claudio Takahasi
1b21625fb0 Add missing response for handle value indication on attribute client 2010-09-22 22:34:27 +03:00
Claudio Takahasi
8204b2e818 Report attribute changes for the Battery Service
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.
2010-09-22 22:34:27 +03:00
Claudio Takahasi
3fd8fddef6 Change notification/indication output formating on gatttool 2010-09-22 22:34:27 +03:00
Vinicius Costa Gomes
a58f4d094a Add a way to unregister GAttrib events
This implements g_attrib_unregister and g_attrib_unregister_all, these
methods allow events to be unregistered.
2010-09-22 22:34:26 +03:00
Claudio Takahasi
cb91573bfd Watchers don't need to reply for characteristic value updates
Value method call doesn't need confirmation. Minor optimization to
not sending method return or error replies.
2010-09-22 22:34:26 +03:00
Claudio Takahasi
e4481c09c4 Add watcher's characteristic path verification before notify changes
Each registered watcher instance is associated with a characteristic
path. Value() method shall not be sent to all watchers, characteristic
path shall match.
2010-09-22 22:34:26 +03:00
Claudio Takahasi
8125506bc1 Return an error if the path doesn't exist when registering a watcher
In the register characteristic watcher method, the given parameter
(characteristic path) shall be validated before register the watcher.
2010-09-22 22:34:26 +03:00
Vinicius Costa Gomes
316f35e7d8 Add support for actively updating the watcher
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.
2010-09-22 22:34:26 +03:00
Vinicius Costa Gomes
d98a28dabf Add support for Indications to the client
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.
2010-09-22 22:34:26 +03:00
Vinicius Costa Gomes
1bacf59916 Add support for Indications to gatttool
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.
2010-09-22 22:34:26 +03:00
Vinicius Costa Gomes
c41e56780b Add support to the server to sending Indications 2010-09-22 22:34:26 +03:00
Vinicius Costa Gomes
9041deab65 Add encoders/decoders for Indication/Confirmation 2010-09-22 22:34:26 +03:00
Claudio Takahasi
37e3aa41e8 Update characteristic value when a notification is received
Changes the internal characteristic value in attribute client side.
Messages to notify the watchers are not being sent yet.
2010-09-22 22:34:26 +03:00
Bastien Nocera
7bf4b08d0b Also run bluetoothd on udev change events
Fixes bluetoothd not starting on cold boot with newer versions
of udev. See:
https://bugzilla.redhat.com/show_bug.cgi?id=634205
2010-09-22 22:26:02 +03:00
Jose Antonio Santos Cadenas
057c6f4b1a Fix wrong parameter name in device.h 2010-09-22 22:24:53 +03:00
Luiz Augusto von Dentz
64c3ed6559 Make MediaEndpoint.ClearConfiguration to take transport path
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.
2010-09-22 22:23:38 +03:00
Luiz Augusto von Dentz
94d0f3a197 Make MediaEndpoint.SetConfiguration to take all transport properties
This will probably avoid the endpoint agent to have to call GetProperties
to check for transport properties.
2010-09-22 22:23:38 +03:00
Luiz Augusto von Dentz
7e743bcace Replace use of term 'Renderer' with 'Owner' 2010-09-22 22:23:38 +03:00
Luiz Augusto von Dentz
ce9eaf8572 Remove ReadLock and WriteLock from MediaTransport properties 2010-09-22 22:23:38 +03:00
Luiz Augusto von Dentz
b5251802a1 Fix registering local endpoints when Socket interface is disabled
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.
2010-09-22 22:23:38 +03:00
Johan Hedberg
ec901c2428 Fix reading local name from command complete event
The event consists of 1 byte status + 248 byte name so 249 bytes should
be copied and not 248 bytes.
2010-09-22 17:48:14 +03:00
Marcel Holtmann
cca89b3d5c Release 4.72 2010-09-22 19:48:34 +09:00
Johan Hedberg
9b4fa9f23b Add a2dp-codecs.h to dist 2010-09-22 12:53:06 +03:00
Johan Hedberg
0ca6eacb9a Remove redundant parentheses 2010-09-22 10:55:11 +03:00
Santiago Carot-Nemesio
bab7bc682b Remove magic numbers in MCAP CSP 2010-09-22 10:48:16 +03:00
Santiago Carot-Nemesio
d9c916ac62 Simplify logic to calculate the BT/system clock latency
This is only a cosmetic change. Using a while loop
we avoid direct manipulation of counter loop variable
when error happens reading the BT clock.
2010-09-22 10:48:11 +03:00
Johan Hedberg
ad737e6427 Fix coding style issues in hciops 2010-09-22 10:46:05 +03:00
Johan Hedberg
c67ba167cc Fix usage of error variables
Integer type "err" variables should always be negative to be consistent
with the rest of the code base.
2010-09-22 10:39:15 +03:00