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" |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 9 | |
| 10 | namespace nfd { |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame] | 11 | namespace fw { |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 12 | |
Junxiao Shi | 679e927 | 2014-02-15 20:10:21 -0700 | [diff] [blame] | 13 | NFD_LOG_INIT("Strategy"); |
| 14 | |
Junxiao Shi | bb5105f | 2014-03-03 12:06:45 -0700 | [diff] [blame] | 15 | Strategy::Strategy(Forwarder& forwarder, const Name& name) |
| 16 | : m_name(name) |
| 17 | , m_forwarder(forwarder) |
Junxiao Shi | 7bb0151 | 2014-03-05 21:34:09 -0700 | [diff] [blame] | 18 | , m_measurements(m_forwarder.getMeasurements(), |
| 19 | m_forwarder.getStrategyChoice(), this) |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 20 | { |
| 21 | } |
| 22 | |
| 23 | Strategy::~Strategy() |
| 24 | { |
| 25 | } |
| 26 | |
Junxiao Shi | 679e927 | 2014-02-15 20:10:21 -0700 | [diff] [blame] | 27 | void |
Junxiao Shi | 22be22c | 2014-02-16 22:53:48 -0700 | [diff] [blame] | 28 | Strategy::beforeSatisfyPendingInterest(shared_ptr<pit::Entry> pitEntry, |
| 29 | const Face& inFace, const Data& data) |
| 30 | { |
| 31 | NFD_LOG_DEBUG("beforeSatisfyPendingInterest pitEntry=" << pitEntry->getName() << |
| 32 | " inFace=" << inFace.getId() << " data=" << data.getName()); |
| 33 | } |
| 34 | |
| 35 | void |
Junxiao Shi | 679e927 | 2014-02-15 20:10:21 -0700 | [diff] [blame] | 36 | Strategy::beforeExpirePendingInterest(shared_ptr<pit::Entry> pitEntry) |
| 37 | { |
| 38 | NFD_LOG_DEBUG("beforeExpirePendingInterest pitEntry=" << pitEntry->getName()); |
| 39 | } |
| 40 | |
Junxiao Shi | 22be22c | 2014-02-16 22:53:48 -0700 | [diff] [blame] | 41 | //void |
| 42 | //Strategy::afterAddFibEntry(shared_ptr<fib::Entry> fibEntry) |
| 43 | //{ |
| 44 | // NFD_LOG_DEBUG("afterAddFibEntry fibEntry=" << fibEntry->getPrefix()); |
| 45 | //} |
| 46 | // |
| 47 | //void |
| 48 | //Strategy::afterUpdateFibEntry(shared_ptr<fib::Entry> fibEntry) |
| 49 | //{ |
| 50 | // NFD_LOG_DEBUG("afterUpdateFibEntry fibEntry=" << fibEntry->getPrefix()); |
| 51 | //} |
| 52 | // |
| 53 | //void |
| 54 | //Strategy::beforeRemoveFibEntry(shared_ptr<fib::Entry> fibEntry) |
| 55 | //{ |
| 56 | // NFD_LOG_DEBUG("beforeRemoveFibEntry fibEntry=" << fibEntry->getPrefix()); |
| 57 | //} |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 58 | |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame] | 59 | } // namespace fw |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 60 | } // namespace nfd |