Elektra
0.9.5
|
Methods for Key name manipulation. More...
#include "kdbprivate.h"
#include <kdbassert.h>
#include <ctype.h>
#include "kdb.h"
#include "kdbhelper.h"
#include "kdbinternal.h"
Functions | |
const char * | keyName (const Key *key) |
Returns a pointer to the abbreviated real internal key name. More... | |
ssize_t | keyGetNameSize (const Key *key) |
Bytes needed to store the key name without owner. More... | |
const void * | keyUnescapedName (const Key *key) |
Returns a keyname which is null separated and does not use backslash for escaping. More... | |
ssize_t | keyGetUnescapedNameSize (const Key *key) |
return size of unescaped name with embedded and terminating null characters More... | |
ssize_t | keyGetName (const Key *key, char *returnedName, size_t maxSize) |
Get abbreviated key name (without owner name). More... | |
ssize_t | keyGetUnescapedName (const Key *key, char *returnedName, size_t maxSize) |
Copies the unescaped name of a key into provided buffer. More... | |
ssize_t | keySetName (Key *key, const char *newName) |
Set a new name to a key. More... | |
ssize_t | keyAddName (Key *key, const char *newName) |
Add an already escaped name to the keyname. More... | |
int | keyReplacePrefix (Key *key, const Key *oldPrefix, const Key *newPrefix) |
Replaces a prefix of the key name of key . More... | |
bool | elektraKeyNameValidate (const char *name, bool isComplete) |
Takes an escaped key name and validates it. More... | |
void | elektraKeyNameCanonicalize (const char *name, char **canonicalName, size_t *canonicalSizePtr, size_t offset, size_t *usizePtr) |
Takes a valid (non-)canonical key name and produces its canonical form. More... | |
void | elektraKeyNameUnescape (const char *canonicalName, char *unescapedName) |
Takes a canonical key name and unescapes it. More... | |
const char * | keyBaseName (const Key *key) |
Returns a pointer to the internal unescaped key name where the basename starts. More... | |
ssize_t | keyGetBaseNameSize (const Key *key) |
Calculates number of bytes needed to store basename of key . More... | |
ssize_t | keyGetBaseName (const Key *key, char *returned, size_t maxSize) |
Calculate the basename of a key name and put it in returned finalizing the string with NULL. More... | |
size_t | elektraKeyNameEscapePart (const char *part, char **escapedPart) |
Takes a single key name part and produces its escaped form. More... | |
ssize_t | keyAddBaseName (Key *key, const char *baseName) |
Adds baseName (that will be escaped) to the current key name. More... | |
ssize_t | keySetBaseName (Key *key, const char *baseName) |
Sets baseName as the new basename for key . More... | |
elektraNamespace | keyGetNamespace (const Key *key) |
For currently valid namespaces see elektraNamespace. More... | |
ssize_t | keySetNamespace (Key *key, elektraNamespace ns) |
Changes the namespace of a key. More... | |
Methods for Key name manipulation.