It was a cause of confusion for little gain to have separate
functions for registering profiles with extra information, for
example "role" and "features". We remove those helper functions
in favor of a single one with more parameters, "role" and
"feature" when NULL, will be ignored.
This patch glues together the dundee driver interface with the
D-Bus Profile1 interface.
When the dundee driver requests a connection, it will call the
Device1's ConnectProfile.
This patch declares the external dundee Profile handler. It
contains the initial implementation of the D-Bus Profile1
interface and methods responsible for handling Bluetooth
connections.
As BlueZ 5 introduced backwards incompatible API changes, and we want to
keep support for BlueZ 4 based plugins for some time, we need to separate
the plugins that are based on BlueZ 4 from the ones based on BlueZ 5.
The bluetooth.c plugin has now been renamed to bluez4.c and the hfp_hf.c
plugin is renamed to hfp_hf_bluez4. This will make it easy to add a
HFP HF plugin for BlueZ 5.
By default, both stderr and syslog messages go to the systemd journal,
which results in duplicate messages being logged.
Thanks to Vinicius Costa Gomes for pointing out this problem.
If the ATD*99# dial fails for some reason, NO CARRIER, for example, we
need to disconnect the bluetooth link and do further clean up on
disconnect_callback().
If we do not shut it down the fd can remain opened. This make impossible
to try a re-connect: busy is returned in this case.
We call shutdown here to make sure that the link is always closed.