OSDN Git Service

android-x86/external-bluetooth-bluez.git
11 years agoAVCTP: Add proper queueing for channels
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:30 +0000 (16:05 +0200)]
AVCTP: Add proper queueing for channels

Add a request queue to channels to avoid dispatching too many requests
at once as the number of transaction is quite limited (16).

11 years agoAVCTP: Add proper prefix to AVC passthrough codes
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:29 +0000 (16:05 +0200)]
AVCTP: Add proper prefix to AVC passthrough codes

11 years agoAVCTP: Wait confirmation to send button release
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:28 +0000 (16:05 +0200)]
AVCTP: Wait confirmation to send button release

11 years agoAVCTP: Make use of allocate buffer to send data
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:27 +0000 (16:05 +0200)]
AVCTP: Make use of allocate buffer to send data

There is no need to use the stack as the channel now have proper buffer
which can be used to store data to be send.

In addition to that make avctp_send_passthrough to use avctp_send.

11 years agoAVRCP: Simplify state_changed callback
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:26 +0000 (16:05 +0200)]
AVRCP: Simplify state_changed callback

Move session creation and destroy to their own functions

11 years agoAVRCP: Fix crash on disconnect
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:25 +0000 (16:05 +0200)]
AVRCP: Fix crash on disconnect

In case of multiple session being active the code was registering one
PDU hanlder per AVRCP session and given the session pointer as user data
causing the following:

    24 bytes in 1 blocks are definitely lost in loss record 370 of 893
       at 0x4A0884D: malloc (vg_replace_malloc.c:263)
       by 0x4C803FE: g_malloc (in /usr/lib64/libglib-2.0.so.0.3200.4)
       by 0x12EE9D: avctp_register_browsing_pdu_handler (avctp.c:1259)
       by 0x12FD7B: state_changed (avrcp.c:1402)
       by 0x12D391: avctp_set_state (avctp.c:403)
       by 0x12E6B4: avctp_confirm_cb (avctp.c:871)
       by 0x1606A3: server_cb (btio.c:254)
       by 0x4C7A824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
       by 0x4C7AB57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
       by 0x4C7AF51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
       by 0x120EA1: main (main.c:551)

To fix this the PDU handlers are now per AVCTP session/channel so each
AVRCP session can register its own handler and pass itself as user
data.

11 years agoAVRCP: Register to AVCTP state changes without depending on player
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:23 +0000 (16:05 +0200)]
AVRCP: Register to AVCTP state changes without depending on player

It is not longer necessary to have a player to be able to register the
extra pdu handlers.

11 years agoAVCTP: Allocate memory to hold incoming/outgoing PDUs
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:22 +0000 (16:05 +0200)]
AVCTP: Allocate memory to hold incoming/outgoing PDUs

This makes possible to the handler to respond asyncronous as the memory
remains valid after it returns.

In addition to that it uses the MTU to calculate the buffer size
necessary.

11 years agoAVCTP: Simplify channel handling
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:21 +0000 (16:05 +0200)]
AVCTP: Simplify channel handling

Make both control and browsing channels to use the same structure to
store its channel information.

11 years agoadapter: Use g_slist_free_full for cleaning up discovery->found
Johan Hedberg [Mon, 15 Oct 2012 20:03:11 +0000 (23:03 +0300)]
adapter: Use g_slist_free_full for cleaning up discovery->found

11 years agoadapter: Use idle callbacks for forcing DevicesFound events
Johan Hedberg [Mon, 15 Oct 2012 12:55:48 +0000 (15:55 +0300)]
adapter: Use idle callbacks for forcing DevicesFound events

This way we ensure that we include all found devices from the current
mainloop iteration into the DevicesFound signal.

11 years agotest: Add timeout option to simple-agent
Johan Hedberg [Mon, 15 Oct 2012 12:03:06 +0000 (15:03 +0300)]
test: Add timeout option to simple-agent

11 years agodevice: Implement Device.CancelPairing method
Johan Hedberg [Mon, 15 Oct 2012 12:02:30 +0000 (15:02 +0300)]
device: Implement Device.CancelPairing method

