Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Named Data Networking Project |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #include "strategy.hpp" |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame] | 8 | #include "forwarder.hpp" |
Steve DiBenedetto | bf6a93d | 2014-03-21 14:03:02 -0600 | [diff] [blame^] | 9 | #include "core/logger.hpp" |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 10 | |
| 11 | namespace nfd { |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame] | 12 | namespace fw { |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 13 | |
Junxiao Shi | 679e927 | 2014-02-15 20:10:21 -0700 | [diff] [blame] | 14 | NFD_LOG_INIT("Strategy"); |
| 15 | |
Junxiao Shi | bb5105f | 2014-03-03 12:06:45 -0700 | [diff] [blame] | 16 | Strategy::Strategy(Forwarder& forwarder, const Name& name) |
| 17 | : m_name(name) |
| 18 | , m_forwarder(forwarder) |
Junxiao Shi | 7bb0151 | 2014-03-05 21:34:09 -0700 | [diff] [blame] | 19 | , m_measurements(m_forwarder.getMeasurements(), |
| 20 | m_forwarder.getStrategyChoice(), this) |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 21 | { |
| 22 | } |
| 23 | |
| 24 | Strategy::~Strategy() |
| 25 | { |
| 26 | } |
| 27 | |
Junxiao Shi | 679e927 | 2014-02-15 20:10:21 -0700 | [diff] [blame] | 28 | void |
Junxiao Shi | 22be22c | 2014-02-16 22:53:48 -0700 | [diff] [blame] | 29 | Strategy::beforeSatisfyPendingInterest(shared_ptr<pit::Entry> pitEntry, |
| 30 | const Face& inFace, const Data& data) |
| 31 | { |
| 32 | NFD_LOG_DEBUG("beforeSatisfyPendingInterest pitEntry=" << pitEntry->getName() << |
| 33 | " inFace=" << inFace.getId() << " data=" << data.getName()); |
| 34 | } |
| 35 | |
| 36 | void |
Junxiao Shi | 679e927 | 2014-02-15 20:10:21 -0700 | [diff] [blame] | 37 | Strategy::beforeExpirePendingInterest(shared_ptr<pit::Entry> pitEntry) |
| 38 | { |
| 39 | NFD_LOG_DEBUG("beforeExpirePendingInterest pitEntry=" << pitEntry->getName()); |
| 40 | } |
| 41 | |
Junxiao Shi | 22be22c | 2014-02-16 22:53:48 -0700 | [diff] [blame] | 42 | //void |
| 43 | //Strategy::afterAddFibEntry(shared_ptr<fib::Entry> fibEntry) |
| 44 | //{ |
| 45 | // NFD_LOG_DEBUG("afterAddFibEntry fibEntry=" << fibEntry->getPrefix()); |
| 46 | //} |
| 47 | // |
| 48 | //void |
| 49 | //Strategy::afterUpdateFibEntry(shared_ptr<fib::Entry> fibEntry) |
| 50 | //{ |
| 51 | // NFD_LOG_DEBUG("afterUpdateFibEntry fibEntry=" << fibEntry->getPrefix()); |
| 52 | //} |
| 53 | // |
| 54 | //void |
| 55 | //Strategy::beforeRemoveFibEntry(shared_ptr<fib::Entry> fibEntry) |
| 56 | //{ |
| 57 | // NFD_LOG_DEBUG("beforeRemoveFibEntry fibEntry=" << fibEntry->getPrefix()); |
| 58 | //} |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 59 | |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame] | 60 | } // namespace fw |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 61 | } // namespace nfd |