Open Source Telephony
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: Re: [RFC PATCHv2 1/4] Automatic provisioning of GPRS context settings
Date: Tue, 04 Jan 2011 01:29:57 -0800	[thread overview]
Message-ID: <1294133397.5852.81.camel@aeonflux> (raw)
In-Reply-To: <1294130547.8212.82.camel@jsaunama-desktop>

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

Hi Jukka,

> > the oFono plugins work like kernel modules. They are pretty much
> > generic. Inside the init function you can a driver register function and
> > inside the exit function, you call the driver unregister function.
> 
> Right, that seems clear enough.
> 
> > static int setup_context(struct ofono_gprs_primary_context *context)
> > {
> > 	...
> > 
> > 	return 0;
> > }
> > 
> > static const ofono_gprs_provision_driver driver {
> > 	.name =	"test",
> > 	.setup_context = setup_context,
> > };
> 
> I guess that current struct ofono_gprs_primary_context* is not enough
> for provisioning data, it is missing at least name, MMS proxy and server
> information. Should those (and whatever might be needed in future) be
> added into that struct, or should we define some 
> struct ofono_gprs_provisioning_data {
> 	struct ofono_gprs_primary_context pri;
> 	char name[MAX_CONTEXT_NAME_LENGTH + 1];
> 	char message_proxy[MAX_MESSAGE_PROXY_LENGTH + 1];
> 	char message_center[MAX_MESSAGE_CENTER_LENGTH + 1];	
> }
> struct pri_context in gprs.c contains everything, but has extra
> gprs-internal stuff.  
> 
> Also setup_context() needs ofono_gprs_context_type as in-parameter.

it is just an example and we most likely need a bit more thinking about
it. To be honest, I just spent only 10 minutes on it to give you a brief
idea on how I think this could be done.

> And a question about the priorities, if there is more than one
> provisioning plugin: would plugins be called in priority order, and
> after first returns something, rest would not be called?

Inside oFono we have not used this concept, but inside ConnMan we just
order the drivers by priority. And then call the function in priority
order. If it returns < 0, then we try the next, if it return = 0 then we
stop calling. First one with highest priority wins ;)

We might need to add a probe() and remove() callback to do some basic
detection of the driver pre-constraints. This needs to be figured out as
well.

Regards

Marcel



  reply	other threads:[~2011-01-04  9:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-03  7:31 [RFC PATCHv2 1/4] Automatic provisioning of GPRS context settings Jukka Saunamaki
2011-01-03  7:31 ` [RFC PATCHv2 1/4] sim: add ofono_sim_get_mnc_length Jukka Saunamaki
2011-01-03 20:37   ` Marcel Holtmann
2011-01-03  7:31 ` [RFC PATCHv2 2/4] operator-settings: Add GPRS context provisioning sources Jukka Saunamaki
2011-01-03  7:31 ` [RFC PATCHv2 3/4] gprs: add automatic context settings provisioning Jukka Saunamaki
2011-01-03  7:31 ` [RFC PATCHv2 4/4] operator-settings: Example GPRS context settings file Jukka Saunamaki
2011-01-03  8:57 ` [RFC PATCHv2 1/4] Automatic provisioning of GPRS context settings Kalle Valo
2011-01-03 10:44   ` Jukka Saunamaki
2011-01-03 11:40     ` Kalle Valo
2011-01-03 13:32       ` Aki Niemi
2011-01-03 13:38       ` Jukka Saunamaki
2011-01-03 20:34         ` Marcel Holtmann
2011-01-03 11:28   ` Aki Niemi
2011-01-03 20:31     ` Marcel Holtmann
2011-01-03 23:03 ` Marcel Holtmann
2011-01-04  7:13   ` Jukka Saunamaki
2011-01-04  8:05     ` Marcel Holtmann
2011-01-04  8:42       ` Jukka Saunamaki
2011-01-04  9:29         ` Marcel Holtmann [this message]
2011-01-04  8:23   ` Kalle Valo
2011-01-04  8:30     ` Marcel Holtmann
2011-01-04 10:00       ` Kalle Valo
2011-01-11  0:59         ` Marcel Holtmann
2011-01-13 22:41           ` Kalle Valo
  -- strict thread matches above, loose matches on Subject: below --
2011-09-08  7:38 manju krishna

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=1294133397.5852.81.camel@aeonflux \
    --to=marcel@holtmann.org \
    --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