OSDN Git Service

android-x86/external-bluetooth-bluez.git
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

11 years agoattrib: Remove opcode parameter from g_attrib_send()
Vinicius Costa Gomes [Tue, 9 Oct 2012 00:17:38 +0000 (21:17 -0300)]
attrib: Remove opcode parameter from g_attrib_send()

In all uses of g_attrib_send() the opcode of the command/event is
already clear because of the att.h functions used to build the ATT
PDU.

11 years agocore: Add support for included services
Vinicius Costa Gomes [Tue, 9 Oct 2012 00:17:37 +0000 (21:17 -0300)]
core: Add support for included services

Soon after the primary service discovery is complete, we do a included
services discovery for all found services and add each included service
to the 'services' list so they can be probe()'d as a normal profile.

This will also make these services to appear on the D-Bus object tree.

11 years agogatttool: Add "included" command
Jefferson Delfes [Tue, 9 Oct 2012 00:17:36 +0000 (21:17 -0300)]
gatttool: Add "included" command

New command to find included services in interactive mode.

11 years agogatt: Add support for find included services
Vinicius Costa Gomes [Tue, 9 Oct 2012 00:17:35 +0000 (21:17 -0300)]
gatt: Add support for find included services

Some services like HID over LE can reference another service using
included services.

See Vol 3, Part G, section 2.6.3 of Core specification for more
details.

11 years agoservice: Fix passing stack variable as reference value
Luiz Augusto von Dentz [Mon, 8 Oct 2012 20:08:24 +0000 (22:08 +0200)]
service: Fix passing stack variable as reference value

BDADDR_ANY cannot be return as it uses stack allocation:

Conditional jump or move depends on uninitialised value(s)
   at 0x170E47: sdp_record_remove (sdpd-database.c:269)
   by 0x17071A: remove_record_from_server (sdpd-service.c:290)
   by 0x14D416: exit_callback (service.c:131)
   by 0x124396: service_filter (watch.c:486)
   by 0x12405A: message_filter (watch.c:554)
   by 0x4F63A35: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.5.6)
   by 0x122EE7: message_dispatch (mainloop.c:76)
   by 0x4C7B3BA: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
   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 0x1225B1: main (main.c:551)
 Uninitialised value was created by a stack allocation
   at 0x1705B0: add_record_to_server (sdpd-service.c:235)

Conditional jump or move depends on uninitialised value(s)
   at 0x4A0AD21: bcmp (mc_replace_strmem.c:889)
   by 0x4C959E0: g_slist_find_custom (in /usr/lib64/libglib-2.0.so.0.3200.4)
   by 0x17C059: manager_find_adapter (manager.c:291)
   by 0x170E8F: sdp_record_remove (sdpd-database.c:270)
   by 0x17071A: remove_record_from_server (sdpd-service.c:290)
   by 0x14D416: exit_callback (service.c:131)
   by 0x124396: service_filter (watch.c:486)
   by 0x12405A: message_filter (watch.c:554)
   by 0x4F63A35: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.5.6)
   by 0x122EE7: message_dispatch (mainloop.c:76)
   by 0x4C7B3BA: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
   by 0x4C7A824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
 Uninitialised value was created by a stack allocation
   at 0x1705B0: add_record_to_server (sdpd-service.c:235)

11 years agoinput: Fix registering HoG service for non-HoG profiles
Vinicius Costa Gomes [Tue, 9 Oct 2012 00:04:34 +0000 (21:04 -0300)]
input: Fix registering HoG service for non-HoG profiles

We need to handle the case that the device has multiple HoG services,
but before registering we must check the service UUID.

11 years agoemulator: Add first draft of b1ee tool
Marcel Holtmann [Mon, 8 Oct 2012 22:35:47 +0000 (00:35 +0200)]
emulator: Add first draft of b1ee tool

11 years agoevent: Remove not used btd_event_remote_class
Szymon Janc [Mon, 8 Oct 2012 12:11:28 +0000 (14:11 +0200)]
event: Remove not used btd_event_remote_class

This was used in hciops only. With mgmt interface remote CoD is
received in EIR from Device Found/Connected events.

11 years agogdbus: Fix processing pending properties in remove_interface()
Johan Hedberg [Mon, 8 Oct 2012 12:36:12 +0000 (14:36 +0200)]
gdbus: Fix processing pending properties in remove_interface()

11 years agocore: Fix GATT security level for non-paired devices
Johan Hedberg [Mon, 8 Oct 2012 10:17:01 +0000 (13:17 +0300)]
core: Fix GATT security level for non-paired devices

If we're not paired we shouldn't use medium security (which requires
pairing).

11 years agodevice: Fix missing iterator append call in dev_property_get_product
Johan Hedberg [Sat, 6 Oct 2012 17:58:30 +0000 (19:58 +0200)]
device: Fix missing iterator append call in  dev_property_get_product

11 years agobuild: Indicate 5.x development branch
Marcel Holtmann [Sat, 6 Oct 2012 16:31:07 +0000 (18:31 +0200)]
build: Indicate 5.x development branch

11 years agocore: Move functions to avoid forward declaration
Lucas De Marchi [Sat, 6 Oct 2012 07:02:40 +0000 (04:02 -0300)]
core: Move functions to avoid forward declaration

11 years agocore: Add setters and signals to Device interface
Lucas De Marchi [Sat, 6 Oct 2012 07:02:39 +0000 (04:02 -0300)]
core: Add setters and signals to Device interface

11 years agocore: Add DBus.Properties getters for Device interface
Lucas De Marchi [Sat, 6 Oct 2012 07:02:38 +0000 (04:02 -0300)]
core: Add DBus.Properties getters for Device interface

11 years agodoc: Mark optional properties in Device interface
Lucas De Marchi [Sat, 6 Oct 2012 07:02:37 +0000 (04:02 -0300)]
doc: Mark optional properties in Device interface

11 years agocore: Remove useless memset and make icon optional
Lucas De Marchi [Sat, 6 Oct 2012 07:02:36 +0000 (04:02 -0300)]
core: Remove useless memset and make icon optional

name is not being really used anywhere, so remove it together with the
memset from Device.GetProperties().

icon is optional, so check if it's not NULL before adding it to the list
of device properties.

11 years agogdbus: Fix up Properties.Set() code path
Lucas De Marchi [Sat, 6 Oct 2012 07:02:35 +0000 (04:02 -0300)]
gdbus: Fix up Properties.Set() code path

Minor fixes to make setter actually work:

- Add propdata in pending_property_set
- Break loop when we are removing propdata from list and we
  found it
- in_args and out_args were swapped
- interface and method name arguments were swapped

11 years agogdbus: Fix invalid memory access while unregistering
Lucas De Marchi [Thu, 4 Oct 2012 20:42:33 +0000 (17:42 -0300)]
gdbus: Fix invalid memory access while unregistering

If an interface is added and removed on the same mailoop iteration,
ObjectManager would try to send InterfacesAdded signal while running the
idler because the interface was added to data->added list.

This is easily reproduced by forcing an error path in a plugin
registration, like on sap_server_register(), resulting in the following
error:

==11795== Invalid read of size 4
==11795==    at 0x496F592: dbus_message_iter_append_basic (dbus-message.c:2598)
==11795==    by 0x117B39: append_interface (object.c:554)
==11795==    by 0x48955E7: g_slist_foreach (gslist.c:840)
==11795==    by 0x11923B: process_changes (object.c:592)
==11795==    by 0x11956D: generic_unregister (object.c:980)
==11795==    by 0x4973BAC: _dbus_object_tree_unregister_and_unlock (dbus-object-tree.c:516)
==11795==    by 0x4965240: dbus_connection_unregister_object_path (dbus-connection.c:5776)
==11795==    by 0x1178A5: object_path_unref (object.c:1219)
==11795==    by 0x118517: g_dbus_unregister_interface (object.c:1344)
==11795==    by 0x19AF5B: sap_exit (sap.c:385)
==11795==    by 0x13E9E2: sap_server_register (server.c:1428)
==11795==    by 0x13C092: sap_server_probe (manager.c:44)

With this patch we don't send the InterfacesAdded signal, removing it
from data->added while unregistering.

11 years agodoc: Cycling Speed and Cadence profile (CSCP) API
Andrzej Kaczmarek [Mon, 1 Oct 2012 09:43:41 +0000 (11:43 +0200)]
doc: Cycling Speed and Cadence profile (CSCP) API

11 years agoAUTHORS: Add missing people
Johan Hedberg [Fri, 5 Oct 2012 17:15:05 +0000 (19:15 +0200)]
AUTHORS: Add missing people

