From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC PATCH 2/3] ssn: add code and call id to notifications
Date: Mon, 28 Feb 2011 16:19:07 -0600 [thread overview]
Message-ID: <4D6C1F5B.60300@gmail.com> (raw)
In-Reply-To: <7010601938f3077559093876e1136dc9fd15afe5.1298883762.git.Andras.Domokos@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 4142 bytes --]
Hi Andras,
On 02/28/2011 10:28 AM, Andras Domokos wrote:
> ---
> drivers/atmodem/ssn.c | 4 ++--
> include/ssn.h | 7 ++++---
> src/ofono.h | 5 +++--
> src/ssn.c | 11 ++++++-----
> 4 files changed, 15 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/atmodem/ssn.c b/drivers/atmodem/ssn.c
> index c927bf1..ba8f89a 100644
> --- a/drivers/atmodem/ssn.c
> +++ b/drivers/atmodem/ssn.c
> @@ -56,7 +56,7 @@ static void cssi_notify(GAtResult *result, gpointer user_data)
> if (!g_at_result_iter_next_number(&iter, &index))
> index = 0;
>
> - ofono_ssn_mo_notify(ssn, code1, index);
> + ofono_ssn_mo_notify(ssn, 0, code1, index);
> }
>
> static void cssu_notify(GAtResult *result, gpointer user_data)
> @@ -93,7 +93,7 @@ static void cssu_notify(GAtResult *result, gpointer user_data)
> return;
>
> out:
> - ofono_ssn_mt_notify(ssn, code2, index, &ph);
> + ofono_ssn_mt_notify(ssn, 0, code2, index, &ph);
> }
>
> static void at_ssn_initialized(gboolean ok, GAtResult *result,
> diff --git a/include/ssn.h b/include/ssn.h
> index c8f3e0b..4f41bae 100644
> --- a/include/ssn.h
> +++ b/include/ssn.h
> @@ -37,9 +37,10 @@ struct ofono_ssn_driver {
> };
>
> /* SSN notifications (CSSI and CSSU). */
> -void ofono_ssn_mo_notify(struct ofono_ssn *ssn, int code, int index);
> -void ofono_ssn_mt_notify(struct ofono_ssn *ssn, int code, int index,
> - const struct ofono_phone_number *number);
> +void ofono_ssn_mo_notify(struct ofono_ssn *ssn, unsigned int id,
> + int code1, int index);
> +void ofono_ssn_mt_notify(struct ofono_ssn *ssn, unsigned int id, int code2,
> + int index, const struct ofono_phone_number *number);
>
> int ofono_ssn_driver_register(const struct ofono_ssn_driver *d);
> void ofono_ssn_driver_unregister(const struct ofono_ssn_driver *d);
Please just remove the ssn atom completely and add these functions to
the voicecall atom. e.g.:
ofono_voicecall_cssi_notify
ofono_voicecall_cssu_notify
or
ofono_voicecall_ssn_mt_notify
ofono_voicecall_ssn_mo_notify
> diff --git a/src/ofono.h b/src/ofono.h
> index 4e298f1..4af6f86 100644
> --- a/src/ofono.h
> +++ b/src/ofono.h
> @@ -346,8 +346,9 @@ int __ofono_sms_sim_download(struct ofono_stk *stk, const struct sms *msg,
>
> #include <ofono/ssn.h>
>
> -typedef void (*ofono_ssn_mo_notify_cb)(int index, void *user);
> -typedef void (*ofono_ssn_mt_notify_cb)(int index,
> +typedef void (*ofono_ssn_mo_notify_cb)(unsigned int id, int code1, int index,
> + void *user);
> +typedef void (*ofono_ssn_mt_notify_cb)(unsigned int id, int code2, int index,
> const struct ofono_phone_number *ph,
> void *user);
>
> diff --git a/src/ssn.c b/src/ssn.c
> index ee48fba..383114c 100644
> --- a/src/ssn.c
> +++ b/src/ssn.c
> @@ -111,7 +111,8 @@ gboolean __ofono_ssn_mt_watch_remove(struct ofono_ssn *ssn, unsigned int id)
> return __ofono_watchlist_remove_item(ssn->mt_handler_list, id);
> }
>
> -void ofono_ssn_mo_notify(struct ofono_ssn *ssn, int code1, int index)
> +void ofono_ssn_mo_notify(struct ofono_ssn *ssn, unsigned int id,
> + int code1, int index)
> {
> struct ssn_handler *h;
> GSList *l;
> @@ -122,12 +123,12 @@ void ofono_ssn_mo_notify(struct ofono_ssn *ssn, int code1, int index)
> notify = h->item.notify;
>
> if (h->code == code1)
> - notify(index, h->item.notify_data);
> + notify(id, code1, index, h->item.notify_data);
> }
> }
>
> -void ofono_ssn_mt_notify(struct ofono_ssn *ssn, int code2, int index,
> - const struct ofono_phone_number *ph)
> +void ofono_ssn_mt_notify(struct ofono_ssn *ssn, unsigned int id, int code2,
> + int index, const struct ofono_phone_number *ph)
> {
> struct ssn_handler *h;
> GSList *l;
> @@ -138,7 +139,7 @@ void ofono_ssn_mt_notify(struct ofono_ssn *ssn, int code2, int index,
> notify = h->item.notify;
>
> if (h->code == code2)
> - notify(index, ph, h->item.notify_data);
> + notify(id, code2, index, ph, h->item.notify_data);
> }
> }
>
Regards,
-Denis
next prev parent reply other threads:[~2011-02-28 22:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 16:28 [PATCH 0/3] Voice call SS notifications (2nd version) Andras Domokos
2011-02-28 16:28 ` [RFC PATCH 1/3] ssn: remove SSN atom Andras Domokos
2011-02-28 16:28 ` [RFC PATCH 2/3] ssn: add code and call id to notifications Andras Domokos
2011-02-28 22:19 ` Denis Kenzior [this message]
2011-02-28 16:28 ` [RFC PATCH 3/3] voicecall: add SSN notifications handling Andras Domokos
2011-03-10 8:33 ` Setting PDP mode claudio
2011-03-11 15:27 ` Aygon, Bertrand
2011-03-11 16:20 ` Denis Kenzior
2011-03-14 10:13 ` Mika.Liljeberg
2011-03-14 14:21 ` Denis Kenzior
2011-03-14 14:55 ` Mika.Liljeberg
-- strict thread matches above, loose matches on Subject: below --
2011-02-09 10:33 [PATCH 0/3] Voice call SS notifications Andras Domokos
2011-02-09 10:34 ` [RFC PATCH 2/3] ssn: add code and call id to notifications Andras Domokos
2011-02-10 3:08 ` Denis Kenzior
2011-02-10 9:12 ` Andras Domokos
2011-02-22 12:07 ` Sankar
2011-02-24 11:43 ` Andras Domokos
2011-02-24 15:43 ` Denis Kenzior
2011-02-24 16:11 ` Andras Domokos
2011-02-24 16:14 ` Denis Kenzior
2011-02-24 16:21 ` Andras Domokos
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=4D6C1F5B.60300@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.