CPKIFContentWithAttributes Class Reference

#include <ContentWithAttributes.h>

Inheritance diagram for CPKIFContentWithAttributes:

Inheritance graph
[legend]
Collaboration diagram for CPKIFContentWithAttributes:

Collaboration graph
[legend]

List of all members.


Detailed Description

The CPKIFContentWithAttributes class provides an interface to Content With Attributes objects.

TSP-enforcing: No

Definition at line 28 of file ContentWithAttributes.h.


Public Member Functions

 CPKIFContentWithAttributes ()
virtual ~CPKIFContentWithAttributes ()
bool Decoded () const
CPKIFBufferPtr Encode ()
void Decode (CPKIFBufferPtr &buf)
void SetContentInfo (CPKIFContentInfoPtr &contentList)
CPKIFContentInfoPtr GetContentInfo () const
void GetAttributes (CPKIFAttributeList &sal)
void AddAttribute (CPKIFAttributePtr &sa)
template<class T>
boost::shared_ptr< T > GetAttribute ()
void GetEncodedAttributes (CPKIFBufferPtr &buf)
void _GetAttributes (std::vector< CPKIFAttributePtr > &attrVector)
virtual void GetAddedAttributes (std::vector< CPKIFAttributePtr > &attr)

Constructor & Destructor Documentation

CPKIFContentWithAttributes::CPKIFContentWithAttributes (  ) 

Interface: External

Default constructor. Applications only use the default constructor when creating CPKIFContentWithAttributes objects.

Returns:
None

Definition at line 51 of file ContentWithAttributes.cpp.

References g_contentWithAttributes, and CPKIFContentType::SetContentType().

CPKIFContentWithAttributes::~CPKIFContentWithAttributes (  )  [virtual]

Interface: External

This function destroys an instance of CPKIFContentWithAttributes object.

Returns:
None

Definition at line 121 of file ContentWithAttributes.cpp.


Member Function Documentation

bool CPKIFContentWithAttributes::Decoded (  )  const

Interface: External

Whether a SignerInfo object has been decoded from an encoded SignerInfo or has been constructed. This function is not typically used by applications.

Return values:
True if SignerInfo object has been decoded from an encoded SignerInfo
False SignerInfo object has been constructed

Definition at line 136 of file ContentWithAttributes.cpp.

CPKIFBufferPtr CPKIFContentWithAttributes::Encode (  )  [virtual]

Interface: External

This function encodes contentwithattributes

Returns:
None

Implements CPKIFContentType.

Definition at line 278 of file ContentWithAttributes.cpp.

References COMMON_NOT_IMPLEMENTED, and RAISE_MESSAGE_EXCEPTION.

void CPKIFContentWithAttributes::Decode ( CPKIFBufferPtr &  siBuf  )  [virtual]

Interface: External

This constructor is invoked internally when parsing a CMS SignedData message (it is not invoked by applications); this version will throw a std::bad_alloc exception if allocation of memory to hold the encoded attribute value fails and an exception indicating ASN.1 decoding errors if any SignerInfo component fails to parse.

Returns:
None
Parameters:
siBuf  [in] Reference to a ContentWithAttributes structure containing information to use to populate a new instance of CPKIFContentWithAttributes

Implements CPKIFContentType.

Definition at line 67 of file ContentWithAttributes.cpp.

References CACASNWRAPPER_CREATE, and data.

void CPKIFContentWithAttributes::SetContentInfo ( CPKIFContentInfoPtr &  contentInfo  ) 

Interface: External

This function sets the content info for the contentwithattributes object

Returns:
None
Parameters:
contentInfo  [in] A smart pointer to CPKIFContentInfo object

Definition at line 254 of file ContentWithAttributes.cpp.

CPKIFContentInfoPtr CPKIFContentWithAttributes::GetContentInfo (  )  const

Interface: External

This function retrives the content info for the contentwithattributes object

Returns:
A smart poniter to CPKIFContentInfo object

Definition at line 267 of file ContentWithAttributes.cpp.

void CPKIFContentWithAttributes::GetAttributes ( CPKIFAttributeList ual  ) 

Interface: External

This functions are used to get the unsigned attributes associated with a SignerInfo object.

Returns:
None
Parameters:
ual  [out] A list of the unsigned attributes.

Definition at line 148 of file ContentWithAttributes.cpp.

References IPKIFHasAttributes::GetAttributes(), and CPKIFCMSAttributeMediator2::GetInstance().

void CPKIFContentWithAttributes::AddAttribute ( CPKIFAttributePtr &  ua  ) 

Interface: External

This functions are used to add the unsigned attributes associated with a SignerInfo object.

Returns:
None
Exceptions:
CPKIFMessageException(COMMON_INVALID_INPUT) 
Parameters:
ua  [in] An attribute to add to the unsigned attributes.

Definition at line 168 of file ContentWithAttributes.cpp.

References COMMON_INVALID_INPUT, and TOOLKIT_MESSAGE.

template<class T>
boost::shared_ptr< T > CPKIFContentWithAttributes::GetAttribute (  )  [inline]

Interface: External

This function is used to get the unsigned attributes associated with a SignerInfo object.

Returns:
None

Definition at line 84 of file ContentWithAttributes.h.

References _GetAttributes().

void CPKIFContentWithAttributes::GetEncodedAttributes ( CPKIFBufferPtr &  buf  )  [virtual]

Interface: External

This function retrives a list of DER encoded signed CMS attributes

Returns:
None
Parameters:
buf  [out] A reference to a smart pointer to CPKIFBuffer object containing the DER encoded list of CMS attributes

Reimplemented from IPKIFHasAttributes.

Definition at line 99 of file ContentWithAttributes.cpp.

void CPKIFContentWithAttributes::_GetAttributes ( std::vector< CPKIFAttributePtr > &  attrVector  ) 

Interface: Subsystem

This functions are used to get the signed attributes associated with a SignerInfo object.

Returns:
None
Parameters:
attrVector  [out] A vector of CPKIFAttribute objects

Definition at line 222 of file ContentWithAttributes.cpp.

References IPKIFHasAttributes::GetAttributes(), and CPKIFCMSAttributeMediator2::GetInstance().

Referenced by GetAttribute().

void CPKIFContentWithAttributes::GetAddedAttributes ( std::vector< CPKIFAttributePtr > &  attr  )  [virtual]

Interface: External

This functions are used to get the added signed attributes associated with a SignerInfo object.

Returns:
None
Parameters:
attr  [out] A vector of CPKIFAttribute objects

Reimplemented from IPKIFHasAttributes.

Definition at line 236 of file ContentWithAttributes.cpp.


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

Generated on Mon Nov 15 11:20:05 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6