11 years agoadapter: Remove legacy CancelDeviceCreation method
Johan Hedberg [Mon, 15 Oct 2012 11:30:01 +0000 (14:30 +0300)]
adapter: Remove legacy CancelDeviceCreation method

11 years agotest: Update simple-agent to support the new Device.Pair API
Johan Hedberg [Mon, 15 Oct 2012 11:25:54 +0000 (14:25 +0300)]
test: Update simple-agent to support the new Device.Pair API

11 years agoTODO: Mark CreateDevice/CreatePairedDevice removal as done
Johan Hedberg [Mon, 15 Oct 2012 11:06:36 +0000 (14:06 +0300)]
TODO: Mark CreateDevice/CreatePairedDevice removal as done

11 years agocore: Add timer for removing temporary discovered device objects
Johan Hedberg [Mon, 15 Oct 2012 11:05:13 +0000 (14:05 +0300)]
core: Add timer for removing temporary discovered device objects

11 years agogdbus: Fix invalid memory access during interface removal
Johan Hedberg [Mon, 15 Oct 2012 10:21:11 +0000 (13:21 +0300)]
gdbus: Fix invalid memory access during interface removal

If an interface is removed from the root path during the same mainloop
iteration that it was added we need to check for data->added before
doing the check for data->parent == NULL in the remove_interface()
function. Otherwise the added interface doesn't get removed from the
data->added list and will result in accessing freed memory:

==337== Invalid read of size 8
==337==    at 0x4F65AFA: dbus_message_iter_append_basic (in /usr/lib64/libdbus-1.so.3.7.1)
==337==    by 0x1247B5: append_interface (object.c:556)
==337==    by 0x4C8DC5C: g_slist_foreach (gslist.c:840)
==337==    by 0x1261F7: process_changes (object.c:594)
==337==    by 0x126372: generic_unregister (object.c:997)
==337==    by 0x4F69669: ??? (in /usr/lib64/libdbus-1.so.3.7.1)
==337==    by 0x4F5CE51: dbus_connection_unregister_object_path (in /usr/lib64/libdbus-1.so.3.7.1)
==337==    by 0x125E81: object_path_unref (object.c:1236)
==337==    by 0x126136: g_dbus_unregister_interface (object.c:1361)
==337==    by 0x14CDF0: service_exit (service.c:581)
==337==    by 0x177556: plugin_cleanup (plugin.c:242)
==337==    by 0x12221F: main (main.c:559)
==337==  Address 0x5bc1550 is 0 bytes inside a block of size 56 free'd
==337==    at 0x4A079AE: free (vg_replace_malloc.c:427)
==337==    by 0x4C7850E: g_free (gmem.c:252)
==337==    by 0x125DB0: remove_interface (object.c:671)
==337==    by 0x125E3B: object_path_unref (object.c:1230)
==337==    by 0x126136: g_dbus_unregister_interface (object.c:1361)
==337==    by 0x14CDF0: service_exit (service.c:581)
==337==    by 0x177556: plugin_cleanup (plugin.c:242)
==337==    by 0x12221F: main (main.c:559)

11 years agomedia: Fix leaking endpoint in case of failure to register SEP
Luiz Augusto von Dentz [Mon, 15 Oct 2012 09:51:27 +0000 (11:51 +0200)]
media: Fix leaking endpoint in case of failure to register SEP

This can happen in case of AudioSink and/or AudioSource are disabled in
audio.conf.

11 years agoheartrate: Convert to DBus.Properties
Andrzej Kaczmarek [Sat, 13 Oct 2012 16:56:19 +0000 (18:56 +0200)]
heartrate: Convert to DBus.Properties

11 years agoheartrate: Remove unused measurement characteristic value handle
Andrzej Kaczmarek [Sat, 13 Oct 2012 15:18:22 +0000 (17:18 +0200)]
heartrate: Remove unused measurement characteristic value handle

Since notification handler is now registered only for measurement
characteristic value handle it's no longer needed to keep this handle.

11 years agoheartrate: Fix registration of notification handler
Andrzej Kaczmarek [Sat, 13 Oct 2012 15:18:21 +0000 (17:18 +0200)]
heartrate: Fix registration of notification handler

