#include <PKIFCMSAttributeMediator2.h>
TSP-enforcing: No
Definition at line 32 of file PKIFCMSAttributeMediator2.h.
Public Member Functions | |
~CPKIFCMSAttributeMediator2 () | |
void | Initialize (std::vector< CPKIFException * > *errorInfo=NULL) |
void | Terminate () |
CPKIFAttributePtr | getAttribute (CPKIFOIDPtr oid, CPKIFBufferPtr buf) |
void | ParseAttributes (CPKIFBufferPtr &buf, std::vector< CPKIFAttributePtr > &attrVector) |
void | ParseAttributes2 (CPKIFBufferPtr &buf, std::vector< CPKIFAttributePtr > &attrVector) |
void | AddColleague (IPKIFColleague *module, bool transferOwnership) |
Static Public Member Functions | |
static CPKIFCMSAttributeMediator2 * | GetInstance (void) |
CPKIFCMSAttributeMediator2::~CPKIFCMSAttributeMediator2 | ( | void | ) |
Interface: External
This function destroys an instance of CPKIFCMSAttributeMediator2 including invocation of Terminate to clean up any associated colleagues.
Definition at line 113 of file PKIFCMSAttributeMediator2.cpp.
References _ASSERT, LOG_STRING_DEBUG, Terminate(), and TOOLKIT_CRYPTO_MISC.
CPKIFCMSAttributeMediator2 * CPKIFCMSAttributeMediator2::GetInstance | ( | void | ) | [static] |
Interface: External
This function returns an instance of a CPKIFCMSAttributeMediator2 class.
Definition at line 81 of file PKIFCMSAttributeMediator2.cpp.
References Initialize(), and IPKIFColleague::InitializeMediator().
Referenced by CPKIFContentWithAttributes::_GetAttributes(), CPKIFSignerInfo::_GetSignedAttributes(), CPKIFEnvelopedData::_GetUnprotectedAttributes(), CPKIFEncryptedData::_GetUnprotectedAttributes(), CPKIFSignerInfo::_GetUnsignedAttributes(), CPKIFContentWithAttributes::GetAttributes(), CPKIFSignerInfo::GetSignedAttributes(), and CPKIFSignerInfo::GetUnsignedAttributes().
void CPKIFCMSAttributeMediator2::Initialize | ( | std::vector< CPKIFException * > * | errorInfo = NULL |
) |
Interface: External
This function prepares an instance of CPKIFCMSAttributeMediator2 for use, including initialization of all runtime-associated mediators and colleagues. By default, all mediators catch and discard these exceptions and ignore the offending colleague. Applications can review the list of exceptions that occurred during initialization by passing a non-NULL pointer to a vector of CPKIFException objects. Any exception objects returned in the vector must be freed by the application.
CPKIFMessageException(COMMON_ALREADY_INITIALIZED) |
errorInfo | [out] Pointer to a vector of exception objects to receive exceptions thrown during initialization by associated colleague objects |
Definition at line 160 of file PKIFCMSAttributeMediator2.cpp.
References IPKIFColleague::AddParent(), COMMON_ALREADY_INITIALIZED, IPKIFColleague::Initialize(), LOG_STRING_DEBUG, TOOLKIT_CRYPTO_MISC, and TOOLKIT_MESSAGE_ATTR_MEDIATOR.
Referenced by GetInstance().
void CPKIFCMSAttributeMediator2::Terminate | ( | ) | [virtual] |
Interface: External
This function de-initializes an instance of CPKIFCryptoMediator2 rendering it unusable until after a subsequent call to Initialize. Terminate will remove all mediator and colleague associations and will destroy any colleagues associated at runtime via AddColleague with transfer of ownership. This is called automatically by the destructor.
Reimplemented from IPKIFColleague.
Definition at line 140 of file PKIFCMSAttributeMediator2.cpp.
Referenced by ~CPKIFCMSAttributeMediator2().
CPKIFAttributePtr CPKIFCMSAttributeMediator2::getAttribute | ( | CPKIFOIDPtr | oid, | |
CPKIFBufferPtr | buf | |||
) |
Interface: External
This function takes a pointer to an Objective structure containing a CMS attribute and returns a pointer to a CPKIFAttribute (or derived) object containing the type and value from the attribute. The associated colleagues are invoked as appropriate when generating an object derived from CPKIFAttribute. If an attribute cannot be parsed, a CPKIFAttribute object containing the encoded attribute is returned.
oid | [in] The OID of the CACCMSAttribute object |
buf | [in] A buffer pointing to a unparsed CACCMSAttribute object |
Definition at line 282 of file PKIFCMSAttributeMediator2.cpp.
References IPKIFCMSAttributeFactory::create(), LOG_STRING_DEBUG, IPKIFCMSAttributeFactory::refOID(), and TOOLKIT_CRYPTO_MISC.
void CPKIFCMSAttributeMediator2::ParseAttributes | ( | CPKIFBufferPtr & | buf, | |
std::vector< CPKIFAttributePtr > & | attrVector | |||
) | [virtual] |
Interface: External
This function takes a pointer to a buffer containing unencoded attributes. The function then decodes and parses the attributes, and their respective pointers to the vector parameter.
buf | [in] pointer to a buffer of unencoded attributes |
attrVector | [out] this vector will hold attribute ptrs, if any |
Implements IPKIFParseAttributes.
Definition at line 328 of file PKIFCMSAttributeMediator2.cpp.
References CACASNWRAPPER_CREATE, and IPKIFCMSAttributeFactory::refOID().
void CPKIFCMSAttributeMediator2::ParseAttributes2 | ( | CPKIFBufferPtr & | buf, | |
std::vector< CPKIFAttributePtr > & | attrVector | |||
) | [virtual] |
Interface: External
This function takes a pointer to a buffer containing unencoded attributes for content with attributes trusture. The function then decodes and parses the attributes, and their respective pointers to the vector parameter.
buf | [in] pointer to a buffer of unencoded attributes |
attrVector | [out] this vector will hold attribute ptrs, if any |
Implements IPKIFParseAttributes.
Definition at line 404 of file PKIFCMSAttributeMediator2.cpp.
References CACASNWRAPPER_CREATE, and IPKIFCMSAttributeFactory::refOID().
void CPKIFCMSAttributeMediator2::AddColleague | ( | IPKIFColleague * | module, | |
bool | transferOwnership | |||
) |
Interface: External
This function add a colleague to the CPKIFCMSAttributeMediator2
module | [in] Pointer to an IPKIFColleague object |
transferOwnership | [in] Boolean value indicating whether the mediator should take ownership of the object passed as module for deletion purposes |
Definition at line 478 of file PKIFCMSAttributeMediator2.cpp.
References IPKIFColleague::AddParent(), IPKIFColleague::Initialize(), LOG_STRING_DEBUG, and TOOLKIT_PATH_MEDIATOR.