00001 00009 #include "PKIFCRLNodeEntry.h" 00010 #include "CRL.h" 00011 00013 struct CPKIFCRLNodeEntryImpl 00014 { 00015 CPKIFCRLPtr m_crl; 00016 }; 00018 00026 CPKIFCRLNodeEntry::CPKIFCRLNodeEntry() : m_impl(new CPKIFCRLNodeEntryImpl) 00027 { 00028 } 00029 00037 CPKIFCRLNodeEntry::CPKIFCRLNodeEntry(CPKIFCRLPtr& crl) : m_impl(new CPKIFCRLNodeEntryImpl) 00038 { 00039 SetCRL(crl); 00040 } 00041 00049 CPKIFCRLNodeEntry::~CPKIFCRLNodeEntry(void) 00050 { 00051 if(m_impl) delete m_impl; 00052 } 00053 00063 CPKIFCRLPtr CPKIFCRLNodeEntry::GetCRL()const 00064 { 00065 return m_impl->m_crl; 00066 } 00067 00076 void CPKIFCRLNodeEntry::SetCRL(const CPKIFCRLPtr& crl) 00077 { 00078 m_impl->m_crl = crl; 00079 SetState(PAS_AVAILABLE); 00080 } 00081 00092 bool CPKIFCRLNodeEntry::operator==(const CPKIFCRLNodeEntry& rhs) 00093 { 00094 if(m_impl->m_crl != (CPKIFCRL*)NULL && rhs.m_impl->m_crl != (CPKIFCRL*)NULL) 00095 return *m_impl->m_crl == *rhs.m_impl->m_crl; 00096 else if(m_impl->m_crl == (CPKIFCRL*)NULL && rhs.m_impl->m_crl == (CPKIFCRL*)NULL) 00097 return true; 00098 else 00099 return false; 00100 } 00101 00112 bool CPKIFCRLNodeEntry::operator==(const CPKIFCRLPtr& rhs) 00113 { 00114 if(m_impl->m_crl != (CPKIFCRL*)NULL && rhs != (CPKIFCRL*)NULL) 00115 return *m_impl->m_crl == *rhs; 00116 else if(m_impl->m_crl == (CPKIFCRL*)NULL && rhs == (CPKIFCRL*)NULL) 00117 return true; 00118 else 00119 return false; 00120 }