Notification handler is registered only when CCC is written during
descriptors discovery, i.e. at least one watcher is registered before
device is connected. This means there will be no handler registered in
case watcher is registered after device already connected.
This is side-effect of 74a9fc7.

This patch registers handler immediately when measurement characteristic
is discovered so it does not matter when watcher is registered.

ccc_write_cb() is reduntant in this case so it's removed.

11 years agoinput: Convert to DBus.Properties
Lucas De Marchi [Thu, 11 Oct 2012 18:57:48 +0000 (15:57 -0300)]
input: Convert to DBus.Properties

11 years agotest: Update test-discovery to match new API
Johan Hedberg [Fri, 12 Oct 2012 10:42:36 +0000 (12:42 +0200)]
test: Update test-discovery to match new API

11 years agoadapter: Add DevicesFound signal
Johan Hedberg [Fri, 12 Oct 2012 10:31:04 +0000 (12:31 +0200)]
adapter: Add DevicesFound signal

11 years agogdbus: Add g_dbus_get_properties function
Johan Hedberg [Fri, 12 Oct 2012 08:55:37 +0000 (10:55 +0200)]
gdbus: Add g_dbus_get_properties function

This function can be used to construct custom D-Bus messages containing
the properties for a specific interface on a given path.

11 years agodoc: Update adapter and device D-Bus APIs
Johan Hedberg [Fri, 12 Oct 2012 08:47:36 +0000 (10:47 +0200)]
doc: Update adapter and device D-Bus APIs

11 years agoadapter: Remove out of range devices tracking
Johan Hedberg [Fri, 12 Oct 2012 08:40:21 +0000 (10:40 +0200)]
adapter: Remove out of range devices tracking

With interleaved discovery the inquiry is so short that there's a good
chance of nearby devices in not showing up during some cycles. This
makes tracking "out of range" devices unreliable and it's therefore
better to remove it. Devices get their RSSI property invalidated when a
discovery cycle finishes so devices that are not found anymore can still
be easily sorted with a lower priority by UIs.

11 years agocore: Create devices dynamically during discovery
Johan Hedberg [Thu, 11 Oct 2012 10:14:30 +0000 (12:14 +0200)]
core: Create devices dynamically during discovery

11 years agotest: Update test-discovery to support the latest API
Johan Hedberg [Thu, 11 Oct 2012 10:35:29 +0000 (12:35 +0200)]
test: Update test-discovery to support the latest API

11 years agoadapter: Remove Create(Paired)Device methods
Johan Hedberg [Thu, 11 Oct 2012 10:11:01 +0000 (12:11 +0200)]
adapter: Remove Create(Paired)Device methods

These are not needed when devices get created dynamically during
discovery.

11 years agodevice: Add device_name_known convenience function
Johan Hedberg [Thu, 11 Oct 2012 10:07:32 +0000 (12:07 +0200)]
device: Add device_name_known convenience function

11 years agodevice: Add LegacyPairing and RSSI properties
Johan Hedberg [Thu, 11 Oct 2012 08:42:16 +0000 (10:42 +0200)]
device: Add LegacyPairing and RSSI properties

These are needed for the new device discovery where we create objects
for each found device.

11 years agorctest: add option to save received data to file
Gustavo Padovan [Mon, 8 Oct 2012 03:50:03 +0000 (11:50 +0800)]
rctest: add option to save received data to file

works only for automated test option for now

11 years agorctest: add automated test
Gustavo Padovan [Mon, 8 Oct 2012 03:50:02 +0000 (11:50 +0800)]
rctest: add automated test

adds -a option to enable automated tests. We use the -i option to define
the receiving side and the -a define the sending side:

./rctest -i hci0 -a hci1

11 years agogdbus: Add support for invalidated properties
Johan Hedberg [Thu, 11 Oct 2012 09:53:27 +0000 (11:53 +0200)]
gdbus: Add support for invalidated properties

If there's a pending property but its exists() callback returns false
the property should be considered invalidated and included in the
relevant list of the PropertiesChanged signal.

11 years agohog: Fix passing NULL pointer to g_attrib_unregister
Johan Hedberg [Thu, 11 Oct 2012 12:03:41 +0000 (15:03 +0300)]
hog: Fix passing NULL pointer to g_attrib_unregister

