Profile "dataname" and config_get questions

David C Niemi <[email protected]> Mon, 12 Jan 2004 14:44:18 -0500 (EST)
Newsgroups gmane.network.beep.beepcore.c.general
Message-ID <[email protected]>
I am trying to do some smarter use of BEEP's config file support in my 
application.  Is there some easy way for a profile to find out what 
"dataname" its configuration came from?  I would like to make use of this.

Without knowing the "dataname", how can one reliably know what to load in 
for various parameters?  config_get seems to require an exact path to 
where the parameter you want is.  So for example:

<beep ...>
  <profiles>
     ...
  </profiles>
  <myappname>
    <application>
       <dataname1>
          <criticalitem>foo1</criticalitem>
       </dataname1>
       <dataname2>
          <criticalitem>foo2</criticalitem>
       </dataname2>
    </application>
  </myappname>
</beep>

I'd like the profile to be able to figure out that its dataname is 
"dataname1", and to figure out that its criticalitem is "foo1", as opposed 
to "foo2".  do I need to use the config_search_* functions?  Or can I look 
for a disembodied <criticalitem> and expect that the tree is pruned to 
just the dataname that applies to this profile instance?

-------------------------------------------------------
-- David C. Niemi           Adeptech Systems, Inc.   --
-- Reston, Virginia, USA    http://www.adeptech.com/ --
-------------------------------------------------------



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html