Functions | |
Key * | keyNext (Key *key) |
Return a pointer to the next key, if key is member of a KeySet. | |
ssize_t | keyToStream (const Key *key, FILE *stream, unsigned long options) |
Prints an XML representation of the key. | |
ssize_t | keyToStreamBasename (const Key *key, FILE *stream, const char *parent, const size_t parentSize, unsigned long options) |
Same as keyToStream() but tries to strip parentSize bytes from key name if it matches parent . |
To use them:
#include <kdb.h>
|
Return a pointer to the next key, if Different from ksNext(), this call does not affect the KeySet internal cursor. Definition at line 2221 of file key.c. References _Key::next. |
|
Prints an XML representation of the key. String generated is of the form: <key name="system/sw/XFree/Monitor/Monitor0/Name" type="string" uid="root" gid="root" mode="0660"> <value>Samsung TFT panel</value> <comment>My monitor</comment> </key>
<key parent="system/sw/XFree/Monitor/Monitor0" basename="Name" type="string" uid="root" gid="root" mode="0660"> <value>Samsung TFT panel</value> <comment>My monitor</comment> </key> Accepted options that can be ORed:
Definition at line 2603 of file key.c. References keyToStreamBasename(). Referenced by ksToStream(). |
|
Same as keyToStream() but tries to strip
Taking the example from keyToStream(), if <key basename="Monitor/Monitor0/Name" type="string" uid="root" gid="root" mode="0660"> <value>Samsung TFT panel</value> <comment>My monitor</comment> </key> This method is used when ksToStream() is called with KDBOption::KDB_O_HIER option.
Definition at line 2633 of file key.c. References _Key::access, _Key::comment, _Key::data, _Key::dataSize, encode(), _Key::gid, _Key::key, KEY_TYPE_BINARY, KEY_TYPE_DIR, KEY_TYPE_LINK, KEY_TYPE_STRING, KEY_TYPE_UNDEFINED, keyGetFullName(), keyIsUser(), strblen(), _Key::type, _Key::uid, and _Key::userDomain. Referenced by keyToStream(), and ksToStream(). |