Commit Graph

15166 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
77f567523b tool/mpris-player: Fix not unregister players when adapter is removed
This prevent the players to be registered again when an adapter appeared
again.
2013-07-25 16:12:44 +03:00
Luiz Augusto von Dentz
8aee579387 audio: Remove audio.conf
With the audio plugin split there is no longer a need to have a .conf
file and anyway any configuration should be put in main.conf under
plugin name group.
2013-07-24 15:45:36 -07:00
Luiz Augusto von Dentz
956e63360d audio: Remove audio plugin
Audio plugin is now splitted in multiple plugins so it is no longer
necessary to have a manager to deal with many different drivers.
2013-07-24 15:45:18 -07:00
Luiz Augusto von Dentz
abe0595df1 audio: Move A2DP code to its own plugin
This moves A2DP related code to a2dp plugin and making it possible to
disable by passing -P a2dp and increasing the modularity of the code.
2013-07-24 15:45:09 -07:00
Luiz Augusto von Dentz
089d112ffe audio: Move AVRCP related code to its own plugin
This moves AVRCP related code to avrcp plugin and making it possible to
disable by passing -P avrcp and increasing the modularity of the code.
2013-07-24 15:44:52 -07:00
Bruna Moreira
84dc71d92b tools/mgmt-tester: Add stop discovery for BR/EDR only
Send stop command during inquiry. Check if inquiry cancel is sent and
discovering event is disabled.
2013-07-24 09:06:19 -07:00
Bruna Moreira
c582e850a8 emulator: Add new function for running all hooks
It was defined four hook types and they are run before/after the first
part of default command processing and send event. Note that hook return
will define if the emulator will process/send next events (calling the
default_cmd_completion() function or not).
2013-07-24 09:05:56 -07:00
Eder Ruiz Maria
0714d4ee67 emulator: cmd_status() using send_packet() for run hooks easily
Now like cmd_command(), cmd_status() directly uses send_packet() instead
of send_event(), consequently cmd_status() must build the hci packet
without help of send_event(). With this change the events sent by
default_cmd() no more use send_event(), who is a good place to run hooks
for BTDEV_HOOK_POST_EVT. And the functions cmd_command() and
cmd_status() can run hooks for BTDEV_HOOK_POST_CMD.
2013-07-24 09:05:45 -07:00
Eder Ruiz Maria
6eef674964 emulator: Split default_cmd() for better command and event handler
Now except for command complete event and command status event, all
other are handled by default_cmd_completion(). With this we can easily
add hooks in some points.
2013-07-24 09:04:03 -07:00
Eder Ruiz Maria
653a17cc3b emulator: Add support for delete a hook 2013-07-24 09:03:49 -07:00
Eder Ruiz Maria
5fd080f471 emulator: Export command and event hooks for hciemu user 2013-07-24 09:03:31 -07:00
Eder Ruiz Maria
7fcddf9989 emulator: Add hook only if there aren't other with same type and opcode 2013-07-24 09:03:02 -07:00
Eder Ruiz Maria
37199df506 emulator: Add support for pre/post command/event hooks
Now who use emulator can add hooks to manipulate hci packets before
and after process commands and send events.
2013-07-24 09:02:52 -07:00
Anderson Lizardo
d1abf2b7d8 attrib: Reduce scope of variable declarations in char_discovered_cb()
This makes it easy to identify where variables are being used.
2013-07-24 08:44:07 -07:00
Anderson Lizardo
638790716f attrib: Allow dec_read_resp() to just check if PDU is valid
If a NULL "value" parameter is given, only check whether PDU is valid,
without copying attribute value to a buffer.
2013-07-24 08:43:17 -07:00
Alvaro Silva
1ed64821ac attrib: Add encode/decode execute write support
Add functions for encoding/decoding Execute Write Request PDUs.
2013-07-24 08:43:05 -07:00
Alvaro Silva
38487a9915 attrib: Add encode/decode prepare write support
Add functions for encoding/decoding Prepare Write Request PDUs.
2013-07-24 08:42:43 -07:00
Alvaro Silva
9abeec8c11 attrib: Remove unused parameter from enc_write_resp() 2013-07-24 08:42:32 -07:00
Eder Ruiz Maria
969906d6aa attrib: Fix coding style for various enc_*/dec_* functions
Fix coding style for enc_read_blob(), enc_read_blob_resp(),
dec_read_resp(), enc_error_resp(), enc_find_info_req(),
enc_find_info_resp() and enc_prep_write().
2013-07-24 08:42:22 -07:00
Anderson Lizardo
910beb706c attrib: Simplify prepare_write()
All parameters can be retrieved from struct write_long_data fields,
therefore there is no need to pass them separately.
2013-07-24 08:42:05 -07:00
Anderson Lizardo
9b1e7de26c attrib: Fix coding style in prepare_write_cb() 2013-07-24 08:41:58 -07:00
Anderson Lizardo
ccd0e3783d attrib: Do not use Write Command in gatt_write_char()
Previously, if no callback was given to gatt_write_char(), it was
assumed that a "Write Without Response" (which uses Write Command)
should be used instead of Write Request.

This "shortcut" is unnecessary (there is gatt_write_cmd() for the
situations where Write Without Response is required) and just duplicates
code.

This commit also fixes the few places where gatt_write_cmd() should be
used.
2013-07-24 08:41:47 -07:00
Anderson Lizardo
1d4f111fae attrib: Rename gatt_find_info() to gatt_discover_char_desc()
The old name referred to the underlying ATT PDU (Find Information
Request and Find Information Response) and not to the actual GATT
procedure (Discover All Characteristic Descriptors).
2013-07-24 08:41:32 -07:00
Eder Ruiz Maria
613cc886ed gatttool: Remove unused code
Since commit 6a3a89774c the code
removed here has no sense.
2013-07-24 08:41:25 -07:00
Luiz Augusto von Dentz
ef9673dcb4 audio/player: Fix attempting to set the same setting value
This cause unnecessary commands to be sent over the air so instead the
code should just return success as nothing should be changed.
2013-07-23 21:44:35 -07:00
Luiz Augusto von Dentz
64fa2166c8 audio/media: Fix not updating position
The status may not be 'playing' as MPRIS documents it as 'Playing'
instead, to make this less prone to typos like this the code now
uses strcasecmp.
2013-07-23 21:44:18 -07:00
Luiz Augusto von Dentz
27efc30f04 audio/AVRCP: Fix registration of VOLUME_CHANGED
First check with GetCapabilities if the event is really support before
registering.
2013-07-23 21:44:09 -07:00
Luiz Augusto von Dentz
81620276aa audio/AVRCP: Rework role detection
This makes AVRCP agnostic to any roles so the same session can be used
both for controller and target role.
2013-07-23 21:43:41 -07:00
Anderson Lizardo
6666f31313 cyclingspeed: Fix MultipleLocationsSupported property name usage
MultipleLocationsSupported is the correct property name, as implemented
in profiles/cyclingspeed/cyclingspeed.c.
2013-07-23 21:43:04 -07:00
Johan Hedberg
9e52c81f0a mailmap: Add Martin due to one commit with incomplete name 2013-07-20 23:33:02 +03:00
Sathish Narasimman
03375be73a attrib: Fix interactive gatttool segfault
Passing the special character single quote:

$gatttool -I
[   ][                 ][LE]> '
Segmentation fault (core dumped)

Checking g_shell_parse_argv fail status (return FALSE on failure), works
fine.
2013-07-19 14:24:55 +03:00
Marcel Holtmann
f763e5e3e4 build: Build a simpler version of libgdbus-internal 2013-07-18 07:37:19 -07:00
Lucas De Marchi
c97860db27 build-sys: Don't build gdbus several times
We are currently compiling gdbus 3 times: one for tests, one for
bluetoothd and another for obexd.

