OSDN Git Service

android-x86/external-bluetooth-bluez.git
11 years agoobexd: Get rid of gint
Lucas De Marchi [Wed, 1 May 2013 05:27:57 +0000 (02:27 -0300)]
obexd: Get rid of gint

Use plain int instead of gint. In glib gint is always a typedef to int,
so it's safe to use it even for callbacks with glib.

11 years agogobex: Get rid of gint
Lucas De Marchi [Wed, 1 May 2013 05:27:56 +0000 (02:27 -0300)]
gobex: Get rid of gint

Use plain int instead of gint. In glib gint is always a typedef to int,
so it's safe to use it even for callbacks with glib.

11 years agoattrib: Get rid of gint
Lucas De Marchi [Wed, 1 May 2013 05:27:55 +0000 (02:27 -0300)]
attrib: Get rid of gint

Use plain int instead of gint. In glib gint is always a typedef to int,
so it's safe to use it even for callbacks with glib.

11 years agoemulator: Remove unneeded btdev_set_bdaddr function
Johan Hedberg [Tue, 30 Apr 2013 10:21:23 +0000 (13:21 +0300)]
emulator: Remove unneeded btdev_set_bdaddr function

11 years agolib: Fix list of company identifiers
Anderson Lizardo [Thu, 11 Apr 2013 18:59:12 +0000 (14:59 -0400)]
lib: Fix list of company identifiers

Fix minor typos on company names.

11 years agoshared: Remove static address assignment in hciemu
Jefferson Delfes [Thu, 11 Apr 2013 15:24:43 +0000 (11:24 -0400)]
shared: Remove static address assignment in hciemu

If we need multiple virtual devices, addresses should not be the same.
Inside the function btdev_create, a specific address is generated.

11 years agoshared: Return real address of master dev in hciemu
Jefferson Delfes [Thu, 11 Apr 2013 15:24:44 +0000 (11:24 -0400)]
shared: Return real address of master dev in hciemu

Exports master btdev address in hciemu.

11 years agoemulator: Add getter function for device address in btdev
Jefferson Delfes [Thu, 11 Apr 2013 15:24:42 +0000 (11:24 -0400)]
emulator: Add getter function for device address in btdev

This helper function returns bdaddr field from btdev.

11 years agoattrib-server: Fix btd_device_get_storage_path failure handling
Johan Hedberg [Mon, 29 Apr 2013 13:28:13 +0000 (16:28 +0300)]
attrib-server: Fix btd_device_get_storage_path failure handling

11 years agoproximity: Fix btd_device_get_storage_path failure handling
Johan Hedberg [Mon, 29 Apr 2013 13:27:51 +0000 (16:27 +0300)]
proximity: Fix btd_device_get_storage_path failure handling

11 years agogatt: Fix btd_device_get_storage_path failure handling
Johan Hedberg [Mon, 29 Apr 2013 13:27:38 +0000 (16:27 +0300)]
gatt: Fix btd_device_get_storage_path failure handling

11 years agoalert: Fix btd_device_get_storage_path failure handling
Johan Hedberg [Mon, 29 Apr 2013 13:27:14 +0000 (16:27 +0300)]
alert: Fix btd_device_get_storage_path failure handling

11 years agocore: Refuse storage for private addressed devices
Johan Hedberg [Mon, 29 Apr 2013 13:26:44 +0000 (16:26 +0300)]
core: Refuse storage for private addressed devices

11 years agocore: Fix storing info for private addressed devices
Johan Hedberg [Mon, 29 Apr 2013 11:02:34 +0000 (14:02 +0300)]
core: Fix storing info for private addressed devices

Devices with private addresses cannot persistently be identified by
their address. Therefore it doesn't make sense to store any information
about them as the information couldn't be looked up later once the
remote address has changed.

Once the kernel receives support for private address resolution we'll
start getting the public address of such devices to user space. However,
until then we just have to ignore such devices from a storage
perspective.

