Defines | |
#define | CMD_GET 1 |
#define | CMD_SET 2 |
#define | CMD_REMOVE 3 |
#define | CMD_LIST 4 |
#define | CMD_LINK 5 |
#define | CMD_EDIT 6 |
#define | CMD_LOAD 7 |
#define | CMD_SAVE 8 |
#define | CMD_MONITOR 9 |
#define | ARGSIZE 30 |
Functions | |
int | parseCommandLine (int argc, char *argv[]) |
void | listAccess (Key *key, char *readable) |
void | listTime (time_t when, char *readable) |
void | listSingleKey (Key *key) |
int | commandRemove () |
int | commandSet () |
int | commandLink () |
int | commandList () |
int | commandGet () |
int | processNode (KeySet *ks, xmlTextReaderPtr reader) |
int | ksFromXMLReader (KeySet *ks, xmlTextReaderPtr reader) |
int | ksFromXMLfile (KeySet *ks, char *filename) |
int | ksFromXML (KeySet *ks, int fd) |
int | commandEdit () |
int | commandImport () |
int | commandExport () |
int | commandMonitor () |
int | doCommand (int command) |
int | main (int argc, char **argv) |
Variables | |
char * | argComment = 0 |
char * | argFile = 0 |
char * | argData = 0 |
char * | argKeyName = 0 |
char * | argDomain = 0 |
uid_t * | argUID = 0 |
uid_t * | argGID = 0 |
int | argCommand = 0 |
int | argRecursive = 0 |
int | argLong = 0 |
int | argValue = 0 |
int | argAll = 0 |
int | argSort = 1 |
int | argDescriptive = 0 |
int | argFullName = 0 |
int | argShow = 1 |
int | argShell = 0 |
int | argXML = 0 |
mode_t | argMode = 0 |
int | argType = KEY_TYPE_UNDEFINED |
|
Opens an editor to edit an XML representation of the keys. This is one of the most complex commands of the kdb program. Is will
Definition at line 1057 of file kdb.c. References argAll, argKeyName, argRecursive, KDB_O_NFOLLOWLINK, KDB_O_SORT, KDB_O_XMLHEADERS, kdbGetChildKeys(), kdbGetKey(), kdbRemove(), kdbSetKeys(), keyClose(), keyGetFullName(), keyInit(), keySetName(), ksAppend(), ksCompare(), ksCurrent(), ksFromXMLfile(), ksInit(), ksNext(), ksRewind(), ksToStream(), and _KeySet::size. Referenced by doCommand(). |
|
Business logic behind the 'kdb export' command. Export a set of keys to an XML format. Usefull to make backups or copy keys to other machine or user. Equivalent to 'kdb ls -xRv base/key/name'
Definition at line 1206 of file kdb.c. References argAll, argFullName, argRecursive, argShow, argSort, argValue, argXML, commandList(), kdbClose(), and kdbOpen(). Referenced by doCommand(). |
|
Business logic behind the 'kdb get' command. Get a key and return its value to you.
Definition at line 721 of file kdb.c. References argDescriptive, argFullName, argKeyName, argLong, argShell, kdbGetKey(), KEY_TYPE_STRING, keyGetBaseName(), keyGetBaseNameSize(), keyGetBinary(), keyGetComment(), keyGetCommentSize(), keyGetDataSize(), keyGetFullName(), keyGetFullNameSize(), keyGetName(), keyGetNameSize(), keyGetString(), keyGetType(), keyInit(), and keySetName(). Referenced by doCommand(). |
|
Business logic behind the 'kdb import' command. Import an XML file (or standard input) into the key database. This is usefull to import full programs keys, or restore backups.
Definition at line 1158 of file kdb.c. References argKeyName, kdbSetKeys(), keyGetFullName(), ksCurrent(), ksFromXML(), ksFromXMLfile(), ksInit(), and ksRewind(). Referenced by doCommand(). |
|
The business logic behind 'kdb ln' command
Definition at line 537 of file kdb.c. References argData, argKeyName, and kdbLink(). Referenced by doCommand(). |
|
The business logic behind 'kdb ls' command.
Definition at line 594 of file kdb.c. References argAll, argKeyName, argRecursive, argShow, argSort, argValue, argXML, KDB_O_DIR, KDB_O_NFOLLOWLINK, KDB_O_STATONLY, KDB_O_XMLHEADERS, kdbGetChildKeys(), kdbGetKey(), kdbGetRootKeys(), kdbStatKey(), keyClose(), keyGetFullName(), keyInit(), keySetName(), keyToStream(), ksAppend(), ksAppendKeys(), ksClose(), ksInit(), ksNext(), ksRewind(), ksToStream(), listSingleKey(), _Key::next, _KeySet::size, and _KeySet::start. Referenced by commandExport(), and doCommand(). |
|
Business logic behind 'kdb mon' command. Will block your command line until some change happens to the interested key.
Definition at line 1244 of file kdb.c. References argKeyName, kdbGetKey(), kdbMonitorKey(), KEY_FLAG_HASDATA, keyGetDataSize(), keyGetString(), keyInit(), and keySetName(). Referenced by doCommand(). |
|
The business logic behind 'kdb rm' command
Definition at line 400 of file kdb.c. References argKeyName, and kdbRemove(). Referenced by doCommand(). |
|
The business logic behind 'kdb set' command. Sets value to a single key.
Definition at line 437 of file kdb.c. References argComment, argData, argFile, argGID, argKeyName, argMode, argType, argUID, KDB_RET_NOTFOUND, kdbGetKey(), kdbSetKey(), KEY_TYPE_BINARY, KEY_TYPE_DIR, KEY_TYPE_LINK, KEY_TYPE_STRING, KEY_TYPE_UNDEFINED, keyGetType(), keyInit(), keySetAccess(), keySetBinary(), keySetComment(), keySetGID(), keySetLink(), keySetName(), keySetString(), keySetType(), and keySetUID(). Referenced by doCommand(). |