$ ls gdbus/*watch.o
gdbus/bluetoothd-watch.o  gdbus/obexd-watch.o  gdbus/watch.o

Instead of prepending $(gdbus_sources) to several _SOURCES variable, use
a convenience library.
2013-07-18 07:31:50 -07:00
Lucas De Marchi
0585eb43c6 build-sys: Rename lib suffix to -internal
libbluetooth-private -> libbluetooth-internal
2013-07-18 07:31:50 -07:00
Anderson Lizardo
9b686b14f2 lib: Remove duplicated HSP_HS_UUID definition
There is an identical definition on the same header file (next to
HSP_AG_UUID).
2013-07-18 12:33:08 +03:00
Luiz Augusto von Dentz
adce984e04 tools/bluetooth-player: Make show-item command print Player property
This makes show-item command to print Player property that indicates
which player the item belongs to.
2013-07-17 14:31:49 +03:00
Luiz Augusto von Dentz
84fd2a75e0 doc/media-api: Update documentation of MediaItem1
This adds documentation of property Player
2013-07-17 14:31:49 +03:00
Luiz Augusto von Dentz
0fe67267ce audio/player: Add Player property to MediaItem1
This proper refer to the player object path which the item belongs to
2013-07-17 14:31:49 +03:00
Luiz Augusto von Dentz
7c746fcd27 doc/media-api: Update documentation of MediaFolder1
This adds missing access types to properties NumberOfItems and Name
2013-07-17 14:31:49 +03:00
Martin Xu
2ed925ad73 core: Fix default authorize value for external profiles
Previously the value of "authorize" was essentially ignored in the
settings table. This wasn't very noticeable since almost all profiles
use the default true value. Since the default value of "authorize" is
true it cannot be left out from the default settings table entries
(leaving it out would set it implicitly to false).
2013-07-17 11:35:36 +03:00
Luiz Augusto von Dentz
8ec17c314f doc/media-api: Update documentation of MediaPlayer1
This adds documentation of properties Type and Subtype
2013-07-16 14:53:38 +03:00
Johan Hedberg
55a7d81123 input: Add debug logs for attio connection status in HoG code 2013-07-16 13:59:17 +03:00
Johan Hedberg
d8773c56f0 input: Fix minor coding style issue in HoG code 2013-07-16 13:58:37 +03:00
Johan Hedberg
7487d5b922 core: Add debug log for attrib disconnection reason 2013-07-16 13:53:59 +03:00
Johan Hedberg
0e4fb34307 core: Remove unnecessary btd_device reference count in browse_req
The browse request is "owned" by the btd_device structure so it doesn't
make sense to have browse_req keeping an extra reference for the
btd_device.
2013-07-15 14:34:05 +03:00
Szymon Janc
3d328b458e core: Use proper header for S_IRUSR/S_IWUSR
According to open() manual one should include <sys/stat.h>.
This fix build with bionic library:

target thumb C: libbluetoothd <= external/bluetooth/bluez/src/attrib-server.c
external/bluetooth/bluez/src/attrib-server.c: In function 'write_value':
external/bluetooth/bluez/src/attrib-server.c:922:26: error: 'S_IRUSR'
	 undeclared (first use in this function)
external/bluetooth/bluez/src/attrib-server.c:922:26: note: each undeclared
	identifier is reported only once for each function it appears in
external/bluetooth/bluez/src/attrib-server.c:922:36: error: 'S_IWUSR'
	undeclared (first use in this function)
2013-07-15 12:24:34 +03:00
Luiz Augusto von Dentz
57ce0cb4c2 plugins/policy: Limit the number of retries to sink profile
The policy should only retry a limit number of times.
2013-07-12 15:05:50 +03:00
Luiz Augusto von Dentz
48e3137565 plugins/policy: Limit the number of retries to source profile
The policy should only retry a limit number of times.
2013-07-12 15:05:50 +03:00
Luiz Augusto von Dentz
7662d49f57 audio/control: Enable initiate connection to CT role
Since the policy uses service API to initiate the connections this needs
to be enabled for both CT and TG roles.
2013-07-12 15:05:50 +03:00
Luiz Augusto von Dentz
f5fc3fffe5 audio/sink: Move stream retry logic to policy plugin
policy plugin is a better place to have such a logic as it is already
handling other connection policies related to such profiles.
2013-07-12 15:05:50 +03:00