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