Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 10/12] handsfree: Read-only voice-recognition D-Bus prop
Date: Fri, 09 Sep 2011 01:13:08 -0500	[thread overview]
Message-ID: <4E69AE74.9040907@gmail.com> (raw)
In-Reply-To: <1316104483-13144-11-git-send-email-mikel.astiz@bmw-carit.de>

[-- Attachment #1: Type: text/plain, Size: 2851 bytes --]

Hi Mikel,

On 09/15/2011 11:34 AM, Mikel Astiz wrote:
> ---
>  include/handsfree.h |    2 ++
>  src/handsfree.c     |   25 +++++++++++++++++++++++++
>  2 files changed, 27 insertions(+), 0 deletions(-)

Can you split this patch into two, one for handsfree driver api changes
and one for the atom changes.

Also, I'd like the read-only and write-only patches to be combined.

> 
> diff --git a/include/handsfree.h b/include/handsfree.h
> index 18c6f26..26a4c4f 100644
> --- a/include/handsfree.h
> +++ b/include/handsfree.h
> @@ -46,6 +46,8 @@ struct ofono_handsfree_driver {
>  
>  void ofono_handsfree_set_inband_ringing(struct ofono_handsfree *hf,
>  						ofono_bool_t enabled);
> +void ofono_handsfree_set_voice_recognition(struct ofono_handsfree *hf,
> +						ofono_bool_t enabled);
>  
>  int ofono_handsfree_driver_register(const struct ofono_handsfree_driver *d);
>  void ofono_handsfree_driver_unregister(
> diff --git a/src/handsfree.c b/src/handsfree.c
> index 3138474..4b0756b 100644
> --- a/src/handsfree.c
> +++ b/src/handsfree.c
> @@ -44,6 +44,8 @@ static GSList *g_drivers = NULL;
>  
>  struct ofono_handsfree {
>  	ofono_bool_t inband_ringing;
> +	ofono_bool_t voicerec_state;
> +
>  	const struct ofono_handsfree_driver *driver;
>  	void *driver_data;
>  	struct ofono_atom *atom;
> @@ -68,6 +70,24 @@ void ofono_handsfree_set_inband_ringing(struct ofono_handsfree *hf,
>  					&dbus_enabled);
>  }
>  
> +void ofono_handsfree_set_voice_recognition(struct ofono_handsfree *hf,
> +						ofono_bool_t enabled)
> +{
> +	DBusConnection *conn = ofono_dbus_get_connection();
> +	const char *path = __ofono_atom_get_path(hf->atom);
> +	dbus_bool_t dbus_enabled = enabled;
> +
> +	if (hf->voicerec_state == enabled)
> +		return;
> +
> +	hf->voicerec_state = enabled;
> +
> +	ofono_dbus_signal_property_changed(conn, path,
> +					OFONO_HANDSFREE_INTERFACE,
> +					"VoiceRecognition", DBUS_TYPE_BOOLEAN,
> +					&dbus_enabled);
> +}
> +
>  static DBusMessage *handsfree_get_properties(DBusConnection *conn,
>  						DBusMessage *msg, void *data)
>  {
> @@ -76,6 +96,7 @@ static DBusMessage *handsfree_get_properties(DBusConnection *conn,
>  	DBusMessageIter iter;
>  	DBusMessageIter dict;
>  	dbus_bool_t inband_ringing;
> +	dbus_bool_t voicerec_state;
>  
>  	reply = dbus_message_new_method_return(msg);
>  	if (reply == NULL)
> @@ -91,6 +112,10 @@ static DBusMessage *handsfree_get_properties(DBusConnection *conn,
>  	ofono_dbus_dict_append(&dict, "InbandRinging", DBUS_TYPE_BOOLEAN,
>  				&inband_ringing);
>  
> +	voicerec_state = hf->voicerec_state;
> +	ofono_dbus_dict_append(&dict, "VoiceRecognition", DBUS_TYPE_BOOLEAN,
> +				&voicerec_state);
> +
>  	dbus_message_iter_close_container(&iter, &dict);
>  
>  	return reply;

Regards,
-Denis

  reply	other threads:[~2011-09-09  6:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15 16:34 [PATCH 00/12] Bluetooth HFP-specific extensions Mikel Astiz
2011-09-15 16:34 ` [PATCH 01/12] TODO: Task added for HFP-specific capabilities Mikel Astiz
2011-09-09  5:10   ` Denis Kenzior
2011-09-15 16:34 ` [PATCH 02/12] Add handsfree atom " Mikel Astiz
2011-09-09  5:13   ` Denis Kenzior
2011-09-16 15:56   ` Daniel Wagner
2011-09-09  5:14     ` Denis Kenzior
2011-09-15 16:34 ` [PATCH 03/12] hfpmodem: Driver implements handsfree atom Mikel Astiz
2011-09-09  6:14   ` Denis Kenzior
2011-09-15 16:34 ` [PATCH 04/12] hfp_hf: Plugin creates " Mikel Astiz
2011-09-09  6:16   ` Denis Kenzior
2011-09-15 16:34 ` [PATCH 05/12] handsfree: Atom supports inband ringing status Mikel Astiz
2011-09-09  6:15   ` Denis Kenzior
2011-09-15 16:34 ` [PATCH 06/12] hfpmodem: Support for +BSIR unsol. result codes Mikel Astiz
2011-09-09  5:48   ` Denis Kenzior
2011-09-15 16:34 ` [PATCH 07/12] handsfree: Support for number requests (AT+BINP=1) Mikel Astiz
2011-09-09  6:16   ` Denis Kenzior
2011-09-15 16:34 ` [PATCH 08/12] handsfree: Expose RequestInput in D-Bus API Mikel Astiz
2011-09-09  6:01   ` Denis Kenzior
2011-09-15 16:34 ` [PATCH 09/12] hfpmodem: Support of number requests (AT+BINP=1) Mikel Astiz
2011-09-09  6:04   ` Denis Kenzior
2011-09-15 16:34 ` [PATCH 10/12] handsfree: Read-only voice-recognition D-Bus prop Mikel Astiz
2011-09-09  6:13   ` Denis Kenzior [this message]
2011-09-15 16:34 ` [PATCH 11/12] handsfree: Writable voice-recogn. prop (AT+BVRA) Mikel Astiz
2011-09-15 16:34 ` [PATCH 12/12] hfpmodem: Support for AT+BVRA Mikel Astiz
2011-09-09  6:17   ` Denis Kenzior
2011-09-23  8:57 ` [PATCH 00/12] Bluetooth HFP-specific extensions =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E69AE74.9040907@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox