Re: [PATCH v2] add call-list helper to manage voice call lists
Hi Alexander, We are not exposing glib into the oFono plugin API. So the use of GSList, etc data structures across driver <-> core boundary is not possible. The reasons are somewhat historic, but essentially non-GLib based plugins must be possible. Also, oFono's use of GLib will be replaced by ell [1] in the future. Interesting. Do you have any plans when and how the migratation will be done? No concrete timelines, but most likely we will simply introduce a dependency on ell at some point and start converting code over until all traces of GLib are eradicated. I'm still not quite sure what you're trying to solve with these changes? A bit more info on the motivation of the patches in the commit description would be helpful... My motivation is to get rid of the generic part in the modem drivers. E.g. look at the rild and atmodem, they have a lot similiar code when parsing the call list. So it would be nice to replace those. On the other side I've written a voicecall driver for qmi which is using the call list, but I'm still testing it. Okay, I see now. In the ideal world the call state notification mechanism provides all the information needed so that a driver internal call list is not needed. See calypsomodem/voicecall.c for example. For drivers that do use a call list, maybe we can put the common code into drivers/common/*.[ch] or so. Regards, -Denis ___ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono
Re: [PATCH v2] add call-list helper to manage voice call lists
On Mon, 7 Aug 2017 12:42:55 -0500 Denis Kenziorwrote: Hi Dennis, > So this is not in line with our patch submission guidelines. See > HACKING... I'm sorry. I missed that one. Hopefully I got the coding style right so far. > We are not exposing glib into the oFono plugin API. So the use of > GSList, etc data structures across driver <-> core boundary is not > possible. The reasons are somewhat historic, but essentially > non-GLib based plugins must be possible. Also, oFono's use of GLib > will be replaced by ell [1] in the future. Interesting. Do you have any plans when and how the migratation will be done? > I'm still not quite sure what you're trying to solve with these > changes? A bit more info on the motivation of the patches in the > commit description would be helpful... My motivation is to get rid of the generic part in the modem drivers. E.g. look at the rild and atmodem, they have a lot similiar code when parsing the call list. So it would be nice to replace those. On the other side I've written a voicecall driver for qmi which is using the call list, but I'm still testing it. Best, Alex PS. I better had tagged this patch RFC... -- Alexander Couzens mail: lyn...@fe80.eu jabber: lyn...@fe80.eu mobile: +4915123277221 gpg: 390D CF78 8BF9 AA50 4F8F F1E2 C29E 9DA6 A0DF 8604 pgp5nfolp4qp_.pgp Description: OpenPGP digital signature ___ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono
Re: [PATCH v2] add call-list helper to manage voice call lists
Hi Alexander, On 07/26/2017 06:23 PM, Alexander Couzens wrote: Many drivers asks the modem for a complete call list of current calls. These list of calls can be feeded into call-list which parse the list and notify ofono for new calls. --- v2: fix a bug when notify_calls is faster than the dial_callback. Improved dial_callback testcase to cover this. Makefile.am | 13 ++- include/call-list.h | 38 src/call-list.c | 114 unit/test-call-list.c | 237 ++ So this is not in line with our patch submission guidelines. See HACKING... 4 files changed, 399 insertions(+), 3 deletions(-) create mode 100644 include/call-list.h create mode 100644 src/call-list.c create mode 100644 unit/test-call-list.c diff --git a/include/call-list.h b/include/call-list.h new file mode 100644 index ..dbd6ddd6 --- /dev/null +++ b/include/call-list.h @@ -0,0 +1,38 @@ +/* + * + * oFono - Open Source Telephony + * + * Copyright (C) 2017 Alexander Couzens+ * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include + We are not exposing glib into the oFono plugin API. So the use of GSList, etc data structures across driver <-> core boundary is not possible. The reasons are somewhat historic, but essentially non-GLib based plugins must be possible. Also, oFono's use of GLib will be replaced by ell [1] in the future. +struct ofono_voicecall; +struct ofono_phone_number; + +/* + * Can be called by the driver in the dialing callback, + * when the new call id already known + */ +void ofono_call_list_dial_callback(struct ofono_voicecall *vc, + GSList **call_list, + const struct ofono_phone_number *ph, + int call_id); + +/* + * Called with a list of known calls e.g. clcc. + * Call list will take ownership of all ofono call within the calls. + */ +void ofono_call_list_notify(struct ofono_voicecall *vc, + GSList **call_list, + GSList *calls); I'm still not quite sure what you're trying to solve with these changes? A bit more info on the motivation of the patches in the commit description would be helpful... Regards, -Denis [1] https://git.kernel.org/pub/scm/libs/ell/ell.git/ ___ ofono mailing list ofono@ofono.org https://lists.ofono.org/mailman/listinfo/ofono