#include <ContentCollection.h>
TSP-enforcing: No
Definition at line 24 of file ContentCollection.h.
Public Member Functions | |
CPKIFContentCollection () | |
CPKIFContentCollection (const CPKIFOIDPtr &oid, const CPKIFBufferPtr &ciBuf) | |
virtual | ~CPKIFContentCollection () |
void | SetContentList (CPKIFContentInfoList &contentList) |
void | GetContentList (CPKIFContentInfoList &contentList) const |
void | Decode (CPKIFBufferPtr &buf) |
void | Decode (const unsigned char *buf, int bufLen) |
CPKIFBufferPtr | Encode () |
Friends | |
struct | CPKIFContentCollectionImpl |
CPKIFContentCollection::CPKIFContentCollection | ( | ) |
Interface: External
Default constructor
Definition at line 37 of file ContentCollection.cpp.
References g_contentCollection, LOG_STRING_DEBUG, CPKIFContentType::SetContentType(), and TOOLKIT_MESSAGE_CONTENT_INFO.
CPKIFContentCollection::CPKIFContentCollection | ( | const CPKIFOIDPtr & | oid, | |
const CPKIFBufferPtr & | ciBuf | |||
) |
CPKIFContentCollection::~CPKIFContentCollection | ( | ) | [virtual] |
Interface: External
Destructor
Definition at line 50 of file ContentCollection.cpp.
References LOG_STRING_DEBUG, and TOOLKIT_MESSAGE_CONTENT_INFO.
void CPKIFContentCollection::SetContentList | ( | CPKIFContentInfoList & | contentList | ) |
Interface: External
This function is used to set the contentInfoList
contentList | [in] The contentinfo list |
Definition at line 65 of file ContentCollection.cpp.
void CPKIFContentCollection::GetContentList | ( | CPKIFContentInfoList & | contentList | ) | const |
Interface: External
This function is used to get the contentInfoList
contentList | [out] The content info list |
Definition at line 77 of file ContentCollection.cpp.
void CPKIFContentCollection::Decode | ( | CPKIFBufferPtr & | buf | ) | [virtual] |
Interface: External
This function is used to decode a buffer containing an encoded content colleaction blob.
CPKIFMessageException(MSG_DECODE_FAILED) | ||
CPKIFMessageException(COMMON_INVALID_INPUT) |
buf | [in] A reference to a smart pointer to CPKIFBuffer obejct containing an encoded content colleaction blob |
Implements CPKIFContentType.
Definition at line 191 of file ContentCollection.cpp.
References COMMON_INVALID_INPUT.
void CPKIFContentCollection::Decode | ( | const unsigned char * | buf, | |
int | bufLen | |||
) |
Interface: External
This function is used to decode a buffer containing an encoded content colleaction blob. Following invocation of this function, the content is available by calling GetContentList. If a message cannot be decoded, an exception with the error code MSG_DECODE_FAILED will be thrown.
CPKIFMessageException(MSG_DECODE_FAILED) | ||
CPKIFMessageException(COMMON_INVALID_INPUT) |
buf | [in] The input content info blob to decode. |
bufLen | [in] The length of buf. |
Definition at line 96 of file ContentCollection.cpp.
References COMMON_INVALID_INPUT, CPKIFASNWrapper< T >::data(), CPKIFASNWrapper< T >::Decode(), LOG_STRING_DEBUG, MSG_DECODE_FAILED, PEMDecode(), CPKIFException::push_info(), and TOOLKIT_MESSAGE_CONTENT_INFO.
CPKIFBufferPtr CPKIFContentCollection::Encode | ( | ) | [virtual] |
Interface: External
This function is used to encode the OID and content associated by calls to SetContent and SetContentType. The encoded result is returned in a smart pointer to a CPKIFBuffer object. This function may generate an exception containing one of the following error codes MSG_INCOMPLETE or MSG_ENCODE_FAILED.
CPKIFMessageException(MSG_INCOMPLETE) | ||
CPKIFMessageException(MSG_DECODE_FAILED) |
Implements CPKIFContentType.
Definition at line 261 of file ContentCollection.cpp.
References COMMON_NOT_IMPLEMENTED, and RAISE_MESSAGE_EXCEPTION.
friend struct CPKIFContentCollectionImpl [friend] |
Definition at line 26 of file ContentCollection.h.