Alexander Afanasyev | 8a677dd | 2011-08-12 13:08:15 -0700 | [diff] [blame^] | 1 | /* -*- 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 | |
| 21 | |
| 22 | #include "content-object-header.h" |
| 23 | |
| 24 | namespace ns3 |
| 25 | { |
| 26 | namespace NDNabstraction |
| 27 | { |
| 28 | |
| 29 | ContentObjectHeader::ContentObjectHeader () |
| 30 | { |
| 31 | } |
| 32 | |
| 33 | void |
| 34 | ContentObjectHeader::SetName (const Ptr<Name::Components> &name) |
| 35 | { |
| 36 | m_name = name; |
| 37 | } |
| 38 | |
| 39 | const Name::Components& |
| 40 | ContentObjectHeader::GetName () const |
| 41 | { |
| 42 | return *m_name; |
| 43 | } |
| 44 | |
| 45 | uint32_t |
| 46 | ContentObjectHeader::GetSerializedSize (void) const |
| 47 | { |
| 48 | return 0; |
| 49 | } |
| 50 | |
| 51 | void |
| 52 | ContentObjectHeader::Serialize (Buffer::Iterator start) const |
| 53 | { |
| 54 | return; |
| 55 | } |
| 56 | |
| 57 | uint32_t |
| 58 | ContentObjectHeader::Deserialize (Buffer::Iterator start) |
| 59 | { |
| 60 | return 0; |
| 61 | } |
| 62 | |
| 63 | TypeId |
| 64 | ContentObjectHeader::GetTypeId (void) |
| 65 | { |
| 66 | static TypeId tid = TypeId ("ns3::NDNabstraction::ContentObjectHeader") |
| 67 | .SetParent<Header> () |
| 68 | .AddConstructor<ContentObjectHeader> () |
| 69 | ; |
| 70 | return tid; |
| 71 | } |
| 72 | |
| 73 | TypeId |
| 74 | ContentObjectHeader::GetInstanceTypeId (void) const |
| 75 | { |
| 76 | return GetTypeId (); |
| 77 | } |
| 78 | |
| 79 | void |
| 80 | ContentObjectHeader::Print (std::ostream &os) const |
| 81 | { |
| 82 | os << "ContentObject: " << *m_name; |
| 83 | } |
| 84 | } |
| 85 | } |