Add getContact method of ContactManager, add supporting methods in ContactStorage
diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index 9b7d7a3..af094a7 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -171,6 +171,20 @@
return result;
}
+Ptr<ContactItem>
+ContactManager::getContact(const ndn::Name& contactNamespace)
+{
+ Ptr<ContactItem> contactItem = m_contactStorage->getNormalContact(contactNamespace);
+ if(NULL != contactItem)
+ return contactItem;
+
+ contactItem = m_contactStorage->getTrustedContact(contactNamespace);
+ if(NULL != contactItem)
+ return contactItem;
+
+ return NULL;
+}
+
Ptr<EndorseCertificate>
ContactManager::getSignedSelfEndorseCertificate(const Name& identity,
const Profile& profile)