blob: 8ce46c1f8d5e5036660b666908632fa4665bdcdc [file] [log] [blame]
Junxiao Shid3c792f2014-01-30 00:46:13 -07001/* -*- 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 Shi8c8d2182014-01-30 22:33:00 -07008#include "forwarder.hpp"
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -06009#include "core/logger.hpp"
Junxiao Shid3c792f2014-01-30 00:46:13 -070010
11namespace nfd {
Junxiao Shi8c8d2182014-01-30 22:33:00 -070012namespace fw {
Junxiao Shid3c792f2014-01-30 00:46:13 -070013
Junxiao Shi679e9272014-02-15 20:10:21 -070014NFD_LOG_INIT("Strategy");
15
Junxiao Shibb5105f2014-03-03 12:06:45 -070016Strategy::Strategy(Forwarder& forwarder, const Name& name)
17 : m_name(name)
18 , m_forwarder(forwarder)
Junxiao Shi7bb01512014-03-05 21:34:09 -070019 , m_measurements(m_forwarder.getMeasurements(),
20 m_forwarder.getStrategyChoice(), this)
Junxiao Shid3c792f2014-01-30 00:46:13 -070021{
22}
23
24Strategy::~Strategy()
25{
26}
27
Junxiao Shi679e9272014-02-15 20:10:21 -070028void
Junxiao Shi22be22c2014-02-16 22:53:48 -070029Strategy::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
36void
Junxiao Shi679e9272014-02-15 20:10:21 -070037Strategy::beforeExpirePendingInterest(shared_ptr<pit::Entry> pitEntry)
38{
39 NFD_LOG_DEBUG("beforeExpirePendingInterest pitEntry=" << pitEntry->getName());
40}
41
Junxiao Shi22be22c2014-02-16 22:53:48 -070042//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 Shid3c792f2014-01-30 00:46:13 -070059
Junxiao Shi8c8d2182014-01-30 22:33:00 -070060} // namespace fw
Junxiao Shid3c792f2014-01-30 00:46:13 -070061} // namespace nfd