11 years agodevice: Move auth_type_t definition to device.c
Szymon Janc [Fri, 5 Oct 2012 12:54:39 +0000 (14:54 +0200)]
device: Move auth_type_t definition to device.c

Bonding is handled in device.c and auth_type_t is private device data
not used outside of it.

11 years agoadapter: Don't use adapter_get_path to access adapter path
Szymon Janc [Fri, 5 Oct 2012 12:54:38 +0000 (14:54 +0200)]
adapter: Don't use adapter_get_path to access adapter path

Use struct btd_adapter directly to access path member.

11 years agoadapter: Don't use adapter_get_address to access adapter address
Szymon Janc [Fri, 5 Oct 2012 12:54:37 +0000 (14:54 +0200)]
adapter: Don't use adapter_get_address to access adapter address

Use struct btd_adapter directly to access bdaddr member.

11 years agodevice: Don't use device_get_addr_type to access device address type
Szymon Janc [Fri, 5 Oct 2012 12:54:36 +0000 (14:54 +0200)]
device: Don't use device_get_addr_type to access device address type

Use struct btd_device directly to access bdaddr_type member.

11 years agodevice: Don't use device_get_adapter to access device adapter
Szymon Janc [Fri, 5 Oct 2012 12:54:35 +0000 (14:54 +0200)]
device: Don't use device_get_adapter to access device adapter

Use struct btd_device directly to access adapter member.

11 years agodevice: Remove bogus line from device_create_bonding
Szymon Janc [Fri, 5 Oct 2012 11:08:37 +0000 (13:08 +0200)]
device: Remove bogus line from device_create_bonding

This is a typo from 899e6561d284806007b7e57e1ab3b65e54be3d22.

11 years agodevice: Make device_get_address return const pointer
Szymon Janc [Fri, 5 Oct 2012 08:17:01 +0000 (10:17 +0200)]
device: Make device_get_address return const pointer

11 years agoadapter: Constify use of bdaddr_t pointer parameters
Szymon Janc [Fri, 5 Oct 2012 08:17:00 +0000 (10:17 +0200)]
adapter: Constify use of bdaddr_t pointer parameters

Mark all input only bdaddr_t pointer parameters as const.

11 years agomgmt: Constify use of bdaddr_t pointer parameters
Szymon Janc [Fri, 5 Oct 2012 08:16:59 +0000 (10:16 +0200)]
mgmt: Constify use of bdaddr_t pointer parameters

Mark all input only bdaddr_t pointer parameters as const.

11 years agodevice: Convert device_get_address into simple getter
Szymon Janc [Fri, 5 Oct 2012 08:16:58 +0000 (10:16 +0200)]
device: Convert device_get_address into simple getter

This allow to remove number of local variables used only to get device
address and pass it as pointer later on.

bdaddr_type parameter is also removed as there is device_get_addr_type
already present which can be used to get it if needed.

11 years agoadapter: Constify pointer returned by adapter_get_address
Szymon Janc [Fri, 5 Oct 2012 08:16:57 +0000 (10:16 +0200)]
adapter: Constify pointer returned by adapter_get_address

11 years agostorage: Constify bdaddr_t pointers parameters
Szymon Janc [Fri, 5 Oct 2012 08:16:56 +0000 (10:16 +0200)]
storage: Constify bdaddr_t pointers parameters

11 years agoadapter: Convert adapter_get_address into simple getter
Szymon Janc [Fri, 5 Oct 2012 08:16:55 +0000 (10:16 +0200)]
adapter: Convert adapter_get_address into simple getter

Most uses of adapter_get_address were in form of:

bdaddr_t addr;
adapter_get_address(adapter, &addr);
foo(&addr);

Changing it to getter makes code simpler and avoid number of not
needed memcpy.

11 years agocore: Fix walking the list while removing elements
Lucas De Marchi [Thu, 4 Oct 2012 17:07:19 +0000 (14:07 -0300)]
core: Fix walking the list while removing elements

If we are walking a GSList and remove the element we are pointing to,
the next iteration g_slist_next() will access previously freed
memory.

11 years agocore: Fix leaking connection list nodes
Lucas De Marchi [Thu, 4 Oct 2012 17:39:53 +0000 (14:39 -0300)]
core: Fix leaking connection list nodes

