Digital Authentication Framework 6.0.1.33
Public Member Functions

DAMetaData Class Reference

General metadata interface. More...

#include <DigitalAuthenticationFramework.h>

Inheritance diagram for DAMetaData:
BasicMetaData

List of all members.

Public Member Functions

virtual ~DAMetaData ()
 Virtual Destructor.
virtual bool getString (DAAttrib which, std::string &data)=0
 Get String attribute.
virtual bool getFlag (DAAttrib which)=0
 Get boolean attribute.
virtual bool getData (DAAttrib which, DAData &data, size_t index=0)=0
 Get byteblock attribute.
virtual bool getSize (DAAttrib which, size_t &len_r)=0
 Get size attribute.

Detailed Description

General metadata interface.

All objects which can have attributes (see DAAttrib) provide an implementation of the DAMetaData interface (generally returned by that object's getInfo() method).


Constructor & Destructor Documentation

virtual DAMetaData::~DAMetaData ( ) [inline, virtual]

Virtual Destructor.


Member Function Documentation

virtual bool DAMetaData::getData ( DAAttrib  which,
DAData data,
size_t  index = 0 
) [pure virtual]

Get byteblock attribute.

For DA_CERTIFICATE attributes, index is set to 0 to return the X.509 certificate for the key. If additional certificates are required to validate this, these should be provided for index=1, index=2, and so on. The caller can discover the certificate chain by enumerating successive index values, until the method returns false.

Returns:
true if the key has the requested attribute (and data has been set). false if the requested attribute is not present.

Implemented in BasicMetaData.

virtual bool DAMetaData::getFlag ( DAAttrib  which) [pure virtual]

Get boolean attribute.

Parameters:
whichidentifies the flag value to query
Returns:
true if the requested flag attribute is present, false if the flag is not set / not present.

Queries whether a particular flag is set. Note that there is no semantic difference between a flag being 'not set' and the flag attribute being 'not present'.

Implemented in BasicMetaData.

virtual bool DAMetaData::getSize ( DAAttrib  which,
size_t &  len_r 
) [pure virtual]

Get size attribute.

Used with DA_SIGNATURE_SIZE and DA_MAX_DECRYPT_SIZE attributes to return the sizes (in bytes) of signatures and decrypted data, respectively. Keys with DA_SMIME_SIGN or DA_TLS_CLIENT_AUTH flags set must also have a DA_SIGNATURE_SIZE attribute. Keys with DA_SMIME_DECRYPT must have DA_MAX_DECRYPT_SIZE.

Returns:
true if the key has the requested size attribute (and len_r must have been set), false if the requested attribute is not present.

Implemented in BasicMetaData.

virtual bool DAMetaData::getString ( DAAttrib  which,
std::string &  data 
) [pure virtual]

Get String attribute.

Parameters:
whichIdentifies the attribute to get
dataOn return, set to the value of the requested attribute.
Returns:
true if the key has the requested string attribute (and data has been set). false if the requested attribute is not present.

Implemented in BasicMetaData.


The documentation for this class was generated from the following file: