model: A basic implementation of ndn::ApiFace that can be used as an NDN handler in any "normal" NS-3 application
Refs #1005 (http://redmine.named-data.net/)
diff --git a/examples/custom-apps/ndn-api-app.h b/examples/custom-apps/ndn-api-app.h
index 4e9e487..7709b80 100644
--- a/examples/custom-apps/ndn-api-app.h
+++ b/examples/custom-apps/ndn-api-app.h
@@ -25,7 +25,7 @@
#include "ns3/network-module.h"
#include "ns3/ndnSIM-module.h"
-// #include "ns3/ndnSIM/ndn.cxx/ndn-handler.h"
+#include "ns3/ndnSIM/ndn.cxx/ndn-api-face.h"
namespace ns3 {
namespace ndn {
@@ -41,6 +41,9 @@
private:
void
RequestData ();
+
+ void
+ GotData (Ptr<const Interest> origInterest, Ptr<const ContentObject> data);
protected:
// inherited from Application base class.
@@ -49,9 +52,12 @@
virtual void
StopApplication ();
-
+
private:
- // Ptr<Handler> m_handler;
+ Ptr<ApiFace> m_face;
+
+ Name m_name;
+ Time m_interestLifetime;
};
} // namespace ndn