11 years agocore: Remove useless attrib server confirm callback
Johan Hedberg [Fri, 26 Apr 2013 13:38:50 +0000 (16:38 +0300)]
core: Remove useless attrib server confirm callback

11 years agoprofile: Use btd_service for connect/disconnect
Mikel Astiz [Fri, 26 Apr 2013 09:46:25 +0000 (11:46 +0200)]
profile: Use btd_service for connect/disconnect

Change the btd_profile connect/disconnect callbacks to receive a
btd_service pointer. This should make it possible to handle multiple
instances of the same profile in a specific device.

The patch strongly influences how the profiles should interact with the
core. The state transitions, previously reported using the device.h API
(device_profile_connected() and device_profile_disconnected()), have
now been replaced by the btd_service API.

The transitions will then be propagated to device.c by means of the
conventional state-changed callback mechanism.

11 years agoservice: Add callbacks to track state changes
Mikel Astiz [Fri, 26 Apr 2013 09:46:24 +0000 (11:46 +0200)]
service: Add callbacks to track state changes

Extend the btd_service API to support state observers.

11 years agoservice: Add error-code btd_service
Mikel Astiz [Fri, 26 Apr 2013 09:46:23 +0000 (11:46 +0200)]
service: Add error-code btd_service

The error-code represents the result of a connection/disconnection
procedure and can be useful when a state transition is detected.

11 years agotools: Fix parsing of PlayItem pdu in hcidump
Luiz Augusto von Dentz [Fri, 26 Apr 2013 09:38:07 +0000 (12:38 +0300)]
tools: Fix parsing of PlayItem pdu in hcidump

11 years agomonitor: Fix ATT Read By Type Response minimum length
Johan Hedberg [Fri, 26 Apr 2013 10:47:35 +0000 (13:47 +0300)]
monitor: Fix ATT Read By Type Response minimum length

11 years agoinput: Hold a reference to btd_service
Mikel Astiz [Fri, 26 Apr 2013 06:17:21 +0000 (08:17 +0200)]
input: Hold a reference to btd_service

Profile implementations are allowed to hold a reference to probed
services and make use of the service's userdata pointer, so update the
input profiles accordingly.

11 years agocontrol: Bypass manager for connect state changes
Mikel Astiz [Fri, 26 Apr 2013 06:17:20 +0000 (08:17 +0200)]
control: Bypass manager for connect state changes

Move the code to propagate the AVRCP->core state changes from manager.c
to control.c.

11 years agoaudio: Hold a reference to btd_service
Mikel Astiz [Fri, 26 Apr 2013 06:17:19 +0000 (08:17 +0200)]
audio: Hold a reference to btd_service

Profile implementations are allowed to hold a reference to probed
services, so update the audio profiles accordingly.

11 years agonetwork: Hold a reference to btd_service
Mikel Astiz [Fri, 26 Apr 2013 06:17:18 +0000 (08:17 +0200)]
network: Hold a reference to btd_service

Profile implementations are allowed to hold a reference to probed
services and make use of the service's userdata pointer, so update the
network profiles accordingly.

11 years agocore: Add user_data to btd_service
Mikel Astiz [Fri, 26 Apr 2013 06:17:17 +0000 (08:17 +0200)]
core: Add user_data to btd_service

Profile implementations can benefit from a user_data associated to a
service, which will typically be set during probe.

11 years agonetwork: Add trivial helper function
Mikel Astiz [Fri, 26 Apr 2013 06:17:16 +0000 (08:17 +0200)]
network: Add trivial helper function

Simplify the code and make it more readable by adding a trivial helper
function.

11 years agoprofile: Use btd_service for probing profiles
Mikel Astiz [Fri, 26 Apr 2013 06:17:15 +0000 (08:17 +0200)]
profile: Use btd_service for probing profiles

Change the profile probe mechanism in order to pass the btd_service
instance representing the remote service. This object is bound to a
btd_profile and a btd_device, thus replacing the previous parameters.

The probe callback is allowed to hold a reference to the btd_service
by means of btd_service_ref(), which should be unreferenced during
removal.

Keeping such a reference of the btd_service allows supporting multiple
instances of the same UUID, since the reference can serve as a handle
during the interactions between the profile implementation and the core.

11 years agodevice: Replace pending profile list with services
Mikel Astiz [Fri, 26 Apr 2013 06:17:14 +0000 (08:17 +0200)]
device: Replace pending profile list with services

Use btd_service pointers to represent the list of services pending for
connection.

This list doesn't reference count the btd_service instances, since the
pending services should be a subset of the available services, and thus
they should already be referenced by device->services. This means
special care must be taken to make sure any removed service is also
removed from the pending list, as addressed in remove_service().

11 years agodevice: Find services instead of profiles
Mikel Astiz [Fri, 26 Apr 2013 06:17:13 +0000 (08:17 +0200)]
device: Find services instead of profiles

Trivially replace the former find_connectable_profile() with
find_connectable_service().

11 years agodevice: Replace connected_profiles with btd_service
Mikel Astiz [Fri, 26 Apr 2013 06:17:12 +0000 (08:17 +0200)]
device: Replace connected_profiles with btd_service

The service state can provide enough information not to maintain such
a connected_profiles list. Therefore, avoid duplicated information and
remove the list.

11 years agocore: Add a state enum to btd_service
Mikel Astiz [Fri, 26 Apr 2013 06:17:11 +0000 (08:17 +0200)]
core: Add a state enum to btd_service

Add a state to btd_service in order to distinguish which operations are
allowed in a certain point in time.

11 years agocore: Add connect/disconnect API to btd_service
Mikel Astiz [Fri, 26 Apr 2013 06:17:10 +0000 (08:17 +0200)]
core: Add connect/disconnect API to btd_service

Make use of the btd_profile connect/disconnect callbacks directly within
service.c instead of doing it inside device.c.

11 years agocore: Add probe API to btd_service
Mikel Astiz [Fri, 26 Apr 2013 06:17:09 +0000 (08:17 +0200)]
core: Add probe API to btd_service

Make use of the btd_profile callbacks directly within service.c instead
of doing it inside device.c.

11 years agodevice: Use btd_service to represent profiles
Mikel Astiz [Fri, 26 Apr 2013 06:17:08 +0000 (08:17 +0200)]
device: Use btd_service to represent profiles

Maintain a list of btd_service pointers instead of btd_profile pointers,
for services that have been probed for this device.

This list will not only reference count the btd_service instances but
also "own" them, in the sense of destroying them (make them completely
unavailable) when the service is removed from the list. This is needed
because the btd_service does not reference count the btd_device
instance.

11 years agocore: Add btd_service to represent device services
Mikel Astiz [Fri, 26 Apr 2013 06:17:07 +0000 (08:17 +0200)]
core: Add btd_service to represent device services

Add a new object to centralize all data corresponding to a service
provided by a remote device, coupling a pair of btd_profile and
btd_device pointers.

11 years agonetwork: Bypass manager during probe/remove
Mikel Astiz [Fri, 26 Apr 2013 06:17:06 +0000 (08:17 +0200)]
network: Bypass manager during probe/remove

Use the internal device API to provide the btd_profile callback
functions, without boilerplate code in manager.c.

11 years agoinput: Remove useless forward declarations
Johan Hedberg [Fri, 26 Apr 2013 07:19:34 +0000 (10:19 +0300)]
input: Remove useless forward declarations

11 years agoinput: Bypass manager during probe/remove
Mikel Astiz [Fri, 26 Apr 2013 06:17:05 +0000 (08:17 +0200)]
input: Bypass manager during probe/remove

Use the internal device API to provide the btd_profile callback
functions, without boilerplate code in manager.c.

