Value for directories make Elektra to be more compatible with Windows
registry.

The flags on the Key struct are used to NEEDSYNC, isUser, isSystem, and for
the key{Set|Get}Flag() methods.

The NEEDSYNC flag is raised not when you set a value to a formerly NULL key,
but when any component on the key (data or metadta) is changed after
retrieved from storage. So a key freshly retrieved with a kdbGetKey() will
always have NEEDSYNC unset. If you chnge anything on it, NEEDSYNC will be
set. This is useful for methods like kdbSetKeys(), where they jump (and
don't waste time) with keys that NEEDSYNC is not set.

Directory keys can contain any type of values now: string, binary or user
defined. They are almost as regular keys. Dir is not a specific type
anymore, but a sort of key permission. It is defined on the access bits.
Check keyIsDir() and keySetDir() to see the changes in the approach.

And currently (on the repo, post 0.6.6), filesys and berkeleydb can
correctly handle dir keys with values. The kdbedit GUI needs some
modifications to support it too.

Use version from the repo to make some tests:
- Create a regular key
- Create a new key under previously created regular key
- Try to remove regular keys
- Try to remove dir keys with child keys
- Try to remove dir keys without children

These should all work on filesys and bdb.

Regards,
Avi

On 12/28/06, Markus Raab <[EMAIL PROTECTED]> wrote:

I have some questions about the typing system now (I am modifying it for
mount
points).

Are key flags used anymore for anything else then KEY_SWITCH_NEEDSYNC? If
a
value is set can be easy checked if value is NULL, isSystem and isUser is
a
strcmp in fact, and the bits are not useful. Same with user domain.

The use of directory is now very confusing.
Directories now are able to have a value and comment. So they must be
allowed
to have a binary value too. But I can't see any way to make that possible
with the typing system now, because if it is a directory, it can't be
string
or binary!

If we make it the other way round, that (binary or string) keys can have
subkeys, there is no easy way to find out, if there are subkeys in there,
or
intend to be. The implementation of backends will also get hard, because
you
have always be prepaired that subkeys will follow or need a routine to
convert.

Can you explain your ideas on that?

thank you
Markus Raab


--
http://avi.alkalay.net/blog
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Registry-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/registry-list

Reply via email to