[PATCH v0 3/3] hfp_hf_bluez5: Add SCO listen socket

2013-01-23 Thread Claudio Takahasi
This patch adds the initial SCO server socket handling. --- plugins/hfp_hf_bluez5.c | 95 + 1 file changed, 95 insertions(+) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index 0e496ee..84c4a55 100644 --- a/plugins/hfp_hf_bluez5.c +

[PATCH v0 1/3] bluez5: Add SCO socket declarations

2013-01-23 Thread Claudio Takahasi
Adds local copy of SCO Bluetooth sockets declarations, since the objective to avoid including BlueZ library headers. --- plugins/bluez5.c| 3 +++ plugins/bluez5.h| 28 plugins/hfp_hf_bluez5.c | 2 ++ 3 files changed, 33 insertions(+) diff --git a/plu

[PATCH v0 2/3] bluez5: Add bt_bacpy

2013-01-23 Thread Claudio Takahasi
Adds a copy of BlueZ bacpy function. --- plugins/bluez5.c | 8 +++- plugins/bluez5.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/bluez5.c b/plugins/bluez5.c index d471454..ea74fac 100644 --- a/plugins/bluez5.c +++ b/plugins/bluez5.c @@ -23,9 +23,10 @@ #includ

Re: [PATCH] hfp_hf_bluez5: Add SLC establishment procedure

2013-01-23 Thread Denis Kenzior
Hi Vinicius, On 01/23/2013 05:08 PM, Vinicius Costa Gomes wrote: 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 poin

[PATCH] hfp_hf_bluez5: Add SLC establishment procedure

2013-01-23 Thread Vinicius Costa Gomes
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. --- Now that we don't change how hfp_slc_info is allocated, this

Re: [PATCH v1 06/10] hfpmodem: Add dynamic hfp_slc_info allocation

2013-01-23 Thread Vinicius Costa Gomes
Hi Denis, On 14:34 Wed 23 Jan, Denis Kenzior wrote: > Hi Vinicius, > > >diff --git a/plugins/phonesim.c b/plugins/phonesim.c > >index 26f96d0..9210e02 100644 > >--- a/plugins/phonesim.c > >+++ b/plugins/phonesim.c > >@@ -929,8 +929,8 @@ static int localhfp_enable(struct ofono_modem *modem) > > >

Re: [PATCH v1 06/10] hfpmodem: Add dynamic hfp_slc_info allocation

2013-01-23 Thread Denis Kenzior
Hi Vinicius, diff --git a/plugins/phonesim.c b/plugins/phonesim.c index 26f96d0..9210e02 100644 --- a/plugins/phonesim.c +++ b/plugins/phonesim.c @@ -929,8 +929,8 @@ static int localhfp_enable(struct ofono_modem *modem) g_at_chat_set_disconnect_function(chat, slc_failed, modem); -

Re: [PATCH v1 05/10] hfp_hf_bluez5: Handle NewConnection from BlueZ

2013-01-23 Thread Denis Kenzior
Hi Vinicius, On 01/23/2013 12:27 PM, Vinicius Costa Gomes wrote: 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

Re: [PATCH v1 04/10] hfp_hf_bluez5: Keep track of changes of devices Aliases

2013-01-23 Thread Denis Kenzior
Hi Vinicius, On 01/23/2013 12:27 PM, Vinicius Costa Gomes wrote: If the device Alias property changes we should also change the name of the modem. --- plugins/hfp_hf_bluez5.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) Patch has been applied, thanks. Regards,

Re: [PATCH v1 03/10] hfp_hf_bluez5: Register modem for HFP AG capable devices

2013-01-23 Thread Denis Kenzior
Hi Vinicius, On 01/23/2013 12:27 PM, Vinicius Costa Gomes wrote: 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. --- plugins/bluez5.h| 1 + plugins/hfp_hf_bluez

Re: [PATCH v1 02/10] hfp_hf_bluez5: Add GDBusProxy for Bluetooth devices

2013-01-23 Thread Denis Kenzior
Hi Vinicius, On 01/23/2013 12:27 PM, Vinicius Costa Gomes wrote: This patch tracks the GDBusProxy for Bluetooth devices in order to be able to get its properties. --- plugins/bluez5.h| 1 + plugins/hfp_hf_bluez5.c | 23 --- 2 files changed, 21 insertions(+), 3 de

Re: [PATCH v1 01/10] hfp_hf_bluez5: Initial GDBusClient for BlueZ

2013-01-23 Thread Denis Kenzior
Hi Vinicius, On 01/23/2013 12:27 PM, Vinicius Costa Gomes wrote: 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. --- plugins/bluez5.h| 3 ++- plugins/hfp_hf_bluez5.c |

[PATCH v1 10/10] hfp_hf_bluez5: Add SLC establishment procedure

2013-01-23 Thread Vinicius Costa Gomes
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. --- plugins/hfp_hf_bluez5.c | 176 ++

[PATCH v1 09/10] phonesim: Use hfp_slc_info_free()

2013-01-23 Thread Vinicius Costa Gomes
Now that we have a function that takes care of free'ing that structure we should use it. --- plugins/phonesim.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/phonesim.c b/plugins/phonesim.c index 9210e02..a9b77b9 100644 --- a/plugins/phonesim.c +++ b/plugins/pho

[PATCH v1 08/10] hfp_hf_bluez4: Use hfp_slc_info_free()

2013-01-23 Thread Vinicius Costa Gomes
Now that we have a function that takes care of free'ing that structure we should use it. --- plugins/hfp_hf_bluez4.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/hfp_hf_bluez4.c b/plugins/hfp_hf_bluez4.c index b0aa1aa..d00e019 100644 --- a/plugins/hfp_

[PATCH v1 07/10] hfpmodem: Implement hfp_slc_info_free()

2013-01-23 Thread Vinicius Costa Gomes
Add missing hfp_slc_info_free() function declaration. --- drivers/hfpmodem/slc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/hfpmodem/slc.c b/drivers/hfpmodem/slc.c index 825b8a9..bf8d02d 100644 --- a/drivers/hfpmodem/slc.c +++ b/drivers/hfpmodem/slc.c @@ -84,6 +84,16 @

[PATCH v1 06/10] hfpmodem: Add dynamic hfp_slc_info allocation

2013-01-23 Thread Vinicius Costa Gomes
It less error prone to have hfp_slc_info allocated dynamically than having it allocated statically, as it makes the verification that it was already de-allocated more direct. --- drivers/hfpmodem/slc.c | 9 - drivers/hfpmodem/slc.h | 3 ++- plugins/hfp_hf_bluez4.c | 35

[PATCH v1 05/10] hfp_hf_bluez5: Handle NewConnection from BlueZ

2013-01-23 Thread Vinicius Costa Gomes
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. --- plugins/hfp_hf_bluez5.c | 51 +++

[PATCH v1 04/10] hfp_hf_bluez5: Keep track of changes of devices Aliases

2013-01-23 Thread Vinicius Costa Gomes
If the device Alias property changes we should also change the name of the modem. --- plugins/hfp_hf_bluez5.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index fbb1be3..91bafaf 100644 --- a/plugins/hfp_hf_

[PATCH v1 03/10] hfp_hf_bluez5: Register modem for HFP AG capable devices

2013-01-23 Thread Vinicius Costa Gomes
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. --- plugins/bluez5.h| 1 + plugins/hfp_hf_bluez5.c | 78 - 2 files ch

[PATCH v1 02/10] hfp_hf_bluez5: Add GDBusProxy for Bluetooth devices

2013-01-23 Thread Vinicius Costa Gomes
This patch tracks the GDBusProxy for Bluetooth devices in order to be able to get its properties. --- plugins/bluez5.h| 1 + plugins/hfp_hf_bluez5.c | 23 --- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/plugins/bluez5.h b/plugins/bluez5.h index 8930

[PATCH v1 01/10] hfp_hf_bluez5: Initial GDBusClient for BlueZ

2013-01-23 Thread Vinicius Costa Gomes
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. --- plugins/bluez5.h| 3 ++- plugins/hfp_hf_bluez5.c | 51 + 2 files changed,

[PATCH v1 00/10] HFP Service Level Connection establishment

2013-01-23 Thread Vinicius Costa Gomes
Hi, Changes from last version (from review comments): - Better error handling when using GDBusProxy; - Fixed some indentation issues; - Proper use of the ofono_modem functionality to keep associated data; - Simplifications that these changes allowed; Cheers, Vinicius Costa Gomes (10): hf

Re: AW: [PATCH 05/10] hfp_hf_bluez5: Handle NewConnection from BlueZ

2013-01-23 Thread Vinicius Costa Gomes
Hi, On 08:49 Wed 23 Jan, Denis Kenzior wrote: > Hi Andreas, > > > > >I assume returning NULL is ok here if nothing went wrong? > >I'm not familiar with plain dbus API, just using glib gdbus, there I would > >expect to create an answer to the call. > > The NewConnection method is marked as 'AS

Re: AW: [PATCH 05/10] hfp_hf_bluez5: Handle NewConnection from BlueZ

2013-01-23 Thread Denis Kenzior
Hi Andreas, I assume returning NULL is ok here if nothing went wrong? I'm not familiar with plain dbus API, just using glib gdbus, there I would expect to create an answer to the call. The NewConnection method is marked as 'ASYNC' in the method table (see profile_methods). In our gdbus li

Re: [PATCH 03/10] hfp_hf_bluez5: Register modem for HFP AG capable devices

2013-01-23 Thread Vinicius Costa Gomes
Hi Denis, On 22:59 Tue 22 Jan, Denis Kenzior wrote: > Hi Vinicius, > > On 01/22/2013 03:43 PM, Vinicius Costa Gomes wrote: > >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 a

Re: [PATCH 01/10] hfp_hf_bluez5: Initial GDBusClient for BlueZ

2013-01-23 Thread Vinicius Costa Gomes
Hi Denis, On 22:30 Tue 22 Jan, Denis Kenzior wrote: > Hi Vinicius, > > On 01/22/2013 03:43 PM, Vinicius Costa Gomes wrote: > >This patch adds the initial callbacks to track when BlueZ connects or > >disconnects from the system bus. And tracks the interfaces added or > >removed. > >--- > > plugin

AW: [PATCH 05/10] hfp_hf_bluez5: Handle NewConnection from BlueZ

2013-01-23 Thread Kling, Andreas
Hi, >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. >--- > plugins/hfp_hf_bluez5