11 years agoinput: Remove unused UUID field
Mikel Astiz [Fri, 26 Apr 2013 06:17:04 +0000 (08:17 +0200)]
input: Remove unused UUID field

Trivially remove the field because it's actually not being used.

11 years agoinput: Move timeout setting to device.c
Mikel Astiz [Fri, 26 Apr 2013 06:17:03 +0000 (08:17 +0200)]
input: Move timeout setting to device.c

The timeout setting is global across devices and it's actually only used
inside device.c. Therefore, simplify the code by just passing it once.

11 years agoinput: Fix ignored profile shutdown
Mikel Astiz [Fri, 26 Apr 2013 06:17:02 +0000 (08:17 +0200)]
input: Fix ignored profile shutdown

Unprobing the profile should never fail which means neither should
input_device_unregister(). This requires shutting everything down
regardless of possible pending connection requests.

11 years agonetwork: Fail if multiple profile instances
Mikel Astiz [Fri, 26 Apr 2013 06:17:01 +0000 (08:17 +0200)]
network: Fail if multiple profile instances

Considerable parts codebase are assuming that there is one single
instance of each UUID and therefore return an error during probe instead
of silently ignoring duplicated entries.

11 years agoprofile: Remove UUID list from probe function
Mikel Astiz [Fri, 26 Apr 2013 06:17:00 +0000 (08:17 +0200)]
profile: Remove UUID list from probe function

Each instance of btd_profile is associated to one single remote UUID
and therefore the list provided by the callback is redundant and can be
removed.

11 years agoinput: Simplify code since UUID is known
Mikel Astiz [Fri, 26 Apr 2013 06:16:59 +0000 (08:16 +0200)]
input: Simplify code since UUID is known

The UUID in this code path is fixed so trivially use it instead of
using the provided probe parameter.

11 years agocontrol: Simplify UUID handling during probe
Mikel Astiz [Fri, 26 Apr 2013 06:16:58 +0000 (08:16 +0200)]
control: Simplify UUID handling during probe

There is actually one single UUID which can be received during probe, so
simplify the code accordingly.

11 years agodevice: Fix returned error code
Mikel Astiz [Fri, 26 Apr 2013 06:16:57 +0000 (08:16 +0200)]
device: Fix returned error code

The second 'err' shadows the main local variable which is being used to
as return value of the function. Otherwise -ENOENT was always returned
in case of error.

11 years agodoc: Fix optional properties not marked as such
Mikel Astiz [Thu, 25 Apr 2013 07:33:55 +0000 (09:33 +0200)]
doc: Fix optional properties not marked as such

Commit 826023de56896e83f35ae69a73d6a120a2f5b11e made some of the
device's properties optional but the documentation was not updated
accordingly. More specifically, the properties 'Name' and 'UUIDs' won't
be present if the information is not available.

11 years agomonitor: Add an option to dump SCO traffic
Vinicius Costa Gomes [Wed, 17 Apr 2013 15:03:42 +0000 (12:03 -0300)]
monitor: Add an option to dump SCO traffic

11 years agoattrib: Change match_event return type from gboolean
Jefferson Delfes [Wed, 17 Apr 2013 14:03:08 +0000 (10:03 -0400)]
attrib: Change match_event return type from gboolean

There is no reason to use gboolean as return type of match_event.

11 years agoattrib: Change is_response return type from gboolean
Jefferson Delfes [Wed, 17 Apr 2013 14:03:07 +0000 (10:03 -0400)]
attrib: Change is_response return type from gboolean

There is no reason to use gboolean as return type of is_response.

11 years agoattrib: Change command->sent type from gboolean
Jefferson Delfes [Wed, 17 Apr 2013 14:03:06 +0000 (10:03 -0400)]
attrib: Change command->sent type from gboolean

There is no reason to command->sent be gboolean.

