gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: howto change gnokii driver on the run


From: Bastien Nocera
Subject: Re: howto change gnokii driver on the run
Date: Sat, 07 Jul 2007 17:14:22 +0100

On Sat, 2007-07-07 at 17:05 +0200, Pawel Kot wrote:
> On 7/7/07, Bastien Nocera <address@hidden> wrote:
> > On Sat, 2007-07-07 at 15:44 +0200, Pawel Kot wrote:
> > > Now, prepare new configuration. When you have new configuration in the 
> > > memory:
> > > ret = gn_cfg_memory_read(mem);
> > > When you want to reread config file:
> > > ret = gn_cfg_file_read(file);
> > > or
> > > ret = gn_cfg_read_default();
> > > You may want just to switch the phone section being used in already
> > > read config file:
> > > ret = gn_cfg_phone_load(section, state); /* default section is "global" */
> > > If you want to change just some key value from the config:
> > > ret = cfg_set(gn_cfg_info, section, key, value); /* to change the
> >
> > Nothing seems to use cfg_set (it's a gnokii-internal.h unused function),
> 
> Indeed. But it is possible to use it. I don't recommend this method as
> function name will change defnitely when we would like to put it in
> documented gnokii API.

I didn't manage to use it in gnome-phone-manager, even after declaring
it as extern. The symbol seems to be private and/or not exported.

> > and the first parameter is a gn_cfg_header, not a gn_cfg_info. How do I
> > get that out of the state?
> 
> gn_cfg_info is a global variable in libgnokii (please don't comment
> that, it's on the list to be changed) of gn_cfg_header (see top of
> common/cfgreader.c). Just declare it extern in your app and use
> directly.
> Unfortunately it makes harder to use few connections at the same time.

I set my phone to ask for confirmation for each connection. And using
the attached patch still connects twice to the phone.

I had to add a sleep, otherwise gn_lib_phone_open() fails with a busy
device.

Ideas?

-- 
Bastien Nocera <address@hidden> 

Attachment: gnokii-reconnect-function.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]