Switch from NDNx to CCNx

Change-Id: Icc2e6dd95d9c4e0ba22b7efb9933c1db7194842e
diff --git a/ndnx/ndnx-closure.cpp b/ndnx/ndnx-closure.cpp
new file mode 100644
index 0000000..1a96582
--- /dev/null
+++ b/ndnx/ndnx-closure.cpp
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include "ndnx-closure.h"
+
+namespace Ndnx {
+
+Closure::Closure(const DataCallback &dataCallback, const TimeoutCallback &timeoutCallback)
+  : m_timeoutCallback (timeoutCallback)
+  , m_dataCallback (dataCallback)
+{
+}
+
+Closure::~Closure ()
+{
+}
+
+void
+Closure::runTimeoutCallback(Name interest, const Closure &closure, Selectors selectors)
+{
+  if (!m_timeoutCallback.empty ())
+    {
+      m_timeoutCallback (interest, closure, selectors);
+    }
+}
+
+
+void
+Closure::runDataCallback(Name name, PcoPtr content)
+{
+  if (!m_dataCallback.empty ())
+    {
+      m_dataCallback (name, content);
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+// ExecutorClosure::ExecutorClosure(const Closure &closure, ExecutorPtr executor)
+//   : Closure(closure.m_dataCallback, closure.m_timeoutCallback)
+//   , m_executor(executor)
+// {
+// }
+
+// ExecutorClosure::~ExecutorClosure()
+// {
+// }
+
+// void
+// ExecutorClosure::runDataCallback(Name name, PcoPtr content)
+// {
+//   m_executor->execute(boost::bind(&Closure::runDataCallback, this, name, content));
+// }
+
+// // void
+// // ExecutorClosure::execute(Name name, PcoPtr content)
+// // {
+// //   Closure::runDataCallback(name, content);
+// // }
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+// ExecutorInterestClosure::ExecutorInterestClosure(const InterestCallback &callback, ExecutorPtr executor)
+//   : m_callback(callback)
+//   , m_executor(executor)
+// {
+// }
+
+// void
+// ExecutorInterestClosure::runInterestCallback(Name interest)
+// {
+//   m_executor->execute(boost::bind(&ExecutorInterestClosure::execute, this, interest));
+// }
+
+// void
+// ExecutorInterestClosure::execute(Name interest)
+// {
+//   if (!m_callback.empty())
+//   {
+//     m_callback(interest);
+//   }
+// }
+
+} // Ndnx