Switch from NDNx to CCNx

Change-Id: Icc2e6dd95d9c4e0ba22b7efb9933c1db7194842e
diff --git a/disabled/ccnx-tunnel.cpp b/disabled/ndnx-tunnel.cpp
similarity index 77%
rename from disabled/ccnx-tunnel.cpp
rename to disabled/ndnx-tunnel.cpp
index def125a..0984d26 100644
--- a/disabled/ccnx-tunnel.cpp
+++ b/disabled/ndnx-tunnel.cpp
@@ -19,41 +19,41 @@
  *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
-#include "ccnx-tunnel.h"
-#include "ccnx-pco.h"
+#include "ndnx-tunnel.h"
+#include "ndnx-pco.h"
 
-namespace Ccnx
+namespace Ndnx
 {
 
-CcnxTunnel::CcnxTunnel()
-  : CcnxWrapper()
+NdnxTunnel::NdnxTunnel()
+  : NdnxWrapper()
   , m_localPrefix("/")
 {
   refreshLocalPrefix();
 }
 
-CcnxTunnel::~CcnxTunnel()
+NdnxTunnel::~NdnxTunnel()
 {
 }
 
 void
-CcnxTunnel::refreshLocalPrefix()
+NdnxTunnel::refreshLocalPrefix()
 {
   Name newPrefix = getLocalPrefix();
   if (!newPrefix.toString().empty() && m_localPrefix != newPrefix)
   {
-    CcnxWrapper::clearInterestFilter(m_localPrefix);
-    CcnxWrapper::setInterestFilter(newPrefix, bind(&CcnxTunnel::handleTunneledInterest, this, _1));
+    NdnxWrapper::clearInterestFilter(m_localPrefix);
+    NdnxWrapper::setInterestFilter(newPrefix, bind(&NdnxTunnel::handleTunneledInterest, this, _1));
     m_localPrefix = newPrefix;
   }
 }
 
 int
-CcnxTunnel::sendInterest (const Name &interest, const Closure &closure, const Selectors &selectors)
+NdnxTunnel::sendInterest (const Name &interest, const Closure &closure, const Selectors &selectors)
 {
   Name tunneledInterest = queryRoutableName(interest);
 
-  CcnxWrapper::sendInterest(tunneledInterest,
+  NdnxWrapper::sendInterest(tunneledInterest,
                             TunnelClosure(closure, *this, interest),
                             selectors);
 
@@ -61,14 +61,14 @@
 }
 
 void
-CcnxTunnel::handleTunneledData(const Name &name, const Bytes &tunneledData, const Closure::DataCallback &originalDataCallback)
+NdnxTunnel::handleTunneledData(const Name &name, const Bytes &tunneledData, const Closure::DataCallback &originalDataCallback)
 {
   ParsedContentObject pco(tunneledData);
   originalDataCallback(pco.name(), pco.content());
 }
 
 int
-CcnxTunnel::publishData(const Name &name, const unsigned char *buf, size_t len, int freshness)
+NdnxTunnel::publishData(const Name &name, const unsigned char *buf, size_t len, int freshness)
 {
   Bytes content = createContentObject(name, buf, len, freshness);
   storeContentObject(name, content);
@@ -77,17 +77,17 @@
 }
 
 int
-CcnxTunnel::publishContentObject(const Name &name, const Bytes &contentObject, int freshness)
+NdnxTunnel::publishContentObject(const Name &name, const Bytes &contentObject, int freshness)
 {
   Name tunneledName = m_localPrefix + name;
   Bytes tunneledCo = createContentObject(tunneledName, head(contentObject), contentObject.size(), freshness);
-  return putToCcnd(tunneledCo);
+  return putToNdnd(tunneledCo);
 }
 
 void
-CcnxTunnel::handleTunneledInterest(const Name &tunneledInterest)
+NdnxTunnel::handleTunneledInterest(const Name &tunneledInterest)
 {
-  // The interest must have m_localPrefix as a prefix (component-wise), otherwise ccnd would not deliver it to us
+  // The interest must have m_localPrefix as a prefix (component-wise), otherwise ndnd would not deliver it to us
   Name interest = tunneledInterest.getPartialName(m_localPrefix.size());
 
   ReadLock lock(m_ritLock);
@@ -104,7 +104,7 @@
 }
 
 bool
-CcnxTunnel::isPrefix(const Name &prefix, const Name &name)
+NdnxTunnel::isPrefix(const Name &prefix, const Name &name)
 {
   if (prefix.size() > name.size())
   {
@@ -124,7 +124,7 @@
 }
 
 int
-CcnxTunnel::setInterestFilter(const Name &prefix, const InterestCallback &interestCallback)
+NdnxTunnel::setInterestFilter(const Name &prefix, const InterestCallback &interestCallback)
 {
   WriteLock lock(m_ritLock);
   // make sure copy constructor for boost::function works properly
@@ -133,14 +133,14 @@
 }
 
 void
-CcnxTunnel::clearInterestFilter(const Name &prefix)
+NdnxTunnel::clearInterestFilter(const Name &prefix)
 {
   WriteLock lock(m_ritLock);
   // remove all
   m_rit.erase(prefix);
 }
 
-TunnelClosure::TunnelClosure(const DataCallback &dataCallback, CcnxTunnel &tunnel,
+TunnelClosure::TunnelClosure(const DataCallback &dataCallback, NdnxTunnel &tunnel,
                              const Name &originalInterest, const TimeoutCallback &timeoutCallback)
   : Closure(dataCallback, timeoutCallback)
   , m_tunnel(tunnel)
@@ -148,7 +148,7 @@
 {
 }
 
-TunnelClosure::TunnelClosure(const Closure &closure, CcnxTunnel &tunnel, const Name &originalInterest)
+TunnelClosure::TunnelClosure(const Closure &closure, NdnxTunnel &tunnel, const Name &originalInterest)
   : Closure(closure)
   , m_tunnel(tunnel)
 {
@@ -172,4 +172,4 @@
   return Closure::runTimeoutCallback(m_originalInterest);
 }
 
-} // Ccnx
+} // Ndnx
diff --git a/disabled/ccnx-tunnel.h b/disabled/ndnx-tunnel.h
similarity index 88%
rename from disabled/ccnx-tunnel.h
rename to disabled/ndnx-tunnel.h
index 01dbf5e..1722eb1 100644
--- a/disabled/ccnx-tunnel.h
+++ b/disabled/ndnx-tunnel.h
@@ -19,10 +19,10 @@
  *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
-#ifndef CCNX_TUNNEL_H
-#define CCNX_TUNNEL_H
+#ifndef NDNX_TUNNEL_H
+#define NDNX_TUNNEL_H
 
-#include "ccnx-wrapper.h"
+#include "ndnx-wrapper.h"
 
 #define _OVERRIDE
 #ifdef __GNUC__
@@ -32,20 +32,20 @@
 #endif // __GNUC__ version
 #endif // __GNUC__
 
-// Eventually, Sync::CcnxWrapper should be moved to this namespace.
+// Eventually, Sync::NdnxWrapper should be moved to this namespace.
 // It has nothing to do with Sync.
-namespace Ccnx
+namespace Ndnx
 {
 
-class CcnxTunnel : public CcnxWrapper
+class NdnxTunnel : public NdnxWrapper
 {
 public:
   typedef std::multimap<Name, InterestCallback> RegisteredInterestTable;
   typedef std::multimap<Name, InterestCallback>::iterator RitIter;
 
 
-  CcnxTunnel();
-  virtual ~CcnxTunnel();
+  NdnxTunnel();
+  virtual ~NdnxTunnel();
 
   // name is topology-independent
   virtual int
@@ -91,7 +91,7 @@
   handleTunneledData(const Name &name, const Bytes &tunneledData, const Closure::DataCallback &originalDataCallback);
 
 private:
-  CcnxTunnel(const CcnxTunnel &other) {}
+  NdnxTunnel(const NdnxTunnel &other) {}
 
 protected:
   // need a way to update local prefix, perhaps using macports trick, but eventually we need something more portable
@@ -103,10 +103,10 @@
 class TunnelClosure : public Closure
 {
 public:
-  TunnelClosure(const DataCallback &dataCallback, CcnxTunnel &tunnel,
+  TunnelClosure(const DataCallback &dataCallback, NdnxTunnel &tunnel,
                 const Name &originalInterest, const TimeoutCallback &timeoutCallback = TimeoutCallback());
 
-  TunnelClosure(const Closure &closure, CcnxTunnel &tunnel, const Name &originalInterest);
+  TunnelClosure(const Closure &closure, NdnxTunnel &tunnel, const Name &originalInterest);
 
   virtual void
   runDataCallback(const Name &name, const Bytes &content) _OVERRIDE;
@@ -118,7 +118,7 @@
   dup() const;
 
 private:
-  CcnxTunnel &m_tunnel;
+  NdnxTunnel &m_tunnel;
   Name m_originalInterest;
 };
 
diff --git a/disabled/test-ccnx-tunnel.cc b/disabled/test-ndnx-tunnel.cc
similarity index 80%
rename from disabled/test-ccnx-tunnel.cc
rename to disabled/test-ndnx-tunnel.cc
index 724d6e5..baa3ec7 100644
--- a/disabled/test-ccnx-tunnel.cc
+++ b/disabled/test-ndnx-tunnel.cc
@@ -1,19 +1,19 @@
-#include "ccnx-tunnel.h"
-#include "ccnx-closure.h"
-#include "ccnx-name.h"
-#include "ccnx-pco.h"
+#include "ndnx-tunnel.h"
+#include "ndnx-closure.h"
+#include "ndnx-name.h"
+#include "ndnx-pco.h"
 #include <unistd.h>
 
 #include <boost/test/unit_test.hpp>
 
 
-using namespace Ccnx;
+using namespace Ndnx;
 using namespace std;
 using namespace boost;
 
-BOOST_AUTO_TEST_SUITE(CcnxTunnelTests)
+BOOST_AUTO_TEST_SUITE(NdnxTunnelTests)
 
-class DummyTunnel : public CcnxTunnel
+class DummyTunnel : public NdnxTunnel
 {
 public:
   DummyTunnel();
@@ -27,7 +27,7 @@
 
 };
 
-DummyTunnel::DummyTunnel() : CcnxTunnel()
+DummyTunnel::DummyTunnel() : NdnxTunnel()
 {
   m_localPrefix = Name("/local");
 }
@@ -35,7 +35,7 @@
 void
 DummyTunnel::overridePrefix()
 {
-  CcnxWrapper::setInterestFilter(m_localPrefix, bind(&DummyTunnel::handleTunneledInterest, this, _1));
+  NdnxWrapper::setInterestFilter(m_localPrefix, bind(&DummyTunnel::handleTunneledInterest, this, _1));
 }
 
 Name
@@ -44,9 +44,9 @@
   return Name("/local") + name;
 }
 
-CcnxWrapperPtr t1(new DummyTunnel());
-CcnxWrapperPtr t2(new DummyTunnel());
-CcnxWrapperPtr c1(new CcnxWrapper());
+NdnxWrapperPtr t1(new DummyTunnel());
+NdnxWrapperPtr t2(new DummyTunnel());
+NdnxWrapperPtr c1(new NdnxWrapper());
 
 DummyTunnel t3;
 
@@ -74,7 +74,7 @@
   g_ic++;
 }
 
-BOOST_AUTO_TEST_CASE (CcnxTunnelTest)
+BOOST_AUTO_TEST_CASE (NdnxTunnelTest)
 {
   // test publish
   string inner = "/hello";
@@ -94,7 +94,7 @@
   BOOST_CHECK_EQUAL(g_dc_i, 1);
 }
 
-BOOST_AUTO_TEST_CASE (CcnxTunnelRegister)
+BOOST_AUTO_TEST_CASE (NdnxTunnelRegister)
 {
 
   g_ic = 0;