==480== HEAP SUMMARY:
==480==     in use at exit: 62,418 bytes in 355 blocks
==480==   total heap usage: 11,134 allocs, 10,779 frees, 5,254,068 bytes allocated
==480==
==480== 16 bytes in 1 blocks are definitely lost in loss record 70 of 250
==480==    at 0x4C2C04B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==480==    by 0x4E80050: g_malloc (in /usr/lib/libglib-2.0.so.0.3200.4)
==480==    by 0x4E94442: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.3200.4)
==480==    by 0x4E95792: g_slist_append (in /usr/lib/libglib-2.0.so.0.3200.4)
==480==    by 0x17E483: adapter_add_connection (adapter.c:3245)
==480==    by 0x187FDF: btd_event_conn_complete (event.c:470)
==480==    by 0x18B72D: mgmt_event.part.36 (mgmt.c:515)
==480==    by 0x4E7A474: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.3200.4)
==480==    by 0x4E7A7A7: ??? (in /usr/lib/libglib-2.0.so.0.3200.4)
==480==    by 0x4E7ABA1: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.3200.4)
==480==    by 0x1216B1: main (main.c:551)

11 years agoaudio: Remove unused function
Chan-yeol Park [Thu, 4 Oct 2012 13:14:06 +0000 (22:14 +0900)]
audio: Remove unused function

11 years agomgmt: Add string for Passkey Notify Event
Chan-yeol Park [Thu, 4 Oct 2012 13:14:07 +0000 (22:14 +0900)]
mgmt: Add string for Passkey Notify Event

11 years agocore: Use DBus.Properties on Manager interface
Lucas De Marchi [Thu, 4 Oct 2012 07:26:39 +0000 (04:26 -0300)]
core: Use DBus.Properties on Manager interface

11 years agoaudio: Use DBus.Properties on Control interface
Lucas De Marchi [Thu, 4 Oct 2012 07:26:38 +0000 (04:26 -0300)]
audio: Use DBus.Properties on Control interface

11 years agogdbus: Implement PropertiesChanged signal
Lucas De Marchi [Thu, 4 Oct 2012 07:26:37 +0000 (04:26 -0300)]
gdbus: Implement PropertiesChanged signal

11 years agogdbus: Simplify code for appending properties
Luiz Augusto von Dentz [Thu, 4 Oct 2012 07:26:36 +0000 (04:26 -0300)]
gdbus: Simplify code for appending properties

This reuse append_properties for GetAll and GetManagedObjects

11 years agogdbus: Integrates ObjectManager with Properties interface
Luiz Augusto von Dentz [Thu, 4 Oct 2012 07:26:35 +0000 (04:26 -0300)]
gdbus: Integrates ObjectManager with Properties interface

This appends the properties and its values when using ObjectManager.

11 years agogdbus: Only export ObjectManager interface on root path
Luiz Augusto von Dentz [Thu, 4 Oct 2012 07:26:34 +0000 (04:26 -0300)]
gdbus: Only export ObjectManager interface on root path

ObjectManager should be exported only in the root path and list all
the children paths.

11 years agogdbus: Group interface changes to reduce the amount of signals emitted
Luiz Augusto von Dentz [Thu, 4 Oct 2012 07:26:33 +0000 (04:26 -0300)]
gdbus: Group interface changes to reduce the amount of signals emitted

InterfacesAdded and InterfacesRemoved can group all the interfaces
changes together in one message.

11 years agogdbus: Add support for org.freedesktop.DBus.ObjectManager interface
Luiz Augusto von Dentz [Thu, 4 Oct 2012 07:26:32 +0000 (04:26 -0300)]
gdbus: Add support for org.freedesktop.DBus.ObjectManager interface

This implements initial support for ObjectManager, it automatically adds
objects to its parents so no action is needed by daemons to get their
objects managed by this interface.

ObjectManager is part of D-Bus spec since revision 0.17:
http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager

11 years agogdbus: Add properties into Introspectable interface
Lucas De Marchi [Thu, 4 Oct 2012 07:26:31 +0000 (04:26 -0300)]
gdbus: Add properties into Introspectable interface

11 years agogdbus: Implement DBus.Properties.Set method
Lucas De Marchi [Thu, 4 Oct 2012 07:26:30 +0000 (04:26 -0300)]
gdbus: Implement DBus.Properties.Set method

Contrary to Get() and GetAll(), Set() is asynchronous so we pass an id
to the setter so later it can declare the Set() as successful or
otherwise.

11 years agogdbus: Implement DBus.Properties.GetAll method
Lucas De Marchi [Thu, 4 Oct 2012 07:26:29 +0000 (04:26 -0300)]
gdbus: Implement DBus.Properties.GetAll method

