* [PATCH 0/3] Voice call SS notifications (2nd version)
@ 2011-02-28 16:28 Andras Domokos
2011-02-28 16:28 ` [RFC PATCH 1/3] ssn: remove SSN atom Andras Domokos
` (3 more replies)
0 siblings, 4 replies; 20+ messages in thread
From: Andras Domokos @ 2011-02-28 16:28 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]
Implementation proposal for handling some of the voice call
related Supplementary Services (SS) notifications.
Implementation details:
- removed SSN atom
- expanded the SS notify functions with call number info, useful
for modems capable of delivering it in the SS notifications
- expanded the SS callback functions with call number info and
service code, useful in demultiplexing when a common callback
function is defined for multiple service codes
- added +CSSU and +CSSI type SS notifications handling to the
voicecall code
Andras Domokos (3):
ssn: remove SSN atom
ssn: add code and call id to notifications
voicecall: add SSN notifications handling
drivers/atmodem/ssn.c | 6 +-
include/ssn.h | 12 ++--
include/types.h | 2 +
plugins/calypso.c | 1 -
plugins/g1.c | 1 -
plugins/huawei.c | 1 -
plugins/ifx.c | 1 -
plugins/isiusb.c | 1 -
plugins/linktop.c | 1 -
plugins/n900.c | 1 -
plugins/phonesim.c | 1 -
plugins/ste.c | 1 -
plugins/tc65.c | 1 -
plugins/u8500.c | 1 -
plugins/wavecom.c | 1 -
src/ofono.h | 5 +-
src/ssn.c | 66 +++++---------
src/voicecall.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++-
18 files changed, 272 insertions(+), 71 deletions(-)
^ permalink raw reply [flat|nested] 20+ messages in thread* [RFC PATCH 1/3] ssn: remove SSN atom 2011-02-28 16:28 [PATCH 0/3] Voice call SS notifications (2nd version) Andras Domokos @ 2011-02-28 16:28 ` Andras Domokos 2011-02-28 16:28 ` [RFC PATCH 2/3] ssn: add code and call id to notifications Andras Domokos ` (2 subsequent siblings) 3 siblings, 0 replies; 20+ messages in thread From: Andras Domokos @ 2011-02-28 16:28 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 12737 bytes --] --- drivers/atmodem/ssn.c | 6 +--- include/ssn.h | 9 +++---- plugins/calypso.c | 1 - plugins/g1.c | 1 - plugins/huawei.c | 1 - plugins/ifx.c | 1 - plugins/isiusb.c | 1 - plugins/linktop.c | 1 - plugins/n900.c | 1 - plugins/phonesim.c | 1 - plugins/ste.c | 1 - plugins/tc65.c | 1 - plugins/u8500.c | 1 - plugins/wavecom.c | 1 - src/ssn.c | 59 +++++++++++++++---------------------------------- 15 files changed, 24 insertions(+), 62 deletions(-) diff --git a/drivers/atmodem/ssn.c b/drivers/atmodem/ssn.c index b7a9df4..c927bf1 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_cssi_notify(ssn, code1, index); + ofono_ssn_mo_notify(ssn, 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_cssu_notify(ssn, code2, index, &ph); + ofono_ssn_mt_notify(ssn, code2, index, &ph); } static void at_ssn_initialized(gboolean ok, GAtResult *result, @@ -104,8 +104,6 @@ static void at_ssn_initialized(gboolean ok, GAtResult *result, g_at_chat_register(chat, "+CSSI:", cssi_notify, FALSE, ssn, NULL); g_at_chat_register(chat, "+CSSU:", cssu_notify, FALSE, ssn, NULL); - - ofono_ssn_register(ssn); } static int at_ssn_probe(struct ofono_ssn *ssn, unsigned int vendor, diff --git a/include/ssn.h b/include/ssn.h index d640cad..c8f3e0b 100644 --- a/include/ssn.h +++ b/include/ssn.h @@ -37,19 +37,18 @@ struct ofono_ssn_driver { }; /* SSN notifications (CSSI and CSSU). */ -void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, int code, int index); -void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int code, int index, +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); int ofono_ssn_driver_register(const struct ofono_ssn_driver *d); void ofono_ssn_driver_unregister(const struct ofono_ssn_driver *d); -struct ofono_ssn *ofono_ssn_create(struct ofono_modem *modem, +struct ofono_ssn *ofono_ssn_new(struct ofono_modem *modem, unsigned int vendor, const char *driver, void *data); -void ofono_ssn_register(struct ofono_ssn *ssn); -void ofono_ssn_remove(struct ofono_ssn *ssn); +void ofono_ssn_free(struct ofono_ssn *ssn); void ofono_ssn_set_data(struct ofono_ssn *ssn, void *data); void *ofono_ssn_get_data(struct ofono_ssn *ssn); diff --git a/plugins/calypso.c b/plugins/calypso.c index 0e29256..9c1b449 100644 --- a/plugins/calypso.c +++ b/plugins/calypso.c @@ -534,7 +534,6 @@ static void calypso_post_sim(struct ofono_modem *modem) data->dlcs[NETREG_DLC]); ofono_call_meter_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]); ofono_call_barring_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]); - ofono_ssn_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]); ofono_call_volume_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]); mw = ofono_message_waiting_create(modem); diff --git a/plugins/g1.c b/plugins/g1.c index 22bacdc..bccde13 100644 --- a/plugins/g1.c +++ b/plugins/g1.c @@ -184,7 +184,6 @@ static void g1_post_sim(struct ofono_modem *modem) ofono_netreg_create(modem, 0, "atmodem", chat); ofono_call_meter_create(modem, 0, "atmodem", chat); ofono_call_barring_create(modem, 0, "atmodem", chat); - ofono_ssn_create(modem, 0, "atmodem", chat); ofono_sms_create(modem, OFONO_VENDOR_QUALCOMM_MSM, "atmodem", chat); ofono_phonebook_create(modem, 0, "atmodem", chat); diff --git a/plugins/huawei.c b/plugins/huawei.c index 6f05677..5be5247 100644 --- a/plugins/huawei.c +++ b/plugins/huawei.c @@ -685,7 +685,6 @@ static void huawei_post_online(struct ofono_modem *modem) ofono_call_forwarding_create(modem, 0, "atmodem", data->pcui); ofono_call_settings_create(modem, 0, "atmodem", data->pcui); ofono_call_barring_create(modem, 0, "atmodem", data->pcui); - ofono_ssn_create(modem, 0, "atmodem", data->pcui); mw = ofono_message_waiting_create(modem); if (mw) diff --git a/plugins/ifx.c b/plugins/ifx.c index 527a8c4..16a2326 100644 --- a/plugins/ifx.c +++ b/plugins/ifx.c @@ -717,7 +717,6 @@ static void ifx_post_online(struct ofono_modem *modem) ofono_cbs_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]); ofono_ussd_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]); - ofono_ssn_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]); ofono_call_settings_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]); ofono_call_meter_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]); ofono_call_barring_create(modem, 0, "atmodem", data->dlcs[AUX_DLC]); diff --git a/plugins/isiusb.c b/plugins/isiusb.c index c036604..a5edf72 100644 --- a/plugins/isiusb.c +++ b/plugins/isiusb.c @@ -428,7 +428,6 @@ static void isiusb_post_online(struct ofono_modem *modem) ofono_netreg_create(modem, 0, "wgmodem2.5", isi->modem); ofono_sms_create(modem, 0, "isimodem", isi->modem); ofono_cbs_create(modem, 0, "isimodem", isi->modem); - ofono_ssn_create(modem, 0, "isimodem", isi->modem); ofono_ussd_create(modem, 0, "isimodem", isi->modem); ofono_call_settings_create(modem, 0, "isimodem", isi->modem); ofono_call_barring_create(modem, 0, "isimodem", isi->modem); diff --git a/plugins/linktop.c b/plugins/linktop.c index 2fb3896..59367d4 100644 --- a/plugins/linktop.c +++ b/plugins/linktop.c @@ -313,7 +313,6 @@ static void linktop_post_online(struct ofono_modem *modem) ofono_netreg_create(modem, OFONO_VENDOR_MBM, "atmodem", data->control); ofono_call_meter_create(modem, 0, "atmodem", data->control); ofono_call_barring_create(modem, 0, "atmodem", data->control); - ofono_ssn_create(modem, 0, "atmodem", data->control); ofono_call_volume_create(modem, 0, "atmodem", data->control); ofono_cbs_create(modem, 0, "atmodem", data->control); diff --git a/plugins/n900.c b/plugins/n900.c index c685266..0c92d8d 100644 --- a/plugins/n900.c +++ b/plugins/n900.c @@ -509,7 +509,6 @@ static void n900_post_online(struct ofono_modem *modem) ofono_netreg_create(modem, 0, "isimodem", isi->modem); ofono_sms_create(modem, 0, "isimodem", isi->modem); ofono_cbs_create(modem, 0, "isimodem", isi->modem); - ofono_ssn_create(modem, 0, "isimodem", isi->modem); ofono_ussd_create(modem, 0, "isimodem", isi->modem); ofono_call_settings_create(modem, 0, "isimodem", isi->modem); ofono_call_barring_create(modem, 0, "isimodem", isi->modem); diff --git a/plugins/phonesim.c b/plugins/phonesim.c index 2b36fe0..9beb04e 100644 --- a/plugins/phonesim.c +++ b/plugins/phonesim.c @@ -651,7 +651,6 @@ static void phonesim_post_online(struct ofono_modem *modem) ofono_call_meter_create(modem, 0, "atmodem", data->chat); ofono_call_barring_create(modem, 0, "atmodem", data->chat); - ofono_ssn_create(modem, 0, "atmodem", data->chat); ofono_call_volume_create(modem, 0, "atmodem", data->chat); if (!data->calypso) diff --git a/plugins/ste.c b/plugins/ste.c index b786571..bcfd33d 100644 --- a/plugins/ste.c +++ b/plugins/ste.c @@ -430,7 +430,6 @@ static void ste_post_online(struct ofono_modem *modem) ofono_netreg_create(modem, OFONO_VENDOR_MBM, "atmodem", data->chat); ofono_call_meter_create(modem, 0, "atmodem", data->chat); ofono_call_barring_create(modem, 0, "atmodem", data->chat); - ofono_ssn_create(modem, 0, "atmodem", data->chat); ofono_call_volume_create(modem, 0, "atmodem", data->chat); ofono_cbs_create(modem, 0, "atmodem", data->chat); diff --git a/plugins/tc65.c b/plugins/tc65.c index f58f33d..e9d6e90 100644 --- a/plugins/tc65.c +++ b/plugins/tc65.c @@ -208,7 +208,6 @@ static void tc65_post_online(struct ofono_modem *modem) ofono_netreg_create(modem, 0, "atmodem", chat); ofono_call_meter_create(modem, 0, "atmodem", chat); ofono_call_barring_create(modem, 0, "atmodem", chat); - ofono_ssn_create(modem, 0, "atmodem", chat); gprs = ofono_gprs_create(modem, 0, "atmodem", chat); gc = ofono_gprs_context_create(modem, 0, "atmodem", chat); diff --git a/plugins/u8500.c b/plugins/u8500.c index eb142b4..c46670f 100644 --- a/plugins/u8500.c +++ b/plugins/u8500.c @@ -460,7 +460,6 @@ static void u8500_post_online(struct ofono_modem *modem) ofono_netreg_create(modem, 0, "wgmodem2.5", isi->modem); ofono_sms_create(modem, 0, "isimodem", isi->modem); ofono_cbs_create(modem, 0, "isimodem", isi->modem); - ofono_ssn_create(modem, 0, "isimodem", isi->modem); ofono_ussd_create(modem, 0, "isimodem", isi->modem); ofono_call_settings_create(modem, 0, "isimodem", isi->modem); ofono_call_barring_create(modem, 0, "isimodem", isi->modem); diff --git a/plugins/wavecom.c b/plugins/wavecom.c index cb55f85..cd9c85e 100644 --- a/plugins/wavecom.c +++ b/plugins/wavecom.c @@ -156,7 +156,6 @@ static void wavecom_post_sim(struct ofono_modem *modem) ofono_netreg_create(modem, 0, "atmodem", chat); ofono_call_meter_create(modem, 0, "atmodem", chat); ofono_call_barring_create(modem, 0, "atmodem", chat); - ofono_ssn_create(modem, 0, "atmodem", chat); ofono_sms_create(modem, 0, "atmodem", chat); ofono_phonebook_create(modem, 0, "atmodem", chat); diff --git a/src/ssn.c b/src/ssn.c index 64c94b7..ee48fba 100644 --- a/src/ssn.c +++ b/src/ssn.c @@ -45,7 +45,6 @@ struct ofono_ssn { struct ofono_watchlist *mt_handler_list; const struct ofono_ssn_driver *driver; void *driver_data; - struct ofono_atom *atom; }; static unsigned int add_ssn_handler(struct ofono_watchlist *watchlist, @@ -112,7 +111,7 @@ 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_cssi_notify(struct ofono_ssn *ssn, int code1, int index) +void ofono_ssn_mo_notify(struct ofono_ssn *ssn, int code1, int index) { struct ssn_handler *h; GSList *l; @@ -127,7 +126,7 @@ void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, int code1, int index) } } -void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int code2, int index, +void ofono_ssn_mt_notify(struct ofono_ssn *ssn, int code2, int index, const struct ofono_phone_number *ph) { struct ssn_handler *h; @@ -162,33 +161,7 @@ void ofono_ssn_driver_unregister(const struct ofono_ssn_driver *d) g_drivers = g_slist_remove(g_drivers, (void *) d); } -static void ssn_unregister(struct ofono_atom *atom) -{ - struct ofono_ssn *ssn = __ofono_atom_get_data(atom); - - __ofono_watchlist_free(ssn->mo_handler_list); - ssn->mo_handler_list = NULL; - - __ofono_watchlist_free(ssn->mt_handler_list); - ssn->mt_handler_list = NULL; -} - -static void ssn_remove(struct ofono_atom *atom) -{ - struct ofono_ssn *ssn = __ofono_atom_get_data(atom); - - DBG("atom: %p", atom); - - if (ssn == NULL) - return; - - if (ssn->driver && ssn->driver->remove) - ssn->driver->remove(ssn); - - g_free(ssn); -} - -struct ofono_ssn *ofono_ssn_create(struct ofono_modem *modem, +struct ofono_ssn *ofono_ssn_new(struct ofono_modem *modem, unsigned int vendor, const char *driver, void *data) @@ -204,9 +177,6 @@ struct ofono_ssn *ofono_ssn_create(struct ofono_modem *modem, if (ssn == NULL) return NULL; - ssn->atom = __ofono_modem_add_atom(modem, OFONO_ATOM_TYPE_SSN, - ssn_remove, ssn); - for (l = g_drivers; l; l = l->next) { const struct ofono_ssn_driver *drv = l->data; @@ -220,20 +190,27 @@ struct ofono_ssn *ofono_ssn_create(struct ofono_modem *modem, break; } - return ssn; -} - -void ofono_ssn_register(struct ofono_ssn *ssn) -{ ssn->mo_handler_list = __ofono_watchlist_new(g_free); ssn->mt_handler_list = __ofono_watchlist_new(g_free); - __ofono_atom_register(ssn->atom, ssn_unregister); + return ssn; } -void ofono_ssn_remove(struct ofono_ssn *ssn) +void ofono_ssn_free(struct ofono_ssn *ssn) { - __ofono_atom_free(ssn->atom); + if (ssn == NULL) + return; + + if (ssn->driver && ssn->driver->remove) + ssn->driver->remove(ssn); + + __ofono_watchlist_free(ssn->mo_handler_list); + ssn->mo_handler_list = NULL; + + __ofono_watchlist_free(ssn->mt_handler_list); + ssn->mt_handler_list = NULL; + + g_free(ssn); } void ofono_ssn_set_data(struct ofono_ssn *ssn, void *data) -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* [RFC PATCH 2/3] ssn: add code and call id to notifications 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 ` Andras Domokos 2011-02-28 22:19 ` Denis Kenzior 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 3 siblings, 1 reply; 20+ messages in thread From: Andras Domokos @ 2011-02-28 16:28 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 3640 bytes --] --- 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); 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); } } -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 2/3] ssn: add code and call id to notifications 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 0 siblings, 0 replies; 20+ messages in thread From: Denis Kenzior @ 2011-02-28 22:19 UTC (permalink / raw) To: ofono [-- 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 ^ permalink raw reply [flat|nested] 20+ messages in thread
* [RFC PATCH 3/3] voicecall: add SSN notifications handling 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 16:28 ` Andras Domokos 2011-03-10 8:33 ` Setting PDP mode claudio 3 siblings, 0 replies; 20+ messages in thread From: Andras Domokos @ 2011-02-28 16:28 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 9388 bytes --] --- include/types.h | 2 + src/voicecall.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 239 insertions(+), 3 deletions(-) diff --git a/include/types.h b/include/types.h index d25f409..b639c8a 100644 --- a/include/types.h +++ b/include/types.h @@ -96,6 +96,8 @@ struct ofono_call { char name[OFONO_MAX_CALLER_NAME_LENGTH + 1]; int clip_validity; int cnap_validity; + ofono_bool_t remote_held; + ofono_bool_t remote_multiparty; }; struct ofono_network_time { diff --git a/src/voicecall.c b/src/voicecall.c index d6e8539..1fa9f41 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -53,6 +53,14 @@ struct ofono_voicecall { struct ofono_sim_context *sim_context; unsigned int sim_watch; unsigned int sim_state_watch; + struct ofono_ssn *ssn; + unsigned int ssn_mt_fwd_watch; + unsigned int ssn_mt_hold_watch; + unsigned int ssn_mt_unhold_watch; + unsigned int ssn_mt_mpty_watch; + unsigned int ssn_mo_fwd_watch; + unsigned int ssn_mo_local_bar_watch; + unsigned int ssn_mo_remote_bar_watch; const struct ofono_voicecall_driver *driver; void *driver_data; struct ofono_atom *atom; @@ -400,6 +408,12 @@ static void append_voicecall_properties(struct voicecall *v, ofono_dbus_dict_append(dict, "Multiparty", DBUS_TYPE_BOOLEAN, &mpty); + ofono_dbus_dict_append(dict, "RemoteHeld", DBUS_TYPE_BOOLEAN, + &call->remote_held); + + ofono_dbus_dict_append(dict, "RemoteMultiparty", DBUS_TYPE_BOOLEAN, + &call->remote_multiparty); + if (v->message) ofono_dbus_dict_append(dict, "Information", DBUS_TYPE_STRING, &v->message); @@ -1869,9 +1883,11 @@ static GDBusMethodTable manager_methods[] = { }; static GDBusSignalTable manager_signals[] = { - { "PropertyChanged", "sv" }, - { "CallAdded", "oa{sv}" }, - { "CallRemoved", "o" }, + { "Forwarded", "s" }, + { "BarringActive", "s" }, + { "PropertyChanged", "sv" }, + { "CallAdded", "oa{sv}" }, + { "CallRemoved", "o" }, { } }; @@ -2169,6 +2185,46 @@ void ofono_voicecall_driver_unregister(const struct ofono_voicecall_driver *d) g_drivers = g_slist_remove(g_drivers, (void *) d); } +static void voicecall_ssn_watches_remove(struct ofono_voicecall *vc) +{ + if (vc->ssn_mt_fwd_watch) { + __ofono_ssn_mt_watch_remove(vc->ssn, vc->ssn_mt_fwd_watch); + vc->ssn_mt_fwd_watch = 0; + } + + if (vc->ssn_mt_hold_watch) { + __ofono_ssn_mt_watch_remove(vc->ssn, vc->ssn_mt_hold_watch); + vc->ssn_mt_hold_watch = 0; + } + + if (vc->ssn_mt_unhold_watch) { + __ofono_ssn_mt_watch_remove(vc->ssn, vc->ssn_mt_unhold_watch); + vc->ssn_mt_unhold_watch = 0; + } + + if (vc->ssn_mt_mpty_watch) { + __ofono_ssn_mt_watch_remove(vc->ssn, vc->ssn_mt_mpty_watch); + vc->ssn_mt_mpty_watch = 0; + } + + if (vc->ssn_mo_fwd_watch) { + __ofono_ssn_mt_watch_remove(vc->ssn, vc->ssn_mo_fwd_watch); + vc->ssn_mo_fwd_watch = 0; + } + + if (vc->ssn_mo_local_bar_watch) { + __ofono_ssn_mt_watch_remove(vc->ssn, + vc->ssn_mo_local_bar_watch); + vc->ssn_mo_local_bar_watch = 0; + } + + if (vc->ssn_mo_remote_bar_watch) { + __ofono_ssn_mo_watch_remove(vc->ssn, + vc->ssn_mo_remote_bar_watch); + vc->ssn_mo_remote_bar_watch = 0; + } +} + static void voicecall_unregister(struct ofono_atom *atom) { DBusConnection *conn = ofono_dbus_get_connection(); @@ -2182,6 +2238,9 @@ static void voicecall_unregister(struct ofono_atom *atom) vc->sim_watch = 0; } + if (vc->ssn) + voicecall_ssn_watches_remove(vc); + if (vc->dial_req) dial_request_finish(vc); @@ -2239,6 +2298,11 @@ static void voicecall_remove(struct ofono_atom *atom) g_queue_free(vc->toneq); } + if (vc->ssn) { + ofono_ssn_free(vc->ssn); + vc->ssn = NULL; + } + g_free(vc); } @@ -2258,6 +2322,8 @@ struct ofono_voicecall *ofono_voicecall_create(struct ofono_modem *modem, if (vc == NULL) return NULL; + vc->ssn = ofono_ssn_new(modem, vendor, driver, data); + vc->toneq = g_queue_new(); vc->atom = __ofono_modem_add_atom(modem, OFONO_ATOM_TYPE_VOICECALL, @@ -2351,6 +2417,171 @@ static void sim_watch(struct ofono_atom *atom, sim_state_watch(ofono_sim_get_state(sim), vc); } +static void ssn_mt_forwarded_notify(unsigned int id, int code1, int idx, + const struct ofono_phone_number *ph, + void *data) +{ + struct ofono_voicecall *vc = data; + DBusConnection *conn = ofono_dbus_get_connection(); + const char *path = __ofono_atom_get_path(vc->atom); + char *info = "incoming"; + + g_dbus_emit_signal(conn, path, OFONO_VOICECALL_MANAGER_INTERFACE, + "Forwarded", + DBUS_TYPE_STRING, &info, + DBUS_TYPE_INVALID); +} + +static struct voicecall *voicecall_select(struct ofono_voicecall *vc, + unsigned int id, int code) +{ + struct voicecall *v = NULL; + GSList *l; + + for (l = vc->call_list; l; l = l->next) { + struct voicecall *v1 = l->data; + + if (id == 0 && g_slist_length(vc->call_list) == 1) { + if (code == SS_MT_VOICECALL_RETRIEVED && + v1->call->remote_held == TRUE) { + v = v1; + break; + } else if (code == SS_MT_VOICECALL_ON_HOLD && + v1->call->remote_held == FALSE) { + v = v1; + break; + } else if (code == SS_MT_MULTIPARTY_VOICECALL && + v1->call->remote_multiparty == FALSE) { + v = v1; + break; + } + } else if (v1->call->id == id) { + v = v1; + break; + } + } + + return v; +} + +static void ssn_mt_remote_held_notify(unsigned int id, int code1, int idx, + const struct ofono_phone_number *ph, + void *data) +{ + struct ofono_voicecall *vc = data; + struct voicecall *v = voicecall_select(vc, id, code1); + DBusConnection *conn = ofono_dbus_get_connection(); + const char *path; + + if (v == NULL) + return; + + if (code1 == SS_MT_VOICECALL_ON_HOLD) + v->call->remote_held = TRUE; + else + v->call->remote_held = FALSE; + + path = voicecall_build_path(vc, v->call); + + ofono_dbus_signal_property_changed(conn, path, + OFONO_VOICECALL_INTERFACE, + "RemoteHeld", DBUS_TYPE_BOOLEAN, + &v->call->remote_held); +} + +static void ssn_mt_remote_multiparty_notify(unsigned int id, int code1, int idx, + const struct ofono_phone_number *ph, + void *data) +{ + struct ofono_voicecall *vc = data; + struct voicecall *v = voicecall_select(vc, id, code1); + DBusConnection *conn = ofono_dbus_get_connection(); + const char *path; + + if (v == NULL) + return; + + v->call->remote_multiparty = TRUE; + + path = voicecall_build_path(vc, v->call); + + ofono_dbus_signal_property_changed(conn, path, + OFONO_VOICECALL_INTERFACE, + "RemoteMultiparty", DBUS_TYPE_BOOLEAN, + &v->call->remote_multiparty); +} + +static void ssn_mo_call_barred_notify(unsigned int id, int code2, + int idx, void *data) +{ + struct ofono_voicecall *vc = data; + DBusConnection *conn = ofono_dbus_get_connection(); + const char *path = __ofono_atom_get_path(vc->atom); + const char *info; + + if (code2 == SS_MO_INCOMING_BARRING) + info = "remote"; + else + info = "local"; + + g_dbus_emit_signal(conn, path, OFONO_VOICECALL_MANAGER_INTERFACE, + "BarringActive", + DBUS_TYPE_STRING, &info, + DBUS_TYPE_INVALID); +} + +static void ssn_mo_forwarded_notify(unsigned int id, int code2, + int idx, void *data) +{ + struct ofono_voicecall *vc = data; + DBusConnection *conn = ofono_dbus_get_connection(); + const char *path = __ofono_atom_get_path(vc->atom); + char *info = "outgoing"; + + g_dbus_emit_signal(conn, path, OFONO_VOICECALL_MANAGER_INTERFACE, + "Forwarded", + DBUS_TYPE_STRING, &info, + DBUS_TYPE_INVALID); +} + +static void voicecall_ssn_watches_add(struct ofono_voicecall *vc) +{ + vc->ssn_mt_fwd_watch = __ofono_ssn_mt_watch_add(vc->ssn, + SS_MT_CALL_FORWARDED, + ssn_mt_forwarded_notify, + vc, NULL); + + vc->ssn_mt_hold_watch = __ofono_ssn_mt_watch_add(vc->ssn, + SS_MT_VOICECALL_ON_HOLD, + ssn_mt_remote_held_notify, + vc, NULL); + + vc->ssn_mt_unhold_watch = __ofono_ssn_mt_watch_add(vc->ssn, + SS_MT_VOICECALL_RETRIEVED, + ssn_mt_remote_held_notify, + vc, NULL); + + vc->ssn_mt_mpty_watch = __ofono_ssn_mt_watch_add(vc->ssn, + SS_MT_MULTIPARTY_VOICECALL, + ssn_mt_remote_multiparty_notify, + vc, NULL); + + vc->ssn_mo_fwd_watch = __ofono_ssn_mo_watch_add(vc->ssn, + SS_MO_CALL_FORWARDED, + ssn_mo_forwarded_notify, + vc, NULL); + + vc->ssn_mo_local_bar_watch = __ofono_ssn_mo_watch_add(vc->ssn, + SS_MO_OUTGOING_BARRING, + ssn_mo_call_barred_notify, + vc, NULL); + + vc->ssn_mo_remote_bar_watch = __ofono_ssn_mo_watch_add(vc->ssn, + SS_MO_INCOMING_BARRING, + ssn_mo_call_barred_notify, + vc, NULL); +} + void ofono_voicecall_register(struct ofono_voicecall *vc) { DBusConnection *conn = ofono_dbus_get_connection(); @@ -2377,6 +2608,9 @@ void ofono_voicecall_register(struct ofono_voicecall *vc) add_to_en_list(&vc->en_list, default_en_list_no_sim); add_to_en_list(&vc->en_list, default_en_list); + if (vc->ssn != NULL) + voicecall_ssn_watches_add(vc); + vc->sim_watch = __ofono_modem_add_atom_watch(modem, OFONO_ATOM_TYPE_SIM, sim_watch, vc, NULL); -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Setting PDP mode 2011-02-28 16:28 [PATCH 0/3] Voice call SS notifications (2nd version) Andras Domokos ` (2 preceding siblings ...) 2011-02-28 16:28 ` [RFC PATCH 3/3] voicecall: add SSN notifications handling Andras Domokos @ 2011-03-10 8:33 ` claudio 2011-03-11 15:27 ` Aygon, Bertrand 2011-03-11 16:20 ` Denis Kenzior 3 siblings, 2 replies; 20+ messages in thread From: claudio @ 2011-03-10 8:33 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 177 bytes --] Hi, It's possible to set the pdp mode through ofono ? I need to set the pdp mode to auto, ip and ppp, What are the dbus interface and properties to use ? regs ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: Setting PDP mode 2011-03-10 8:33 ` Setting PDP mode claudio @ 2011-03-11 15:27 ` Aygon, Bertrand 2011-03-11 16:20 ` Denis Kenzior 1 sibling, 0 replies; 20+ messages in thread From: Aygon, Bertrand @ 2011-03-11 15:27 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1355 bytes --] > Hi, > > It's possible to set the pdp mode through ofono ? I need to set the pdp > mode to auto, ip and ppp, > > What are the dbus interface and properties to use ? Hi, You should have a look at doc/connman-api.txt. In the org.ofono.ConnectionContext interface, there is a 'Protocol' properties. But I am not so familiar with oFono yet, and it seems that only IP is supported. IPv6 works seems in progress. And from what I could have seen in the sources, oFono only 'discuss' with modem making IP data call. For PPP, oFono use its own PPP stack. So to conclude, I don't think that you can change the PDP mode, but I hope that someone with a biggest background, which should be very easy to found, will give us some more detailed info. Regards, Bertrand. --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Setting PDP mode 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 1 sibling, 1 reply; 20+ messages in thread From: Denis Kenzior @ 2011-03-11 16:20 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 850 bytes --] Hi claudio, On 03/10/2011 02:33 AM, claudio wrote: > > Hi, > > It's possible to set the pdp mode through ofono ? I need to set the pdp > mode to auto, ip and ppp, I'm not sure what you mean by 'auto' pdp mode. The protocol selection (IP, IPv6 or dual stack IPv4 & IPv6 combined) is currently work in progress, but we support IP contexts already. Refer to the Protocol property of ConnectionContext interface in doc/connman-api.txt oFono does not allow you to select the actual protocol used to talk to the modem (e.g. PPP, high-speed, or some vendor specific) for gprs contexts. In fact it does not even care itself. It is up to the modem driver to figure out the best protocol for that particular modem. > > What are the dbus interface and properties to use ? > Refer to doc/connman-api.txt Regards, -Denis ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: Setting PDP mode 2011-03-11 16:20 ` Denis Kenzior @ 2011-03-14 10:13 ` Mika.Liljeberg 2011-03-14 14:21 ` Denis Kenzior 0 siblings, 1 reply; 20+ messages in thread From: Mika.Liljeberg @ 2011-03-14 10:13 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1032 bytes --] Hi Denis, > The protocol selection (IP, IPv6 or dual stack IPv4 & IPv6 > combined) is > currently work in progress, but we support IP contexts already. If by "work in progress" you're referring to my IPv6 patches, the progress is pretty much stalled due to lack of response from you or Marcel for a couple of months now. Are you planning to review and/or push the patches or not? The next time I will send a patch, it will be to remove the work item from the TODO list due to lack of interest from maintainers. > oFono does not allow you to select the actual protocol used to talk to > the modem (e.g. PPP, high-speed, or some vendor specific) for gprs > contexts. In fact it does not even care itself. It is up to > the modem > driver to figure out the best protocol for that particular modem. Just FYI, PPP is a valid PDP context type, where the PPP protocol terminates on the network side instead of in the modem. AFAIK, this configuration is not widely supported by cellular operators, though. MikaL ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Setting PDP mode 2011-03-14 10:13 ` Mika.Liljeberg @ 2011-03-14 14:21 ` Denis Kenzior 2011-03-14 14:55 ` Mika.Liljeberg 0 siblings, 1 reply; 20+ messages in thread From: Denis Kenzior @ 2011-03-14 14:21 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1471 bytes --] Hi Mika, On 03/14/2011 05:13 AM, Mika.Liljeberg(a)nokia.com wrote: > Hi Denis, > >> The protocol selection (IP, IPv6 or dual stack IPv4 & IPv6 >> combined) is >> currently work in progress, but we support IP contexts already. > > If by "work in progress" you're referring to my IPv6 patches, the progress is pretty much stalled due to lack of response from you or Marcel for a couple of months now. Are you planning to review and/or push the patches or not? The next time I will send a patch, it will be to remove the work item from the TODO list due to lack of interest from maintainers. > I would not describe it as a lack of interest. There were simply higher priority items and I wanted to discuss this with Samuel first anyway. I have reworked your IPv6 patches and the API 'slightly' and just now waiting on Marcel to cut a new release to push them. >> oFono does not allow you to select the actual protocol used to talk to >> the modem (e.g. PPP, high-speed, or some vendor specific) for gprs >> contexts. In fact it does not even care itself. It is up to >> the modem >> driver to figure out the best protocol for that particular modem. > > Just FYI, PPP is a valid PDP context type, where the PPP protocol terminates on the network side instead of in the modem. AFAIK, this configuration is not widely supported by cellular operators, though. > Fair enough, that makes sense now that you mention it. Regards, -Denis ^ permalink raw reply [flat|nested] 20+ messages in thread
* RE: Setting PDP mode 2011-03-14 14:21 ` Denis Kenzior @ 2011-03-14 14:55 ` Mika.Liljeberg 0 siblings, 0 replies; 20+ messages in thread From: Mika.Liljeberg @ 2011-03-14 14:55 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 500 bytes --] Hi Denis, > I would not describe it as a lack of interest. There were > simply higher > priority items and I wanted to discuss this with Samuel first > anyway. I > have reworked your IPv6 patches and the API 'slightly' and just now > waiting on Marcel to cut a new release to push them. IMHO, two months with no acknowledgement whatsoever is a bit excessive no matter which way you look at it. Anyway, good to hear the patches are not disappearing into a black hole. Br, MikaL ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 0/3] Voice call SS notifications @ 2011-02-09 10:33 Andras Domokos 2011-02-09 10:34 ` [RFC PATCH 2/3] ssn: add code and call id to notifications Andras Domokos 0 siblings, 1 reply; 20+ messages in thread From: Andras Domokos @ 2011-02-09 10:33 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1212 bytes --] Here are the implementation proposal for handling some of the voice call related Supplementary Services notifications. Implementation details: - removed the +CSSI type SS notifications handling from the call-barring code - expanded the SS notify functions with call number info, useful for modems capable of delivering it in the SS notifications - expanded the SS callback functions with call number info and service code, useful in demultiplexing when a common callback function is defined for multiple service codes - added +CSSU and +CSSI type SS notifications handling to the voicecall code The API level detailed changes are explained in the doc files. Andras Domokos (3): call-barring: removed +CSSI type SS notifications ssn: add code and call id to notifications voicecall: handle voice call SS notifications drivers/atmodem/ssn.c | 4 +- include/ssn.h | 7 +- include/types.h | 2 + src/call-barring.c | 74 --------------- src/ofono.h | 6 +- src/ssn.c | 11 +- src/voicecall.c | 242 ++++++++++++++++++++++++++++++++++++++++++++++++- 7 files changed, 257 insertions(+), 89 deletions(-) ^ permalink raw reply [flat|nested] 20+ messages in thread
* [RFC PATCH 2/3] ssn: add code and call id to notifications 2011-02-09 10:33 [PATCH 0/3] Voice call SS notifications Andras Domokos @ 2011-02-09 10:34 ` Andras Domokos 2011-02-10 3:08 ` Denis Kenzior 0 siblings, 1 reply; 20+ messages in thread From: Andras Domokos @ 2011-02-09 10:34 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 3673 bytes --] --- drivers/atmodem/ssn.c | 4 ++-- include/ssn.h | 7 ++++--- src/ofono.h | 6 ++++-- src/ssn.c | 11 ++++++----- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/atmodem/ssn.c b/drivers/atmodem/ssn.c index b7a9df4..b00871d 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_cssi_notify(ssn, code1, index); + ofono_ssn_cssi_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_cssu_notify(ssn, code2, index, &ph); + ofono_ssn_cssu_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 d640cad..ba3701b 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_cssi_notify(struct ofono_ssn *ssn, int code, int index); -void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int code, int index, - const struct ofono_phone_number *number); +void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, unsigned int id, + int code1, int index); +void ofono_ssn_cssu_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); diff --git a/src/ofono.h b/src/ofono.h index 6ba0187..eafab21 100644 --- a/src/ofono.h +++ b/src/ofono.h @@ -314,8 +314,10 @@ 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 64c94b7..065e4fd 100644 --- a/src/ssn.c +++ b/src/ssn.c @@ -112,7 +112,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_cssi_notify(struct ofono_ssn *ssn, int code1, int index) +void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, unsigned int id, + int code1, int index) { struct ssn_handler *h; GSList *l; @@ -123,12 +124,12 @@ void ofono_ssn_cssi_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_cssu_notify(struct ofono_ssn *ssn, int code2, int index, - const struct ofono_phone_number *ph) +void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, unsigned int id, int code2, + int index, const struct ofono_phone_number *ph) { struct ssn_handler *h; GSList *l; @@ -139,7 +140,7 @@ void ofono_ssn_cssu_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); } } -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 2/3] ssn: add code and call id to notifications 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 0 siblings, 1 reply; 20+ messages in thread From: Denis Kenzior @ 2011-02-10 3:08 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1199 bytes --] Hi Andras, > diff --git a/include/ssn.h b/include/ssn.h > index d640cad..ba3701b 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_cssi_notify(struct ofono_ssn *ssn, int code, int index); > -void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int code, int index, > - const struct ofono_phone_number *number); > +void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, unsigned int id, > + int code1, int index); > +void ofono_ssn_cssu_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); Right now I'm not seeing any users (or even potential ones) of the SSN atom besides voicecall. What do you think of removing the SSN atom and moving these to the voicecall atom? The only one I'm not sure about is <code2> from 27.007: 6 forward check SS message received (can be received whenever) Any idea what this one is about? Regards, -Denis ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 2/3] ssn: add code and call id to notifications 2011-02-10 3:08 ` Denis Kenzior @ 2011-02-10 9:12 ` Andras Domokos 2011-02-22 12:07 ` Sankar 0 siblings, 1 reply; 20+ messages in thread From: Andras Domokos @ 2011-02-10 9:12 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1643 bytes --] Hi Denis, On 02/10/2011 05:08 AM, ext Denis Kenzior wrote: > Hi Andras, > >> diff --git a/include/ssn.h b/include/ssn.h >> index d640cad..ba3701b 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_cssi_notify(struct ofono_ssn *ssn, int code, int index); >> -void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int code, int index, >> - const struct ofono_phone_number *number); >> +void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, unsigned int id, >> + int code1, int index); >> +void ofono_ssn_cssu_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); > Right now I'm not seeing any users (or even potential ones) of the SSN > atom besides voicecall. What do you think of removing the SSN atom and > moving these to the voicecall atom? Yes, we talked about removing the SSN atom, but I thought I would keep it for now, it can be removed any time later, anyways, doesn't save much removing it. > The only one I'm not sure about is<code2> from 27.007: > 6 forward check SS message received (can be received whenever) > > Any idea what this one is about? > Never encountered this message, and I am not sure what is it for. A patch for handling this message can be submitted later, if a real life case is found for it. > Regards, > -Denis Regards, Andras ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 2/3] ssn: add code and call id to notifications 2011-02-10 9:12 ` Andras Domokos @ 2011-02-22 12:07 ` Sankar 2011-02-24 11:43 ` Andras Domokos 0 siblings, 1 reply; 20+ messages in thread From: Sankar @ 2011-02-22 12:07 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 2123 bytes --] Hi Denis/Andras, Is this patch applied and available in the GIT? Regards, Sankar. On Thu, Feb 10, 2011 at 2:42 PM, Andras Domokos <andras.domokos@nokia.com>wrote: > Hi Denis, > > > On 02/10/2011 05:08 AM, ext Denis Kenzior wrote: > >> Hi Andras, >> >> diff --git a/include/ssn.h b/include/ssn.h >>> index d640cad..ba3701b 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_cssi_notify(struct ofono_ssn *ssn, int code, int index); >>> -void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int code, int index, >>> - const struct ofono_phone_number *number); >>> +void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, unsigned int id, >>> + int code1, int index); >>> +void ofono_ssn_cssu_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); >>> >> Right now I'm not seeing any users (or even potential ones) of the SSN >> atom besides voicecall. What do you think of removing the SSN atom and >> moving these to the voicecall atom? >> > Yes, we talked about removing the SSN atom, but I thought I would > keep it for now, it can be removed any time later, anyways, doesn't > save much removing it. > > > The only one I'm not sure about is<code2> from 27.007: >> 6 forward check SS message received (can be received whenever) >> >> Any idea what this one is about? >> >> Never encountered this message, and I am not sure what is it for. > A patch for handling this message can be submitted later, if a real > life case is found for it. > > Regards, >> -Denis >> > Regards, > Andras > > _______________________________________________ > ofono mailing list > ofono(a)ofono.org > http://lists.ofono.org/listinfo/ofono > [-- Attachment #2: attachment.html --] [-- Type: text/html, Size: 3193 bytes --] ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 2/3] ssn: add code and call id to notifications 2011-02-22 12:07 ` Sankar @ 2011-02-24 11:43 ` Andras Domokos 2011-02-24 15:43 ` Denis Kenzior 0 siblings, 1 reply; 20+ messages in thread From: Andras Domokos @ 2011-02-24 11:43 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 2824 bytes --] Hi Denis and Sankar, The call SS notification handling patches hasn't been (fully) applied, I think we need to do something about it. Regards, Andras On 02/22/2011 02:07 PM, ext Sankar wrote: > Hi Denis/Andras, > > Is this patch applied and available in the GIT? > > Regards, > Sankar. > > On Thu, Feb 10, 2011 at 2:42 PM, Andras Domokos > <andras.domokos(a)nokia.com <mailto:andras.domokos@nokia.com>> wrote: > > Hi Denis, > > > On 02/10/2011 05:08 AM, ext Denis Kenzior wrote: > > Hi Andras, > > diff --git a/include/ssn.h b/include/ssn.h > index d640cad..ba3701b 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_cssi_notify(struct ofono_ssn *ssn, int > code, int index); > -void ofono_ssn_cssu_notify(struct ofono_ssn *ssn, int > code, int index, > - const struct > ofono_phone_number *number); > +void ofono_ssn_cssi_notify(struct ofono_ssn *ssn, > unsigned int id, > + int code1, int index); > +void ofono_ssn_cssu_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); > > Right now I'm not seeing any users (or even potential ones) of > the SSN > atom besides voicecall. What do you think of removing the SSN > atom and > moving these to the voicecall atom? > > Yes, we talked about removing the SSN atom, but I thought I would > keep it for now, it can be removed any time later, anyways, doesn't > save much removing it. > > > The only one I'm not sure about is<code2> from 27.007: > 6 forward check SS message received (can be received > whenever) > > Any idea what this one is about? > > Never encountered this message, and I am not sure what is it for. > A patch for handling this message can be submitted later, if a real > life case is found for it. > > Regards, > -Denis > > Regards, > Andras > > _______________________________________________ > ofono mailing list > ofono(a)ofono.org <mailto:ofono@ofono.org> > http://lists.ofono.org/listinfo/ofono > > [-- Attachment #2: attachment.html --] [-- Type: text/html, Size: 5571 bytes --] ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 2/3] ssn: add code and call id to notifications 2011-02-24 11:43 ` Andras Domokos @ 2011-02-24 15:43 ` Denis Kenzior 2011-02-24 16:11 ` Andras Domokos 0 siblings, 1 reply; 20+ messages in thread From: Denis Kenzior @ 2011-02-24 15:43 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 364 bytes --] Hi Andras, Please no top posting on this mailing list. You should know this by now. On 02/24/2011 05:43 AM, Andras Domokos wrote: > Hi Denis and Sankar, > > The call SS notification handling patches hasn't been (fully) applied, I > think we need to do something about it. > I'd still like a version with the SSN atom removed. Regards, -Denis ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 2/3] ssn: add code and call id to notifications 2011-02-24 15:43 ` Denis Kenzior @ 2011-02-24 16:11 ` Andras Domokos 2011-02-24 16:14 ` Denis Kenzior 0 siblings, 1 reply; 20+ messages in thread From: Andras Domokos @ 2011-02-24 16:11 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 615 bytes --] Hi, On 02/24/2011 05:43 PM, ext Denis Kenzior wrote: > Hi Andras, > > Please no top posting on this mailing list. You should know this by now. I am terribly sorry, I know I should have not done that. > On 02/24/2011 05:43 AM, Andras Domokos wrote: >> Hi Denis and Sankar, >> >> The call SS notification handling patches hasn't been (fully) applied, I >> think we need to do something about it. >> > I'd still like a version with the SSN atom removed. OK, I am going to remove the SSN atom, not a big deal, but do you have any other issues at this point? > Regards, > -Denis Regards, Andras ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 2/3] ssn: add code and call id to notifications 2011-02-24 16:11 ` Andras Domokos @ 2011-02-24 16:14 ` Denis Kenzior 2011-02-24 16:21 ` Andras Domokos 0 siblings, 1 reply; 20+ messages in thread From: Denis Kenzior @ 2011-02-24 16:14 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 437 bytes --] Hi Andras, >>> The call SS notification handling patches hasn't been (fully) applied, I >>> think we need to do something about it. >>> >> I'd still like a version with the SSN atom removed. > OK, I am going to remove the SSN atom, not a big deal, but do you have > any other issues at this point? Not right now. Your API proposal is already upstream, I just didn't like the ssn atom being kept around. Regards, -Denis ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [RFC PATCH 2/3] ssn: add code and call id to notifications 2011-02-24 16:14 ` Denis Kenzior @ 2011-02-24 16:21 ` Andras Domokos 0 siblings, 0 replies; 20+ messages in thread From: Andras Domokos @ 2011-02-24 16:21 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 596 bytes --] Hi Denis, On 02/24/2011 06:14 PM, ext Denis Kenzior wrote: > Hi Andras, > >>>> The call SS notification handling patches hasn't been (fully) applied, I >>>> think we need to do something about it. >>>> >>> I'd still like a version with the SSN atom removed. >> OK, I am going to remove the SSN atom, not a big deal, but do you have >> any other issues at this point? > Not right now. Your API proposal is already upstream, I just didn't > like the ssn atom being kept around. OK, I'll prepare the patches with the SSN atom removed. > Regards, > -Denis Regards, Andras ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2011-03-14 14:55 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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
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.