Alexander Afanasyev | 8ade0be | 2013-06-04 10:06:06 -0700 | [diff] [blame] | 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2011,2012 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: Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| 19 | * Ilya Moiseenko <iliamo@cs.ucla.edu> |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | #include "content-store-nocache.h" |
| 24 | #include "ns3/log.h" |
| 25 | #include "ns3/packet.h" |
| 26 | #include "ns3/ndn-name.h" |
| 27 | #include "ns3/ndn-interest.h" |
| 28 | #include "ns3/ndn-content-object.h" |
| 29 | |
| 30 | NS_LOG_COMPONENT_DEFINE ("ndn.cs.Nocache"); |
| 31 | |
| 32 | namespace ns3 { |
| 33 | namespace ndn { |
| 34 | namespace cs { |
| 35 | |
| 36 | NS_OBJECT_ENSURE_REGISTERED (Nocache); |
| 37 | |
| 38 | TypeId |
| 39 | Nocache::GetTypeId (void) |
| 40 | { |
| 41 | static TypeId tid = TypeId ("ns3::ndn::cs::Nocache") |
| 42 | .SetGroupName ("Ndn") |
| 43 | .SetParent<ContentStore> () |
| 44 | .AddConstructor< Nocache > () |
| 45 | ; |
| 46 | |
| 47 | return tid; |
| 48 | } |
| 49 | |
| 50 | Nocache::Nocache () |
| 51 | { |
| 52 | } |
| 53 | |
| 54 | Nocache::~Nocache () |
| 55 | { |
| 56 | } |
| 57 | |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 58 | Ptr<ContentObject> |
Alexander Afanasyev | 8ade0be | 2013-06-04 10:06:06 -0700 | [diff] [blame] | 59 | Nocache::Lookup (Ptr<const Interest> interest) |
| 60 | { |
| 61 | this->m_cacheMissesTrace (interest); |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 62 | return 0; |
Alexander Afanasyev | 8ade0be | 2013-06-04 10:06:06 -0700 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | bool |
Alexander Afanasyev | b989b12 | 2013-07-10 17:15:46 -0700 | [diff] [blame] | 66 | Nocache::Add (Ptr<const ContentObject> data) |
Alexander Afanasyev | 8ade0be | 2013-06-04 10:06:06 -0700 | [diff] [blame] | 67 | { |
| 68 | return false; |
| 69 | } |
| 70 | |
| 71 | void |
| 72 | Nocache::Print (std::ostream &os) const |
| 73 | { |
| 74 | } |
| 75 | |
| 76 | uint32_t |
| 77 | Nocache::GetSize () const |
| 78 | { |
| 79 | return 0; |
| 80 | } |
| 81 | |
| 82 | Ptr<cs::Entry> |
| 83 | Nocache::Begin () |
| 84 | { |
| 85 | return 0; |
| 86 | } |
| 87 | |
| 88 | Ptr<cs::Entry> |
| 89 | Nocache::End () |
| 90 | { |
| 91 | return 0; |
| 92 | } |
| 93 | |
| 94 | Ptr<cs::Entry> |
| 95 | Nocache::Next (Ptr<cs::Entry>) |
| 96 | { |
| 97 | return 0; |
| 98 | } |
| 99 | |
| 100 | } // namespace cs |
| 101 | } // namespace ndn |
| 102 | } // namespace ns3 |