11 years agogdbus: Implement DBus.Properties.Get method
Lucas De Marchi [Thu, 4 Oct 2012 07:26:28 +0000 (04:26 -0300)]
gdbus: Implement DBus.Properties.Get method

11 years agogdbus: Add skeleton of DBus.Properties interface
Lucas De Marchi [Thu, 4 Oct 2012 07:26:27 +0000 (04:26 -0300)]
gdbus: Add skeleton of DBus.Properties interface

This interface is responsible for handling properties of all objects in
a given path. Right now it only registers itself, doing nothing useful.
A conversion to this new layout will be done by subsequent patches.

org.freedesktop.org.DBus.Properties spec can be found at
http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties

11 years agogdbus: Use macros to add annotations
Lucas De Marchi [Thu, 4 Oct 2012 07:26:26 +0000 (04:26 -0300)]
gdbus: Use macros to add annotations

Besides being more readable this way it avoids going over 80 chars.

11 years agogdbus: Move typedefs up
Lucas De Marchi [Thu, 4 Oct 2012 07:26:25 +0000 (04:26 -0300)]
gdbus: Move typedefs up

Move the typedefs up so they can be used by functions and callbacks.

11 years agobuild-sys: Don't use deprecated INCLUDES variable
Lucas De Marchi [Thu, 4 Oct 2012 06:37:10 +0000 (03:37 -0300)]
build-sys: Don't use deprecated INCLUDES variable

Makefile.am:410: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

11 years agobuild-sys: Don't use deprecated AM_PROG_MKDIR_P
Lucas De Marchi [Thu, 4 Oct 2012 06:37:09 +0000 (03:37 -0300)]
build-sys: Don't use deprecated AM_PROG_MKDIR_P

AM_PROG_MKDIR_P is deprecated since:

configure.ac:23: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed.
configure.ac:23: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
configure.ac:23: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.

We are already using $(MKDIR_P) so we just need to call the right macro.

11 years agoAVDTP: Remove hand-written function name from log
Lucas De Marchi [Thu, 4 Oct 2012 05:14:34 +0000 (02:14 -0300)]
AVDTP: Remove hand-written function name from log

11 years agoAVCTP: Remove hand-written function name from log
Lucas De Marchi [Thu, 4 Oct 2012 05:14:33 +0000 (02:14 -0300)]
AVCTP: Remove hand-written function name from log

Besides being hand-written, it was wrong which leads to confusion with
the AVDTP.

11 years agocore: Add GoepL2capPsm lookup for external OBEX profiles
Johan Hedberg [Thu, 4 Oct 2012 08:19:04 +0000 (11:19 +0300)]
core: Add GoepL2capPsm lookup for external OBEX profiles

11 years agolib: Add GoepL2capPsm SDP attribute define
Johan Hedberg [Wed, 3 Oct 2012 20:14:03 +0000 (23:14 +0300)]
lib: Add GoepL2capPsm SDP attribute define

11 years agoneard: Implement RequestOOB function
Szymon Janc [Wed, 3 Oct 2012 13:18:31 +0000 (15:18 +0200)]
neard: Implement RequestOOB function

This function is used by neard to request data to be transmitted over
OOB channel. It also allows neard to provide data to be used in OOB
pairing without initializing pairing it self.

11 years agoneard: Implement PushOOB function
Szymon Janc [Wed, 3 Oct 2012 13:18:30 +0000 (15:18 +0200)]
neard: Implement PushOOB function

This implements PushOOB function which allows neard to pass data used
for discovery and pairing. Only EIR data type is supported.

11 years agoAdd initial neard plugin implementation
Szymon Janc [Wed, 3 Oct 2012 13:18:29 +0000 (15:18 +0200)]
Add initial neard plugin implementation

Initial implementation. Only register and unregister support.

11 years agooob: Refactor oob callback handling and move it to adapter code
Szymon Janc [Wed, 3 Oct 2012 13:18:28 +0000 (15:18 +0200)]
oob: Refactor oob callback handling and move it to adapter code

This allows oob plugin to register for callback after executing
certain action on adapter. Currently reading local OOB data and
pairing is supported. It should be easy to support more callbacks
in future if needed e.g. powering on.

Thanks to this plugin is not required to duplicate code that would
validate adapter/device when callback is received as callback condition
is check in adapter.