11 years agoattrib: Change GAttrib->stale type from gboolean
Jefferson Delfes [Wed, 17 Apr 2013 14:03:05 +0000 (10:03 -0400)]
attrib: Change GAttrib->stale type from gboolean

There is no reason to GAttrib->stale be gboolean.

11 years agoattrib: Simplify boolean tests
Jefferson Delfes [Wed, 17 Apr 2013 14:03:04 +0000 (10:03 -0400)]
attrib: Simplify boolean tests

Remove unnecessary TRUE/FALSE in boolean tests.

11 years agotools/mgmt-tester: Fix expect_len assignment to use right variable
Johan Hedberg [Wed, 24 Apr 2013 09:58:21 +0000 (12:58 +0300)]
tools/mgmt-tester: Fix expect_len assignment to use right variable

11 years agotools/mgmt-tester: Add valid test case for LE-only discovery
Johan Hedberg [Wed, 24 Apr 2013 09:57:34 +0000 (12:57 +0300)]
tools/mgmt-tester: Add valid test case for LE-only discovery

11 years agotools/mgmt-tester: Update LE-only test case pre-conditions
Johan Hedberg [Wed, 24 Apr 2013 09:48:30 +0000 (12:48 +0300)]
tools/mgmt-tester: Update LE-only test case pre-conditions

Starting with Linux 3.10 single mode controllers will always have the LE
setting bit enabled in the current_settings mask.

11 years agotools: Fix avrcp_media_element_item_dump to print elements properly
Luiz Augusto von Dentz [Mon, 22 Apr 2013 16:26:02 +0000 (19:26 +0300)]
tools: Fix avrcp_media_element_item_dump to print elements properly

11 years agocore: Delay Paired property until SDP completes
Johan Hedberg [Tue, 23 Apr 2013 17:26:18 +0000 (20:26 +0300)]
core: Delay Paired property until SDP completes

To make it easier for clients to know when SDP has completed, and to
make the property consistent with the timing of the Device1.Pair()
method return it makes sense to delay the "Paired" property change until
SDP has completed.

11 years agoinput: Automatically attempt a reconnect when required.
Alex Deymo [Tue, 16 Apr 2013 21:58:41 +0000 (14:58 -0700)]
input: Automatically attempt a reconnect when required.

The HID 1.1 spec requires a host to attempt a reconnection when a
HID device goes out of range and comes back. There is test (see
TP/HCE/BV-04-I [Host Initiated Re-connection]) to ensure that the
host initiates the connection when that happens.

This patch adds a reconnection timer for HID devices trying to
reconnect every 30s for a maximum of 3 minutes after the connection
to a HID device with a ReconnectMode of "host" or "any" is closed.

11 years agoinput: Fix memory leak for hidp_connadd_req.
Alex Deymo [Tue, 16 Apr 2013 21:58:40 +0000 (14:58 -0700)]
input: Fix memory leak for hidp_connadd_req.

If the struct input_device is destroyed while a hidp_connad_req
is pending, the input_device will be destroyed leaking the associated
memory.

==30790== 492 (168 direct, 324 indirect) bytes in 1 blocks are definitely lost in loss record 199 of 216
==30790==    at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30790==    by 0x4E7FAE0: g_malloc0 (gmem.c:189)
==30790==    by 0x4378E4: hidp_add_connection (device.c:365)
==30790==    by 0x438055: input_device_connected (device.c:525)
==30790==    by 0x4380DA: interrupt_connect_cb (device.c:548)
==30790==    by 0x443508: connect_cb (btio.c:230)
==30790==    by 0x4E79D52: g_main_context_dispatch (gmain.c:2539)
==30790==    by 0x4E7A09F: g_main_context_iterate.isra.23 (gmain.c:3146)
==30790==    by 0x4E7A499: g_main_loop_run (gmain.c:3340)
==30790==    by 0x448CCC: main (main.c:583)

