In file keytool.h++:

class keyToolManager_c

Key Tool Manager class

Public Classes

enum status_t
Status of getKey() call.
FAILED
Failed.
KEY_ALREADY_IN_MANAGER
Key already in manager.
KEY_FOUND_IN_FILE
Key read in from file.
KEY_COMPLETELY_NEW
Key completely new- ie not in manager nor file.
OK
Ok.

Public Methods

status_t commit ()
Commit the entire database.
int existsKey (char *path, char* name)
Check to see if a key exists at all.
keyToolKey_c* getKey (char *path, char *name, status_t *retStatus)
Get key
keyToolKey_c* getKey (md5Key_c keyId, status_t *retStatus)
Get key
status_t removeKey (keyToolKey_c *key)
Remove a key from this manager.
status_t removeKeyPermanently (keyToolKey_c *key)
Remove a key from this manager and persistent store.
void showProfile ()
Show performance profile.
status_t swapContents (keyToolKey_c *key1, keyToolKey_c *key2)
Swap contents of keys (ptr switch).

Public

enum status_t
Status of getKey() call.
FAILED
Failed.
KEY_ALREADY_IN_MANAGER
Key already in manager.
KEY_FOUND_IN_FILE
Key read in from file.
KEY_COMPLETELY_NEW
Key completely new- ie not in manager nor file.
OK
Ok.

Documentation

Key Tool Manager class. This is a quick keytool simulator hack. It is a first try. The spec will no doubt change over time. So the documentation describes the functionality of the existing classes, which may or may not change in the final spec.

To begin you need to create a key tool manager which basically sets up a directory in which is can store files to hold data for the keys (Ptool will no doubt have its own way of doing this). Currently every key gets 1 data file and 1 meta data file. The data file only contains the contents of the key. The meta data file contains the meta data: size of data, timestamp, comment.

Using the keytool manager you can get a keytool key object (a wrapper) which gives you access to the internals of the keys- ie the actual data, the time stamp, etc. The keytool manager is essentially a cache between physical memory and secondary storage.

Note, the difference between a time stamp and an aux (auxiliary) time stamp is that the former is always done on a commit. The latter is not. The aux time stamp is used to allow user defined timestamping. e.g. the aux time stamp can be used to record the timestamp of the original remote data source, whereas the regular timestamp can be used to record the time stamp of the local copy of the data.

keyToolKey_c* getKey(char *path, char *name, status_t *retStatus)
Get key. If key does not exist already then a new key is generated in the manager. A wrapper (keyToolKey_c) is returned. This key does not get stored permanently until you do a commit.

If key already exists in the database but not in the manager then load it from the database to the manager. Return a wrapper (keyToolKey_c) to the key.

If key already exists in the manager then simply return a wrapper (keyToolKey_c) to the key.

keyToolKey_c* getKey(md5Key_c keyId, status_t *retStatus)
Get key. This only returns a keyToolKey_c wrapper if the key has been previously loaded into the manager via the other overloading of the getKey call. If it hasn't then this call returns NULL.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de