The hogdev->attrib pointer can be NULL if we got disconnected.

11 years agohog: Fix requested range for descriptor discovery
João Paulo Rechi Vita [Thu, 11 Oct 2012 05:31:23 +0000 (02:31 -0300)]
hog: Fix requested range for descriptor discovery

When discovering descriptors of the last characteristic of a service the
discovery range was exceeding the service limits. This commit keeps the
discovery within the limits of the HoG service.

11 years agohog: Fix characteristic descriptor discovery
João Paulo Rechi Vita [Thu, 11 Oct 2012 05:31:22 +0000 (02:31 -0300)]
hog: Fix characteristic descriptor discovery

The discover descriptors sub-procedure is complete when the error
response is received and the error code is set to "Attribute Not Found"
or the find information response has an attribute handle that is equal
to the last handle in the request. This commit fixes the stop condition
for characteristic descriptor discovery.

11 years agocore: Fix connecting to an already connected device on pairing
João Paulo Rechi Vita [Thu, 11 Oct 2012 05:30:46 +0000 (02:30 -0300)]
core: Fix connecting to an already connected device on pairing

11 years agotest: Add support for passing address type to btiotest
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:56:43 +0000 (20:56 -0300)]
test: Add support for passing address type to btiotest

11 years agogas: Add the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:57 +0000 (20:55 -0300)]
gas: Add the per handle GATT event notifier

11 years agoheartrate: Use the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:56 +0000 (20:55 -0300)]
heartrate: Use the per handle GATT event notifier

11 years agohog: Use the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:55 +0000 (20:55 -0300)]
hog: Use the per handle GATT event notifier

11 years agoscan: Use the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:54 +0000 (20:55 -0300)]
scan: Use the per handle GATT event notifier

11 years agogattrib: Add support for listening for events for specific handles
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:53 +0000 (20:55 -0300)]
gattrib: Add support for listening for events for specific handles

We want only the profile that implements a service to be notified of
changes on that service. Before this patch, all the registered event
notifiers are being called.

11 years agogas: Only do the Exchange MTU procedure over LE links
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:03 +0000 (20:35 -0300)]
gas: Only do the Exchange MTU procedure over LE links

The Exchange MTU procedure should only be performed over LE links,
we are using the check of the Channel ID used to verify this.

11 years agoattrib: Fix not checking if att_data_list_alloc fails
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:02 +0000 (20:35 -0300)]
attrib: Fix not checking if att_data_list_alloc fails

Now that this function may fail in more usual situations (invalid
input), we have to check its return value.

11 years agoatt: Fix sending pdu's with invalid data
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:01 +0000 (20:35 -0300)]
att: Fix sending pdu's with invalid data

When encoding an att_data_list we need to make sure that each element
lenght of the data list will not exceed 255, because that information
will be encoded as a octet later.

11 years agoatt: Replace ATT_MAX_MTU with ATT_MAX_VALUE_LEN
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:00 +0000 (20:35 -0300)]
att: Replace ATT_MAX_MTU with ATT_MAX_VALUE_LEN

ATT has the concept that an attribute value has a maximum length and we
weren't keeping track of this.

11 years agoattrib: Remove all the usages of ATT_MAX_MTU
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:34:59 +0000 (20:34 -0300)]
attrib: Remove all the usages of ATT_MAX_MTU

This "define" was bogus for two reasons: 1. There's no concept
of maximum MTU in the ATT level; 2. It was used as a maximum attribute
value length.

11 years agogattrib: Fix ignoring the error message when write fails
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:34:58 +0000 (20:34 -0300)]
gattrib: Fix ignoring the error message when write fails

If an error happens during writing to the socket, we should complain
that it failed.

11 years agoevent: Use bool instead gboolean for legacy parameter
Szymon Janc [Wed, 10 Oct 2012 13:19:58 +0000 (15:19 +0200)]
event: Use bool instead gboolean for legacy parameter

This will avoid mixing bool and gboolean in btd_event_device_found
definition. Whole execution chain for legacy parameter is also
converted to bool type.

11 years agocore: Pass confirm name as bool value
Szymon Janc [Wed, 10 Oct 2012 13:19:57 +0000 (15:19 +0200)]
core: Pass confirm name as bool value