11 years agoinput: Convert gboolean to bool
Alex Deymo [Tue, 16 Apr 2013 21:58:39 +0000 (14:58 -0700)]
input: Convert gboolean to bool

Remove some usage of gboolean in favor of bool.

11 years agoinput: Implement the new ReconnectMode Input1 property.
Alex Deymo [Tue, 16 Apr 2013 21:58:38 +0000 (14:58 -0700)]
input: Implement the new ReconnectMode Input1 property.

The "Connectability" of a HID device, as defined by the HID spec,
governs the way the host may and should connect to a HID device or
expect a connection from it. In the comon case of mice and keyboards
the HIDNormallyConnectable is FALSE and HIDReconnectInitiate is TRUE,
since those devices only attempt a connection to the host when they
have some data to transfer. A connection attempt initiated from the
host after the device drops the connection (while still paired) will
result in a Page timeout.

This patch exposes a new property called "ReconnectMode" combining the
those two SDP attributes as shown in the Connectability section of the
HID spec (see section 5.4.2). The property can have one of the following
four values: "None", "Device", "Host", "Any", and is derived from the
SDP cached value on device creation even if the device is off.

11 years agoinput: Documentation for new Input1 interface
Alex Deymo [Tue, 16 Apr 2013 21:58:37 +0000 (14:58 -0700)]
input: Documentation for new Input1 interface

Adds documentation for a new Input1 interface explaining a new
"ReconnectMode" property that exposes the Connectability mode of
a HID device.

11 years agotools: Fix AVRCP parsing of GetFolderItems for folders and items
Luiz Augusto von Dentz [Fri, 19 Apr 2013 13:33:37 +0000 (16:33 +0300)]
tools: Fix AVRCP parsing of GetFolderItems for folders and items

Length of name is 2 bytes not 1

11 years agoemulator: Remove extended features from LE-only controllers
Johan Hedberg [Fri, 19 Apr 2013 13:51:07 +0000 (16:51 +0300)]
emulator: Remove extended features from LE-only controllers

11 years agoemulator: Move Event Mask Page 2 from BR/EDR to BR/EDR/LE
Johan Hedberg [Fri, 19 Apr 2013 13:50:21 +0000 (16:50 +0300)]
emulator: Move Event Mask Page 2 from BR/EDR to BR/EDR/LE

11 years agoemulator: Add proper supported commands response values
Johan Hedberg [Fri, 19 Apr 2013 13:13:48 +0000 (16:13 +0300)]
emulator: Add proper supported commands response values

11 years agoemulator: Add missing command support checks
Johan Hedberg [Fri, 19 Apr 2013 13:02:55 +0000 (16:02 +0300)]
emulator: Add missing command support checks

11 years agoemulator: Add basic HCI_Set_Event_Mask_Page_2 support
Johan Hedberg [Fri, 19 Apr 2013 11:31:10 +0000 (14:31 +0300)]
emulator: Add basic HCI_Set_Event_Mask_Page_2 support

11 years agoemulator: Add sync train parameter reading support
Johan Hedberg [Thu, 18 Apr 2013 14:54:43 +0000 (17:54 +0300)]
emulator: Add sync train parameter reading support

11 years agoemulator: Fix extended features invalid params response
Johan Hedberg [Thu, 18 Apr 2013 14:54:05 +0000 (17:54 +0300)]
emulator: Fix extended features invalid params response

11 years agomonitor: Fix missing byte order conversions
Johan Hedberg [Thu, 18 Apr 2013 14:21:41 +0000 (17:21 +0300)]
monitor: Fix missing byte order conversions

11 years agomonitor: Add support for decoding read sync train params response
Johan Hedberg [Thu, 18 Apr 2013 12:26:27 +0000 (15:26 +0300)]
monitor: Add support for decoding read sync train params response

11 years agoobexd: Fix make distcheck
Luiz Augusto von Dentz [Wed, 17 Apr 2013 14:46:55 +0000 (17:46 +0300)]
obexd: Fix make distcheck

