make: Global change: Move all public headers to include folder. Change source to including public headers using #include <ndn-cpp/*>. Split some header files to minimize exposing C .h files.
diff --git a/include/ndn-cpp/encoding/element-listener.hpp b/include/ndn-cpp/encoding/element-listener.hpp
new file mode 100644
index 0000000..7d13312
--- /dev/null
+++ b/include/ndn-cpp/encoding/element-listener.hpp
@@ -0,0 +1,48 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_ELEMENT_LISTENER_HPP
+#define NDN_ELEMENT_LISTENER_HPP
+
+#include "../c/encoding/element-listener.h"
+
+namespace ndn {
+
+/**
+ * An ElementListener extends an ndn_ElementListener struct to proved an abstract virtual onReceivedElement function which wraps
+ * the onReceivedElement used by the ndn_ElementListener struct. You must extend this class to override onReceivedElement.
+ */
+class ElementListener : public ndn_ElementListener {
+public:
+ ElementListener()
+ {
+ ndn_ElementListener_initialize(this, staticOnReceivedElement);
+ }
+
+ /**
+ * This is called when an entire binary XML element is received. You must extend this class to override this method.
+ * @param element pointer to the binary XML element. This buffer is only valid during this call. If you need the data
+ * later, you must copy.
+ * @param elementLength length of element
+ */
+ virtual void
+ onReceivedElement(const uint8_t *element, size_t elementLength) = 0;
+
+private:
+ /**
+ * Call the virtual method onReceivedElement. This is used to initialize the base ndn_ElementListener struct.
+ * @param self
+ * @param element
+ * @param elementLength
+ */
+ static void
+ staticOnReceivedElement(struct ndn_ElementListener *self, uint8_t *element, size_t elementLength);
+};
+
+}
+
+#endif