[Openais] [PATCH] Add object tracking to the objdb and confdb

angus salkeld angus.salkeld at alliedtelesis.co.nz
Tue Aug 5 02:24:33 PDT 2008


Hi

Oops, I should have asked if anyone was busy with it.

xpathlite:
I have just started on it, I just wanted to get the tracking stuff done with first.
I'd like an interface like:

For a list of objects

res = confdb_iter_create("/logging/logger[debug=off]", &my_iterator);

if (res == CONFDB_OK) {
    while (confdb_iter_next(my_iterator, &obj_handle) == CONFDB_OK) {
        confdb_key_get(obj_handle, bla, bla...);
         ...
    }
}
confdb_iter_free(my_iterator);

OR for a single (non-list object)

res = confdb_object_get("/logging/logger[ident=CONFDB]",
    OBJECT_PARENT_HANDLE, &my_object);

if (res == CONFDB_OK) {
    confdb_key_get(obj_handle, bla, bla...);
     ...
}
confdb_iter_free(my_iterator);

OR for a single (non-list key)

res = confdb_key_get("/logging/logger[ident=CONFDB]/@to_file",
    OBJECT_PARENT_HANDLE, &my_value_buffer, &my_value_len);


We could also remove the parent_object_handle, from the args
and make people use full paths.

What do you think?

-Angus


>>> Steven Dake <sdake at redhat.com> 08/05/08 5:44 PM >>>
Well

What can I say other then really great work.

I wish I wasn't working on this exact same piece of code at the moment
but it is what it is :)

I'll go ahead and merge this now and refix my changes.

Also what are you plans WRT xpathlite?  I noticed you added some types
in the confdb but don't see any api exported that uses it.

Regards
-steve




More information about the Openais mailing list