It also allows to pass user data which will be provided back when cb
is called further reducing plugin code.

11 years agoadapter: Add btd_adapter_get_class function
Szymon Janc [Wed, 3 Oct 2012 13:18:27 +0000 (15:18 +0200)]
adapter: Add btd_adapter_get_class function

This is a simple getter to get current Class Of Device of adapter.

11 years agoadapter: Rename btd_adapter_get_class to btd_adapter_read_class
Szymon Janc [Wed, 3 Oct 2012 13:18:26 +0000 (15:18 +0200)]
adapter: Rename btd_adapter_get_class to btd_adapter_read_class

It better suits what this function really does.

11 years agoadapter: Add btd_adapter_get_services function
Szymon Janc [Wed, 3 Oct 2012 13:18:25 +0000 (15:18 +0200)]
adapter: Add btd_adapter_get_services function

Services will be used to create EIR to be send over OOB.

11 years agoeir: Add support for creating proper OOB EIR
Szymon Janc [Wed, 3 Oct 2012 13:18:24 +0000 (15:18 +0200)]
eir: Add support for creating proper OOB EIR

Address and total length field are mandatory part of OOB EIR.

11 years agoeir: Remove struct uuid_info
Szymon Janc [Wed, 3 Oct 2012 13:18:23 +0000 (15:18 +0200)]
eir: Remove struct uuid_info

Remove struct uuid_info and convert functions to use sdp_record_t
list instead. This will allow to easily use services list from
struct btd_adapter to create EIR.

11 years agoeir: Return number of bytes written by eir_create_oob
Szymon Janc [Wed, 3 Oct 2012 13:18:22 +0000 (15:18 +0200)]
eir: Return number of bytes written by eir_create_oob

In OOB EIR is not zero padded.

11 years agoeir: Remove support for creating EIR with tx_power fields
Szymon Janc [Wed, 3 Oct 2012 13:18:21 +0000 (15:18 +0200)]
eir: Remove support for creating EIR with tx_power fields

This field is not used for OOB EIR.

11 years agoeir: Rename eir_create to eir_create_oob
Szymon Janc [Wed, 3 Oct 2012 13:18:20 +0000 (15:18 +0200)]
eir: Rename eir_create to eir_create_oob

With mgmt interface EIR is created by kernel. Renaming this function
makes it clear what is a purpose of it in userspace. It also contains
support for EIR data types that shall be transmitted only over OOB
channel.

11 years agoeir: Add support for creating EIR with CoD field
Szymon Janc [Wed, 3 Oct 2012 13:18:19 +0000 (15:18 +0200)]
eir: Add support for creating EIR with CoD field

This will be used to create EIR to be send over OOB channel.

11 years agoeir: Add support creating EIR with hash and randomizer fields
Szymon Janc [Wed, 3 Oct 2012 13:18:18 +0000 (15:18 +0200)]
eir: Add support creating EIR with hash and randomizer fields

This will be used to create EIR to be send over OOB channel.

11 years agoeir: Add eir_parse_oob function
Szymon Janc [Wed, 3 Oct 2012 13:18:17 +0000 (15:18 +0200)]
eir: Add eir_parse_oob function

This will parse EIR received over OOB. Such EIR contains mandatory
and optional part.

11 years agoeir: Store class in struct eir_data as uint32_t
Szymon Janc [Wed, 3 Oct 2012 13:18:16 +0000 (15:18 +0200)]
eir: Store class in struct eir_data as uint32_t

This simplify code as class is stored on storage as uint32_t and
had to be converted to it in few places.

11 years agoeir: Add support for parsing SSP hash and randomizer
Szymon Janc [Wed, 3 Oct 2012 13:18:15 +0000 (15:18 +0200)]
eir: Add support for parsing SSP hash and randomizer

This will be used over OOB mechanism.

11 years agomgmt: Handle missing randomizer in mgmt_add_remote_oob_data
Szymon Janc [Wed, 3 Oct 2012 13:18:14 +0000 (15:18 +0200)]
mgmt: Handle missing randomizer in mgmt_add_remote_oob_data

Randomizer is optional. Handling missing randomizer in
mgmt_add_remote_oob_data is easy and will simplify caller code.

11 years agoalert: Fix various coding style issues
Johan Hedberg [Wed, 3 Oct 2012 19:37:13 +0000 (22:37 +0300)]
alert: Fix various coding style issues