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