confirm_name is a boolean value and can be pass as such instead of
uint8_t.

11 years agoaudio: Remove redundant procedure when a2dp connect
Chan-yeol Park [Tue, 9 Oct 2012 11:35:48 +0000 (20:35 +0900)]
audio: Remove redundant procedure when a2dp connect

This patch fixes the bug that when remote host is down a2dp connection failure
is handled like XCASE

11 years agoaudio: Fix audio driver is not probed
Chan-yeol Park [Tue, 9 Oct 2012 11:35:47 +0000 (20:35 +0900)]
audio: Fix audio driver is not probed

This patch fix the bugs that when handling an AVDTP incoming connection,
audio-a2dp driver is not probed because advanced audio UUID is missed.

11 years agoavinfo: Print a2dp vendor codec info
Chan-yeol Park [Tue, 9 Oct 2012 11:35:46 +0000 (20:35 +0900)]
avinfo: Print a2dp vendor codec info

11 years agoavinfo: Replace definitions with a2dp-codecs.h's
Chan-yeol Park [Tue, 9 Oct 2012 11:35:45 +0000 (20:35 +0900)]
avinfo: Replace definitions with a2dp-codecs.h's

11 years agoaudio: Add check for vendor specific A2DP codec
Chan-yeol Park [Tue, 9 Oct 2012 11:35:44 +0000 (20:35 +0900)]
audio: Add check for vendor specific A2DP codec

This patch adds checks(vendor ID, vendor specific codec ID) to make sure of
vendor specific A2DP codec selection.

11 years agobuild-sys: Remove leftover AM_YFLAGS
Lucas De Marchi [Tue, 9 Oct 2012 17:51:17 +0000 (14:51 -0300)]
build-sys: Remove leftover AM_YFLAGS

11 years agocore: fix stop scanning after GCEP
João Paulo Rechi Vita [Tue, 9 Oct 2012 17:38:27 +0000 (14:38 -0300)]
core: fix stop scanning after GCEP

The session type identification on struct session req (commit 328661a0)
broke the stop condition of the LE Genereal Connection Establishment
Procedure. This commit creates new identificators for discovery sessions
and makes their naming a bit more clear.

11 years agocore: Add initial Device.Pair() implementation
Johan Hedberg [Tue, 9 Oct 2012 17:38:07 +0000 (19:38 +0200)]
core: Add initial Device.Pair() implementation

This will ultimately replace Adapter.CreatePairedDevice()

11 years agobuild: Add missing documentation files to EXTRA_DIST
Andrzej Kaczmarek [Tue, 9 Oct 2012 13:51:47 +0000 (15:51 +0200)]
build: Add missing documentation files to EXTRA_DIST

This patch adds missing documentation files to EXTRA_DIST variable so
they are included when creating tarball.

11 years agosink: Remove deprecated code
Luiz Augusto von Dentz [Tue, 9 Oct 2012 16:03:53 +0000 (18:03 +0200)]
sink: Remove deprecated code

Remove decrecated properties and signals

11 years agoaudio: Fix memory leak of AVDTP buffer
Luiz Augusto von Dentz [Tue, 9 Oct 2012 16:03:52 +0000 (18:03 +0200)]
audio: Fix memory leak of AVDTP buffer

Upon disconnection all references to AVDTP session should be release
otherwise the data associate with it cannot be freed and new connection
may overwrite the buf pointer causing it to leak.

11 years agodevice: Remove not used device_set_class function
Szymon Janc [Tue, 9 Oct 2012 12:12:02 +0000 (14:12 +0200)]
device: Remove not used device_set_class function

With mgmt interface CoD cannot change as it is only received in EIR when
device is discovered or connected. Was only used in
btd_event_remote_class which is now removed.

11 years agoadapter: Remove not used btd_adapter_switch_{online,offline} functions
Szymon Janc [Tue, 9 Oct 2012 12:12:01 +0000 (14:12 +0200)]
adapter: Remove not used btd_adapter_switch_{online,offline} functions

Were used only in Maemo plugin which is now removed.

11 years agostorage: Remove not used read_remote_features
Szymon Janc [Tue, 9 Oct 2012 12:12:00 +0000 (14:12 +0200)]
storage: Remove not used read_remote_features

