00001 00010 #include "IssuerNameAndSerialNumberBasedSearch.h" 00011 #include "ToolkitUtils.h" 00012 #include "components.h" 00013 #include "Name.h" 00014 00016 struct CPKIFIssuerNameAndSerialNumberBasedSearchImpl 00017 { 00018 CPKIFNamePtr m_issuerName; 00019 CPKIFStringPtr m_serialNumber; 00020 }; 00022 00030 CPKIFIssuerNameAndSerialNumberBasedSearch::CPKIFIssuerNameAndSerialNumberBasedSearch() 00031 :m_impl (new CPKIFIssuerNameAndSerialNumberBasedSearchImpl) 00032 { 00033 LOG_STRING_DEBUG("CPKIFIssuerNameAndSerialNumberBasedSearch::CPKIFIssuerNameAndSerialNumberBasedSearch()", TOOLKIT_SR_MISC, 0, this); 00034 } 00042 CPKIFIssuerNameAndSerialNumberBasedSearch::~CPKIFIssuerNameAndSerialNumberBasedSearch() 00043 { 00044 LOG_STRING_DEBUG("CPKIFIssuerNameAndSerialNumberBasedSearch::~CPKIFIssuerNameAndSerialNumberBasedSearch()", TOOLKIT_SR_MISC, 0, this); 00045 00046 delete m_impl; 00047 m_impl = NULL; 00048 } 00049 00050 //IPKIFSearchCriteria functions 00058 SearchType CPKIFIssuerNameAndSerialNumberBasedSearch::GetSearchType() const 00059 { 00060 return ISSUERSERIAL; 00061 } 00062 00063 //misc. functions 00071 CPKIFNamePtr CPKIFIssuerNameAndSerialNumberBasedSearch::GetIssuerName() const 00072 { 00073 return m_impl->m_issuerName; 00074 } 00082 void CPKIFIssuerNameAndSerialNumberBasedSearch::SetIssuerName( 00084 CPKIFNamePtr& issuerName) 00085 { 00086 m_impl->m_issuerName = issuerName; 00087 } 00095 const char* CPKIFIssuerNameAndSerialNumberBasedSearch::GetSerialNumber() const 00096 { 00097 if(m_impl->m_serialNumber != (std::string*)NULL) 00098 return m_impl->m_serialNumber->c_str(); 00099 else 00100 return NULL; 00101 } 00109 void CPKIFIssuerNameAndSerialNumberBasedSearch::SetSerialNumber( 00111 CPKIFStringPtr& serialNumber) 00112 { 00113 m_impl->m_serialNumber = serialNumber; 00114 }