PKIFLocalCrlNode.cpp

Go to the documentation of this file.
00001 
00010 #include "PKIFLocalCrlNode.h"
00011 
00012 #include "Certificate.h"
00013 #include "GottaMatch.h"
00014 #include "LDAP_URL_Header.h"
00015 #include "Name.h"
00016 #include "PKIFLDAPRepository.h"
00017 #include "PKIFCRLNodeEntry.h"
00018 
00019 using namespace std;
00020 
00022 struct CPKIFLocalCrlNodeImpl
00023 {
00024     CPKIFCRLNodeList m_crls;
00025 };
00027 
00034 CPKIFLocalCrlNode::CPKIFLocalCrlNode() 
00035     : m_impl(new CPKIFLocalCrlNodeImpl)
00036 {
00037 }
00045 CPKIFLocalCrlNode::~CPKIFLocalCrlNode()
00046 {
00047     if(m_impl) delete m_impl;
00048 }
00056 void CPKIFLocalCrlNode::GetCrls(
00058     CPKIFCRLNodeList& crlNodeList)
00059 {
00060     CPKIFCRLNodeList::iterator pos;
00061     CPKIFCRLNodeList::iterator end = m_impl->m_crls.end();
00062     for(pos = m_impl->m_crls.begin(); pos != end; ++pos)
00063     {
00064         GottaMatch<CPKIFCRLNodeEntryPtr> gm;
00065         gm.SetRHS(*pos);
00066         if(crlNodeList.end() == find_if(crlNodeList.begin(), crlNodeList.end(), gm))
00067             crlNodeList.push_back(*pos);
00068     }
00069 }
00077 void CPKIFLocalCrlNode::AddCrl(
00079     CPKIFCRLNodeEntryPtr& crl)
00080 {
00081     GottaMatch<CPKIFCRLNodeEntryPtr> gm;
00082     gm.SetRHS(crl);
00083     if(m_impl->m_crls.end() == find_if(m_impl->m_crls.begin(), m_impl->m_crls.end(), gm))
00084         m_impl->m_crls.push_back(crl);
00085 }

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