Elektra backend for KDE

Thomas Braxton brax108 at cox.net
Mon Feb 20 17:32:12 GMT 2006


On Monday 20 February 2006 10:57, Avi Alkalay wrote:
> Your current interface would fit, though the method names only don't make
> much sense. Thats a minor issue.
>
> On elektra we have Keys and KeySets. A Key (and its value) is something
> like
>
>
> system/sw/xorg/InputDevices/Mouse0/Options/Device: /dev/input/mice
>
> While a KeySet can be all keys under system/sw/xorg
> Check here for more examples:
> http://www.libelektra.org/Overview/examples.html

So that looks like KConfig's Keys and Groups, but a file can have unlimited 
groups. Is this possible with Elektra? If not, then we might have to come up 
with a different interface. Or elektra might treat the KeySet 
"systems/sw/xorg" as the file, and all KeySets immediately under that as the 
groups of that file. KConfig right now only has a very simple idea of 
nesting, there is no nesting of groups, so it only does:
file
  group1
    keys
  group2
    keys
there isn't a way to have
file
  group1
    group2
      keys
  group3
    keys
So Elektra group/key names might end up looking like directories, ie
KConfig kc("systems/sw/xorg");
kc.setGroup("InputDevices");
kc.readEntry("Mouse0/Options/Device");
or
kc.setGroup("InputDevices/Mouse0/Options");
kc.readEntry("Device");
should probably return the same thing.

> So the idea for the backend is to map Elektra Keys and KeySets to KConfig's
> keys. Then we have to solve how to make kiosk, etc.
How you mark things as immutable will be backend specific. ini does it by 
adding a tag "[$i]" to the end of the groups/keys that are immutable, or a 
group named "[$i]" to mark the file as immutable.

Thomas




More information about the kde-core-devel mailing list