NameBasedSearch.cpp

Go to the documentation of this file.
00001 
00010 #include "NameBasedSearch.h"
00011 #include "ToolkitUtils.h"
00012 #include "components.h"
00013 
00014 #include "Name.h"
00015 
00017 struct CPKIFNameBasedSearchImpl
00018 {
00019     SearchType m_searchType;
00020     CPKIFNamePtr m_name;
00021     char* m_strName;
00022 };
00024 
00032 CPKIFNameBasedSearch::CPKIFNameBasedSearch()
00033     :m_impl (new CPKIFNameBasedSearchImpl)
00034 {
00035     LOG_STRING_DEBUG("CPKIFNameBasedSearch::CPKIFNameBasedSearch()", TOOLKIT_SR_MISC, 0, this);
00036 
00037     m_impl->m_searchType = SUBJECTNAME;
00038     m_impl->m_strName = NULL;
00039 }
00047 CPKIFNameBasedSearch::~CPKIFNameBasedSearch()
00048 {
00049     LOG_STRING_DEBUG("CPKIFNameBasedSearch::~CPKIFNameBasedSearch()", TOOLKIT_SR_MISC, 0, this);
00050 
00051     delete m_impl;
00052     m_impl = NULL;
00053 }
00061 SearchType CPKIFNameBasedSearch::GetSearchType() const
00062 {
00063     return m_impl->m_searchType;
00064 }
00072 void CPKIFNameBasedSearch::SetSearchType(
00074     SearchType st)
00075 {
00076     m_impl->m_searchType = st;
00077 }
00085 CPKIFNamePtr CPKIFNameBasedSearch::GetName() const
00086 {
00087     return m_impl->m_name;
00088 }
00096 void CPKIFNameBasedSearch::SetName(
00098     CPKIFNamePtr& name)
00099 {
00100     m_impl->m_name = name;
00101 }
00109 void CPKIFNameBasedSearch::SetStringName(
00111     char* s)
00112 {
00113     //modified 4/21/2004
00114     m_impl->m_name = GetPKIFNameFromStr((unsigned char*)s);
00115     //m_strName = s;
00116 }
00127 const char* CPKIFNameBasedSearch::GetStringName() const
00128 {
00129     //return m_strName;
00130     if(m_impl->m_name != (CPKIFName*)NULL)
00131         return m_impl->m_name->ToString();
00132     else
00133         return NULL;
00134 }
00135 

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