Open Source Telephony
 help / color / mirror / Atom feed
From: Guillaume Zajac <guillaume.zajac@linux.intel.com>
To: ofono@ofono.org
Subject: Re: [PATCH_v2 2/4] emulator: add routine to request/release private network from ConnMan
Date: Fri, 29 Apr 2011 12:06:20 +0200	[thread overview]
Message-ID: <4DBA8D9C.2000106@linux.intel.com> (raw)
In-Reply-To: <4DB9C266.4020605@gmail.com>

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

Hi Denis,

On 28/04/2011 21:39, Denis Kenzior wrote:
> Hi Guillaume,
>
> On 04/28/2011 08:29 AM, Guillaume Zajac wrote:
>> Hi Denis,
>>
>> On 27/04/2011 05:25, Denis Kenzior wrote:
>>> Hi Guillaume,
>>>
>>> On 04/22/2011 07:06 AM, Guillaume Zajac wrote:
>>>> +typedef void (*network_request)(struct ofono_error *, int *,
>>>> +                const char **, const char **,
>>>> +                const char **, const char **);
>>>> +typedef void (*network_release)(void);
>>>> +
>>>> +void ofono_emulator_add_network_request_cb(struct ofono_emulator *em,
>>>> +                            network_request cb);
>>>> +void ofono_emulator_add_network_release_cb(struct ofono_emulator *em,
>>>> +                            network_release cb);
>>>> +
>>> I really don't like this, you're re-inventing the wheel here.  We
>>> already solved this pattern a while ago ;)  I suggest you look at
>>> include/gprs-provision.h and examples/provision.c
>> In looking the example, I should create some emulator network drivers to
>> get settings and release the network like:
>>
>> struct emulator_network{
>>      ...
>> }
> struct private_network_settings or something might be better
>

Ok

>> struct emulator_network_provision_driver{
>>      char *name;
>>      (void)(*get_settings)(struct emulator_network **out_en);
> You will probably need to make this async, and allow cancellation, since
> there can be multiple emulators requesting private networks
> concurrently.  This probably means you need to return a unique
> identifier as well.
>

Concerning asynchronism and cancellation,
I don't see the use case here, do you mean:
     - on a device with multiple modems, we have one DUN emulator per modem
     - 2 clients request DUN data call on this device, data call will be 
redirected to each modem by ConnMan.
     - oFono will ask for 2 private network settings, however ConnMan 
can't handle this case, so we should
       avoid this case from oFono by cancelling the 1 of the request.

how should we priotirize it?
Could that be a concrete use case?

>>      (void)(*release)(void);
> And you need to take the unique id as input here.

I can store the private_network_settings into ofono_emulator. Then I 
pass it as input of the release function.

>> }
>>
>> and un/register drivers into emulator.c
>>
>>> Regards,
>>> -Denis
>>>
>> Kind regards,
>> Guillaume
> Regards,
> -Denis
>

Kind regards,
Guillaume


  reply	other threads:[~2011-04-29 10:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22 12:06 [PATCH_v2 0/4] Request private petwork creation to ConnMan Guillaume Zajac
2011-04-22 12:06 ` [PATCH_v2 1/4] gatppp: Add new contructor to use external fd Guillaume Zajac
2011-04-27  3:20   ` Denis Kenzior
2011-04-28 13:06     ` Guillaume Zajac
2011-04-28 14:44       ` Denis Kenzior
2011-04-28 15:17         ` Guillaume Zajac
2011-04-28 19:41           ` Denis Kenzior
2011-04-29 13:12             ` Guillaume Zajac
2011-04-29  8:52               ` Denis Kenzior
2011-04-29 13:39               ` Guillaume Zajac
2011-04-22 12:06 ` [PATCH_v2 2/4] emulator: add routine to request/release private network from ConnMan Guillaume Zajac
2011-04-27  3:25   ` Denis Kenzior
2011-04-28 13:29     ` Guillaume Zajac
2011-04-28 19:39       ` Denis Kenzior
2011-04-29 10:06         ` Guillaume Zajac [this message]
2011-04-29  8:59           ` Denis Kenzior
2011-04-29 14:35             ` Guillaume Zajac
2011-04-22 12:06 ` [PATCH_v2 3/4] connman: add plugin in oFono to request request/release private network Guillaume Zajac
2011-04-22 12:06 ` [PATCH_v2 4/4] Makefile: add connman plugin build Guillaume Zajac
2011-04-27  3:27   ` Denis Kenzior

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=4DBA8D9C.2000106@linux.intel.com \
    --to=guillaume.zajac@linux.intel.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