diff --git a/ndn-cpp/Closure.hpp b/ndn-cpp/Closure.hpp
new file mode 100644
index 0000000..99dafdb
--- /dev/null
+++ b/ndn-cpp/Closure.hpp
@@ -0,0 +1,68 @@
+/**
+ * @author: Jeff Thompson
+ * This is a port of py from PyCCN, written by: 
+ * Derek Kulinski <takeda@takeda.tk>
+ * Jeff Burke <jburke@ucla.edu>
+ * 
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_CLOSURE_HPP
+#define	NDN_CLOSURE_HPP
+
+#include "Common.hpp"
+
+namespace ndn {
+
+enum UpcallResult {
+  CLOSURE_RESULT_ERR               = -1, // upcall detected an error
+  CLOSURE_RESULT_OK                =  0, // normal upcall return
+  CLOSURE_RESULT_REEXPRESS         =  1, // reexpress the same interest again
+  CLOSURE_RESULT_INTEREST_CONSUMED =  2, // upcall claims to consume interest
+  CLOSURE_RESULT_VERIFY            =  3, // force an unverified result to be verified
+  CLOSURE_RESULT_FETCHKEY          =  4  // get the key in the key locator and re-call the interest
+};
+
+enum UpcallKind {
+  UPCALL_FINAL              = 0, // handler is about to be deregistered
+  UPCALL_INTEREST           = 1, // incoming interest
+  UPCALL_CONSUMED_INTEREST  = 2, // incoming interest, someone has answered
+  UPCALL_CONTENT            = 3, // incoming verified content
+  UPCALL_INTEREST_TIMED_OUT = 4, // interest timed out
+  UPCALL_CONTENT_UNVERIFIED = 5, // content that has not been verified
+  UPCALL_CONTENT_BAD        = 6  // verification failed  
+};
+
+class NDN;
+class Interest;
+class ContentObject;
+
+class UpcallInfo {
+public:
+  UpcallInfo(NDN *ndn, ptr_lib::shared_ptr<Interest> interest, int matchedComps, ptr_lib::shared_ptr<ContentObject> contentObject) 
+  {
+    ndn_ = ndn;
+    interest_ = interest;
+    contentObject_ = contentObject;
+  }
+  
+  NDN *getNDN() { return ndn_; }
+  
+  ptr_lib::shared_ptr<Interest> getInterest() { return interest_; }
+  
+  ptr_lib::shared_ptr<ContentObject> getContentObject() { return contentObject_; }
+  
+private:
+  NDN *ndn_;
+  ptr_lib::shared_ptr<Interest> interest_;
+  ptr_lib::shared_ptr<ContentObject> contentObject_;
+};
+
+class Closure {
+public:
+  virtual UpcallResult upcall(UpcallKind kind, UpcallInfo &upcallInfo) = 0;
+};
+
+}
+
+#endif
diff --git a/ndn-cpp/NDN.cpp b/ndn-cpp/NDN.cpp
index ba47698..cd1dbe6 100644
--- a/ndn-cpp/NDN.cpp
+++ b/ndn-cpp/NDN.cpp
@@ -8,6 +8,8 @@
 #include "ContentObject.hpp"
 #include "NDN.hpp"
 
+using namespace std;
+
 namespace ndn {
 
 void NDN::onReceivedElement(unsigned char *element, unsigned int elementLength)
@@ -15,15 +17,11 @@
   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
+    ptr_lib::shared_ptr<ContentObject> contentObject(new ContentObject());
+    contentObject->decode(element, elementLength);
+    
+    UpcallInfo upcallInfo(this, ptr_lib::shared_ptr<Interest>(), 0, contentObject);
+    closure_->upcall(UPCALL_CONTENT, upcallInfo);
   }
 }
 
diff --git a/ndn-cpp/NDN.hpp b/ndn-cpp/NDN.hpp
index a89918b..9c8c691 100644
--- a/ndn-cpp/NDN.hpp
+++ b/ndn-cpp/NDN.hpp
@@ -6,13 +6,22 @@
 #ifndef NDN_NDN_HPP
 #define	NDN_NDN_HPP
 
+#include "Closure.hpp"
 #include "encoding/BinaryXMLElementReader.hpp"
 
 namespace ndn {
 
 class NDN : public ElementListener {
 public:
+  NDN(Closure *closure)
+  {
+    closure_ = closure;
+  }
+  
   virtual void onReceivedElement(unsigned char *element, unsigned int elementLength);
+  
+private:
+  Closure *closure_;
 };
 
 }
