Commit Graph

71 Commits

Author SHA1 Message Date
Claudio Takahasi a2b698dc40 hfp_hf_bluez5: Add Profile RequestDisconnection
This patch implements RequestDisconnection method of the Profile1
interface. This method gets called when the profile gets disconnected.
The profile implementation needs to cleanup the resources related to
the informed device.
2013-02-14 08:47:10 -06:00
Claudio Takahasi 86224f5724 bluez5: Rename BlueZ Profile registration functions
This patch renames external profile registration functions replacing the
prefix from 'bluetooth_' to 'bt_' in order to follow the name convention
adopted for bluez5 functions.
2013-02-14 08:47:10 -06:00
Claudio Takahasi 39e72e0178 hfp_hf_bluez5: Remove BlueZ devices proxies hash
The hash table to track the devices is not necessary anymore since
dynamic modem registration on NewConnection was removed.
2013-01-31 16:03:48 -06:00
Claudio Takahasi f044c6c1fa hfp_hf_bluez5: Fix registering modem on NewConnection
HFP modem will be registered when Proxy Added callback gets called
or when Pair is True. This patch removes the support for dynamic modem
registration when a new connection is notified and there isn't a modem
associated with the Bluetooth remote device.

BlueZ behaviour has been changed and a NewConnection is not notified
before the service discovery finishes.
2013-01-31 16:01:04 -06:00
Vinicius Costa Gomes 852ea612c8 hfp_hf_bluez5: Remove unneeded error handling
Apart from g_io_channel_unix_new() not setting errno, it never
returns an NULL pointer on error, because in practice it only
calls g_new().
2013-01-31 15:57:55 -06:00
Vinicius Costa Gomes 5b56668f1e hfp_hf_bluez5: Only register modems for Paired devices
When there are many devices around that support the HFP AG profile,
we may have a lot of modems that the user will never use.
2013-01-30 21:36:49 -06:00
Claudio Takahasi 5185980fb0 hfp_hf_bluez5: Improve Proxy property changed handling
This patch removes unnecessary GDBusProxy object access when property
changed is triggered. The property name and the argument iterator is
informed in the function callback.
2013-01-30 21:32:47 -06:00
Claudio Takahasi 9496fe8e70 hfp_hf_bluez5: Fix missing fd close
This patch fix an unusual scenario, service_level_connection() fails if
GIOChannel or GAtChat memory allocation fails.
2013-01-29 15:58:39 -06:00
Vinicius Costa Gomes b6f92d3074 hfp_hf_bluez5: Rename 'Address' to 'Remote'
Rename this property to better indicate that it is the remote Address
being referred to.
2013-01-29 15:57:48 -06:00
Claudio Takahasi e8621fe8c2 bluez5: Add bt_ba2str()
Adds a copy of BlueZ ba2str() function.
2013-01-29 09:02:45 -06:00
Claudio Takahasi e05b3dfb4d hfp_hf_bluez5: Add SCO listen socket
This patch adds the initial SCO server socket handling. BtIO and BlueZ
functions should not be used, with the new Profile API the objetive is
to get rid of these dependencies.
2013-01-29 09:01:26 -06:00
Claudio Takahasi a2376f6c77 bluez5: Add SCO socket declarations
Adds local copy of SCO Bluetooth sockets declarations, since the
objective to avoid including BlueZ library headers.
2013-01-29 08:39:31 -06:00
Vinicius Costa Gomes 3a3e31eef2 hfp_hf_bluez5: Add SLC establishment procedure
When receiving a NewConnection call from BlueZ, initiates the Service
Level Connection using the received file descriptor. The HFP modem
sub-components (devinfo, voicecall, netreg, handsfree and callvolume)
are created at this point.
2013-01-23 17:28:16 -06:00
Vinicius Costa Gomes a90f0441d6 hfp_hf_bluez5: Handle NewConnection from BlueZ
Parse the essential arguments in the message, in this case only the
file descriptor, and register the modem if it is not already
registered. This is necessary because in some cases, we may receive a
NewConnection call, and the SDP process is still taking place.
2013-01-23 14:19:53 -06:00
Vinicius Costa Gomes 71986b67a3 hfp_hf_bluez5: Follow HFP AG device Alias property
If the device Alias property changes we should also change the name of
the modem.
2013-01-23 14:18:18 -06:00
Vinicius Costa Gomes 67cdf33fe8 hfp_hf_bluez5: Register modem for HFP AG devices
Now that we are able to keep track of devices appearing and
disappearing from BlueZ, we are able to register the modem when a
device that supports the HFP AG UUID appears.
2013-01-23 14:16:54 -06:00
Vinicius Costa Gomes 0de672ca78 hfp_hf_bluez5: Add tracking of bluetooth devices
This patch tracks the GDBusProxy for Bluetooth devices in order to be
able to get their properties.
2013-01-23 14:13:37 -06:00
Vinicius Costa Gomes 63cd9a740a hfp_hf_bluez5: Initial GDBusClient for BlueZ
This patch adds the initial callbacks to track when BlueZ connects so
we can register our HFP external profile handler. And tracks the
interfaces added or removed.
2013-01-23 14:13:37 -06:00
Claudio Takahasi 544726eb2e hfp_hf_bluez5: Add BlueZ Profile handler
This patch declares the external HFP Profile handler. It contains the
initial implementation of the D-Bus Profile1 interface and methods
responsible for handling Bluetooth connections.
2013-01-16 13:59:52 -06:00
Claudio Takahasi f95fbc72a1 hfp_hf_bluez5: Add initial skeleton implementation 2013-01-16 13:54:03 -06:00
Claudio Takahasi 2b7d96a223 hfp_hf: Add initial file for external HFP
This patch adds the initial file to support external HFP profile and
BlueZ 5. "hfp_hf_bluez5" plugin will implement an external Bluetooth
profile compatible with BlueZ 5, and "hfp_hf_bluez4" plugin will keep
the compatibility with BlueZ 4.
2013-01-16 13:43:06 -06:00