EncapsulatedContentInfo.cpp

Go to the documentation of this file.
00001 
00009 #include "EncapsulatedContentInfo.h"
00010 
00011 #include "ToolkitUtils.h"
00012 #include "components.h"
00013 #include "PKIFCommonErrors.h"
00014 #include "PKIFMessageException.h"
00015 
00017 struct CPKIFEncapsulatedContentInfoImpl
00018 {
00019     CPKIFOIDPtr m_oid;
00020     CPKIFBufferPtr m_content;
00021 };
00023 
00032 CPKIFEncapsulatedContentInfo::CPKIFEncapsulatedContentInfo()
00033     :m_impl (new CPKIFEncapsulatedContentInfoImpl)
00034 {
00035     m_impl->m_oid = g_data;
00036 }
00044 CPKIFEncapsulatedContentInfo::~CPKIFEncapsulatedContentInfo() 
00045 {
00046     delete m_impl;
00047     m_impl = NULL;
00048 }
00065 void CPKIFEncapsulatedContentInfo::SetOID(
00069     CPKIFOIDPtr& oid) 
00070 {
00071     //accept no NULLs
00072     if(oid == (CPKIFOID*)NULL)
00073         throw CPKIFMessageException(TOOLKIT_MESSAGE, COMMON_INVALID_INPUT);
00074 
00075     m_impl->m_oid = oid;
00076 }
00087 CPKIFOIDPtr CPKIFEncapsulatedContentInfo::GetOID() const 
00088 {
00089     return m_impl->m_oid;
00090 }
00105 void CPKIFEncapsulatedContentInfo::SetContent(
00109     CPKIFBufferPtr& buf) 
00110 {
00111     //accept no NULLs
00112     if(buf == (CPKIFBuffer*)NULL)
00113         throw CPKIFMessageException(TOOLKIT_MESSAGE, COMMON_INVALID_INPUT);
00114 
00115     m_impl->m_content = buf;
00116 }
00127 CPKIFBufferPtr CPKIFEncapsulatedContentInfo::GetContent() const 
00128 {
00129     return m_impl->m_content;
00130 }

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