The class |DaemonSocket| and its helpers implement a service-
neutral connection to a HAL daemon. This patch moves the code
to an appropriate directory and breaks up the code into smaller
pieces.
This patch integrates the functionality of |BluetoothDaemonChannel|
into |BluetoothDaemonConnection|. All users are adapted, the former
class is removed.
This patch converts |ListenSocket| to forward events to an instance
of |ListenSocketConsumer|. All users are converted and the related
listener and consumer classes are removed.
With this patch, Bluetooth v1 and v2 share the same interfaces classes
for their backend code. Bluetooth v1 doesn't yet support GATT, so the
GATT interfaces are still not implemented.
The patch also fixes the GATT-specific classes to compile under recent GCC
versions 4.8 and later, which are used with Android L.
The patch also preserves the prefered backend for each version. Bluetooth
v1 defaults to 'bluetoothd,' v2 defaults to 'bluedroid.'
Bluetooth use different types for the second argument of their variant
of |BluetoothInterface::SspReply|. This patch standardizes them on the
v2 version.
With this patch, Bluetooth v1 and v2 share the same interfaces classes
for their backend code. Bluetooth v1 doesn't yet support GATT, so the
GATT interfaces are still not implemented.
The patch also fixes the GATT-specific classes to compile under recent GCC
versions 4.8 and later, which are used with Android L.
The patch also preserves the prefered backend for each version. Bluetooth
v1 defaults to 'bluetoothd,' v2 defaults to 'bluedroid.'
Bluetooth use different types for the second argument of their variant
of |BluetoothInterface::SspReply|. This patch standardizes them on the
v2 version.
There are some minor differences between backends in Bluetooth v1 and
v2. Some of the types have been added, removed or renamed. This patch
prepares the HAL and daemon backend interfaces to support both variants.
This patch adds error handling to all interface methods of Bluedroid's
daemon backend. If an error occures while sending a command to the daemon,
the methods dispatch an error.
This patch adds support for a random postfix for bluetoothd's socket
name. The postfix is re-generated for every instance of the daemon.
This prevents name collisions between mutliple sessions and malicious
programs from taking over the connection easily.
Currently, Gecko connects to a running instance of bluetoothd when
it starts the daemon backend. This contains a race condition between
the startup of the daemon and the startup of Gecko.
This patch changes the initialization and cleanup of Bluetooth's
daemon backend so that the Bluetooth daemon connects to Gecko. The
daemon process is now started as part of the initialization and
quits during shutdown. The steps are strictly ordered, so no race
condition exists.
The initialization and cleanup procedures should now be compatible
with BlueZ 5.
The class |BluetoothDaemonChannel| for the bluetoothd channels
supports reference counting. This patch fixes the respective
variable to use |nsRefPtr| instead of |nsAutoPtr|.
This patch adds the core interfaces and the Setup module for
the Bluetooth Daemon. The Setup module implements commands
for enabling and disabling Bluetooth profiles in the daemon.