File name format change and Removed warning messages (Except warning from boost for Logging)
Change-Id: If3a3a5411d377d925527fc3e8809c228a9a81e26
diff --git a/src/security/waiting-list-entry.cpp b/src/security/waiting-list-entry.cpp
new file mode 100644
index 0000000..1172698
--- /dev/null
+++ b/src/security/waiting-list-entry.cpp
@@ -0,0 +1,41 @@
+#include <iostream>
+#include <list>
+#include <ndn-cpp-dev/face.hpp>
+#include "waiting-list-entry.hpp"
+
+namespace nlsr {
+static bool
+waiteeCompare(std::string& w1, std::string& w2)
+{
+ return w1 == w2 ;
+}
+
+bool
+WaitingListEntry::addWaitee(std::string waiteeName)
+{
+ std::list<std::string>::iterator it = std::find_if(m_waitingCerts.begin(),
+ m_waitingCerts.end(), ndn::bind(&waiteeCompare, _1, waiteeName));
+ if (it == m_waitingCerts.end())
+ {
+ m_waitingCerts.push_back(waiteeName);
+ return true;
+ }
+
+ return false;
+}
+
+std::ostream&
+operator<<(std::ostream& os, const WaitingListEntry& we)
+{
+ os << "-------------Wiating List Entry-------------" << std::endl;
+ os << "Responsible Certificate: " << we.getResponsibleCert() << std::endl;
+ std::list<std::string> waitee = we.getWaitingCerts();
+ int i = 1;
+ for (std::list<std::string>::iterator it = waitee.begin();
+ it != waitee.end(); ++i, ++it)
+ {
+ os << "Waite " << i << ": " << *(it) << std::endl;
+ }
+ return os;
+}
+}//namespace nlsr