class keyToolKey_c

Key tool key class

Public Classes

enum status_t
Status
LOCKED
LOCKED
UNLOCKED
UNLOCKED
FAILED
FAILED
OK
Ok.
LOCKED
LOCKED
ALREADY_LOCKED
ALREADY LOCKED
UNLOCKED
UNLOCKED
ALREADY_UNLOCKED
ALREADY UNLOCKED
CANNOT_UNLOCK
CANNOT UNLOCK
CANNOT_LOCK
CANNOT LOCK

Public Methods

md5Key_c getKeyId ()
Get the key id of the current key object.
md5Key_c getDataCheckSum ()
Compute the checksum of the data in the key.
char* getData ()
Get pointer to data buffer in key
int getDataSize ()
Return size of data.
int getRealSize ()
Return size of internal buffer.
status_t alloc (int size)
Allocate memory in key (previous contents MAY be deleted).
status_t trash ()
Delete the data in a key.
status_t commit ()
Commit this key (automatially timestamps. Does not affect aux time stamp.)
status_t setMeta (char* password, char *data, int msize)
Set meta field
status_t permissionLock (char *password)
Lock a key
status_t permissionUnlock (char *password)
Unlock the key
status_t permissionForceUnlock ()
Force an Unlock of the key.
status_t permissionForceLock (char *password)
Force a lock even when its locked by some other password.
status_t getPermissionLockStatus (char *password, int size)
Get the lock's status
char* getMeta ()
Get meta data. Returns ptr to the buffer.
int getMetaSize ()
Return size of meta data.
void stampTime ()
Force stamp the timestamp with the current time. Ie without doing a commit.
void stampAuxTime ()
Stamp the aux time stamp.
void setTimeStamp (double theTime)
Set the time stamp to a particular time.
void setAuxTimeStamp (double theTime)
Set the aux time stamp to a particular time.
double getTimeStamp ()
Get the time stamp.
double getAuxTimeStamp ()
Get the aux time stamp.

Public


Allocate memory while maintaining contents.

status_t resize(int size);

Documentation

Key tool key class. Objects of this type are created by the Key Tool Manager.
char* getData()
Get pointer to data buffer in key. Need more elaborate call in future as in Stuart's original spec.

status_t permissionLock(char *password)
Lock a key
Parameters:
password - is the "key" to the lock Returns FAILED, ALREADY_LOCKED (by you), CANNOT_LOCK, LOCKED (successfully)

status_t permissionUnlock(char *password)
Unlock the key. Returns FAILED, ALREADY_UNLOCKED (by you), CANNOT_UNLOCK, UNLOCKED (successfully)

status_t getPermissionLockStatus(char *password, int size)
Get the lock's status
Parameters:
password - find out what password is holding the lock
size - of password char buffer to fill.


This class has no child classes.
See Also:
keyToolManager_c

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