model: Major API changes
Interest and ContentObject are no longer derived from Header class.
Instead, they are encapsulating payload and, optionally, wire-formatted
Packet object.
Refs #1005 (http://redmine.named-data.net/)
diff --git a/model/cs/ndn-content-store.cc b/model/cs/ndn-content-store.cc
index c99d7ed..cfe362e 100644
--- a/model/cs/ndn-content-store.cc
+++ b/model/cs/ndn-content-store.cc
@@ -34,7 +34,7 @@
NS_OBJECT_ENSURE_REGISTERED (ContentStore);
-TypeId
+TypeId
ContentStore::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::ndn::ContentStore")
@@ -60,24 +60,12 @@
//////////////////////////////////////////////////////////////////////
-Entry::Entry (Ptr<ContentStore> cs, Ptr<const ContentObject> header, Ptr<const Packet> packet)
+Entry::Entry (Ptr<ContentStore> cs, Ptr<const ContentObject> data)
: m_cs (cs)
- , m_header (header)
- , m_packet (packet->Copy ())
+ , m_data (data)
{
}
-Ptr<Packet>
-Entry::GetFullyFormedNdnPacket () const
-{
- static ContentObjectTail tail; ///< \internal for optimization purposes
-
- Ptr<Packet> packet = m_packet->Copy ();
- packet->AddHeader (*m_header);
- packet->AddTrailer (tail);
- return packet;
-}
-
const Name&
Entry::GetName () const
{
@@ -85,15 +73,9 @@
}
Ptr<const ContentObject>
-Entry::GetHeader () const
+Entry::GetData () const
{
- return m_header;
-}
-
-Ptr<const Packet>
-Entry::GetPacket () const
-{
- return m_packet;
+ return m_data;
}
Ptr<ContentStore>