Re: storing 'config sets' in gconf



Hi Cyrille,
  Thanks for the reply. 
  I was actually wondering if the schema itself
provides for such dynamic paths. Now it is clear that
we have to do it without the schema. That clarifies.
You mentioned that there could be other issues in
maintaining such account info. It would be helpful if
you could let me know your concern.

Regards,
Venkat.

--- Cyrille Moureaux <Cyrille Moureaux Sun COM> wrote:

> Hi Venkat,
> 
> >  I know that gconf is primarily meant for storing
> >preferences rather than appl config but still, is
> it
> >possible to store sets of config. eg. consider an
> >email appl which stores email account info in
> gconf.
> >Is it possible to do this? I learnt from: 
>
>http://codeblogs.ximian.com/blogs/evolution/archives/2004_03.html
> >(last item) that it is not possible. Could someone
> >confirm this.
> >  The issue as I see (to my limited knowledge of
> >gconf) is that the gconf paths are predefined and
> >cannot be dynamically created (at appl run time).
> We
> >can only assign values to the pre-defined keys,
> right?
> >If I have to create accounts and its parameters
> under
> >'/apps/myemailapp/accounts' (this will be defined
> in
> >the appl's gconf schema), eg. 
> >
> >'/apps/myemailapp/accounts/account1'
> >'/apps/myemailapp/accounts/account1/smtpservername'
> >'/apps/myemailapp/accounts/account1/smtpuserid'
> >'/apps/myemailapp/accounts/account1/smtpuserpasswd'
> >
> >etc, and for another account it would be
> >
> >'/apps/myemailapp/accounts/account2'
> >'/apps/myemailapp/accounts/account2/smtpservername'
> >'/apps/myemailapp/accounts/account2/smtpuserid'
> >'/apps/myemailapp/accounts/account2/smtpuserpasswd'
> >  
> >
> I don't see what would prevent you from doing that.
> The GConf schemas 
> are not mandatory declarations, you can have keys
> without any schema 
> association and you can create on the fly any key
> you want. An example 
> of something very similar to what you describe with
> mail accounts can be 
> seen in the panel applets and launchers list, which
> is located in GConf 
> at /apps/panel/profiles/default, and where you have
> for instance the 
> "objects" item which gets subkeys named "object_<n>"
> each time you add a 
> launcher to your panel.
> 
> There are possibly other issues in maintaining
> account details in GConf, 
> but I don't think the feasibility of storing
> arbitrary keys is one.
> 
> Cyrille
> 
> 



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com



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