It was only usefull with hciops.

11 years agostorage: Remove not used write_features_info
Szymon Janc [Tue, 9 Oct 2012 12:11:59 +0000 (14:11 +0200)]
storage: Remove not used write_features_info

This was used in hciops.

11 years agostorage: Remove not used write_version_info
Szymon Janc [Tue, 9 Oct 2012 12:11:58 +0000 (14:11 +0200)]
storage: Remove not used write_version_info

This was used in hciops only.

11 years agostorage: Remove not used read_remote_eir
Szymon Janc [Tue, 9 Oct 2012 12:11:57 +0000 (14:11 +0200)]
storage: Remove not used read_remote_eir

This function is not used. Previously it was used to determine if
remote device is legacy or not.

11 years agoevent: Don't store EIR in btd_event_device_found
Szymon Janc [Tue, 9 Oct 2012 12:11:56 +0000 (14:11 +0200)]
event: Don't store EIR in btd_event_device_found

It is never read and was usefull only to gather EIR data for testing
which can also be done with hcidump etc.

11 years agoSimplify checking if found device is legacy
Szymon Janc [Tue, 9 Oct 2012 12:11:54 +0000 (14:11 +0200)]
Simplify checking if found device is legacy

This simplify code by removing pairing_is_legacy() function which was
always returning FALSE due to EIR being always present with mgmt
interface (this also fix small issue when first DeviceFound signal
emitted for legacy device was having LegacyPairing set to false).

Instead of using btd_event_set_legacy_pairing to set legacy pairing in
remote_dev_info handle it in similar way to rssi.

11 years agodoc: Reformat thermometer-api.txt to follow 80-character rule
Johan Hedberg [Tue, 9 Oct 2012 15:58:40 +0000 (17:58 +0200)]
doc: Reformat thermometer-api.txt to follow 80-character rule

11 years agothermometer: Fix missing braces
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:58 +0000 (13:19 +0200)]
thermometer: Fix missing braces

11 years agothermometer: Fix indentation
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:57 +0000 (13:19 +0200)]
thermometer: Fix indentation

11 years agothermometer: Fix whitespace
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:56 +0000 (13:19 +0200)]
thermometer: Fix whitespace

11 years agothermometer: Refactor processing of measurement characteristic value
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:55 +0000 (13:19 +0200)]
thermometer: Refactor processing of measurement characteristic value

Data buffer is read by simply moving buffer pointer instead of calculating
indexes of consecutive fields. This makes function flow easier to follow
as there's no need to care about presence of fields prior to current when
reading data.

11 years agothermometer: Add common function to write characteristics CCC
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:54 +0000 (13:19 +0200)]
thermometer: Add common function to write characteristics CCC

There are now few separate functions to write CCC for measurement
characteristics which looks similar. This patch adds common function
to write given value into CCC for given characteristics and leaves
dedicated functions to act only as simple wrappers.

11 years agothermometer: Add constant definition for watcher interface name
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:53 +0000 (13:19 +0200)]
thermometer: Add constant definition for watcher interface name

11 years agothermometer: Update driver naming style
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:52 +0000 (13:19 +0200)]
thermometer: Update driver naming style

This patch changes device probe and remove functions name to include
'device' rather than 'driver' name as it better describes what both
do.

Also profile driver name is changed to better describe that it's now
profile driver rather than device driver only.

11 years agothermometer: Change string properties to lower-case
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:51 +0000 (13:19 +0200)]
thermometer: Change string properties to lower-case

11 years agothermometer: Reformat MeasurementReceived description
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:50 +0000 (13:19 +0200)]
thermometer: Reformat MeasurementReceived description

MeasurementReceived method description is reformatted to be more
readable and consistent with other API documents.

Special values for Exponent and Mantissa fields specify now only NaN
value as this is only special value defined by HTS specification for
measurement.

11 years agothermometer: Update test script
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:49 +0000 (13:19 +0200)]
thermometer: Update test script

11 years agothermometer: Update API document
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:48 +0000 (13:19 +0200)]
thermometer: Update API document

