Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2 6/9] emulator: add CKPD support
Date: Fri, 18 Mar 2011 15:25:42 -0500	[thread overview]
Message-ID: <4D83BFC6.6030101@gmail.com> (raw)
In-Reply-To: <1300388148-925-7-git-send-email-frederic.dalleau@linux.intel.com>

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

Hi Frédéric,

On 03/17/2011 01:55 PM, Frédéric Dalleau wrote:
> ---
>  src/emulator.c |   30 ++++++++++++++++++++++++++++++
>  1 files changed, 30 insertions(+), 0 deletions(-)
> 
> diff --git a/src/emulator.c b/src/emulator.c
> index ce3fabd..1d4fbc6 100644
> --- a/src/emulator.c
> +++ b/src/emulator.c
> @@ -387,6 +387,34 @@ fail:
>  	}
>  }
>  
> +static void ckpd_cb(GAtServer *server, GAtServerRequestType type,
> +			GAtResult *result, gpointer user_data)
> +{
> +	switch (type) {
> +	case G_AT_SERVER_REQUEST_TYPE_SET:
> +	{
> +		GAtResultIter iter;
> +		int key;
> +		g_at_result_iter_init(&iter, result);
> +		g_at_result_iter_next(&iter, "");
> +
> +		if (g_at_result_iter_next_number(&iter, &key) == FALSE)
> +			goto fail;
> +
> +		if (key != 200)
> +			goto fail;
> +
> +		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
> +		break;
> +	}
> +
> +	default:
> +fail:
> +		g_at_server_send_final(server, G_AT_SERVER_RESULT_ERROR);
> +		break;
> +	}
> +}

Do you have a plan on what to do with these key presses?

> +
>  static void emulator_add_indicator(struct ofono_emulator *em, const char* name,
>  					int min, int max, int dflt)
>  {
> @@ -462,6 +490,8 @@ void ofono_emulator_register(struct ofono_emulator *em, int fd)
>  		g_at_server_register(em->server, "+BRSF", brsf_cb, em, NULL);
>  		g_at_server_register(em->server, "+CIND", cind_cb, em, NULL);
>  		g_at_server_register(em->server, "+CMER", cmer_cb, em, NULL);
> +	} else if (em->type == OFONO_EMULATOR_TYPE_HSP) {
> +		g_at_server_register(em->server, "+CKPD", ckpd_cb, em, NULL);
>  	}
>  
>  	__ofono_atom_register(em->atom, emulator_unregister);

Regards,
-Denis

  reply	other threads:[~2011-03-18 20:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 18:55 [PATCH v2 0/9] HSP profile implementation =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 1/9] bluetooth: add functions for sco connection =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-18 20:27   ` Denis Kenzior
2011-03-19 11:06     ` Johan Hedberg
2011-03-21 17:08       ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 2/9] emulator: add hsp emulator type =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 3/9] hsp_ag: add hsp atom type =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 4/9] hsp_ag: Initial plugin commit =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 5/9] hsp_ag: add modem watch =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 6/9] emulator: add CKPD support =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-18 20:25   ` Denis Kenzior [this message]
2011-03-21 18:15     ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-21 18:28       ` Denis Kenzior
2011-03-17 18:55 ` [PATCH v2 7/9] emulator: add audio connection API =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 8/9] emulator: implement " =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-17 18:55 ` [PATCH v2 9/9] hsp_ag: add audio connection support =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau
2011-03-21 12:53 ` [PATCH v2 0/9] HSP profile implementation Luiz Augusto von Dentz
2011-03-21 18:10   ` =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Dalleau

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=4D83BFC6.6030101@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