../obexd/client/map.c:43:17: fatal error: sdp.h: No such file or directory

11 years agotools: Fix mpris-player not forwarding method calls properly
Luiz Augusto von Dentz [Sat, 13 Apr 2013 19:16:24 +0000 (22:16 +0300)]
tools: Fix mpris-player not forwarding method calls properly

This fixes not sending methods calls to players, it now copies the
contents of the original message into the copy instead of relying on
dbus_message_copy and send the reply back.

11 years agoemulator: Add support for local features page 2
Johan Hedberg [Wed, 17 Apr 2013 11:55:58 +0000 (14:55 +0300)]
emulator: Add support for local features page 2

11 years agosdptool: Use macro to calculate array size
Luiz Augusto von Dentz [Wed, 17 Apr 2013 08:28:58 +0000 (11:28 +0300)]
sdptool: Use macro to calculate array size

11 years agotools: Add MAS profile attributes
Luiz Augusto von Dentz [Wed, 17 Apr 2013 08:17:21 +0000 (11:17 +0300)]
tools: Add MAS profile attributes

11 years agotest: Fix opp-client not printing progress
Luiz Augusto von Dentz [Wed, 10 Apr 2013 11:33:57 +0000 (14:33 +0300)]
test: Fix opp-client not printing progress

This avoid KeyError expection and fixes print usage.

11 years agoobexd: Read service attributes when instantiating MAP session
Christian Fetzer [Fri, 12 Apr 2013 09:29:06 +0000 (11:29 +0200)]
obexd: Read service attributes when instantiating MAP session

Parse the service attributes mas_instance_id and supported_message_types
from the transport's service attributes as soon as a connection is
established.

11 years agolib: Add attributes MASInstanceID and SupportedMessageTypes
Christian Fetzer [Fri, 12 Apr 2013 09:29:05 +0000 (11:29 +0200)]
lib: Add attributes MASInstanceID and SupportedMessageTypes

11 years agoobexd: Add obc_session_get_attribute to session
Christian Fetzer [Fri, 12 Apr 2013 09:29:04 +0000 (11:29 +0200)]
obexd: Add obc_session_get_attribute to session

This adds a obc_session_get_attribute function to the client session.
The function allows querying the session specific service attributes.

11 years agoobexd: Add bluetooth_getattribute to Bluetooth transport
Christian Fetzer [Fri, 12 Apr 2013 09:29:03 +0000 (11:29 +0200)]
obexd: Add bluetooth_getattribute to Bluetooth transport

This function makes the cached SDP attributes available for the profile
implementations.

11 years agoobexd: Add getattribute to obc_transport
Christian Fetzer [Fri, 12 Apr 2013 09:29:02 +0000 (11:29 +0200)]
obexd: Add getattribute to obc_transport

This adds a getattribute function pointer to obc_transport, which allows
transports to provide the session specific service attributes.

11 years agoobexd: Cache SDP record in bluetooth transport
Christian Fetzer [Fri, 12 Apr 2013 09:29:01 +0000 (11:29 +0200)]
obexd: Cache SDP record in bluetooth transport

This caches the SDP record of the active session in the Bluetooth
transport.

11 years agogatttool: Use error message prefixes consistently
Alvaro Silva [Tue, 2 Apr 2013 23:31:30 +0000 (19:31 -0400)]
gatttool: Use error message prefixes consistently

Replace rl_printf() calls with macros that add appropriate prefixes.

11 years agogatttool: Show info message when no primary service is found
Eder Ruiz Maria [Tue, 2 Apr 2013 23:31:29 +0000 (19:31 -0400)]
gatttool: Show info message when no primary service is found

11 years agogatttool: Use bluetoothctl strategy for unix signal handling
Eder Ruiz Maria [Tue, 2 Apr 2013 23:31:28 +0000 (19:31 -0400)]
gatttool: Use bluetoothctl strategy for unix signal handling

Now to exit from gatttool at interactive mode, user must use SIGTERM(15)
or press Ctrl+D. SIGINT(2) or Ctrl+C just flushes typed characters and
breaks line.

11 years agogatttool: Use bluetoothctl strategy to handle standard input
Eder Ruiz Maria [Tue, 2 Apr 2013 23:31:27 +0000 (19:31 -0400)]
gatttool: Use bluetoothctl strategy to handle standard input

Use GSource id returned by g_io_add_watch() instead of raw GIOChannel to
handle stdin and glib main loop.

11 years agogatttool: Remove connecting message from prompt
Alvaro Silva [Tue, 2 Apr 2013 23:31:26 +0000 (19:31 -0400)]
gatttool: Remove connecting message from prompt

When trying to connect, the "connecting" message is not set as prompt
anymore. Instead, it is printed just like other status messages and the
prompt is kept, allowing the user to send commands while connection is
being established.

11 years agogatttool: Show connection state using color
Alvaro Silva [Tue, 2 Apr 2013 23:31:25 +0000 (19:31 -0400)]
gatttool: Show connection state using color

When device is connected, the Bluetooth address is shown in blue color.

11 years agogatttool: Use bluetoothctl behavior when pressing Enter on empty prompt
Eder Ruiz Maria [Tue, 2 Apr 2013 23:31:24 +0000 (19:31 -0400)]
gatttool: Use bluetoothctl behavior when pressing Enter on empty prompt

11 years agogatttool: Replace more usages of printf() with rl_printf()
Eder Ruiz Maria [Tue, 2 Apr 2013 23:31:23 +0000 (19:31 -0400)]
gatttool: Replace more usages of printf() with rl_printf()

rl_printf() works better with readline than plain printf(), specially on
asynchronous callbacks.

11 years agogatttool: Fix issues with printf() and readline prompt
Eder Ruiz Maria [Tue, 2 Apr 2013 23:31:22 +0000 (19:31 -0400)]
gatttool: Fix issues with printf() and readline prompt

Use rl_printf() from bluetoothctl to consistently display messages. This
is specially important for asynchronous callbacks, where using printf()
may mess up the prompt created by readline.

11 years agogatttool: Use GError to propage error messages to caller
Eder Ruiz Maria [Tue, 16 Apr 2013 15:49:54 +0000 (11:49 -0400)]
gatttool: Use GError to propage error messages to caller

Handle runtime errors outside gatt_connect(), using GError to propagate
error messages to caller.

11 years agomonitor: Remove bogus entries from event mask table
Johan Hedberg [Tue, 16 Apr 2013 17:34:29 +0000 (20:34 +0300)]
monitor: Remove bogus entries from event mask table

The event mask is 64 bits so any bit offsets greater than that do not
make sense.

11 years agoaudio: Remove unused constants
João Paulo Rechi Vita [Fri, 12 Apr 2013 22:34:24 +0000 (19:34 -0300)]
audio: Remove unused constants

Removes the never used constants AUDIO_SINK_INTERFACE and
AUDIO_SOURCE_INTERFACE which are defined to "org.bluez.AudioSink" and
"org.bluez.AudioSource", respectively.

11 years agoaudio: Remove unused function
João Paulo Rechi Vita [Fri, 12 Apr 2013 22:34:23 +0000 (19:34 -0300)]
audio: Remove unused function

Removes the never used function audio_device_is_active.

11 years agoaudio: Remove unused constant
João Paulo Rechi Vita [Fri, 12 Apr 2013 22:34:22 +0000 (19:34 -0300)]
audio: Remove unused constant

Removes the never used constant AUDIO_INTERFACE which is defined to
"org.bluez.Audio".

11 years agoRelease 5.4
Marcel Holtmann [Thu, 11 Apr 2013 05:50:12 +0000 (22:50 -0700)]
Release 5.4