This patch updates Thermometer API document to reflect changes in
Thermometer interface and introduction of ThermometerManager
interface and fixes minor formatiing inconsistencies.

11 years agothermometer: Include remote device information in MeasurementReceived
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:47 +0000 (13:19 +0200)]
thermometer: Include remote device information in MeasurementReceived

Since watchers are now registered per-adapter it's necessary to include
remote device information in MeasurementReceived callback.

This patch adds parameter to MeasurementReceived method which is an
object path to remote device object.

11 years agothermometer: Move watcher logic to adapter interface
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:46 +0000 (13:19 +0200)]
thermometer: Move watcher logic to adapter interface

This patch moves watcher related methods to ThermometerManager interface
so watchers can be registered per-adapter instead of per-device.

Final measurement notifications are now enabled on all devices connected
to given adapter when first watcher is registered and disabled when last
watcher is unregistered.

Intermediate measurement notifications are enabled for all devices
connected to given adapter which support this feature.

11 years agothermometer: Register ThermometerManager interface on adapter path
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:45 +0000 (13:19 +0200)]
thermometer: Register ThermometerManager interface on adapter path

11 years agothermometer: Store thermometer devices per-adapter
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:44 +0000 (13:19 +0200)]
thermometer: Store thermometer devices per-adapter

This patch replaces global list of thermometer devices with per-adapter
lists.

11 years agotest: Convert test-device to ObjectManager & D-Bus Properties
Johan Hedberg [Tue, 9 Oct 2012 10:45:41 +0000 (12:45 +0200)]
test: Convert test-device to ObjectManager & D-Bus Properties

11 years agotest: Convert test-adapter to ObjectManager & D-Bus Properties
Johan Hedberg [Tue, 9 Oct 2012 10:27:29 +0000 (12:27 +0200)]
test: Convert test-adapter to ObjectManager & D-Bus Properties

11 years agotest: Update list-devices to ObjectManager
Johan Hedberg [Tue, 9 Oct 2012 10:03:03 +0000 (12:03 +0200)]
test: Update list-devices to ObjectManager

11 years agoadapter: Emit signals through DBus.Properties
Lucas De Marchi [Tue, 9 Oct 2012 07:59:56 +0000 (04:59 -0300)]
adapter: Emit signals through DBus.Properties

11 years agoadapter: Port remaining properties to DBus.Properties
Lucas De Marchi [Tue, 9 Oct 2012 07:59:55 +0000 (04:59 -0300)]
adapter: Port remaining properties to DBus.Properties

Remaining properties ported to DBus.Properties:
- Pairable
- Discoverable
- Powered

11 years agoadapter: Fix calling mgmt_set_pairable() with error set
Lucas De Marchi [Tue, 9 Oct 2012 07:59:54 +0000 (04:59 -0300)]
adapter: Fix calling mgmt_set_pairable() with error set

11 years agoadapter: Add session type to session_req
Lucas De Marchi [Tue, 9 Oct 2012 07:59:53 +0000 (04:59 -0300)]
adapter: Add session type to session_req

With this field we can differentiate requests that should have global
actions from the ones created with RequestSession(). The intention with
this is to allow to separate how we detect a global request on
set_mode_complete(), not tying to the name of the D-Bus method it came
from.

11 years agoadapter: Refactor set_mode() in 2 functions
Lucas De Marchi [Tue, 9 Oct 2012 07:59:52 +0000 (04:59 -0300)]
adapter: Refactor set_mode() in 2 functions

Separate the handling of pending_mode from setting mode. This way it's
simpler to set the pending_mode only when needed. Half of callers were
passing NULL to this parameter.

11 years agoadapter: Set *Timeout through DBus.Properties
Lucas De Marchi [Tue, 9 Oct 2012 07:59:51 +0000 (04:59 -0300)]
adapter: Set *Timeout through DBus.Properties

11 years agoadapter: Set Name through DBus.Properties
Lucas De Marchi [Tue, 9 Oct 2012 07:59:50 +0000 (04:59 -0300)]
adapter: Set Name through DBus.Properties

11 years agoadapter: Add DBus.Properties getters
Lucas De Marchi [Tue, 9 Oct 2012 07:59:49 +0000 (04:59 -0300)]
adapter: Add DBus.Properties getters