blob: 4399afd838b9772da438f8b0e00962317ab1abf3 [file] [log] [blame]
Alexander Afanasyev8a677dd2011-08-12 13:08:15 -07001/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2011 University of California, Los Angeles
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Ilya Moiseenko <iliamo@cs.ucla.edu>
19 */
20
Alexander Afanasyev8a677dd2011-08-12 13:08:15 -070021#include "content-object-header.h"
22
23namespace ns3
24{
25namespace NDNabstraction
26{
27
28 ContentObjectHeader::ContentObjectHeader ()
29 {
30 }
31
32 void
33 ContentObjectHeader::SetName (const Ptr<Name::Components> &name)
34 {
35 m_name = name;
36 }
37
38 const Name::Components&
39 ContentObjectHeader::GetName () const
40 {
41 return *m_name;
42 }
43
44 uint32_t
45 ContentObjectHeader::GetSerializedSize (void) const
46 {
47 return 0;
48 }
49
50 void
51 ContentObjectHeader::Serialize (Buffer::Iterator start) const
52 {
53 return;
54 }
55
56 uint32_t
57 ContentObjectHeader::Deserialize (Buffer::Iterator start)
58 {
59 return 0;
60 }
61
62 TypeId
63 ContentObjectHeader::GetTypeId (void)
64 {
65 static TypeId tid = TypeId ("ns3::NDNabstraction::ContentObjectHeader")
66 .SetParent<Header> ()
67 .AddConstructor<ContentObjectHeader> ()
68 ;
69 return tid;
70 }
71
72 TypeId
73 ContentObjectHeader::GetInstanceTypeId (void) const
74 {
75 return GetTypeId ();
76 }
77
78 void
79 ContentObjectHeader::Print (std::ostream &os) const
80 {
81 os << "ContentObject: " << *m_name;
82 }
83}
84}