Added initial NDN class
diff --git a/ndn-cpp/NDN.cpp b/ndn-cpp/NDN.cpp
new file mode 100644
index 0000000..ba47698
--- /dev/null
+++ b/ndn-cpp/NDN.cpp
@@ -0,0 +1,30 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "encoding/BinaryXMLDecoder.hpp"
+#include "c/encoding/BinaryXML.h"
+#include "ContentObject.hpp"
+#include "NDN.hpp"
+
+namespace ndn {
+
+void NDN::onReceivedElement(unsigned char *element, unsigned int elementLength)
+{
+ BinaryXMLDecoder decoder(element, elementLength);
+
+ if (decoder.peekDTag(ndn_BinaryXML_DTag_ContentObject)) {
+ ContentObject contentObject;
+ contentObject.decode(element, elementLength);
+
+#if 0
+ cout << "Got content with name " << contentObject.getName().to_uri() << endl;
+ for (unsigned int i = 0; i < contentObject.getContent().size(); ++i)
+ cout << contentObject.getContent()[i];
+ cout << endl;
+#endif
+ }
+}
+
+}
diff --git a/ndn-cpp/NDN.hpp b/ndn-cpp/NDN.hpp
new file mode 100644
index 0000000..a89918b
--- /dev/null
+++ b/ndn-cpp/NDN.hpp
@@ -0,0 +1,20 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_NDN_HPP
+#define NDN_NDN_HPP
+
+#include "encoding/BinaryXMLElementReader.hpp"
+
+namespace ndn {
+
+class NDN : public ElementListener {
+public:
+ virtual void onReceivedElement(unsigned char *element, unsigned int elementLength);
+};
+
+}
+
+#endif