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: Pawel Kot
Subject: Re: howto change gnokii driver on the run
Date: Sat, 7 Jul 2007 17:05:34 +0200

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.

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.

take care,
pkot
--
Pawel Kot




reply via email to

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